[FFmpeg-cvslog] hwaccel: do not offer unsupported pixel formats

Rémi Denis-Courmont git at videolan.org
Sun Jan 27 16:34:44 CET 2013


ffmpeg | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Jan 26 22:47:55 2013 +0200| [78bc4d69ebe6189395e5c7e4719ddef50bc943ba] | committer: Luca Barbato

hwaccel: do not offer unsupported pixel formats

Signed-off-by: Luca Barbato <lu_zero at gentoo.org>

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

 libavcodec/h264.c      |    8 ++++++++
 libavcodec/mpegvideo.c |    8 ++++++++
 2 files changed, 16 insertions(+)

diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 62288b0..ffe7586 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -60,10 +60,18 @@ 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
+#if CONFIG_H264_VDPAU_HWACCEL
     AV_PIX_FMT_VDPAU,
+#endif
     AV_PIX_FMT_YUVJ420P,
     AV_PIX_FMT_NONE
 };
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 6320fbc..a4105a5 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -131,10 +131,18 @@ const enum AVPixelFormat ff_pixfmt_list_420[] = {
 };
 
 const enum AVPixelFormat ff_hwaccel_pixfmt_list_420[] = {
+#if CONFIG_DXVA2
     AV_PIX_FMT_DXVA2_VLD,
+#endif
+#if CONFIG_VAAPI
     AV_PIX_FMT_VAAPI_VLD,
+#endif
+#if CONFIG_VDA
     AV_PIX_FMT_VDA_VLD,
+#endif
+#if CONFIG_VDPAU
     AV_PIX_FMT_VDPAU,
+#endif
     AV_PIX_FMT_YUV420P,
     AV_PIX_FMT_NONE
 };



More information about the ffmpeg-cvslog mailing list