Re: [FFmpeg-devel] [PATCH] Revert "ogg/vorbis: implement header packet skip in chained ogg bitstreams."

2025-05-30 Thread James Almer
On 5/30/2025 10:17 PM, Michael Niedermayer wrote: Hi On Sat, May 31, 2025 at 02:45:30AM +0200, Andreas Rheinhardt wrote: Michael Niedermayer: non flat extradata is problematic and was missed by reviewers Found-by: mkver and jamrial I did not find or report this issue, it was Andreas. I just

Re: [FFmpeg-devel] [PATCH 1/4] avcodec/dovi_rpuenc: Avoid intermediate codec par in ff_dovi_configure()

2025-05-30 Thread James Almer
On 5/30/2025 1:44 PM, Andreas Rheinhardt wrote: Patches attached. - Andreas For #11617, something simpler like the following should be enough diff --git a/libavcodec/dovi_rpuenc.c b/libavcodec/dovi_rpuenc.c index 2e1f8be08e..bbc66fe2e8 100644 --- a/libavcodec/dovi_rpuenc.c +++ b/libavcodec/d

[FFmpeg-devel] [PATCH 2/2] fftools/ffmpeg_filter: make InputFilterPriv and OutputFilterPriv private again

2025-05-28 Thread James Almer
As the names imply, they are structs meant to be internal and private to the filter handling code. If a field is required in other modules, then it can be moved to the public facing structs, which is done in this commit. Signed-off-by: James Almer --- fftools/ffmpeg.h | 17

[FFmpeg-devel] [PATCH 1/2] fftools/ffmpeg_filter: make FilterGraphPriv private again

2025-05-28 Thread James Almer
As the name implies, it's a struct meant to be internal and private to the filter handling code. If a field is required in other modules, then it can be moved to the public facing struct, which is done in this commit. Signed-off-by: James Almer --- fftools/ffmpeg.h | 4 +++ ff

Re: [FFmpeg-devel] [FFmpeg-cvslog] avcodec/asvenc: Don't waste bits encoding non-visible part

2025-05-26 Thread James Almer
On 5/26/2025 10:22 AM, Andreas Rheinhardt wrote: James Almer: On 5/26/2025 10:06 AM, Andreas Rheinhardt wrote: It is possible to hit this bug even before my patch with a commandline like this (tested with qemu): ffmpeg -filter_complex nullsrc=s=740x576:r=25,format=yuv420p,crop=w=720:x=2 -c:v

Re: [FFmpeg-devel] [FFmpeg-cvslog] avcodec/asvenc: Don't waste bits encoding non-visible part

2025-05-26 Thread James Almer
On 5/26/2025 10:06 AM, Andreas Rheinhardt wrote: It is possible to hit this bug even before my patch with a commandline like this (tested with qemu): ffmpeg -filter_complex nullsrc=s=740x576:r=25,format=yuv420p,crop=w=720:x=2 -c:v asv2 -f null - Why does that generate unaligned strides? nullsrc

Re: [FFmpeg-devel] libswscale.c : ff_xyz12Torgb48 expensive unaligned 16 byte accesses

2025-05-25 Thread James Almer
On 5/25/2025 9:44 PM, Chitra Dey Sarkar via ffmpeg-devel wrote: H We have been profiling FFmpeg at Microsoft and have identified that ff_xyz12ToRgb48 has a high sample count ( profiled every 1ms ) It seems like ff_xyz12ToRgb48 has performance penalty for 1. Unaligned read and write access

Re: [FFmpeg-devel] [PATCH 01/11] avcodec/vulkan_encode_h264: Fix memleak on error

2025-05-24 Thread James Almer
On 5/5/2025 8:37 PM, Andreas Rheinhardt wrote: From fd131ce99ecaaf3881d11ce7478b5be66cb059d5 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Mon, 5 May 2025 20:14:29 +0200 Subject: [PATCH 08/11] Revert "avcodec/cbs: add an AVBufferRef input argument to ff_cbs_read()" This reverts commi

Re: [FFmpeg-devel] [PATCH 01/11] avcodec/vulkan_encode_h264: Fix memleak on error

2025-05-24 Thread James Almer
On 5/5/2025 8:37 PM, Andreas Rheinhardt wrote: diff --git a/libavcodec/cbs_apv.c b/libavcodec/cbs_apv.c index ebf57d3bbb..ddc363fbf3 100644 --- a/libavcodec/cbs_apv.c +++ b/libavcodec/cbs_apv.c @@ -276,12 +276,14 @@ static int cbs_apv_read_unit(CodedBitstreamContext *ctx, if (err < 0

Re: [FFmpeg-devel] [PATCH 1/3] avcodec/cbs: add a new init function

2025-05-24 Thread James Almer
On 5/24/2025 8:08 AM, Andreas Rheinhardt wrote: If something like this were ever needed, it should not be implemented like this; instead ff_cbs_init() should be like avformat_open_input() and allocate a context if none was provided. - Andreas I didn't do that because it would require ff_cbs_in

Re: [FFmpeg-devel] [PATCH] tests/fate/ac3: Make ac3-fixed-encode-2 bitexact across arches

2025-05-23 Thread James Almer
On 5/23/2025 6:52 AM, Andreas Rheinhardt wrote: Patch attached. Another candidate as input file would be dts/master_audio_7.1_24bit.dts, but then it would be unclear whether this is still a true AC3 test. - Andreas nit: maybe limit the amount of audio frames to be encoded, since it's not the

[FFmpeg-devel] [PATCH 3/3] avcodec/av1_parser: use an AVBufferRef to avoid data copying

2025-05-22 Thread James Almer
Signed-off-by: James Almer --- libavcodec/av1_parser.c | 13 + 1 file changed, 13 insertions(+) diff --git a/libavcodec/av1_parser.c b/libavcodec/av1_parser.c index 77906d0c91..b9a96ad59a 100644 --- a/libavcodec/av1_parser.c +++ b/libavcodec/av1_parser.c @@ -50,6 +50,11 @@ static

[FFmpeg-devel] [PATCH 2/3] avcodec/cbs_av1: don't store a reference to the unit data if it's not needed

2025-05-22 Thread James Almer
If a module using CBS-AV1 doesn't bother to decompose redundant frame header OBUs, then there's no need to keep a reference to the previous frame header around. Signed-off-by: James Almer --- libavcodec/cbs_av1.c | 23 +++ libavcodec

[FFmpeg-devel] [PATCH 1/3] avcodec/cbs: add a new init function

2025-05-22 Thread James Almer
And rename the existing one to ff_cbs_alloc(). This will allow for more versatility when setting options in a module, allowing them to be taken into account when calling module specific init functions. Signed-off-by: James Almer --- libavcodec/apv_decode.c | 6 +- libavcodec

[FFmpeg-devel] [PATCH] avcodec/lcevcdec: don't try to write to output frames directly

2025-05-19 Thread James Almer
The buffer references may not be writable at this point, as the decoder calls get_buffer2() with the AV_GET_BUFFER_FLAG_REF flag. Fixes races as reported by tsan, producing correct output regardless of threading choices. Signed-off-by: James Almer --- libavcodec/decode.c | 39

Re: [FFmpeg-devel] [PATCH 3/3] swscale/swscale_unscaled: fix packed16togbra16() for formats with bpc between 9-14 bits

2025-05-18 Thread James Almer
On 5/18/2025 6:14 PM, James Almer wrote: On 5/18/2025 5:52 PM, Ramiro Polla wrote: Currently, packed16togbra16() always sets the alpha value to 0x, without taking the bit depth into consideration. This commit restricts the alpha value to the bit depth. packed16togbra16() seems to only be

Re: [FFmpeg-devel] [PATCH 3/3] swscale/swscale_unscaled: fix packed16togbra16() for formats with bpc between 9-14 bits

2025-05-18 Thread James Almer
On 5/18/2025 5:52 PM, Ramiro Polla wrote: Currently, packed16togbra16() always sets the alpha value to 0x, without taking the bit depth into consideration. This commit restricts the alpha value to the bit depth. packed16togbra16() seems to only be called for BGR48 and BGRA64, both of whic

Re: [FFmpeg-devel] [PATCH] avformat/framecrcenc: List types and checksums for for side data

2025-05-18 Thread James Almer
On 5/18/2025 9:25 AM, Michael Niedermayer wrote: This allows detecting changes and regressions in side data related code, same as what framecrc does for before already for packet data itself. Signed-off-by: Michael Niedermayer --- libavformat/framecrcenc.c | 116 +- tests

Re: [FFmpeg-devel] [PATCH] avfilter/version: Bump minor for avfilter_link_get_hw_frames_ctx()

2025-05-17 Thread James Almer
On 5/17/2025 10:13 AM, Andreas Rheinhardt wrote: Patch attached. (APIchanges even uses the wrong major version.) - Andreas I think this function should be removed instead, because it should have never been committed. The AVFilterLink API states that the user is not meant to access its intern

Re: [FFmpeg-devel] [FFmpeg-cvslog] fftools/graphprint: Now, make it a Killer-Feature!

2025-05-15 Thread James Almer
! -Original Message- From: ffmpeg-devel On Behalf Of James Almer Sent: Freitag, 16. Mai 2025 02:28 To: ffmpeg-devel@ffmpeg.org Subject: Re: [FFmpeg-devel] [FFmpeg-cvslog] fftools/graphprint: Now, make it a Killer-Feature! On 5/15/2025 9:17 PM, softworkz . wrote: -Original

Re: [FFmpeg-devel] [FFmpeg-cvslog] fftools/graphprint: Now, make it a Killer-Feature!

2025-05-15 Thread James Almer
On 5/15/2025 9:17 PM, softworkz . wrote: -Original Message- From: ffmpeg-devel On Behalf Of Marton Balint Sent: Freitag, 16. Mai 2025 02:00 To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [FFmpeg-cvslog] fftools/graphprint: Now, make it a Killer-Feature!

Re: [FFmpeg-devel] [FFmpeg-cvslog] fftools/graphprint: Now, make it a Killer-Feature!

2025-05-15 Thread James Almer
On 5/15/2025 6:58 PM, softworkz . wrote: -Original Message- From: ffmpeg-devel On Behalf Of James Almer Sent: Donnerstag, 15. Mai 2025 23:53 To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [FFmpeg-cvslog] fftools/graphprint: Now, make it a Killer-Feature

Re: [FFmpeg-devel] [FFmpeg-cvslog] fftools/graphprint: Now, make it a Killer-Feature!

2025-05-15 Thread James Almer
ffmpeg | branch: master | softworkz https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog>> | Thu May 15 23:10:02 2025 +0200| [1f2b8d7238eff4ab8a4d8d6177e250b8180d51f4] | committer: softworkz fftools/graphprint: Now, make it a Killer-Feature! remember this: -sg <= means Show Graph Signed-off-by:

[FFmpeg-devel] [PATCH] doc: add htmlxref.cnf

2025-05-14 Thread James Almer
Silences warnings like filters.texi:256: warning: no htmlxref.cnf entry found for `ffmpeg-utils' Signed-off-by: James Almer --- Seen with current Gentoo and MSYS2 environments. May be something that started\ with texi2info 7.2 doc/htmlxref.cnf | 6 ++ 1 file changed, 6 inser

[FFmpeg-devel] [PATCH] avutil/x86/intmath: remove inline assembly for av_clip{f, d}

2025-05-13 Thread James Almer
It's only supported by GCC, and everything inside the __asm__() block is invisible to the compiler's scheduler. Signed-off-by: James Almer --- libavutil/x86/intmath.h | 55 - 1 file changed, 10 insertions(+), 45 deletions(-) diff --git a/lib

[FFmpeg-devel] [PATCH] avformat/iamf_parse: increase PutBytes buffer when writing AAC extradata

2025-05-13 Thread James Almer
zz/tree/master/projects/ffmpeg Signed-off-by: James Almer --- libavformat/iamf_parse.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libavformat/iamf_parse.c b/libavformat/iamf_parse.c index abedfdb066..11c27ebe98 100644 --- a/libavformat/iamf_parse.c +++ b/libavforma

Re: [FFmpeg-devel] [PATCH] fate: Add test for APV 400-10 profile

2025-05-11 Thread James Almer
On 5/11/2025 10:38 AM, Mark Thompson wrote: Same setup as the 422-10 profile test, using the same content. FFmpeg decoder output is identical to the reference decoder output. --- The OpenAPV people fixed the 400-10 profile (profile_idc == 99) in

[FFmpeg-devel] [PATCH] avformat/iamf_parse: increase PutBytes buffer when writing AAC extradata

2025-05-10 Thread James Almer
zz/tree/master/projects/ffmpeg Signed-off-by: James Almer --- libavformat/iamf_parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/iamf_parse.c b/libavformat/iamf_parse.c index abedfdb066..14b69855c9 100644 --- a/libavformat/iamf_parse.c +++ b/libavforma

Re: [FFmpeg-devel] [PATCH 3/3] avformat/iamf_parse: check space left for AAC

2025-05-10 Thread James Almer
On 5/10/2025 11:36 AM, Michael Niedermayer wrote: Fixes: Assertion n>=0 && n<=32 failed at ./libavcodec/get_bits.h:406 Fixes: 398527871/clusterfuzz-testcase-minimized-ffmpeg_dem_IAMF_fuzzer-6602025714647040 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/pro

Re: [FFmpeg-devel] [PATCH] fftools/ffmpeg: move elapsed time counter to the end of the status line

2025-05-09 Thread James Almer
On 5/9/2025 9:06 AM, Marton Balint wrote: Elapsed time is much less important than the actual progress, and I am guessing several ffmpeg CLI frontends use the existing status line for showing progress, so putting a new field in the beginning is less optimal anyway. LGTM, but for the record, we

Re: [FFmpeg-devel] [PATCH v1] avcodec/apv_encoder: Updated APV encoder to set the encoder output to OAPV_CFG_VAL_AU_BS_FMT_NONE format (the only AU without bitstream format)

2025-05-09 Thread James Almer
On 5/9/2025 8:52 AM, Dawid Kozinski wrote: Signed-off-by: Dawid Kozinski --- libavcodec/liboapvenc.c | 12 1 file changed, 12 insertions(+) diff --git a/libavcodec/liboapvenc.c b/libavcodec/liboapvenc.c index 0c95489bc9..d338b33e2d 100644 --- a/libavcodec/liboapvenc.c +++ b/liba

Re: [FFmpeg-devel] [PATCH] avformat/mov: Fix decoding fragmented MP4 with multiple sample entries and empty stsc

2025-05-08 Thread James Almer
On 5/8/2025 7:14 PM, Dimitry Andric wrote: On 28 Apr 2025, at 13:00, Dimitry Andric wrote: On 19 Apr 2025, at 16:27, Dimitry Andric wrote: On 10 Apr 2025, at 11:03, Dimitry Andric wrote: On 3 Apr 2025, at 22:02, Dimitry Andric wrote: When decoding fragmented MP4 files that have an emp

Re: [FFmpeg-devel] [PATCH 7/7] avcodec/hevc/ps: Fix dependant layer id check

2025-05-08 Thread James Almer
On 5/8/2025 6:57 PM, Michael Niedermayer wrote: Fixes: shift exponent 49 is too large for 32-bit type 'int' Fixes: 398060145/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5023082406543360 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projec

Re: [FFmpeg-devel] [PATCH 5/5] doc/developer: Add subsection about patch submission via FFstaging

2025-05-08 Thread James Almer
On 5/8/2025 7:22 AM, softworkz wrote: From: softworkz Signed-off-by: softworkz --- doc/developer.texi | 16 1 file changed, 16 insertions(+) diff --git a/doc/developer.texi b/doc/developer.texi index 145b57b249..a3ae9e6973 100644 --- a/doc/developer.texi +++ b/doc/develope

Re: [FFmpeg-devel] [PATCH 01/21] avutil/avassert: Add av_unreachable and av_assume() macros

2025-05-07 Thread James Almer
On 5/7/2025 2:57 PM, softworkz . wrote: -Original Message- From: ffmpeg-devel On Behalf Of Andreas Rheinhardt Sent: Mittwoch, 7. Mai 2025 13:59 To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] [PATCH 01/21] avutil/avassert: Add av_unreachable and av_assume() mac

Re: [FFmpeg-devel] [PATCH] tests/fate/image: add a test for half-float dwab compressed stream

2025-05-06 Thread James Almer
On 5/6/2025 6:39 PM, James Almer wrote: On 5/6/2025 6:26 PM, Michael Niedermayer wrote: On Tue, May 06, 2025 at 06:10:22PM -0300, James Almer wrote: On 5/6/2025 5:44 PM, Michael Niedermayer wrote: On Mon, May 05, 2025 at 04:44:06PM -0300, James Almer wrote: Signed-off-by: James Almer

Re: [FFmpeg-devel] [PATCH] tests/fate/image: add a test for half-float dwab compressed stream

2025-05-06 Thread James Almer
On 5/6/2025 6:26 PM, Michael Niedermayer wrote: On Tue, May 06, 2025 at 06:10:22PM -0300, James Almer wrote: On 5/6/2025 5:44 PM, Michael Niedermayer wrote: On Mon, May 05, 2025 at 04:44:06PM -0300, James Almer wrote: Signed-off-by: James Almer --- tests/fate/image.mak

Re: [FFmpeg-devel] [PATCH] tests/fate/image: add a test for half-float dwab compressed stream

2025-05-06 Thread James Almer
On 5/6/2025 5:44 PM, Michael Niedermayer wrote: On Mon, May 05, 2025 at 04:44:06PM -0300, James Almer wrote: Signed-off-by: James Almer --- tests/fate/image.mak| 3 +++ tests/ref/fate/rgb-scanline-dwab-half-float | 6 ++ 2 files changed, 9 insertions(+) create

Re: [FFmpeg-devel] [PATCH] tests/fate/cbs: add tests for APV

2025-05-05 Thread James Almer
On 5/5/2025 5:59 PM, Mark Thompson wrote: On 05/05/2025 18:13, James Almer wrote: Ensure bitexact passthrough using the apv_metadata bsf. Signed-off-by: James Almer --- tests/fate/cbs.mak| 11 +++ tests/ref/fate/cbs-apv-profile_422-10 | 1 + 2 files changed

[FFmpeg-devel] [PATCH] tests/fate/image: add a test for half-float dwab compressed stream

2025-05-05 Thread James Almer
Signed-off-by: James Almer --- tests/fate/image.mak| 3 +++ tests/ref/fate/rgb-scanline-dwab-half-float | 6 ++ 2 files changed, 9 insertions(+) create mode 100644 tests/ref/fate/rgb-scanline-dwab-half-float diff --git a/tests/fate/image.mak b/tests/fate/image.mak

[FFmpeg-devel] [PATCH] tests/fate/cbs: add tests for APV

2025-05-05 Thread James Almer
Ensure bitexact passthrough using the apv_metadata bsf. Signed-off-by: James Almer --- tests/fate/cbs.mak| 11 +++ tests/ref/fate/cbs-apv-profile_422-10 | 1 + 2 files changed, 12 insertions(+) create mode 100644 tests/ref/fate/cbs-apv-profile_422-10 diff --git a

Re: [FFmpeg-devel] [PATCH] avformat/apvdec: also look for an au_info PBU during probing

2025-05-04 Thread James Almer
On 5/1/2025 2:49 PM, James Almer wrote: If present, an Access unit information PBU must be the first in an AU. Signed-off-by: James Almer --- libavformat/apvdec.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/libavformat/apvdec.c b/libavformat

Re: [FFmpeg-devel] [PATCH] avcodec/exr: add support for half-float DWAA/B compression

2025-05-04 Thread James Almer
On 5/1/2025 12:25 AM, James Almer wrote: Fixes ticket #11555. Signed-off-by: James Almer --- libavcodec/exr.c | 56 +++- 1 file changed, 41 insertions(+), 15 deletions(-) Will rename the commit to "avcodec/exr: output half-float D

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/cbs: add ff_cbs_read_buf()

2025-05-04 Thread James Almer
On 5/1/2025 10:44 PM, James Almer wrote: To take a reference from an existing buffer outside of AVPackets. Signed-off-by: James Almer --- libavcodec/cbs.c | 10 +- libavcodec/cbs.h | 11 +++ 2 files changed, 20 insertions(+), 1 deletion(-) Will apply set

[FFmpeg-devel] [PATCH] avcodec/apv_decode: build the lut table only once

2025-05-03 Thread James Almer
No reason to build the exact same table once per decoding thread. Signed-off-by: James Almer --- libavcodec/apv_decode.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/libavcodec/apv_decode.c b/libavcodec/apv_decode.c index b1e1db7d64..b1c59fc873 100644

Re: [FFmpeg-devel] [PATCH 3/6] apv_decode: Improve reporting of decode errors

2025-05-03 Thread James Almer
On 5/3/2025 2:55 PM, Mark Thompson wrote: +fail: +av_log(avctx, AV_LOG_VERBOSE, + "Decode error in tile %d component %d.\n", + tile_index, comp_index); +atomic_fetch_add(&apv->tile_errors, 1); atomic_fetch_add_explicit(&apv->tile_errors, 1, memory_order_relaxed); Yo

Re: [FFmpeg-devel] [PATCH 2/6] apv_decode: Fix memory leak on decode error

2025-05-03 Thread James Almer
On 5/3/2025 2:55 PM, Mark Thompson wrote: --- libavcodec/apv_decode.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libavcodec/apv_decode.c b/libavcodec/apv_decode.c index b1e1db7d64..2a59c9b25d 100644 --- a/libavcodec/apv_decode.c +++ b/libavcodec/apv_decode.c @@

[FFmpeg-devel] [PATCH 2/2] avcodec/hevc/hevcdec: move the slice header buffer overread check up in the function

2025-05-02 Thread James Almer
Abort as soon as we're done reading the slice header instead of running extra checks that assume slice data may follow. Signed-off-by: James Almer --- libavcodec/hevc/hevcdec.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libavcodec/hevc/hevcde

[FFmpeg-devel] [PATCH 1/2] avcodec/hevc/hevcdec: ensure a bit was read when checking for alignment_bit_equal_to_one

2025-05-02 Thread James Almer
Prevents printing bogus errors about the value being 0, when in fact we overread the available slice buffer. Signed-off-by: James Almer --- libavcodec/hevc/hevcdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/hevc/hevcdec.c b/libavcodec/hevc/hevcdec.c index

Re: [FFmpeg-devel] [PATCH] lavc: Add unit test for APV entropy decode

2025-05-02 Thread James Almer
On 4/30/2025 6:09 PM, Mark Thompson wrote: diff --git a/tests/fate/libavcodec.mak b/tests/fate/libavcodec.mak index ef6e6ec40e..5f7ec97ff3 100644 --- a/tests/fate/libavcodec.mak +++ b/tests/fate/libavcodec.mak @@ -3,6 +3,11 @@ fate-av1-levels: libavcodec/tests/av1_levels$(EXESUF) fate-av1-level

[FFmpeg-devel] [PATCH 2/2] avcodec/apv_parser: use ff_cbs_read_buf()

2025-05-01 Thread James Almer
Removes an unecessary data copying. Signed-off-by: James Almer --- libavcodec/apv_parser.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/libavcodec/apv_parser.c b/libavcodec/apv_parser.c index bd1894146c..25b80285a5 100644 --- a/libavcodec/apv_parser.c

[FFmpeg-devel] [PATCH 1/2] avcodec/cbs: add ff_cbs_read_buf()

2025-05-01 Thread James Almer
To take a reference from an existing buffer outside of AVPackets. Signed-off-by: James Almer --- libavcodec/cbs.c | 10 +- libavcodec/cbs.h | 11 +++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/libavcodec/cbs.c b/libavcodec/cbs.c index c0f6c62d20..b26e3ea3de

[FFmpeg-devel] [PATCH] avformat/apvdec: also look for an au_info PBU during probing

2025-05-01 Thread James Almer
If present, an Access unit information PBU must be the first in an AU. Signed-off-by: James Almer --- libavformat/apvdec.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/libavformat/apvdec.c b/libavformat/apvdec.c index 5d0b11b654..e53c9ed085 100644

Re: [FFmpeg-devel] [PATCH v2 1/2] avcodec: add an APV parser

2025-05-01 Thread James Almer
On 4/27/2025 8:39 PM, James Almer wrote: Signed-off-by: James Almer --- Now working if the first AU is not a primary frame. configure | 1 + libavcodec/Makefile | 1 + libavcodec/apv_parser.c | 133 libavcodec/parsers.c

Re: [FFmpeg-devel] [PATCH] avformat/av1dec: fix setting AVPacket->pos in Annex-B demuxer

2025-05-01 Thread James Almer
On 4/28/2025 7:02 PM, James Almer wrote: This demuxers reads encapsulation bytes before reading codec data into the output packets, so take such offset into consideration. Signed-off-by: James Almer --- libavformat/av1dec.c | 8 1 file changed, 8 insertions(+) diff --git a

[FFmpeg-devel] [PATCH] avcodec/exr: add support for half-float DWAA/B compression

2025-04-30 Thread James Almer
Fixes ticket #11555. Signed-off-by: James Almer --- libavcodec/exr.c | 56 +++- 1 file changed, 41 insertions(+), 15 deletions(-) diff --git a/libavcodec/exr.c b/libavcodec/exr.c index a16dd96502..1b3aad96ea 100644 --- a/libavcodec/exr.c +++ b

[FFmpeg-devel] [PATCH v2] avcodec/cbs_apv: don't return an error when reading empty buffers

2025-04-30 Thread James Almer
The output will be a fragment with zero units, which is a lot more user friendly than making them think something went wrong, as it already happens with cbs_av1. Signed-off-by: James Almer --- libavcodec/cbs_apv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a

Re: [FFmpeg-devel] [PATCH] avcodec/cbs_apv: don't return an error when reading empty buffers

2025-04-30 Thread James Almer
On 4/30/2025 6:17 PM, Mark Thompson wrote: On 29/04/2025 20:57, James Almer wrote: The output will be a fragment with zero units, which is a lot more user friendly than making them think something went wrong, as it already happens with cbs_av1. Signed-off-by: James Almer --- libavcodec

Re: [FFmpeg-devel] [PATCH] avcodec: add APV encoder using liboapv

2025-04-30 Thread James Almer
On 4/30/2025 11:03 AM, Dawid Kozinski/Multimedia (PLT) /SRPOL/Staff Engineer/Samsung Electronics wrote: -Original Message- From: ffmpeg-devel On Behalf Of James Almer Sent: środa, 30 kwietnia 2025 02:40 To:ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH] avcodec: add APV encoder

Re: [FFmpeg-devel] [PATCH v2 3/4] avcodec/apv_encoder: Provided support for APV encoder

2025-04-30 Thread James Almer
On 4/30/2025 5:11 AM, Dawid Kozinski wrote: - Added APV encoder wrapper - Changes in project configuration file and libavcodec Makefile - Added documentation for oapv wrapper Signed-off-by: Dawid Kozinski --- configure | 4 + doc/encoders.texi | 41 +++ doc/general

[FFmpeg-devel] [PATCH] avcodec: add APV encoder using liboapv

2025-04-29 Thread James Almer
From: Dawid Kozinski Co-authored-by: James Almer Signed-off-by: James Almer --- Touched up Dawid's patch to fix several issues. The most important one being the image rescaling code that's out of place in an encoder. liboapv does not seem to properly support 12bit content yet (Which

[FFmpeg-devel] [PATCH] avcodec/cbs_apv: don't return an error when reading empty buffers

2025-04-29 Thread James Almer
The output will be a fragment with zero units, which is a lot more user friendly than making them think something went wrong, as it already happens with cbs_av1. Signed-off-by: James Almer --- libavcodec/cbs_apv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec

[FFmpeg-devel] [PATCH] avformat/av1dec: fix setting AVPacket->pos in Annex-B demuxer

2025-04-28 Thread James Almer
This demuxers reads encapsulation bytes before reading codec data into the output packets, so take such offset into consideration. Signed-off-by: James Almer --- libavformat/av1dec.c | 8 1 file changed, 8 insertions(+) diff --git a/libavformat/av1dec.c b/libavformat/av1dec.c index

[FFmpeg-devel] [PATCH v2 1/2] avcodec: add an APV parser

2025-04-27 Thread James Almer
Signed-off-by: James Almer --- Now working if the first AU is not a primary frame. configure | 1 + libavcodec/Makefile | 1 + libavcodec/apv_parser.c | 133 libavcodec/parsers.c| 1 + 4 files changed, 136 insertions

[FFmpeg-devel] [PATCH] avcodec/pthread_frame: don't call ff_decode_internal_sync() during per-frame thread synchonization

2025-04-27 Thread James Almer
The values it copies across contexts are set during preinit() and never changed. Signed-off-by: James Almer --- libavcodec/pthread_frame.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c index 7019108af6..e283eb2941 100644 --- a

Re: [FFmpeg-devel] [PATCH] apv_decode: Replace division with shift

2025-04-27 Thread James Almer
On 4/27/2025 3:49 PM, Mark Thompson wrote: The compiler can't see that this should be a shift and generates a real division which is slow enough to appear in profiles on its own. --- libavcodec/apv_decode.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libavc

[FFmpeg-devel] [PATCH 2/2] avformat/apvdec: don't fill container level fields with codec level info

2025-04-27 Thread James Almer
This is a raw demuxer, it should not read codec level information and export it as container level information. The generic demux code will use the recently introduced parser to take care of that. Signed-off-by: James Almer --- configure| 1 + libavformat/apvdec.c | 46

[FFmpeg-devel] [PATCH 1/2] avcodec: add an APV parser

2025-04-27 Thread James Almer
Signed-off-by: James Almer --- libavcodec/Makefile | 1 + libavcodec/apv_parser.c | 165 libavcodec/parsers.c| 1 + 3 files changed, 167 insertions(+) create mode 100644 libavcodec/apv_parser.c diff --git a/libavcodec/Makefile b/libavcodec

Re: [FFmpeg-devel] [PATCH v3] avformat/apvdec: export color information

2025-04-27 Thread James Almer
On 4/27/2025 5:50 PM, Andreas Rheinhardt wrote: James Almer: apv_read_header() reads enough information that the generic demux code doesn't attempt to read a frame to fill missing fields in codecpar, so make sure it's set here. Signed-off-by: James Almer --- libavformat/apv

Re: [FFmpeg-devel] [PATCH] fate: Add test for APV 422-10 profile

2025-04-27 Thread James Almer
On 4/27/2025 3:13 PM, Mark Thompson wrote: Bitstream generated using the reference encoder, then edited to fix the colour description and an extra metadata block added. FFmpeg decoder output is identical to the reference decoder output. The content used is the first three frames of "Waterfall"

[FFmpeg-devel] [PATCH v3] avformat/apvdec: export color information

2025-04-27 Thread James Almer
apv_read_header() reads enough information that the generic demux code doesn't attempt to read a frame to fill missing fields in codecpar, so make sure it's set here. Signed-off-by: James Almer --- libavformat/apvdec.c | 40 ++-- 1 file changed, 38

[FFmpeg-devel] [PATCH v2] avformat/apvdec: export color information

2025-04-27 Thread James Almer
apv_read_header() reads enough information that the generic demux code doesn't attempt to read a frame to fill missing fields in codecpar, so make sure it's set here. Signed-off-by: James Almer --- libavformat/apvdec.c | 38 +- 1 file changed, 37

Re: [FFmpeg-devel] [PATCH] avformat/apvdec: export color information

2025-04-27 Thread James Almer
On 4/27/2025 3:29 PM, Mark Thompson wrote: On 27/04/2025 18:53, James Almer wrote: apv_read_header() reads enough information that the generic demux code doesn't attempt to read a frame to fill missing fields in codecpar, so make sure it's set here. Signed-off-by: J

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/decode: sync side_data_pref_mask across worker threads

2025-04-27 Thread James Almer
On 4/27/2025 3:52 PM, Andreas Rheinhardt wrote: James Almer: side_data_pref_mask is set during ff_decode_preinit() and then never copied to worker threads. As such, any decoder calling one of the side data helpers that rely on side_data_pref() in frame threaded scenarios will ignore the user

[FFmpeg-devel] [PATCH] avformat/apvdec: export color information

2025-04-27 Thread James Almer
apv_read_header() reads enough information that the generic demux code doesn't attempt to read a frame to fill missing fields in codecpar, so make sure it's set here. Signed-off-by: James Almer --- libavformat/apvdec.c | 32 +--- 1 file changed, 29 insert

[FFmpeg-devel] [PATCH] avcodec/h264dec: export x264_build value

2025-04-26 Thread James Almer
It's a value the caller may care about. Signed-off-by: James Almer --- libavcodec/h264_slice.c | 1 + libavcodec/h264dec.c | 2 +- tests/ref/fate/flv-demux | 2 +- tests/ref/fate/mov-zombie | 2 +- tests/ref/fate/ts-small-demux | 2 +- 5 files changed, 5 insertions(

[FFmpeg-devel] [PATCH 2/2] avcodec/decode: sync side_data_pref_mask across worker threads

2025-04-26 Thread James Almer
side_data_pref_mask is set during ff_decode_preinit() and then never copied to worker threads. As such, any decoder calling one of the side data helpers that rely on side_data_pref() in frame threaded scenarios will ignore the user set list of side data types. Signed-off-by: James Almer

Re: [FFmpeg-devel] [PATCH v4 0/7] APV support

2025-04-26 Thread James Almer
On 4/26/2025 5:49 PM, Mark Thompson wrote: v4: minor changes from previous version reflecting review comments. This seems to be converging so will consider pushing soon and then working on top of it (the patches from Dawid Kozinski for ISOBMFF support will also apply on top of this). My next

[FFmpeg-devel] [PATCH] avcodec/pthread_frame: sync decoded_side_data arrays with all worker threads

2025-04-26 Thread James Almer
After being filled by FFCodec->init() from the first worker thread, it needs to be copied to every other thread context. Otherwise, its entries will not be present when ff_decode_frame_props() populates output frames. Signed-off-by: James Almer --- libavcodec/pthread_frame.c | 8

Re: [FFmpeg-devel] [PATCH v1 14/19] avcodec/cbs_sei_syntax_template: add sei message frame_field_information

2025-04-25 Thread James Almer
On 4/25/2025 7:55 PM, Andreas Rheinhardt wrote: James Almer: On 4/25/2025 7:08 PM, Andreas Rheinhardt wrote: toq...@gmail.com: From: Wu Jianhua Signed-off-by: Wu Jianhua ---   libavcodec/cbs_h2645.c   |  6 ++   libavcodec/cbs_sei.h | 12

Re: [FFmpeg-devel] [PATCH v1 14/19] avcodec/cbs_sei_syntax_template: add sei message frame_field_information

2025-04-25 Thread James Almer
On 4/25/2025 7:08 PM, Andreas Rheinhardt wrote: toq...@gmail.com: From: Wu Jianhua Signed-off-by: Wu Jianhua --- libavcodec/cbs_h2645.c | 6 ++ libavcodec/cbs_sei.h | 12 libavcodec/cbs_sei_syntax_template.c | 26 ++

Re: [FFmpeg-devel] On errors, asserts and crashing

2025-04-25 Thread James Almer
On 4/25/2025 10:05 AM, softworkz . wrote: Once and for all, just GTFO from those kinds of comments This kind of aggression is not ok. OpenPGP_signature.asc Description: OpenPGP digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org

Re: [FFmpeg-devel] [PATCH v3 5/7] lavc/apv: AVX2 transquant for x86-64

2025-04-24 Thread James Almer
On 4/24/2025 5:37 PM, Mark Thompson wrote: On 24/04/2025 03:55, James Almer wrote: On 4/23/2025 5:45 PM, Mark Thompson wrote: Typical checkasm result on Alder Lake: decode_transquant_8_c: 464.2 ( 1.00x) decode_transquant_8_avx2

Re: [FFmpeg-devel] [PATCH v3 4/7] lavc: APV decoder

2025-04-23 Thread James Almer
On 4/23/2025 5:45 PM, Mark Thompson wrote: --- configure| 1 + libavcodec/Makefile | 1 + libavcodec/allcodecs.c | 1 + libavcodec/apv_decode.c | 403 +++ libavcodec/apv_decode.h | 80 libavcodec/apv_dsp.c | 1

Re: [FFmpeg-devel] [PATCH v3 5/7] lavc/apv: AVX2 transquant for x86-64

2025-04-23 Thread James Almer
On 4/23/2025 5:45 PM, Mark Thompson wrote: Typical checkasm result on Alder Lake: decode_transquant_8_c: 464.2 ( 1.00x) decode_transquant_8_avx2: 86.2 ( 5.38x) decode_transquant_10_c:481.6 ( 1.00x) deco

Re: [FFmpeg-devel] [PATCH v3 3/7] lavf: APV demuxer

2025-04-23 Thread James Almer
On 4/23/2025 5:45 PM, Mark Thompson wrote: +static int apv_read_header(AVFormatContext *s) +{ +AVStream *st; +GetByteContext gbc; +APVHeaderInfo header; +uint8_t buffer[28]; +uint32_t au_size, signature, pbu_size; +int err, size; + +err = ffio_ensure_seekback(s->pb, si

Re: [FFmpeg-devel] [PATCH v3 2/7] lavc/cbs: APV support

2025-04-23 Thread James Almer
On 4/23/2025 5:45 PM, Mark Thompson wrote: +static int cbs_apv_split_fragment(CodedBitstreamContext *ctx, + CodedBitstreamFragment *frag, + int header) +{ +uint8_t *data = frag->data; +size_t size = frag->data_size; +

Re: [FFmpeg-devel] [PATCH v1 5/8] avformat/mov_muxer: Extended MOV muxer to handle APV video content

2025-04-23 Thread James Almer
On 4/23/2025 11:13 AM, Dawid Kozinski wrote: @@ -2757,6 +2789,8 @@ static int mov_write_video_tag(AVFormatContext *s, AVIOContext *pb, MOVMuxContex } else if (track->par->codec_id ==AV_CODEC_ID_EVC) { mov_write_evcc_tag(pb, track); +} else if (track->par->codec_id ==AV_

Re: [FFmpeg-devel] [PATCH v1 2/8] avcodec/apv_parser: Added parser implementation for APV format

2025-04-23 Thread James Almer
On 4/23/2025 11:12 AM, Dawid Kozinski wrote: - Added constants definitions for APV parser - Provided parsing following APV RFC - APV parser registration Signed-off-by: Dawid Kozinski --- configure | 2 + libavcodec/Makefile | 2 + libavcodec/apv.h| 93

Re: [FFmpeg-devel] [PATCH v2 5/6] lavc/apv: AVX2 transquant for x86-64

2025-04-22 Thread James Almer
On 4/21/2025 4:50 PM, Mark Thompson wrote: On 21/04/2025 17:53, James Almer wrote: On 4/21/2025 12:24 PM, Mark Thompson wrote: Typical checkasm result on Alder Lake: decode_transquant_8_c: 461.1 ( 1.00x) decode_transquant_8_avx2

Re: [FFmpeg-devel] [PATCH v2 5/6] lavc/apv: AVX2 transquant for x86-64

2025-04-21 Thread James Almer
On 4/21/2025 12:24 PM, Mark Thompson wrote: Typical checkasm result on Alder Lake: decode_transquant_8_c: 461.1 ( 1.00x) decode_transquant_8_avx2: 97.5 ( 4.73x) decode_transquant_10_c:483.9 ( 1.00x) dec

Re: [FFmpeg-devel] [PATCH 4/6] lavc: APV decoder

2025-04-21 Thread James Almer
On 4/19/2025 4:07 PM, Mark Thompson wrote: --- configure| 1 + libavcodec/Makefile | 1 + libavcodec/allcodecs.c | 1 + libavcodec/apv_decode.c | 327 +++ libavcodec/apv_decode.h | 80 ++ libavcodec/apv_dsp.c |

Re: [FFmpeg-devel] [PATCH 2/6] lavf: APV demuxer

2025-04-20 Thread James Almer
On 4/20/2025 1:57 PM, Mark Thompson wrote: On 20/04/2025 17:20, James Almer wrote: On 4/20/2025 1:07 PM, Derek Buitenhuis wrote: On 4/19/2025 8:07 PM, Mark Thompson wrote: +typedef struct APVHeaderInfo { +    uint8_t  pbu_type; +    uint16_t group_id; + +    uint8_t  profile_idc; +    uint8_t

Re: [FFmpeg-devel] [PATCH 2/6] lavf: APV demuxer

2025-04-20 Thread James Almer
On 4/20/2025 1:07 PM, Derek Buitenhuis wrote: On 4/19/2025 8:07 PM, Mark Thompson wrote: +typedef struct APVHeaderInfo { +uint8_t pbu_type; +uint16_t group_id; + +uint8_t profile_idc; +uint8_t level_idc; +uint8_t band_idc; + +uint32_t frame_width; +uint32_t frame_

Re: [FFmpeg-devel] [PATCH 2/2] lavc/dxvenc: migrate DXT1 encoder to lavu hashtable and improve Resolume compatibility

2025-04-20 Thread James Almer
On 4/20/2025 10:08 AM, Emma Worley wrote: Offers a modest performance gain due to the switch from naive linear probling to robin hood, as well as improved compatibility with Resolume. A few numbers would be nice since you're adding new public API and a lot of code changes. OpenPGP_signatur

Re: [FFmpeg-devel] [PATCH 5/6] lavc/apv: AVX2 transquant for x86-64

2025-04-19 Thread James Almer
On 4/19/2025 4:07 PM, Mark Thompson wrote: Typical checkasm result on Alder Lake: decode_transquant_8_c: 408.7 ( 1.00x) decode_transquant_8_avx2: 94.2 ( 4.34x) decode_transquant_10_c:413.1 ( 1.00x) deco

Re: [FFmpeg-devel] [PATCH 5/6] lavc/apv: AVX2 transquant for x86-64

2025-04-19 Thread James Almer
On 4/19/2025 4:07 PM, Mark Thompson wrote: diff --git a/libavcodec/x86/apv_dsp.asm b/libavcodec/x86/apv_dsp.asm new file mode 100644 index 00..0329089f45 --- /dev/null +++ b/libavcodec/x86/apv_dsp.asm @@ -0,0 +1,243 @@ +;

Re: [FFmpeg-devel] [PATCH v3 5/5] lavc: implement a Vulkan-based VC-2 encoder Implements a Vulkan based dirac encoder. Supports Haar and Legall wavelets and should work with all wavelet depths.

2025-04-17 Thread James Almer
On 4/17/2025 10:11 PM, Lynne wrote: On 18/04/2025 01:55, IndecisiveTurtle wrote: From: IndecisiveTurtle Performance wise, encoding a 1080p 1-minute video is performed in about 2.5 minutes with the cpu encoder running on my Ryzen 5 4600H, while it takes about 30 seconds on my NVIDIA GTX 1650

Re: [FFmpeg-devel] [PATCH v3 5/5] lavc: implement a Vulkan-based VC-2 encoder Implements a Vulkan based dirac encoder. Supports Haar and Legall wavelets and should work with all wavelet depths.

2025-04-17 Thread James Almer
On 4/17/2025 8:55 PM, IndecisiveTurtle wrote: From: IndecisiveTurtle Performance wise, encoding a 1080p 1-minute video is performed in about 2.5 minutes with the cpu encoder running on my Ryzen 5 4600H, while it takes about 30 seconds on my NVIDIA GTX 1650 Haar shader has a subgroup optimize

Re: [FFmpeg-devel] [PATCH 2/2] libavformat/takdec.c: Fix msan error.

2025-04-17 Thread James Almer
On 4/17/2025 4:08 PM, Thierry Foucu wrote: On Mon, Apr 7, 2025 at 11:10 AM wrote: From: Thierry Foucu Make sure we are reading 16 bytes for the MD5 --- libavformat/takdec.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavformat/takdec.c b/libavformat/takdec.c

  1   2   3   4   5   6   7   8   9   10   >