From: Andrew Randrianasulu <randrianasulu@gmail.com> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>, "Cinelerra.GG" <cin@lists.cinelerra-gg.org>, Phyllis Smith <phylsmith2017@gmail.com> Subject: [FFmpeg-devel] Vulkan hevc hdr decode regression on ffmpeg master? Date: Wed, 14 May 2025 13:31:46 +0300 Message-ID: <CA+rFky4Fim2nB5n0cu8hFjhB+8JP3Fic9x0wrWfPHG_timrrfg@mail.gmail.com> (raw) [-- Attachment #1: Type: text/plain, Size: 8392 bytes --] 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. [-- Attachment #2: 0003-Do-not-filter-out-dynamic_input-filters.patch --] [-- Type: text/x-patch, Size: 1105 bytes --] From 32b990279fd05e39738ed6b252e278f2b7507b4d Mon Sep 17 00:00:00 2001 From: Andrew Randrianasulu <randrianasulu@gmail.com> Date: Sat, 10 May 2025 15:07:32 +0300 Subject: [PATCH 3/4] Do not filter out dynamic_input filters --- cinelerra-5.1/cinelerra/pluginfclient.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cinelerra-5.1/cinelerra/pluginfclient.C b/cinelerra-5.1/cinelerra/pluginfclient.C index b8694b12..764ba121 100644 --- a/cinelerra-5.1/cinelerra/pluginfclient.C +++ b/cinelerra-5.1/cinelerra/pluginfclient.C @@ -1255,7 +1255,7 @@ int PluginFFilter::init(const char *name, PluginFClientConfig *conf) PluginFLogLevel errs(AV_LOG_ERROR); this->filter = avfilter_get_by_name(name); if( !this->filter ) return AVERROR(ENOENT); - int flag_mask = AVFILTER_FLAG_DYNAMIC_INPUTS | AVFILTER_FLAG_DYNAMIC_OUTPUTS; + int flag_mask = /* AVFILTER_FLAG_DYNAMIC_INPUTS |*/ AVFILTER_FLAG_DYNAMIC_OUTPUTS; if( filter->flags & flag_mask ) return AVERROR(EPERM); if( !this->is_audio() && !this->is_video() ) return AVERROR(EIO); this->graph = avfilter_graph_alloc(); -- 2.46.3 [-- Attachment #3: 0001-Add-check-for-nb_inputs-before-calling-avfilter_get_.patch --] [-- Type: text/x-patch, Size: 1170 bytes --] From 73e74b064b80a0c4cdeb80a3733faf666fd0e4a9 Mon Sep 17 00:00:00 2001 From: Andrew Randrianasulu <randrianasulu@gmail.com> Date: Sat, 10 May 2025 11:06:44 +0300 Subject: [PATCH 1/4] Add check for nb_inputs before calling avfilter_get_pad_name, fixes crash --- cinelerra-5.1/cinelerra/ffmpeg.C | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cinelerra-5.1/cinelerra/ffmpeg.C b/cinelerra-5.1/cinelerra/ffmpeg.C index 1d0979df..82ae0856 100644 --- a/cinelerra-5.1/cinelerra/ffmpeg.C +++ b/cinelerra-5.1/cinelerra/ffmpeg.C @@ -3903,7 +3903,9 @@ int FFVideoStream::create_filter(const char *filter_spec) while( --i>=0 && *sp!=0 && !strchr(" \t:=,",*sp) ) *np++ = *sp++; *np = 0; const AVFilter *filter = !filter_name[0] ? 0 : avfilter_get_by_name(filter_name); - if( !filter || avfilter_pad_get_type(filter->inputs,0) != AVMEDIA_TYPE_VIDEO ) { + //AVFilterContext *ctx = filter->ctx; + int nb_pads = filter->nb_inputs; + if( !filter || (nb_pads>1 && avfilter_pad_get_type(filter->inputs,0)) != AVMEDIA_TYPE_VIDEO ) { ff_err(AVERROR(EINVAL), "FFVideoStream::create_filter: %s\n", filter_spec); return -1; } -- 2.46.3 [-- Attachment #4: 0002-Same-possible-crash-fix-in-ffstreamaudio-for-dynamic.patch --] [-- Type: text/x-patch, Size: 1120 bytes --] From c6548cb637bd9e0dc31c6327f280cffade211641 Mon Sep 17 00:00:00 2001 From: Andrew Randrianasulu <randrianasulu@gmail.com> Date: Sat, 10 May 2025 14:57:00 +0300 Subject: [PATCH 2/4] Same possible crash fix in ffstreamaudio for dynamic inputs <1 --- cinelerra-5.1/cinelerra/ffmpeg.C | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cinelerra-5.1/cinelerra/ffmpeg.C b/cinelerra-5.1/cinelerra/ffmpeg.C index 82ae0856..00b02791 100644 --- a/cinelerra-5.1/cinelerra/ffmpeg.C +++ b/cinelerra-5.1/cinelerra/ffmpeg.C @@ -3959,7 +3959,8 @@ int FFAudioStream::create_filter(const char *filter_spec) while( --i>=0 && *sp!=0 && !strchr(" \t:=,",*sp) ) *np++ = *sp++; *np = 0; const AVFilter *filter = !filter_name[0] ? 0 : avfilter_get_by_name(filter_name); - if( !filter || avfilter_pad_get_type(filter->inputs,0) != AVMEDIA_TYPE_AUDIO ) { + int nb_pads = filter->nb_inputs; + if( !filter || (nb_pads >1 && avfilter_pad_get_type(filter->inputs,0)) != AVMEDIA_TYPE_AUDIO ) { ff_err(AVERROR(EINVAL), "FFAudioStream::create_filter: %s\n", filter_spec); return -1; } -- 2.46.3 [-- Attachment #5: ffmpeg.git.patch1 --] [-- Type: application/octet-stream, Size: 281 bytes --] [-- Attachment #6: ffmpeg.git.patch3 --] [-- Type: application/octet-stream, Size: 2940 bytes --] [-- Attachment #7: ffmpeg.git.patch2 --] [-- Type: application/octet-stream, Size: 17472 bytes --] [-- Attachment #8: ffmpeg.git.patch4 --] [-- Type: application/octet-stream, Size: 464 bytes --] [-- Attachment #9: ffmpeg.git.patch7 --] [-- Type: application/octet-stream, Size: 460 bytes --] [-- Attachment #10: ffmpeg.git.patch9 --] [-- Type: application/octet-stream, Size: 711 bytes --] [-- Attachment #11: ffmpeg.git.patch5 --] [-- Type: application/octet-stream, Size: 1104 bytes --] [-- Attachment #12: ffmpeg.git.patch10 --] [-- Type: application/octet-stream, Size: 707 bytes --] [-- Attachment #13: ffmpeg.git.patchB --] [-- Type: application/octet-stream, Size: 819 bytes --] [-- Attachment #14: ffmpeg.git.patchC --] [-- Type: application/octet-stream, Size: 1127 bytes --] [-- Attachment #15: ffmpeg.git.patchZ2 --] [-- Type: application/octet-stream, Size: 614 bytes --] [-- Attachment #16: ffmpeg.git.patchD --] [-- Type: application/octet-stream, Size: 834 bytes --] [-- Attachment #17: ffmpeg.git.patchZ1 --] [-- Type: application/octet-stream, Size: 1318 bytes --] [-- Attachment #18: Type: text/plain, Size: 251 bytes --] _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next reply other threads:[~2025-05-14 13:32 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2025-05-14 10:31 Andrew Randrianasulu [this message] 2025-05-14 10:49 ` Andrew Randrianasulu
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=CA+rFky4Fim2nB5n0cu8hFjhB+8JP3Fic9x0wrWfPHG_timrrfg@mail.gmail.com \ --to=randrianasulu@gmail.com \ --cc=cin@lists.cinelerra-gg.org \ --cc=ffmpeg-devel@ffmpeg.org \ --cc=phylsmith2017@gmail.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git