[FFmpeg-devel] [PATCH] HWAccel infrastructure (take 7.2)

Michael Niedermayer michaelni
Tue Feb 24 15:34:30 CET 2009


On Tue, Feb 24, 2009 at 03:19:27PM +0100, Gwenole Beauchesne wrote:
> On Mon, 23 Feb 2009, Michael Niedermayer wrote:
>
> [ff_query_pixfmt()]
>> thus all calls to this function can be replaced by
>> return avctx->get_format(avctx, avctx->codec->pix_fmts);
>>
>> and ff_query_pixfmt() droped
>
> New patch attached.

[...]
> diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
> index d2c8fd1..ed3f96b 100644
> --- a/libavcodec/h263dec.c
> +++ b/libavcodec/h263dec.c
> @@ -36,6 +36,35 @@
>  //#define DEBUG
>  //#define PRINT_FRAME_TIME
>  
> +/**
> + * Allowed pixel formats for H.263 codec (4:2:0 chroma format)
> + * Note: HW accelerated formats shall come first
> + */
> +static const enum PixelFormat h263_pixfmt_list_420[] = {
> +    PIX_FMT_YUV420P,
> +    PIX_FMT_NONE
> +};
> +
> +/**
> + * Allowed pixel formats for MPEG-4 codec (4:2:0 chroma format)
> + * Note: HW accelerated formats shall come first
> + */
> +static const enum PixelFormat mpeg4_pixfmt_list_420[] = {
> +    PIX_FMT_YUV420P,
> +    PIX_FMT_NONE
> +};

duplicate


> +
> +/** Returns the pixel format list for the specified codec (4:2:0 chroma format) */
> +static inline const enum PixelFormat *get_pixfmt_list(enum CodecID codec_id)
> +{
> +    switch (codec_id) {
> +    case CODEC_ID_H263:  return h263_pixfmt_list_420;
> +    case CODEC_ID_MPEG4: return mpeg4_pixfmt_list_420;
> +    default: assert(0);
> +    }
> +    return NULL;
> +}
> +
>  av_cold int ff_h263_decode_init(AVCodecContext *avctx)
>  {
>      MpegEncContext *s = avctx->priv_data;

this makes no sense

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Into a blind darkness they enter who follow after the Ignorance,
they as if into a greater darkness enter who devote themselves
to the Knowledge alone. -- Isha Upanishad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090224/bad27558/attachment.pgp>



More information about the ffmpeg-devel mailing list