[FFmpeg-devel] Vulkan hevc hdr decode regression on ffmpeg master?

Andrew Randrianasulu randrianasulu at gmail.com
Wed May 14 13:31:46 EEST 2025


So I was experimenting  with Vulkan decoding in cinelerra-gg.

After some fight I get build using ffmpeg git

commit 038314bc6be2f35a82e9fba2228bcac2e4fee648 for ffmpeg

here is bunch of errors like this:

[hevc @ 0x6f7465c0] Could not find ref with POC 296
[hevc @ 0x6f7465c0] Error constructing the frame RPS.
[hevc @ 0x6f7465c0] Skipping invalid undecodable NALU: 9
[hevc @ 0x6f72ad00] Could not find ref with POC 296
[hevc @ 0x6f72ad00] Error constructing the frame RPS.
[hevc @ 0x6f72ad00] Skipping invalid undecodable NALU: 8
[hevc @ 0x6f77b3c0] Could not find ref with POC 298
[hevc @ 0x6f77b3c0] Error constructing the frame RPS.
[hevc @ 0x6f77b3c0] Skipping invalid undecodable NALU: 8
[hevc @ 0x6f789480] Could not find ref with POC 300
[hevc @ 0x6f789480] Error constructing the frame RPS.
[hevc @ 0x6f789480] Skipping invalid undecodable NALU: 1
[hevc @ 0x6f7465c0] Could not find ref with POC 300
[hevc @ 0x6f7465c0] Error constructing the frame RPS.
[hevc @ 0x6f7465c0] Skipping invalid undecodable NALU: 3
[hevc @ 0x6f72ad00] Could not find ref with POC 300
[hevc @ 0x6f72ad00] Error constructing the frame RPS.
[hevc @ 0x6f72ad00] Skipping invalid undecodable NALU: 2
[hevc @ 0x6f77b3c0] Could not find ref with POC 302
[hevc @ 0x6f77b3c0] Error constructing the frame RPS.
[hevc @ 0x6f77b3c0] Skipping invalid undecodable NALU: 2
[hevc @ 0x6f789480] Could not find ref with POC 304
[hevc @ 0x6f789480] Error constructing the frame RPS.
[hevc @ 0x6f789480] Skipping invalid undecodable NALU: 1
[hevc @ 0x6f7465c0] Could not find ref with POC 304
[hevc @ 0x6f7465c0] Error constructing the frame RPS.
[hevc @ 0x6f7465c0] Skipping invalid undecodable NALU: 3
[hevc @ 0x6f72ad00] Could not find ref with POC 304
[hevc @ 0x6f72ad00] Error constructing the frame RPS.
[hevc @ 0x6f72ad00] Skipping invalid undecodable NALU: 2
[hevc @ 0x6f77b3c0] Could not find ref with POC 306
[hevc @ 0x6f77b3c0] Error constructing the frame RPS.
[hevc @ 0x6f77b3c0] Skipping invalid undecodable NALU: 2
[hevc @ 0x6f789480] Could not find ref with POC 308
[hevc @ 0x6f789480] Error constructing the frame RPS.
[hevc @ 0x6f789480] Skipping invalid undecodable NALU: 1
[hevc @ 0x6f7465c0] Could not find ref with POC 308
[hevc @ 0x6f7465c0] Error constructing the frame RPS.
[hevc @ 0x6f7465c0] Skipping invalid undecodable NALU: 3
[hevc @ 0x6f72ad00] Could not find ref with POC 308
[hevc @ 0x6f72ad00] Error constructing the frame RPS.
[hevc @ 0x6f72ad00] Skipping invalid undecodable NALU: 2
[hevc @ 0x6f77b3c0] Could not find ref with POC 310
[hevc @ 0x6f77b3c0] Error constructing the frame RPS.
[hevc @ 0x6f77b3c0] Skipping invalid undecodable NALU: 2
[hevc @ 0x6f789480] Could not find ref with POC 312
[hevc @ 0x6f789480] Error constructing the frame RPS.
[hevc @ 0x6f789480] Skipping invalid undecodable NALU: 1
[hevc @ 0x6f7465c0] Could not find ref with POC 312
[hevc @ 0x6f7465c0] Error constructing the frame RPS.
[hevc @ 0x6f7465c0] Skipping invalid undecodable NALU: 3
[hevc @ 0x6f72ad00] Could not find ref with POC 312
[hevc @ 0x6f72ad00] Error constructing the frame RPS.
[hevc @ 0x6f72ad00] Skipping invalid undecodable NALU: 2
[hevc @ 0x6f77b3c0] Could not find ref with POC 314
[hevc @ 0x6f77b3c0] Error constructing the frame RPS.
[hevc @ 0x6f77b3c0] Skipping invalid undecodable NALU: 2
[hevc @ 0x6f789480] Could not find ref with POC 316
[hevc @ 0x6f789480] Error constructing the frame RPS.
[hevc @ 0x6f789480] Skipping invalid undecodable NALU: 1
[hevc @ 0x6f7465c0] Could not find ref with POC 316
[hevc @ 0x6f7465c0] Error constructing the frame RPS.
[hevc @ 0x6f7465c0] Skipping invalid undecodable NALU: 3
[hevc @ 0x6f72ad00] Could not find ref with POC 316
[hevc @ 0x6f72ad00] Error constructing the frame RPS.
[hevc @ 0x6f72ad00] Skipping invalid undecodable NALU: 2
[hevc @ 0x6f77b3c0] Could not find ref with POC 318
[hevc @ 0x6f77b3c0] Error constructing the frame RPS.
[hevc @ 0x6f77b3c0] Skipping invalid undecodable NALU: 2
[hevc @ 0x6f789480] Could not find ref with POC 320
[hevc @ 0x6f789480] Error constructing the frame RPS.
[hevc @ 0x6f789480] Skipping invalid undecodable NALU: 1
[hevc @ 0x6f7465c0] Could not find ref with POC 320
[hevc @ 0x6f7465c0] Error constructing the frame RPS.
[hevc @ 0x6f7465c0] Skipping invalid undecodable NALU: 3
[hevc @ 0x6f72ad00] Could not find ref with POC 320
[hevc @ 0x6f72ad00] Error constructing the frame RPS.
[hevc @ 0x6f72ad00] Skipping invalid undecodable NALU: 2
[hevc @ 0x6f77b3c0] Could not find ref with POC 322
[hevc @ 0x6f77b3c0] Error constructing the frame RPS.
[hevc @ 0x6f77b3c0] Skipping invalid undecodable NALU: 2
[hevc @ 0x6f789480] Could not find ref with POC 324
[hevc @ 0x6f789480] Error constructing the frame RPS.
[hevc @ 0x6f789480] Skipping invalid undecodable NALU: 1
[hevc @ 0x6f7465c0] Could not find ref with POC 324
[hevc @ 0x6f7465c0] Error constructing the frame RPS.
[hevc @ 0x6f7465c0] Skipping invalid undecodable NALU: 3
[hevc @ 0x6f72ad00] Could not find ref with POC 324
[hevc @ 0x6f72ad00] Error constructing the frame RPS.
[hevc @ 0x6f72ad00] Skipping invalid undecodable NALU: 2
[hevc @ 0x6f77b3c0] Could not find ref with POC 326
[hevc @ 0x6f77b3c0] Error constructing the frame RPS.
[hevc @ 0x6f77b3c0] Skipping invalid undecodable NALU: 2
[hevc @ 0x6f789480] Could not find ref with POC 328
[hevc @ 0x6f789480] Error constructing the frame RPS.
[hevc @ 0x6f789480] Skipping invalid undecodable NALU: 1
[hevc @ 0x6f7465c0] Could not find ref with POC 328
[hevc @ 0x6f7465c0] Error constructing the frame RPS.
[hevc @ 0x6f7465c0] Skipping invalid undecodable NALU: 3
[hevc @ 0x6f72ad00] Could not find ref with POC 328
[hevc @ 0x6f72ad00] Error constructing the frame RPS.
[hevc @ 0x6f72ad00] Skipping invalid undecodable NALU: 2
[hevc @ 0x6f77b3c0] Could not find ref with POC 330
[hevc @ 0x6f77b3c0] Error constructing the frame RPS.
[hevc @ 0x6f77b3c0] Skipping invalid undecodable NALU: 2
[hevc @ 0x6f789480] Could not find ref with POC 332
[hevc @ 0x6f789480] Error constructing the frame RPS.
[hevc @ 0x6f789480] Skipping invalid undecodable NALU: 1
[hevc @ 0x6f7465c0] Could not find ref with POC 332
[hevc @ 0x6f7465c0] Error constructing the frame RPS.
[hevc @ 0x6f7465c0] Skipping invalid undecodable NALU: 3

file itself:
https://drive.google.com/file/d/1Ic9DZXMSo07EJMqCFaQRKSSrSw6y1mYv/view

But I see some kind of first frame corruption I never saw on 7.0 build

https://paste.pics/860707666060d195485e07ea7b057ce8

and speed kinda down from 58 fps to just 50-51  relative to ffmpeg libs 7.0?

hw:
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc.
[AMD/ATI] Lexa PRO [Radeon 540/540X/550/550X / RX 540X/550/550X] (rev
c7)

mesa:

OpenGL renderer string: AMD Radeon RX 550 / 550 Series (radeonsi,
polaris12, ACO, DRM 3.61, 6.12.26-x64)
OpenGL core profile version string: 4.6 (Core Profile) Mesa
25.2.0-devel (git-ef63e3e4d2)

cingg home git:
git://git.cinelerra-gg.org/goodguy/cinelerra.git

I set two evn. variables specific to my system, but mostly I wanted to
get libplacebo and libzimg for HDR->SDR conversion

EXTRA_LIBS :=  -lOpenCL -lSvtAv1Enc -lvpl -ldav1d -lxvidcore -lass
-lbluray -lsnappy -lzimg -lplacebo -lshaderc_shared -lnuma -lva
-lva-x11 `pkg-config --libs x11` -lva-drm -ldl
FFMPEG_EXTRA_CFG :=  --enable-libvpl --disable-doc --enable-opencl
--enable-libsvtav1 --enable-frei0r --enable-libdav1d --enable-libzimg
--enable-libxvid --enable-libass --enable-libbluray --enable-libsnappy
--enable-libshaderc --enable-libplacebo --enable-vulkan
--disable-debug --extra-cflags=-I/usr/local/include/vpl
--extra-cflags=-I/usr/include/svt-av1 --extra-ldflags=" -lva
`pkg-config --libs libva` -lva-x11 -lva-drm -ldl"


cingg configure:

./configure --with-git-ffmpeg=https://git.ffmpeg.org/ffmpeg.git
--with-single-user --enable-libsvtav1 --disable-dav1d

I used bunch of patches (attached, done by Phyllis and me) and
manually removed posprocess.a ref. from our configure.ac for now

there is still some problem with attaching ffmpeg filters
per-input-file, but main Vulkan decode problem still visible without
any filters

I run just-compiled cin binary like this:

RADV_PERFTEST=video_decode bin/cin
~/K38_sdcard1/Documents/iPhone11_4K-recorder_59.940HDR10.mov

and got corruption as visible on screenshot  at the start of this email

Playing image forward cleans up  this corruption, but returning to
timeline beginning bring it back.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Do-not-filter-out-dynamic_input-filters.patch
Type: text/x-patch
Size: 1105 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250514/adabb95b/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-check-for-nb_inputs-before-calling-avfilter_get_.patch
Type: text/x-patch
Size: 1170 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250514/adabb95b/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Same-possible-crash-fix-in-ffstreamaudio-for-dynamic.patch
Type: text/x-patch
Size: 1120 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250514/adabb95b/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg.git.patch1
Type: application/octet-stream
Size: 281 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250514/adabb95b/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg.git.patch3
Type: application/octet-stream
Size: 2940 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250514/adabb95b/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg.git.patch2
Type: application/octet-stream
Size: 17472 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250514/adabb95b/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg.git.patch4
Type: application/octet-stream
Size: 464 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250514/adabb95b/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg.git.patch7
Type: application/octet-stream
Size: 460 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250514/adabb95b/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg.git.patch9
Type: application/octet-stream
Size: 711 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250514/adabb95b/attachment-0005.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg.git.patch5
Type: application/octet-stream
Size: 1104 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250514/adabb95b/attachment-0006.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg.git.patch10
Type: application/octet-stream
Size: 707 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250514/adabb95b/attachment-0007.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg.git.patchB
Type: application/octet-stream
Size: 819 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250514/adabb95b/attachment-0008.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg.git.patchC
Type: application/octet-stream
Size: 1127 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250514/adabb95b/attachment-0009.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg.git.patchZ2
Type: application/octet-stream
Size: 614 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250514/adabb95b/attachment-0010.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg.git.patchD
Type: application/octet-stream
Size: 834 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250514/adabb95b/attachment-0011.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg.git.patchZ1
Type: application/octet-stream
Size: 1318 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250514/adabb95b/attachment-0012.obj>


More information about the ffmpeg-devel mailing list