[FFmpeg-devel] [PATCH] split out ff_hwaccel_pixfmt_list_420[] over individual codecs.

Michael Niedermayer michaelni at gmx.at
Mon Feb 18 16:29:23 CET 2013


On Sun, Feb 17, 2013 at 08:50:24PM -0800, Ronald S. Bultje wrote:
> From: "Ronald S. Bultje" <rsbultje at gmail.com>
> 
> Not all hwaccels implement all codecs, so using one single list for
> multiple such codecs means some codecs will be represented in the list,
> even though they don't actually handle that codec. Copying specific
> lists in each codec fixes that.

[...]
> diff --git a/libavcodec/h264.c b/libavcodec/h264.c
> index f1bfea6..0614b1f 100644
> --- a/libavcodec/h264.c
> +++ b/libavcodec/h264.c
> @@ -68,6 +68,23 @@ static const uint8_t div6[QP_MAX_NUM + 1] = {
>     14,14,14,14,
>  };
>  
> +static const enum AVPixelFormat hwaccel_pixfmt_list_h264_420[] = {
> +#if CONFIG_H264_DXVA2_HWACCEL
> +    AV_PIX_FMT_DXVA2_VLD,
> +#endif
> +#if CONFIG_H264_VAAPI_HWACCEL
> +    AV_PIX_FMT_VAAPI_VLD,
> +#endif
> +#if CONFIG_H264_VDA_HWACCEL
> +    AV_PIX_FMT_VDA_VLD,
> +#endif
> +#if CONFIG_H264_VDPAU_HWACCEL
> +    AV_PIX_FMT_VDPAU,
> +#endif

> +    AV_PIX_FMT_YUVJ420P,

this looks wrong


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

Rewriting code that is poorly written but fully understood is good.
Rewriting code that one doesnt understand is a sign that one is less smart
then the original author, trying to rewrite it will not make it better.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130218/f0f80e07/attachment.asc>


More information about the ffmpeg-devel mailing list