aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-11-29 13:18:29 +0100
committerAnton Khirnov <anton@khirnov.net>2013-11-29 20:09:44 +0100
commit718a2ddcb898d8465c6715ac1a6627ca67dc6a22 (patch)
tree5d3f5d0e8c55e026953a9aba371fa6be3594706a
parentbd405475ceb38c01088cc9cf1838b23bdd8f685f (diff)
downloadffmpeg-718a2ddcb898d8465c6715ac1a6627ca67dc6a22.tar.gz
h264/mpegvideo: do not provide pixel formats for hwaccels that are not compiled in
-rw-r--r--libavcodec/h264.c6
-rw-r--r--libavcodec/mpegvideo.c6
2 files changed, 12 insertions, 0 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 8625b0f392..29c81966c9 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -60,9 +60,15 @@ static const uint8_t div6[QP_MAX_NUM + 1] = {
};
static const enum AVPixelFormat hwaccel_pixfmt_list_h264_jpeg_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
AV_PIX_FMT_YUVJ420P,
AV_PIX_FMT_NONE
};
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 0274f01208..2f65779f2a 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -131,9 +131,15 @@ const enum AVPixelFormat ff_pixfmt_list_420[] = {
};
const enum AVPixelFormat ff_hwaccel_pixfmt_list_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
AV_PIX_FMT_YUV420P,
AV_PIX_FMT_NONE
};