diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2013-02-18 08:15:52 -0800 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2013-03-06 21:18:50 +0200 |
commit | 8d061989dd0397da15aa29f52d243fe125bf2f5e (patch) | |
tree | 699546f4517dee6841f701ff8282c366e0efb22b /libavcodec/vc1dec.c | |
parent | 5a4e9fe855282a99586050a507d0a486ad39df5b (diff) | |
download | ffmpeg-8d061989dd0397da15aa29f52d243fe125bf2f5e.tar.gz |
lavc: Split out ff_hwaccel_pixfmt_list_420[] over individual codecs
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.
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec/vc1dec.c')
-rw-r--r-- | libavcodec/vc1dec.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c index 403bac8fff..6a76b1dc06 100644 --- a/libavcodec/vc1dec.c +++ b/libavcodec/vc1dec.c @@ -5687,6 +5687,20 @@ static const AVProfile profiles[] = { { FF_PROFILE_UNKNOWN }, }; +static const enum AVPixelFormat vc1_hwaccel_pixfmt_list_420[] = { +#if CONFIG_DXVA2 + AV_PIX_FMT_DXVA2_VLD, +#endif +#if CONFIG_VAAPI + AV_PIX_FMT_VAAPI_VLD, +#endif +#if CONFIG_VDPAU + AV_PIX_FMT_VDPAU, +#endif + AV_PIX_FMT_YUV420P, + AV_PIX_FMT_NONE +}; + AVCodec ff_vc1_decoder = { .name = "vc1", .type = AVMEDIA_TYPE_VIDEO, @@ -5698,7 +5712,7 @@ AVCodec ff_vc1_decoder = { .flush = ff_mpeg_flush, .capabilities = CODEC_CAP_DR1 | CODEC_CAP_DELAY, .long_name = NULL_IF_CONFIG_SMALL("SMPTE VC-1"), - .pix_fmts = ff_hwaccel_pixfmt_list_420, + .pix_fmts = vc1_hwaccel_pixfmt_list_420, .profiles = NULL_IF_CONFIG_SMALL(profiles) }; @@ -5714,7 +5728,7 @@ AVCodec ff_wmv3_decoder = { .flush = ff_mpeg_flush, .capabilities = CODEC_CAP_DR1 | CODEC_CAP_DELAY, .long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 9"), - .pix_fmts = ff_hwaccel_pixfmt_list_420, + .pix_fmts = vc1_hwaccel_pixfmt_list_420, .profiles = NULL_IF_CONFIG_SMALL(profiles) }; #endif |