summaryrefslogtreecommitdiff
path: root/libavcodec/h264.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/h264.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/h264.c')
-rw-r--r--libavcodec/h264.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 24d4a49c3c..ba16b2f306 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_YUV420P,
+ AV_PIX_FMT_NONE
+};
+
static const enum AVPixelFormat hwaccel_pixfmt_list_h264_jpeg_420[] = {
#if CONFIG_H264_DXVA2_HWACCEL
AV_PIX_FMT_DXVA2_VLD,
@@ -2914,7 +2931,7 @@ static enum PixelFormat get_pixel_format(H264Context *h)
h->avctx->codec->pix_fmts :
h->avctx->color_range == AVCOL_RANGE_JPEG ?
hwaccel_pixfmt_list_h264_jpeg_420 :
- ff_hwaccel_pixfmt_list_420;
+ hwaccel_pixfmt_list_h264_420;
for (i=0; fmt[i] != AV_PIX_FMT_NONE; i++)
if (fmt[i] == h->avctx->pix_fmt)