mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-25 12:15:32 +03:00
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
26 lines
952 B
Diff
26 lines
952 B
Diff
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)
|