[FFmpeg-devel] [PATCH] Do not offer unsupported HWAccel PIX_FMT.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Mon Apr 4 21:20:20 CEST 2011


Only fixes MPEG-1/MPEG-2 as a first step.
---
 libavcodec/mpeg12.c |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index 4a17299..9afe8c3 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -1217,21 +1217,31 @@ static void quant_matrix_rebuild(uint16_t *matrix, const uint8_t *old_perm,
 }
 
 static const enum PixelFormat mpeg1_hwaccel_pixfmt_list_420[] = {
+#if CONFIG_MPEG_XVMC_DECODER
     PIX_FMT_XVMC_MPEG2_IDCT,
     PIX_FMT_XVMC_MPEG2_MC,
+#endif
+#if CONFIG_MPEG1_VDPAU_HWACCEL
     PIX_FMT_VDPAU_MPEG1,
-    PIX_FMT_DXVA2_VLD,
-    PIX_FMT_VAAPI_VLD,
+#endif
     PIX_FMT_YUV420P,
     PIX_FMT_NONE
 };
 
 static const enum PixelFormat mpeg2_hwaccel_pixfmt_list_420[] = {
+#if CONFIG_MPEG_XVMC_DECODER
     PIX_FMT_XVMC_MPEG2_IDCT,
     PIX_FMT_XVMC_MPEG2_MC,
+#endif
+#if CONFIG_MPEG2_VDPAU_HWACCEL
     PIX_FMT_VDPAU_MPEG2,
+#endif
+#if CONFIG_MPEG2_DXVA2_HWACCEL
     PIX_FMT_DXVA2_VLD,
+#endif
+#if CONFIG_MPEG2_VAAPI_HWACCEL
     PIX_FMT_VAAPI_VLD,
+#endif
     PIX_FMT_YUV420P,
     PIX_FMT_NONE
 };
-- 
1.7.4.1



More information about the ffmpeg-devel mailing list