diff h263dec.c @ 9028:0f95e4f0a3f5 libavcodec

Add and use ff_pixfmt_list_420.
author michael
date Tue, 24 Feb 2009 18:27:52 +0000
parents 3c141db76660
children e10f554d8fb7
line wrap: on
line diff
--- a/h263dec.c	Tue Feb 24 18:24:56 2009 +0000
+++ b/h263dec.c	Tue Feb 24 18:27:52 2009 +0000
@@ -52,7 +52,7 @@
     s->quant_precision=5;
     s->decode_mb= ff_h263_decode_mb;
     s->low_delay= 1;
-    avctx->pix_fmt= PIX_FMT_YUV420P;
+    avctx->pix_fmt= avctx->get_format(avctx, avctx->codec->pix_fmts);
     s->unrestricted_mv= 1;
 
     /* select sub codec */
@@ -725,6 +725,7 @@
     CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY,
     .flush= ff_mpeg_flush,
     .long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2"),
+    .pix_fmts= ff_pixfmt_list_420,
 };
 
 AVCodec h263_decoder = {
@@ -739,6 +740,7 @@
     CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY,
     .flush= ff_mpeg_flush,
     .long_name= NULL_IF_CONFIG_SMALL("H.263 / H.263-1996, H.263+ / H.263-1998"),
+    .pix_fmts= ff_pixfmt_list_420,
 };
 
 AVCodec msmpeg4v1_decoder = {
@@ -752,6 +754,7 @@
     ff_h263_decode_frame,
     CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1,
     .long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 1"),
+    .pix_fmts= ff_pixfmt_list_420,
 };
 
 AVCodec msmpeg4v2_decoder = {
@@ -765,6 +768,7 @@
     ff_h263_decode_frame,
     CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1,
     .long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 2"),
+    .pix_fmts= ff_pixfmt_list_420,
 };
 
 AVCodec msmpeg4v3_decoder = {
@@ -778,6 +782,7 @@
     ff_h263_decode_frame,
     CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1,
     .long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 3"),
+    .pix_fmts= ff_pixfmt_list_420,
 };
 
 AVCodec wmv1_decoder = {
@@ -791,6 +796,7 @@
     ff_h263_decode_frame,
     CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1,
     .long_name= NULL_IF_CONFIG_SMALL("Windows Media Video 7"),
+    .pix_fmts= ff_pixfmt_list_420,
 };
 
 AVCodec h263i_decoder = {
@@ -804,6 +810,7 @@
     ff_h263_decode_frame,
     CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1,
     .long_name = NULL_IF_CONFIG_SMALL("Intel H.263"),
+    .pix_fmts= ff_pixfmt_list_420,
 };
 
 AVCodec flv_decoder = {
@@ -817,4 +824,5 @@
     ff_h263_decode_frame,
     CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1,
     .long_name= NULL_IF_CONFIG_SMALL("Flash Video"),
+    .pix_fmts= ff_pixfmt_list_420,
 };