Re: [FFmpeg-devel] The "bad" Patch

2025-05-31 Thread Mark Thompson
On 31/05/2025 19:28, softworkz . wrote: >> -Original Message- >> From: ffmpeg-devel On Behalf Of Mark >> Thompson >> Sent: Samstag, 31. Mai 2025 18:21 >> To: ffmpeg-devel@ffmpeg.org >> Subject: Re: [FFmpeg-devel] The "bad" Patc

Re: [FFmpeg-devel] The "bad" Patch

2025-05-31 Thread Mark Thompson
On 31/05/2025 12:44, softworkz . wrote: >> -Original Message- >> From: ffmpeg-devel On Behalf Of softworkz . >> Sent: Donnerstag, 29. Mai 2025 04:59 >> To: FFmpeg development discussions and patches >> Subject: Re: [FFmpeg-devel] The "bad" Patch > > > Two and a half days have passed and

Re: [FFmpeg-devel] [PATCH v2] ffmpeg: Don't print graphs if there are no outputs yet

2025-05-19 Thread Mark Thompson
On 18/05/2025 15:57, softworkz . wrote: >> -Original Message- >> From: ffmpeg-devel On Behalf Of Mark >> Thompson >> Sent: Sonntag, 18. Mai 2025 16:22 >> To: ffmpeg-devel@ffmpeg.org >> Subject: Re: [FFmpeg-devel] [PATCH v2] ffmpeg: Don't print

Re: [FFmpeg-devel] [PATCH v2] ffmpeg: Don't print graphs if there are no outputs yet

2025-05-18 Thread Mark Thompson
On 17/05/2025 21:04, softworkz . wrote: >> -Original Message- >> From: ffmpeg-devel On Behalf Of Mark >> Thompson >> Sent: Samstag, 17. Mai 2025 22:02 >> To: ffmpeg-devel@ffmpeg.org >> Subject: [FFmpeg-devel] [PATCH v2] ffmpeg: Don't pr

[FFmpeg-devel] [PATCH v2] ffmpeg: Don't print graphs if there are no outputs yet

2025-05-17 Thread Mark Thompson
Avoids writing an empty json blob in setup error cases. --- On 17/05/2025 20:08, softworkz . wrote: > If you could resubmit without the nb_filtergraphs check that would be fine! Sure, here. Thanks, - Mark fftools/ffmpeg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ffto

Re: [FFmpeg-devel] [PATCH 1/3] ffmpeg: Don't print graphs if there are no graphs to print

2025-05-17 Thread Mark Thompson
On 17/05/2025 18:52, softworkz . wrote: > > >> -Original Message- >> From: ffmpeg-devel On Behalf Of Mark >> Thompson >> Sent: Samstag, 17. Mai 2025 13:14 >> To: ffmpeg-devel@ffmpeg.org >> Subject: [FFmpeg-devel] [PATCH 1/3] ffmpeg: Don'

[FFmpeg-devel] [PATCH 3/3] fftools/graphprint: Fix leak of graph section header string

2025-05-17 Thread Mark Thompson
--- fftools/graph/graphprint.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fftools/graph/graphprint.c b/fftools/graph/graphprint.c index 9e3e03274a..50f1a2ecdc 100644 --- a/fftools/graph/graphprint.c +++ b/fftools/graph/graphprint.c @@ -780,6 +780,8 @@ static int print_streams(GraphPrint

[FFmpeg-devel] [PATCH 2/3] fftools/graphprint: Fix leak of graphprint object

2025-05-17 Thread Mark Thompson
--- fftools/graph/graphprint.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fftools/graph/graphprint.c b/fftools/graph/graphprint.c index fc94a75797..9e3e03274a 100644 --- a/fftools/graph/graphprint.c +++ b/fftools/graph/graphprint.c @@ -862,6 +862,8 @@ static void uninit_graphprint(Graph

[FFmpeg-devel] [PATCH 1/3] ffmpeg: Don't print graphs if there are no graphs to print

2025-05-17 Thread Mark Thompson
Avoids writing an empty json blob in setup error cases. --- fftools/ffmpeg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 964770df23..ad28cff78d 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -309,7 +309,8 @@ const AVIOInt

Re: [FFmpeg-devel] [PATCH] cbs_apv: Fix memory leak on metadata parse failure

2025-05-17 Thread Mark Thompson
On 14/05/2025 21:50, Mark Thompson wrote: > Buffers are allocated inside some metadata types, so we must ensure > that the object is visible to the free function before a parse failure. > > Found by libFuzzer. > --- > libavcodec/cbs_apv_syntax_template.c | 4 ++-- > 1 file

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

2025-05-15 Thread Mark Thompson
On 15/05/2025 23:19, softworkz . wrote: > > >> -Original Message- >> From: ffmpeg-devel On Behalf Of Ramiro >> Polla >> Sent: Freitag, 16. Mai 2025 00:13 >> To: FFmpeg development discussions and patches >> Subject: Re: [FFmpeg-devel] [FFmpeg-cvslog] fftools/graphprint: Now, make it >

[FFmpeg-devel] [PATCH] cbs_apv: Fix memory leak on metadata parse failure

2025-05-14 Thread Mark Thompson
Buffers are allocated inside some metadata types, so we must ensure that the object is visible to the free function before a parse failure. Found by libFuzzer. --- libavcodec/cbs_apv_syntax_template.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/cbs_apv_synta

Re: [FFmpeg-devel] [PATCH v2 1/2] apv_decode: Multisymbol entropy decode

2025-05-13 Thread Mark Thompson
On 11/05/2025 11:09, Mark Thompson wrote: > --- > v2: > * Bring error handling to the same level as before. > * Split first run/level step to avoid first-AC handling inside the loop. > * More commentary. > * Other minor improvements. > > Thanks, No further changes here

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

2025-05-13 Thread Mark Thompson
On 11/05/2025 14:44, 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. > --- > On 11/05/2025 14:40, James Almer wrote: >> Will upload. > > Thank you! And pushed wit

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

2025-05-11 Thread Mark Thompson
Same setup as the 422-10 profile test, using the same content. FFmpeg decoder output is identical to the reference decoder output. --- On 11/05/2025 14:40, James Almer wrote: > Will upload. Thank you! > Missing the reference file. Oops, updated. Thanks, - Mark tests/fate/apv.mak| 4

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

2025-05-11 Thread Mark Thompson
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 , so this adds a sample to match

[FFmpeg-devel] [PATCH v2 1/2] apv_decode: Multisymbol entropy decode

2025-05-11 Thread Mark Thompson
--- v2: * Bring error handling to the same level as before. * Split first run/level step to avoid first-AC handling inside the loop. * More commentary. * Other minor improvements. Thanks, - Mark libavcodec/apv_decode.c | 5 +- libavcodec/apv_decode.h | 59 ++-- libavcodec/apv_entropy.c | 6

[FFmpeg-devel] [PATCH v2 2/2] lavc: Add unit test for APV entropy decode

2025-05-11 Thread Mark Thompson
--- libavcodec/Makefile | 1 + libavcodec/tests/apv.c| 449 ++ tests/fate/libavcodec.mak | 5 + 3 files changed, 455 insertions(+) create mode 100644 libavcodec/tests/apv.c diff --git a/libavcodec/Makefile b/libavcodec/Makefile index cae8f3a9f1..

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

2025-05-05 Thread Mark Thompson
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, 12 insertions(+) > create mode 1006

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

2025-05-05 Thread Mark Thompson
--- libavcodec/Makefile | 1 + libavcodec/tests/apv.c| 449 ++ tests/fate/libavcodec.mak | 5 + 3 files changed, 455 insertions(+) create mode 100644 libavcodec/tests/apv.c diff --git a/libavcodec/Makefile b/libavcodec/Makefile index cae8f3a9f1..

[FFmpeg-devel] [PATCH 1/2] apv_decode: Multisymbol entropy decode

2025-05-05 Thread Mark Thompson
--- Decode up to four symbols per step with larger lookup tables. This is highly finicky because a lot of internal state has to be tracked and it therefore doesn't fit at all into the existing multisymbol VLC strcture. On a big core (Alder Lake P core) this makes the whole decoder 30-90% faster

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

2025-05-05 Thread Mark Thompson
On 03/05/2025 23:46, James Almer wrote: > 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 >&

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

2025-05-03 Thread Mark Thompson
--- 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 @@ -377,7 +377,7 @@ static int apv_decode_frame(A

[FFmpeg-devel] [PATCH 6/6] cbs_apv: Check tile component sizes

2025-05-03 Thread Mark Thompson
It was possible for the buffer pointers for the last tile to go over the end of the unit buffer leading to a read overflow during decode of the macroblock layer. Check all tile component sizes to prevent this case and also catch related tile size mismatch errors earlier. --- libavcodec/cbs_apv_sy

[FFmpeg-devel] [PATCH 5/6] apv_entropy: Improve robustness to bitstream errors

2025-05-03 Thread Mark Thompson
--- libavcodec/apv_entropy.c | 16 1 file changed, 16 insertions(+) diff --git a/libavcodec/apv_entropy.c b/libavcodec/apv_entropy.c index 00e0b4fbdf..a5648c09b4 100644 --- a/libavcodec/apv_entropy.c +++ b/libavcodec/apv_entropy.c @@ -84,6 +84,14 @@ static unsigned int apv_read_v

[FFmpeg-devel] [PATCH 4/6] cbs_apv: Better constrain tile_width/height_in_mbs

2025-05-03 Thread Mark Thompson
The maximum number of tile columns/rows adds an extra constraint on the minimum tile width/height for large frames (over 5120 width or 2560 height). --- libavcodec/apv_decode.c | 2 +- libavcodec/cbs_apv_syntax_template.c | 14 ++ 2 files changed, 11 insertions(+), 5 dele

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

2025-05-03 Thread Mark Thompson
Halt tile component decoding at the first entropy error (this will be a desync and is not recoverable). If any tile components contain errors then discard the frame unless the output-corrupt flag is set. Also fixes CID 1646764, which is the error case where the tile component is too large for get

[FFmpeg-devel] [PATCH 1/6] cbs_apv: Always restore tracing state on split fragment error

2025-05-03 Thread Mark Thompson
Fixes CID 1646769. --- libavcodec/cbs_apv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/cbs_apv.c b/libavcodec/cbs_apv.c index e7dd04825c..ebf57d3bbb 100644 --- a/libavcodec/cbs_apv.c +++ b/libavcodec/cbs_apv.c @@ -230,14 +230,14 @@ static int cbs_apv_split_f

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

2025-04-30 Thread Mark Thompson
On 30/04/2025 22:22, 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/cbs_apv.c | 4 ++-- > 1 file chang

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

2025-04-30 Thread Mark Thompson
On 27/04/2025 20:58, James Almer wrote: > 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 deco

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

2025-04-30 Thread Mark Thompson
On 27/04/2025 23:21, James Almer wrote: > 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

Re: [FFmpeg-devel] [PATCH] avcodec/apv_dsp: Fix left-shift of negative value

2025-04-30 Thread Mark Thompson
On 30/04/2025 19:26, Andreas Rheinhardt wrote: > Patch attached. > > - Andreas Hmm, the spec does write exactly this but also defines << as arithmetic left shift of a two's complement representation so it works. Seems fair, LGTM. More generally this line is not robust to extreme values (can in

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

2025-04-30 Thread Mark Thompson
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/cbs_apv.c | 2 +- > 1 file changed

Re: [FFmpeg-devel] [PATCH 1/5] avformat/apvdec: Use ffio_read_size()

2025-04-30 Thread Mark Thompson
On 28/04/2025 10:39, Andreas Rheinhardt wrote: > Patches attached. > > - Andreas > > [PATCH 1/5] avformat/apvdec: Use ffio_read_size() LGTM. > [PATCH 2/5] avformat/apvdec: Check before access LGTM. > pkt->flags= AV_PKT_FLAG_KEY; Not sure where the funny alignment on this line ca

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

2025-04-30 Thread Mark Thompson
--- Cleaned up a bit from use earlier. This program allows testing of changes to entropy decode in a form much easier to debug than a whole stream. I had a more complete randomised test of transform here as well along with test code for checking intermediates, though it seems like the checkasm

Re: [FFmpeg-devel] [PATCH 1/7] avformat/apvenc: Only allow APV

2025-04-27 Thread Mark Thompson
On 27/04/2025 19:42, Andreas Rheinhardt wrote: > Patches attached. > > - Andreas > [PATCH 1/7] avformat/apvenc: Only allow APV Oops, sure. > [PATCH 2/7] avformat/apvenc: Remove unused header Sure. > [PATCH 3/7] avformat/apvdec: Use ffio_read_size() Is there a cleaner way to discard very shor

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

2025-04-27 Thread Mark Thompson
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/libavcodec/apv_decode.c b/libavcodec/apv_decode.c ind

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

2025-04-27 Thread Mark Thompson
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: James Almer > --- > libavformat/apvdec.c | 32 ++

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

2025-04-27 Thread Mark Thompson
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" from the SVT Open Content Video Test Suite 20

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

2025-04-27 Thread Mark Thompson
On 27/04/2025 01:15, James Almer wrote: > 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

[FFmpeg-devel] [PATCH v4 6/7] lavc: APV metadata bitstream filter

2025-04-26 Thread Mark Thompson
--- libavcodec/bitstream_filters.c | 1 + libavcodec/bsf/Makefile| 1 + libavcodec/bsf/apv_metadata.c | 134 + 3 files changed, 136 insertions(+) create mode 100644 libavcodec/bsf/apv_metadata.c diff --git a/libavcodec/bitstream_filters.c b/libavcodec

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

2025-04-26 Thread Mark Thompson
Demuxes raw streams as defined in draft spec section 10.2. --- libavformat/Makefile | 1 + libavformat/allformats.c | 1 + libavformat/apvdec.c | 248 +++ 3 files changed, 250 insertions(+) create mode 100644 libavformat/apvdec.c diff --git a/libav

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

2025-04-26 Thread Mark Thompson
entropy decoding because with the optimised transquant it is taking >90% of the decoder time at the highest bitrate bands. Thanks, - Mark Mark Thompson (7): lavc: APV codec ID and descriptor lavc/cbs: APV support lavf: APV demuxer lavc: APV decoder lavc/apv: AVX2 transquant for x86

[FFmpeg-devel] [PATCH v4 7/7] lavf: APV muxer

2025-04-26 Thread Mark Thompson
--- libavformat/Makefile | 1 + libavformat/allformats.c | 1 + libavformat/apvenc.c | 40 3 files changed, 42 insertions(+) create mode 100644 libavformat/apvenc.c diff --git a/libavformat/Makefile b/libavformat/Makefile index ef96c2762e..6c999

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

2025-04-26 Thread Mark Thompson
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) decode_transquant_10_avx2:

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

2025-04-26 Thread Mark Thompson
--- configure| 1 + libavcodec/Makefile | 1 + libavcodec/allcodecs.c | 1 + libavcodec/apv_decode.c | 433 +++ libavcodec/apv_decode.h | 80 libavcodec/apv_dsp.c | 136 libavcodec/apv_dsp.h | 37 +++

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

2025-04-26 Thread Mark Thompson
--- configure| 1 + libavcodec/Makefile | 1 + libavcodec/apv.h | 89 libavcodec/cbs.c | 6 + libavcodec/cbs_apv.c | 455 libavcodec/cbs_apv.h | 207

[FFmpeg-devel] [PATCH v4 1/7] lavc: APV codec ID and descriptor

2025-04-26 Thread Mark Thompson
--- libavcodec/codec_desc.c | 7 +++ libavcodec/codec_id.h | 1 + 2 files changed, 8 insertions(+) diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c index 9fb190e35a..88fed478a3 100644 --- a/libavcodec/codec_desc.c +++ b/libavcodec/codec_desc.c @@ -1985,6 +1985,13 @@ static con

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

2025-04-24 Thread Mark Thompson
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 2/7] lavc/cbs: APV support

2025-04-24 Thread Mark Thompson
On 24/04/2025 01:02, James Almer wrote: > On 4/23/2025 5:45 PM, Mark Thompson wrote: >> +static int cbs_apv_split_fragment(CodedBitstreamContext *ctx, >> +  CodedBitstreamFragment *frag, >> +  int header) >&g

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

2025-04-24 Thread Mark Thompson
On 24/04/2025 01:10, James Almer wrote: > 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]; >&g

Re: [FFmpeg-devel] [PATCH v1 8/8] avcodec/apv_decoder: Provided support for APV decoder

2025-04-24 Thread Mark Thompson
On 23/04/2025 15:13, Dawid Kozinski wrote: > - Added APV decoder wrapper > - Changes in project configuration file and libavcodec Makefile > - Added documentation for APV decoder wrapper > > Signed-off-by: Dawid Kozinski > --- > configure | 1 + > doc/decoders.texi | 27 ++ >

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

2025-04-24 Thread Mark Thompson
On 24/04/2025 13:08, Dawid Kozinski/Multimedia (PLT) /SRPOL/Staff Engineer/Samsung Electronics wrote: >> -Original Message- >> From: ffmpeg-devel On Behalf Of Mark >> Thompson >> Sent: środa, 23 kwietnia 2025 23:08 >> To: ffmpeg-devel@ffmpeg.org >> Sub

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

2025-04-23 Thread Mark Thompson
On 23/04/2025 15:13, Dawid Kozinski wrote: > - Changes in mov_write_video_tag function to handle APV elementary stream > - Provided structure APVDecoderConfigurationRecord that specifies the decoder > configuration information for APV video content > > Signed-off-by: Dawid Kozinski > --- > liba

[FFmpeg-devel] [PATCH v3 6/7] lavc: APV metadata bitstream filter

2025-04-23 Thread Mark Thompson
--- libavcodec/bitstream_filters.c | 1 + libavcodec/bsf/Makefile| 1 + libavcodec/bsf/apv_metadata.c | 134 + 3 files changed, 136 insertions(+) create mode 100644 libavcodec/bsf/apv_metadata.c diff --git a/libavcodec/bitstream_filters.c b/libavcodec

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

2025-04-23 Thread Mark Thompson
On 23/04/2025 15:12, 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|

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

2025-04-23 Thread Mark Thompson
--- configure| 1 + libavcodec/Makefile | 1 + libavcodec/apv.h | 89 libavcodec/cbs.c | 6 + libavcodec/cbs_apv.c | 408 ++ libavcodec/cbs_apv.h | 207 +

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

2025-04-23 Thread Mark Thompson
--- configure| 1 + libavcodec/Makefile | 1 + libavcodec/allcodecs.c | 1 + libavcodec/apv_decode.c | 403 +++ libavcodec/apv_decode.h | 80 libavcodec/apv_dsp.c | 136 + libavcodec/apv_dsp.h | 37 ++

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

2025-04-23 Thread Mark Thompson
Demuxes raw streams as defined in draft spec section 10.2. --- libavformat/Makefile | 1 + libavformat/allformats.c | 1 + libavformat/apvdec.c | 241 +++ 3 files changed, 243 insertions(+) create mode 100644 libavformat/apvdec.c diff --git a/libav

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

2025-04-23 Thread Mark Thompson
On 23/04/2025 20:52, Michael Niedermayer wrote: > Hi > > On Mon, Apr 21, 2025 at 04:24:36PM +0100, Mark Thompson wrote: >> Typical checkasm result on Alder Lake: >> >> decode_transquant_8_c: 461.1 ( 1.00x)

[FFmpeg-devel] [PATCH v3 7/7] lavf: APV muxer

2025-04-23 Thread Mark Thompson
--- libavformat/Makefile | 1 + libavformat/allformats.c | 1 + libavformat/apvenc.c | 40 3 files changed, 42 insertions(+) create mode 100644 libavformat/apvenc.c diff --git a/libavformat/Makefile b/libavformat/Makefile index ef96c2762e..6c999

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

2025-04-23 Thread Mark Thompson
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) decode_transquant_10_avx2:

[FFmpeg-devel] [PATCH v3 0/7] APV support

2025-04-23 Thread Mark Thompson
comments). * Decoder metadata support (not well-tested, need proper samples). * Raw muxer added for easier testing (round-trip through cbs is the identity). * Some other minor changes. Thanks, - Mark Mark Thompson (7): lavc: APV codec ID and descriptor lavc/cbs: APV support lavf: APV demuxer

[FFmpeg-devel] [PATCH v3 1/7] lavc: APV codec ID and descriptor

2025-04-23 Thread Mark Thompson
--- libavcodec/codec_desc.c | 7 +++ libavcodec/codec_id.h | 1 + 2 files changed, 8 insertions(+) diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c index 9fb190e35a..88fed478a3 100644 --- a/libavcodec/codec_desc.c +++ b/libavcodec/codec_desc.c @@ -1985,6 +1985,13 @@ static con

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

2025-04-21 Thread Mark Thompson
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:

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

2025-04-21 Thread Mark Thompson
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) decode_transquant_10_avx2:

[FFmpeg-devel] [PATCH v2 6/6] lavc: APV metadata bitstream filter

2025-04-21 Thread Mark Thompson
--- libavcodec/bitstream_filters.c | 1 + libavcodec/bsf/Makefile| 1 + libavcodec/bsf/apv_metadata.c | 134 + 3 files changed, 136 insertions(+) create mode 100644 libavcodec/bsf/apv_metadata.c diff --git a/libavcodec/bitstream_filters.c b/libavcodec

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

2025-04-21 Thread Mark Thompson
--- configure| 1 + libavcodec/Makefile | 1 + libavcodec/allcodecs.c | 1 + libavcodec/apv_decode.c | 331 +++ libavcodec/apv_decode.h | 80 ++ libavcodec/apv_dsp.c | 136 libavcodec/apv_dsp.h |

[FFmpeg-devel] [PATCH v2 3/6] lavf: APV demuxer

2025-04-21 Thread Mark Thompson
Demuxes raw streams as defined in draft spec section 10.2. --- libavformat/Makefile | 1 + libavformat/allformats.c | 1 + libavformat/apvdec.c | 248 +++ 3 files changed, 250 insertions(+) create mode 100644 libavformat/apvdec.c diff --git a/libav

[FFmpeg-devel] [PATCH v2 1/6] lavc: APV codec ID and descriptor

2025-04-21 Thread Mark Thompson
--- libavcodec/codec_desc.c | 7 +++ libavcodec/codec_id.h | 1 + 2 files changed, 8 insertions(+) diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c index 9fb190e35a..88fed478a3 100644 --- a/libavcodec/codec_desc.c +++ b/libavcodec/codec_desc.c @@ -1985,6 +1985,13 @@ static con

[FFmpeg-devel] [PATCH v2 2/6] lavc/cbs: APV support

2025-04-21 Thread Mark Thompson
--- configure| 1 + libavcodec/Makefile | 1 + libavcodec/apv.h | 86 libavcodec/cbs.c | 6 + libavcodec/cbs_apv.c | 395 ++ libavcodec/cbs_apv.h | 207 +

[FFmpeg-devel] [PATCH v2 0/6] APV support

2025-04-21 Thread Mark Thompson
v2 incorporating review comments and minor additional optimisations. Thanks, - Mark Mark Thompson (6): lavc: APV codec ID and descriptor lavc/cbs: APV support lavf: APV demuxer lavc: APV decoder lavc/apv: AVX2 transquant for x86-64 lavc: APV metadata bitstream filter configure

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

2025-04-21 Thread Mark Thompson
On 21/04/2025 01:54, Michael Niedermayer wrote: > On Sat, Apr 19, 2025 at 08:07:00PM +0100, Mark Thompson wrote: >> Demuxes raw streams as defined in draft spec section 10.2. >> --- >> libavformat/Makefile | 1 + >> libavformat/allformats.c | 1 + >>

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

2025-04-20 Thread Mark Thompson
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; >>> + >>>

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

2025-04-19 Thread Mark Thompson
On 19/04/2025 20:07, 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:

[FFmpeg-devel] [PATCH 1/6] lavc: APV codec ID and descriptor

2025-04-19 Thread Mark Thompson
--- libavcodec/codec_desc.c | 7 +++ libavcodec/codec_id.h | 1 + 2 files changed, 8 insertions(+) diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c index 9fb190e35a..88fed478a3 100644 --- a/libavcodec/codec_desc.c +++ b/libavcodec/codec_desc.c @@ -1985,6 +1985,13 @@ static con

[FFmpeg-devel] [PATCH 6/6] lavc: APV metadata bitstream filter

2025-04-19 Thread Mark Thompson
--- libavcodec/bitstream_filters.c | 1 + libavcodec/bsf/Makefile| 1 + libavcodec/bsf/apv_metadata.c | 134 + 3 files changed, 136 insertions(+) create mode 100644 libavcodec/bsf/apv_metadata.c diff --git a/libavcodec/bitstream_filters.c b/libavcodec

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

2025-04-19 Thread Mark Thompson
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) decode_transquant_10_avx2:

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

2025-04-19 Thread Mark Thompson
--- configure| 1 + libavcodec/Makefile | 1 + libavcodec/allcodecs.c | 1 + libavcodec/apv_decode.c | 327 +++ libavcodec/apv_decode.h | 80 ++ libavcodec/apv_dsp.c | 136 libavcodec/apv_dsp.h |

[FFmpeg-devel] [PATCH 3/6] lavc/cbs: APV support

2025-04-19 Thread Mark Thompson
--- configure| 1 + libavcodec/Makefile | 1 + libavcodec/apv.h | 86 libavcodec/cbs.c | 6 + libavcodec/cbs_apv.c | 395 ++ libavcodec/cbs_apv.h | 209 +

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

2025-04-19 Thread Mark Thompson
Demuxes raw streams as defined in draft spec section 10.2. --- libavformat/Makefile | 1 + libavformat/allformats.c | 1 + libavformat/apvdec.c | 245 +++ 3 files changed, 247 insertions(+) create mode 100644 libavformat/apvdec.c diff --git a/libav

[FFmpeg-devel] [PATCH 0/6] APV support

2025-04-19 Thread Mark Thompson
t non-x86. * ISOBMFF: <https://github.com/AcademySoftwareFoundation/openapv/blob/main/readme/apv_isobmff.md>. * MKV/WebM is presumably going to be a thing since this seems to be adopted by Android things? * RTP if you really want it <https://www.ietf.org/archive/id/draft-lim-rtp-apv-01

Re: [FFmpeg-devel] [PATCH] avcodec/av1_vaapi: Enable AV1Profile2 VAAPI support.

2024-08-11 Thread Mark Thompson
On 11/08/2024 19:27, Mark Thompson wrote: > On 30/07/2024 21:02, David (Ming Qiang) Wu via ffmpeg-devel wrote: >> AV1Profile2 VAAPI is supported and tested on AMD VCN5. >> >> Signed-off-by: David (Ming Qiang) Wu >> --- >> libavcodec/av1dec.c | 3 +++

Re: [FFmpeg-devel] [PATCH] avcodec/av1_vaapi: Enable AV1Profile2 VAAPI support.

2024-08-11 Thread Mark Thompson
On 30/07/2024 21:02, David (Ming Qiang) Wu via ffmpeg-devel wrote: > AV1Profile2 VAAPI is supported and tested on AMD VCN5. > > Signed-off-by: David (Ming Qiang) Wu > --- > libavcodec/av1dec.c | 3 +++ > libavcodec/vaapi_decode.c | 3 +++ > 2 files changed, 6 insertions(+) > > diff --git

[FFmpeg-devel] [PATCH] cbs_vp9: Ensure that the two superframe_header instances are identical

2024-08-11 Thread Mark Thompson
Fixes: use of uninitialized value Fixes: 70907/clusterfuzz-testcase-minimized-ffmpeg_BSF_VP9_METADATA_fuzzer-6339363208757248 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg --- On 11/08/2024 19:05, Mark Thompson wrote: > The correct

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/cbs_vp9: Try to store fewer than 2 things in the same bit

2024-08-11 Thread Mark Thompson
On 08/08/2024 00:53, Michael Niedermayer wrote: > Fixes: use of uninitialized value > Fixes: > 70907/clusterfuzz-testcase-minimized-ffmpeg_BSF_VP9_METADATA_fuzzer-6339363208757248 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-o

Re: [FFmpeg-devel] PATCH: Fallback to NV12 format in VAAPI drivers

2024-08-11 Thread Mark Thompson
On 10/08/2024 09:51, Lluís Batlle i Rossell wrote: > On Fri, Aug 09, 2024 at 09:43:53AM +0200, Lluís Batlle i Rossell wrote: >> On Fri, Aug 09, 2024 at 11:49:54AM +0800, Zhao Zhili wrote: vaapi drivers often lack proper image converesions and not all situations allow vagetimage or vaputim

Re: [FFmpeg-devel] [PATCH] lavc/vvc: Invalidate PPSs which refer to a changed SPS

2024-06-16 Thread Mark Thompson
On 15/06/2024 17:37, Frank Plowman wrote: > n 15/06/2024 13:24, Nuo Mi wrote: >> On Sat, Jun 15, 2024 at 2:35 PM Christophe Gisquet < >> christophe.gisq...@gmail.com> wrote: >> >>> Le ven. 14 juin 2024, 11:39, Frank Plowman a >>> écrit : >>> When the SPS associated with a particular SPS ID ch

Re: [FFmpeg-devel] [PATCH 07/16] hwcontext_nvtegra: add dynamic frequency scaling routines

2024-06-05 Thread Mark Thompson
On 30/05/2024 20:43, averne wrote: > To save on energy, the clock speed of multimedia engines should be adapted to > their workload. > > Signed-off-by: averne > --- > libavutil/hwcontext_nvtegra.c | 165 ++ > libavutil/hwcontext_nvtegra.h | 7 ++ > 2 files chan

Re: [FFmpeg-devel] [PATCH 06/16] avutil: add nvtegra hwcontext

2024-06-05 Thread Mark Thompson
On 30/05/2024 20:43, averne wrote: > This includes hwdevice and hwframes objects. > As the multimedia engines work with tiled surfaces (block linear in nvidia > jargon), two frame transfer methods are implemented. > The first makes use of the VIC to perform the copy. Since some revisions of > the

Re: [FFmpeg-devel] [PATCH 05/16] avutil: add common code for nvtegra

2024-06-05 Thread Mark Thompson
On 30/05/2024 20:43, averne wrote: > This includes a new pixel format for nvtegra hardware frames, and several > objects for interaction with hardware blocks. > In particular, this contains code for channels (handles to hardware engines), > maps (memory-mapped buffers shared with engines), and co

[FFmpeg-devel] [PATCH v5 2/2] hwcontext_vaapi: Deprecate quirks

2024-06-05 Thread Mark Thompson
These only apply to obsolete drivers which do not work with the now-required libva 2.x. --- Fixed checkheaders. libavutil/hwcontext_vaapi.c | 123 ++-- libavutil/hwcontext_vaapi.h | 17 + 2 files changed, 52 insertions(+), 88 deletions(-) diff --git a/libavu

[FFmpeg-devel] [PATCH v5 1/2] configure, lavu, lavc, lavfi: Remove libva 1.x support

2024-06-05 Thread Mark Thompson
libva 2.0 was released in 2017 and the 2.x versions are included in all supported distributions nowadays. Various features no longer need any configure check after this change, including all codecs except AV1. Note that the libva version is the API version plus one, so this is removing support for

[FFmpeg-devel] [PATCH v3 3/3] lavc/vaapi_hevc: Don't require exact profiles

2024-06-05 Thread Mark Thompson
Rather than turning the constraint flags into a single profile and then searching for that profile (and failing if it doesn't match any profile exactly), instead search all supported profiles and use the first one which supports the given set of constraint flags. --- libavcodec/vaapi_decode.c | 45

[FFmpeg-devel] [PATCH v3 2/3] lavc: Add test for H.265 profile handling

2024-06-05 Thread Mark Thompson
--- libavcodec/Makefile | 2 +- libavcodec/tests/.gitignore | 1 + libavcodec/tests/h265_profiles.c | 440 +++ tests/fate/libavcodec.mak| 5 + 4 files changed, 447 insertions(+), 1 deletion(-) create mode 100644 libavcodec/tests/h265_pro

[FFmpeg-devel] [PATCH v3 1/3] lavc/h265_profile_level: Expand profile compatibility checking

2024-06-05 Thread Mark Thompson
Replace existing get_profile() with find_profile(), which finds the lowest compatible profile rather than requiring an exact match. --- Now with an enum tag. libavcodec/h265_profile_level.c | 80 + libavcodec/h265_profile_level.h | 70 -

Re: [FFmpeg-devel] [PATCH 02/10, v3] avcodec: add amfdec.

2024-06-04 Thread Mark Thompson
On 30/05/2024 14:08, Dmitrii Ovchinnikov wrote: > From: Evgeny Pavlov > > Added AMF based h264, hevc, av1 decoders. > Co-authored-by: Dmitrii Ovchinnikov > v2: added encoder reinitialisation > v3: use AMF_SURFACE_UNKNOWN to int decoder(ctx->output_format before) > --- > libavcodec/Makefile|

Re: [FFmpeg-devel] [PATCH 01/10, v3] avutil: add hwcontext_amf.

2024-06-04 Thread Mark Thompson
On 30/05/2024 14:08, Dmitrii Ovchinnikov wrote: > Adds hwcontext_amf, which allows to use shared AMF > context for the encoder, decoder and AMF-based filters, > without copy to the host memory. > It will also allow you to use some optimisations in > the interaction of components (for example, SAV)

Re: [FFmpeg-devel] [PATCH v8 12/15] avcodec/vaapi_encode: extract a free funtion to base layer

2024-05-14 Thread Mark Thompson
On 18/04/2024 09:59, tong1.wu-at-intel@ffmpeg.org wrote: > From: Tong Wu > > Signed-off-by: Tong Wu > --- > libavcodec/hw_base_encode.c | 11 +++ > libavcodec/hw_base_encode.h | 2 ++ > libavcodec/vaapi_encode.c | 6 +- > 3 files changed, 14 insertions(+), 5 deletions(-) ".

Re: [FFmpeg-devel] [PATCH v8 11/15] avcodec/vaapi_encode: extract a get_recon_format function to base layer

2024-05-14 Thread Mark Thompson
On 18/04/2024 09:59, tong1.wu-at-intel@ffmpeg.org wrote: > From: Tong Wu > > Surface size and block size parameters are also moved to base layer. > > Signed-off-by: Tong Wu > --- > libavcodec/hw_base_encode.c | 58 +++ > libavcodec/hw_base_encode.h | 12 + >

  1   2   3   4   5   6   7   8   9   10   >