summaryrefslogtreecommitdiff
path: root/libavcodec/mpeg12.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-08-26 23:25:29 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-08-26 23:25:29 +0000
commit8ee552f69c615c377fa69adac7bc801f7fe6f7ed (patch)
tree616549e85dec2b5c8f5f5ad0c59ee87076aa1656 /libavcodec/mpeg12.c
parentd63f529df7156ff3a38f8efb00fc46b10bac1f62 (diff)
simplify mpeg12 avctx->pix_fmt set
Originally committed as revision 14986 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpeg12.c')
-rw-r--r--libavcodec/mpeg12.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index a48a84bd28..a7272d506b 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -68,9 +68,6 @@ extern int XVMC_field_end(MpegEncContext *s);
extern void XVMC_pack_pblocks(MpegEncContext *s,int cbp);
extern void XVMC_init_block(MpegEncContext *s);//set s->block
-static const enum PixelFormat pixfmt_yuv_420[]= {PIX_FMT_YUV420P,PIX_FMT_NONE};
-static const enum PixelFormat pixfmt_yuv_422[]= {PIX_FMT_YUV422P,PIX_FMT_NONE};
-static const enum PixelFormat pixfmt_yuv_444[]= {PIX_FMT_YUV444P,PIX_FMT_NONE};
static const enum PixelFormat pixfmt_xvmc_mpg2_420[] = {
PIX_FMT_XVMC_MPEG2_IDCT,
PIX_FMT_XVMC_MPEG2_MC,
@@ -1293,13 +1290,13 @@ static int mpeg_decode_postinit(AVCodecContext *avctx){
avctx->pix_fmt = avctx->get_format(avctx,pixfmt_xvmc_mpg2_420);
}else{
if(s->chroma_format < 2){
- avctx->pix_fmt = avctx->get_format(avctx,pixfmt_yuv_420);
+ avctx->pix_fmt = PIX_FMT_YUV420P;
}else
if(s->chroma_format == 2){
- avctx->pix_fmt = avctx->get_format(avctx,pixfmt_yuv_422);
+ avctx->pix_fmt = PIX_FMT_YUV422P;
}else
if(s->chroma_format > 2){
- avctx->pix_fmt = avctx->get_format(avctx,pixfmt_yuv_444);
+ avctx->pix_fmt = PIX_FMT_YUV444P;
}
}
//until then pix_fmt may be changed right after codec init
@@ -2058,7 +2055,7 @@ static int vcr2_init_sequence(AVCodecContext *avctx)
if(avctx->xvmc_acceleration){
avctx->pix_fmt = avctx->get_format(avctx,pixfmt_xvmc_mpg2_420);
}else{
- avctx->pix_fmt = avctx->get_format(avctx,pixfmt_yuv_420);
+ avctx->pix_fmt = PIX_FMT_YUV420P;
}
if( avctx->pix_fmt == PIX_FMT_XVMC_MPEG2_IDCT )