[vlc-devel] [PATCH 2/3] rawvideo: fix sign for yuv2 chroma
Rémi Denis-Courmont
remi at remlab.net
Sat Apr 2 10:23:48 CEST 2016
On Saturday 02 April 2016 01:37:20 Tristan Matthews wrote:
> 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;
> + }
> + }
That can´t be right. If you modify the pixels, you can´t have the same coding
in and out.
> p_src += p_sys->pitches[i];
> p_dst += p_pic->p[i].i_pitch;
> }
--
Rémi Denis-Courmont
http://www.remlab.net/
More information about the vlc-devel
mailing list