[FFmpeg-cvslog] h264/mpegvideo: do not provide pixel formats for hwaccels that are not compiled in

Anton Khirnov git at videolan.org
Sat Dec 21 02:49:09 CET 2013


ffmpeg | branch: release/1.1 | Anton Khirnov <anton at khirnov.net> | Fri Nov 29 13:18:29 2013 +0100| [718a2ddcb898d8465c6715ac1a6627ca67dc6a22] | committer: Anton Khirnov

h264/mpegvideo: do not provide pixel formats for hwaccels that are not compiled in

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=718a2ddcb898d8465c6715ac1a6627ca67dc6a22
---

 libavcodec/h264.c      |    6 ++++++
 libavcodec/mpegvideo.c |    6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 8625b0f..29c8196 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 0274f01..2f65779 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
 };



More information about the ffmpeg-cvslog mailing list