Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 928985 - media-video/ffmpeg[nvenc] : error compiling: NV_ENC_CONFIG_HEVC has no member named pixelBitDepthMinus8
Summary: media-video/ffmpeg[nvenc] : error compiling: NV_ENC_CONFIG_HEVC has no member...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Gentoo Media-video project
URL: https://www.linuxquestions.org/questi...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-09 08:15 UTC by Davide Palma
Modified: 2024-06-07 12:01 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Davide Palma 2024-04-09 08:15:33 UTC
Hello,
After emerging media-libs/nv-codec-headers-12.1.14.0 , compiling ffmpeg with nvenc USE flag will fail with:
src/libavcodec/nvenc.c: In function ‘nvenc_setup_hevc_config’:
src/libavcodec/nvenc.c:1373:9: error: ‘NV_ENC_CONFIG_HEVC’ has no member named ‘pixelBitDepthMinus8’
 1373 |     hevc->pixelBitDepthMinus8 = IS_10BIT(ctx->data_pix_fmt) ? 2 : 0;
      |         ^~

Reproducible: Always

Steps to Reproduce:
1. emerge >=media-libs/nv-codec-headers-12.1.14.0
2. emerge =media-video/ffmpeg-6.1.1-r5::gentoo with nvenc USE flag
Actual Results:  
not compiling

Expected Results:  
compiling

The issue is explained quite well here:  
https://www.linuxquestions.org/questions/slackware-14/requests-for-current-next-15-0-15-1-a-4175706801/page274.html#post6493753  

In short, the issue is fixed upstream and included in ffmpeg 7.0, which however is not in portage for now.

I do not know about upstream policies of backporting so either a patch should be added to the ebuild, or wait for backport, or just bump to 7.0.

I didn't try but I guess emerging without nvenc USE flag would work, and/or using an older media-libs/nv-codec-headers .
Comment 1 Ionen Wolkens gentoo-dev 2024-04-09 08:26:32 UTC
Odd, it doesn't fail for me, and it shouldn't.

[ebuild   R   ] media-libs/nv-codec-headers-12.1.14.0
[ebuild   R   ] media-video/ffmpeg-6.1.1-r5  USE="... nvenc .."

The $URL (and the github commit) seems to implies it's an issue introduced with nv-codec-headers-12.2 or so but it hasn't been added to the tree yet and this is 12.1

The fix, in fact checks for if the version is >12.2 and does nothing otherwise

    // SDK 12.2 compile time feature checks
    #if NVENCAPI_CHECK_VERSION(12, 2)

Do you have other newer headers somewhere?
Comment 2 Ionen Wolkens gentoo-dev 2024-04-09 08:32:28 UTC
(In reply to Ionen Wolkens from comment #1)
> Do you have other newer headers somewhere?
(not that ffmpeg ebuild couldn't prepare for this by either backporting or putting an upper bound for older branches, so it doesn't make this bug invalid if so)
Comment 3 Davide Palma 2024-04-09 08:37:50 UTC
Whoops! That's right, I currently have installed:  
media-libs/nv-codec-headers-12.2.72.0::stefantalpalaru  
I got fooled by the fact that i've looked in /var/log/emerge.log for recent updates and only ::gentoo packages are written there, for some reason.
Well, in case >=media-libs/nv-codec-headers-12.2 gets added to ::gentoo, we already know about this. Sorry for the inconvenience :)
Comment 4 Davide Palma 2024-06-07 12:01:40 UTC
I can't reproduce anymore with =dev-util/nvidia-cuda-toolkit-12.5.0::gentoo.