From: Derk-Jan Hartman Date: Wed, 23 Jul 2008 00:39:18 +0000 (+0200) Subject: theora: Add support for YUV422 and YUV444 output of libtheora . This fixes sample X-Git-Tag: 0.9.0-test3~308 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=737ec46d8948035ddf6fcb7c09ced4a671de26ae;p=vlc theora: Add support for YUV422 and YUV444 output of libtheora . This fixes sample http://v2v.cc/~j/theora_testsuite/mobile_itu601_i_422.ogg in ticket #1456 --- diff --git a/modules/codec/theora.c b/modules/codec/theora.c index ba49b4c6af..ff9c93747c 100644 --- a/modules/codec/theora.c +++ b/modules/codec/theora.c @@ -283,6 +283,22 @@ static int ProcessHeaders( decoder_t *p_dec ) } /* Set output properties */ + switch( p_sys->ti.pixelformat ) + { + case OC_PF_420: + p_dec->fmt_out.i_codec = VLC_FOURCC( 'I','4','2','0' ); + break; + case OC_PF_422: + p_dec->fmt_out.i_codec = VLC_FOURCC( 'I','4','2','2' ); + break; + case OC_PF_444: + p_dec->fmt_out.i_codec = VLC_FOURCC( 'I','4','4','4' ); + break; + case OC_PF_RSVD: + default: + msg_Err( p_dec, "unknown chroma in theora sample" ); + break; + } p_dec->fmt_out.video.i_width = p_sys->ti.width; p_dec->fmt_out.video.i_height = p_sys->ti.height; if( p_sys->ti.frame_width && p_sys->ti.frame_height )