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

This commit is contained in:
Anton Khirnov
2013-11-29 13:18:29 +01:00
parent bd405475ce
commit 718a2ddcb8
2 changed files with 12 additions and 0 deletions

View File

@@ -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
};

View File

@@ -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
};