[vlc-commits] chroma: fix chroma copy tests on big endian

Natanael Copa git at videolan.org
Fri Dec 22 20:07:03 CET 2017


vlc/vlc-3.0 | branch: master | Natanael Copa <ncopa at alpinelinux.org> | Wed Dec 20 15:56:24 2017 +0000| [35db70ce953dee726c97ff318d77f1005bed093d] | committer: Jean-Baptiste Kempf

chroma: fix chroma copy tests on big endian

Signed-off-by: Natanael Copa <ncopa at alpinelinux.org>
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>
(cherry picked from commit 9e0b898f17058fc0621e2dbe88a4bc52f56b642f)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=35db70ce953dee726c97ff318d77f1005bed093d
---

 modules/video_chroma/copy.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/video_chroma/copy.c b/modules/video_chroma/copy.c
index 811e77df49..cb45e23c7b 100644
--- a/modules/video_chroma/copy.c
+++ b/modules/video_chroma/copy.c
@@ -986,10 +986,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 = ntoh16(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] = { ntoh16(0x1042), ntoh16(0xF114), ntoh16(0x3645) };
+    const uint32_t color_16_UV = ntoh32(0xF1143645);
 
     assert(dsc->pixel_size == 1 || dsc->pixel_size == 2);
     if (dsc->pixel_size == 1)



More information about the vlc-commits mailing list