[FFmpeg-cvslog] r16453 - trunk/libavcodec/mpeg12.c
Måns Rullgård
mans
Tue Jan 6 16:49:13 CET 2009
cehoyos wrote:
> Author: cehoyos
> Date: Tue Jan 6 16:16:33 2009
> New Revision: 16453
>
> Log:
> Factorise setting of avctx->pix_fmt.
>
> Modified:
> trunk/libavcodec/mpeg12.c
>
> Modified: trunk/libavcodec/mpeg12.c
> ==============================================================================
> --- trunk/libavcodec/mpeg12.c Tue Jan 6 13:56:21 2009 (r16452)
> +++ trunk/libavcodec/mpeg12.c Tue Jan 6 16:16:33 2009 (r16453)
> @@ -1212,6 +1212,22 @@ static void quant_matrix_rebuild(uint16_
> }
> }
>
> +static enum PixelFormat mpeg_set_pixelformat(AVCodecContext *avctx){
> + Mpeg1Context *s1 = avctx->priv_data;
> + MpegEncContext *s = &s1->mpeg_enc_ctx;
> +
> + if(avctx->xvmc_acceleration)
> + return avctx->get_format(avctx,pixfmt_xvmc_mpg2_420);
> + else{
> + if(s->chroma_format < 2)
> + return PIX_FMT_YUV420P;
> + else if(s->chroma_format == 2)
> + return PIX_FMT_YUV422P;
> + else
> + return PIX_FMT_YUV444P;
> + }
> +}
Using "set" in the name of that function is strange when it doesn't
actually set anything. Using "get" instead seems more natural.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-cvslog
mailing list