Repository navigation
feat: decode H.265 and AV1 with NVDEC on Linux - #353
Merged
Merged
Conversation
The NVDEC decoders decoded H.264 and VP9. They now decode H.265 (Main profile) and AV1 (profile 0) as well, where the GPU does (AV1 since Ampere), asking the driver which codecs it decodes. NVDEC's parser takes the bitstream, so a codec is mostly a matter of telling it which. NVDEC's AV1 parser takes temporal units, which begin with a temporal delimiter, and WebRTC's AV1 frames come without one, so one is put in front. Frames of AV1 spatial layers above the first go to dav1d, as those of VP9 go to libvpx. H.265 has no software decoder to fall back to: what NVDEC cannot decode is an error, and WebRTC asks for a key frame. With NVENC's H.265, NVIDIA GPUs on Linux now carry H.265 calls both ways.
devopvoid
force-pushed
the
feat/nvdec-hevc-av1
branch
from
October 11, 2026 20:52
e6597de to
08a1215
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Brings #350 to
main. #350 was merged intofeat/windows-hevc-codecsafter that branch had already gone tomainwith #347, so its change never reachedmain. This is its squash commit (931b5e8) applied tomain; the only codec code that differs betweenmainand #350's base is #348's VP9 encoder, which touches no NVDEC or Linux file.The NVDEC decoders on Linux decoded H.264 and VP9. They now decode H.265 (Main profile) and AV1 (profile 0) too, where the GPU does (AV1 since Ampere):
NvdecLibraryasks the driver (cuvidGetDecoderCaps) for H.265 and AV1 as it does for the others, and the factory offers what the GPU decodes: H.265 in theH265Formatof feat: encode and decode H.265 in hardware on Windows #347, AV1 in profile 0.With NVENC's H.265 from #347, an NVIDIA GPU on Linux now carries H.265 calls both ways.
Rebased onto
mainafter #352: where both describe Linux decoding (the hardware decoding table in the codec guide, the Javadoc ofHardwareVideoDecoderFactoryand the comment inLinuxHardwareVideoCodecFactories.cpp), the text now names NVDEC's four codecs and VA-API's VP9 decoder, when turned on. The code is #350's as it was.Testing
hardwareDecodesH265andhardwareCropsPaddedH265with NVENC and NVDEC, and the AV1 decoder tests.Not verified
Nothing here has run on an NVIDIA GPU under Linux: there is none here, and CI has no GPU, where the hardware tests skip. In particular whether NVDEC's AV1 parser needs the temporal delimiter, which is harmless if it does not.