Skip to content

cudacodec: VideoWriter fails to compile with Nvidia Video Codec SDK 12.2 #3711

@cudawarped

Description

@cudawarped

Nvidia has changed the nvEncodeAPI.h interface in the new Video Codec SDK 12.2 replacing

NV_ENC_CONFIG_HEVC::pixelBitDepthMinus8 - Specifies pixel bit depth minus 8.

with

NV_ENC_CONFIG_HEVC::outputBitDepth - Specifies pixel bit depth of encoded video.
NV_ENC_CONFIG_HEVC::inputBitDepth - Specifies pixel bit depth of video input.

resulting in the following compilation errors when building opencv_cudacodec

D:\repos\opencv\contrib\modules\cudacodec\src\NvEncoder.cpp(119): error C2039: 'pixelBitDepthMinus8': is not a member of '_NV_ENC_CONFIG_HEVC'
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.3\include\nvEncodeAPI.h(1820): note: see declaration of '_NV_ENC_CONFIG_HEVC'
D:\repos\opencv\contrib\modules\cudacodec\src\NvEncoder.cpp(174): error C2039: 'pixelBitDepthMinus8': is not a member of '_NV_ENC_CONFIG_HEVC'
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.3\include\nvEncodeAPI.h(1820): note: see declaration of '_NV_ENC_CONFIG_HEVC'

System information (version)
  • OpenCV => 4.9
  • Operating System / Platform => Windows 64 Bit
  • Compiler => Visual Studio 2022
Steps to reproduce

Build opencv_cudacodec against Nvidia Video Codec SDK 12.2

Issue submission checklist
  • I report the issue, it's not a question
  • I checked the problem with documentation, FAQ, open issues,
    forum.opencv.org, Stack Overflow, etc and have not found any solution
  • I updated to the latest OpenCV version and the issue is still there
  • There is reproducer code and related data files: videos, images, onnx, etc

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions