summaryrefslogtreecommitdiff
path: root/libavcodec/h263dec.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/h263dec.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/h263dec.c')
-rw-r--r--libavcodec/h263dec.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index 6b2488013d..393fd5362d 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -763,6 +763,17 @@ av_log(avctx, AV_LOG_DEBUG, "%"PRId64"\n", rdtsc()-time);
return (ret && (avctx->err_recognition & AV_EF_EXPLODE))?ret:get_consumed_bytes(s, buf_size);
}
+const enum AVPixelFormat ff_h263_hwaccel_pixfmt_list_420[] = {
+#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_h263_decoder = {
.name = "h263",
.type = AVMEDIA_TYPE_VIDEO,
@@ -776,7 +787,7 @@ AVCodec ff_h263_decoder = {
.flush = ff_mpeg_flush,
.max_lowres = 3,
.long_name = NULL_IF_CONFIG_SMALL("H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2"),
- .pix_fmts = ff_hwaccel_pixfmt_list_420,
+ .pix_fmts = ff_h263_hwaccel_pixfmt_list_420,
};
AVCodec ff_h263p_decoder = {
@@ -792,5 +803,5 @@ AVCodec ff_h263p_decoder = {
.flush = ff_mpeg_flush,
.max_lowres = 3,
.long_name = NULL_IF_CONFIG_SMALL("H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2"),
- .pix_fmts = ff_hwaccel_pixfmt_list_420,
+ .pix_fmts = ff_h263_hwaccel_pixfmt_list_420,
};