]> git.sesse.net Git - vlc/commitdiff
theora: Add support for YUV422 and YUV444 output of libtheora . This fixes sample
authorDerk-Jan Hartman <hartman@videolan.org>
Wed, 23 Jul 2008 00:39:18 +0000 (02:39 +0200)
committerDerk-Jan Hartman <hartman@videolan.org>
Wed, 23 Jul 2008 00:39:18 +0000 (02:39 +0200)
http://v2v.cc/~j/theora_testsuite/mobile_itu601_i_422.ogg in ticket #1456

modules/codec/theora.c

index ba49b4c6af8a655cc175aede9906fcc257ee03fb..ff9c93747c257261b80df5810988b05f4a4cb010 100644 (file)
@@ -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 )