aboutsummaryrefslogtreecommitdiffstats
path: root/community/vlc/fix-test-endian.patch
blob: 3b08e068acc47b4dd7e4f8ca9952edba617f1405 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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)