Skip to content

Commit a797f40

Browse files
ManojBondaphilipl
authored andcommitted
vdpau: Enable HEVC support based on working Nvidia driver versions
Patch https://patchwork.ffmpeg.org/patch/4172/ has disabled use of HEVC by default with the generic hwaccel API if it's the NVIDIA native implementation. This is due to the retrieved decoded YUV data, or the surfaces mapped with GL interop,results in interlacing artifacts with NVIDIA native implementation The issues of 1)VDPAU H.265/HEVC read-back API causing interlaced artifacts 2)HEVC VDPAU OpenGL interop having artifacts Have been addressed in Nvidia driver releases 384.59 and 410.66 respectively.Hence Enabling the VDPAU HEVC support based on the Nvidia driver version.
1 parent 32d021c commit a797f40

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

libavcodec/vdpau.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,12 @@ int ff_vdpau_common_init(AVCodecContext *avctx, VdpDecoderProfile profile,
208208
return vdpau_error(status);
209209
if (avctx->codec_id == AV_CODEC_ID_HEVC && strncmp(info_string, "NVIDIA ", 7) == 0 &&
210210
!(avctx->hwaccel_flags & AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH)) {
211-
av_log(avctx, AV_LOG_VERBOSE, "HEVC with NVIDIA VDPAU drivers is buggy, skipping.\n");
212-
return AVERROR(ENOTSUP);
211+
int driver_version;
212+
sscanf(info_string, "NVIDIA VDPAU Driver Shared Library %d", &driver_version);
213+
if (driver_version < 410) {
214+
av_log(avctx, AV_LOG_VERBOSE, "HEVC with NVIDIA VDPAU drivers is buggy, skipping.\n");
215+
return AVERROR(ENOTSUP);
216+
}
213217
}
214218

215219
status = vdctx->get_proc_address(vdctx->device,

0 commit comments

Comments
 (0)