[vlc-commits] sepia: fix RGB indices on big endian

Rémi Denis-Courmont git at videolan.org
Mon Dec 17 18:46:12 CET 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Dec 17 19:19:38 2018 +0200| [ddc0f812095dcc4f50d036bb65bc0692f960184a] | committer: Rémi Denis-Courmont

sepia: fix RGB indices on big endian

This probably never worked.

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

 modules/video_filter/filter_picture.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/video_filter/filter_picture.h b/modules/video_filter/filter_picture.h
index 28fb4d5727..10015cf7e4 100644
--- a/modules/video_filter/filter_picture.h
+++ b/modules/video_filter/filter_picture.h
@@ -98,7 +98,7 @@ static inline int GetPackedRgbIndexes( const video_format_t *p_fmt, int *i_r_ind
         return VLC_EGENERIC;
 
 #ifdef WORDS_BIGENDIAN
-    const int i_mask_bits = p_fmt->i_chroma == VLC_CODEC_RGB24 ? 24 : 32;
+    const int i_mask_bits = p_fmt->i_chroma == VLC_CODEC_RGB24 ? 16 : 24;
     *i_r_index = (i_mask_bits - vlc_ctz(p_fmt->i_rmask) / 8;
     *i_g_index = (i_mask_bits - vlc_ctz(p_fmt->i_gmask) / 8;
     *i_b_index = (i_mask_bits - vlc_ctz(p_fmt->i_bmask) / 8;



More information about the vlc-commits mailing list