aboutsummaryrefslogtreecommitdiffstats
path: root/community/vlc/fix-test-endian.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2017-12-21 21:04:24 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2017-12-21 21:08:42 +0000
commit3e7dea2bd24e43e23f57cd06dd843511ede820dd (patch)
tree3d35ab14504dd531d0abe95cfef0e12decbd3b2d /community/vlc/fix-test-endian.patch
parent105b55a0905441b9cb8128fbd658b86c5a627ba2 (diff)
downloadaports-3e7dea2bd24e43e23f57cd06dd843511ede820dd.tar.bz2
aports-3e7dea2bd24e43e23f57cd06dd843511ede820dd.tar.xz
community/vlc: fix test on s390x and x86
fix a bug in chroma copy test which affect big endian systems https://mailman.videolan.org/pipermail/vlc-devel/2017-December/117062.html Work around a bug that apparently only affects x86 and s390x. https://trac.videolan.org/vlc/ticket/19321
Diffstat (limited to 'community/vlc/fix-test-endian.patch')
-rw-r--r--community/vlc/fix-test-endian.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/community/vlc/fix-test-endian.patch b/community/vlc/fix-test-endian.patch
new file mode 100644
index 0000000000..3b08e068ac
--- /dev/null
+++ b/community/vlc/fix-test-endian.patch
@@ -0,0 +1,26 @@
+diff --git a/modules/video_chroma/copy.c b/modules/video_chroma/copy.c
+index 67e147637b..d9b029274c 100644
+--- a/modules/video_chroma/copy.c
++++ b/modules/video_chroma/copy.c
+@@ -34,6 +34,7 @@
+ #include <vlc_picture.h>
+ #include <vlc_cpu.h>
+ #include <assert.h>
++#include <arpa/inet.h>
+
+ #include "copy.h"
+
+@@ -983,10 +984,10 @@ static void piccheck(picture_t *pic, const vlc_chroma_description_t *dsc,
+
+ assert(pic->i_planes == 2 || pic->i_planes == 3);
+ const uint8_t colors_8_P[3] = { 0x42, 0xF1, 0x36 };
+- const uint16_t color_8_UV = 0x36F1;
++ const uint16_t color_8_UV = ntohs(0xF136);
+
+- const uint16_t colors_16_P[3] = { 0x4210, 0x14F1, 0x4536 };
+- const uint32_t color_16_UV = 0x453614F1;
++ const uint16_t colors_16_P[3] = { ntohs(0x1042), ntohs(0xF114), ntohs(0x3645) };
++ const uint32_t color_16_UV = ntohl(0xF1143645);
+
+ assert(dsc->pixel_size == 1 || dsc->pixel_size == 2);
+ if (dsc->pixel_size == 1)