summaryrefslogtreecommitdiff
path: root/libavcodec/vc1dec.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2013-02-18 08:15:52 -0800
committerMichael Niedermayer <michaelni@gmx.at>2013-02-18 21:44:22 +0100
commite2789d3e33991a08adda1f14c4f9f5ff4b865e9b (patch)
tree11970ec41edca9243e26c5c38d2c7bacb4eaf671 /libavcodec/vc1dec.c
parent480ddf2bc9c0796493eb76203e255c4c84881947 (diff)
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: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vc1dec.c')
-rw-r--r--libavcodec/vc1dec.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 33f7426762..a3476fd08b 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -5789,6 +5789,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,
@@ -5800,7 +5814,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)
};
@@ -5816,7 +5830,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