[vlc-devel] [PATCH 2/3] rawvideo: fix sign for yuv2 chroma
Tristan Matthews
tmatth at videolan.org
Sat Apr 2 07:37:20 CEST 2016
Refs #16720
---
modules/codec/rawvideo.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/modules/codec/rawvideo.c b/modules/codec/rawvideo.c
index eb0f8a9..84a1346 100644
--- a/modules/codec/rawvideo.c
+++ b/modules/codec/rawvideo.c
@@ -206,6 +206,12 @@ static void FillPicture( decoder_t *p_dec, block_t *p_block, picture_t *p_pic )
for( int x = 0; x < p_pic->p[i].i_visible_lines; x++ )
{
memcpy( p_dst, p_src, p_pic->p[i].i_visible_pitch );
+ /*Fix chroma sign.*/
+ if( p_dec->fmt_in.i_codec == VLC_CODEC_YUV2 ) {
+ for( int y = 0; y < p_pic->p[i].i_visible_pitch; y++ ) {
+ p_dst[2*y + 1] ^= 0x80;
+ }
+ }
p_src += p_sys->pitches[i];
p_dst += p_pic->p[i].i_pitch;
}
--
1.9.1
More information about the vlc-devel
mailing list