You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
vaapi_h265: Fix build failure with old libva without 10-bit surfaces
10-bit surface support was added in libva 1.6.2, earlier versions support H.265 encoding in 8-bit only.
This commit is contained in:
@@ -1236,9 +1236,15 @@ static av_cold int vaapi_encode_h265_init(AVCodecContext *avctx)
|
|||||||
ctx->va_rt_format = VA_RT_FORMAT_YUV420;
|
ctx->va_rt_format = VA_RT_FORMAT_YUV420;
|
||||||
break;
|
break;
|
||||||
case FF_PROFILE_HEVC_MAIN_10:
|
case FF_PROFILE_HEVC_MAIN_10:
|
||||||
|
#ifdef VA_RT_FORMAT_YUV420_10BPP
|
||||||
ctx->va_profile = VAProfileHEVCMain10;
|
ctx->va_profile = VAProfileHEVCMain10;
|
||||||
ctx->va_rt_format = VA_RT_FORMAT_YUV420_10BPP;
|
ctx->va_rt_format = VA_RT_FORMAT_YUV420_10BPP;
|
||||||
break;
|
break;
|
||||||
|
#else
|
||||||
|
av_log(avctx, AV_LOG_ERROR, "10-bit encoding is not "
|
||||||
|
"supported with this VAAPI version.\n");
|
||||||
|
return AVERROR(ENOSYS);
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
av_log(avctx, AV_LOG_ERROR, "Unknown H.265 profile %d.\n",
|
av_log(avctx, AV_LOG_ERROR, "Unknown H.265 profile %d.\n",
|
||||||
avctx->profile);
|
avctx->profile);
|
||||||
|
Reference in New Issue
Block a user