Re: [FFmpeg-devel] [PATCH 3/4 v2] avcodec: add LCEVC decoding support via LCEVCdec

2024-07-22 Thread Frank Plowman
On 21/07/2024 23:53, James Almer wrote: > Signed-off-by: James Almer > --- > configure | 3 + > doc/general_contents.texi | 13 ++ > libavcodec/Makefile | 1 + > libavcodec/lcevcdec.c | 276 ++ > libavcodec/lcevcdec.h | 44

Re: [FFmpeg-devel] [PATCH] lavc/vvc: Always set flags for the current picture

2024-06-27 Thread Frank Plowman
On 27/06/2024 13:52, Nuo Mi wrote: > On Mon, Jun 24, 2024 at 11:30 PM Frank Plowman > wrote: > >> ff_vvc_frame_rpl uses the flags to detect whether a frame is in use. >> Therefore, in the case of a CVSS AU (RASL/GDR with >> NoOutputBeforeRecoveryFlag) with ph_non_

[FFmpeg-devel] [PATCH v2] lavc/vvc: Always set flags for the current picture

2024-06-27 Thread Frank Plowman
, as is done by the HEVC decoder. Signed-off-by: Frank Plowman --- libavcodec/vvc/refs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/vvc/refs.c b/libavcodec/vvc/refs.c index 8b7ba639a3..26a5b0b34c 100644 --- a/libavcodec/vvc/refs.c +++ b/libavcodec/vvc/refs.c

Re: [FFmpeg-devel] [PATCH] avcodec/vvcdec: Fix compiling with MSVC 2022 17.8 and older

2024-06-27 Thread Frank Plowman
On 26/06/2024 09:20, Martin Storsjö wrote: > Versions of MSVC older than 17.9 error out here with the following > error: > > src/libavcodec/vvc/filter.c(815): error C2059: syntax error: '}' > src/libavcodec/vvc/filter.c(832): error C2065: 'all_zero_bs': undeclared > identifier >

Re: [FFmpeg-devel] [PATCH 5/5] lavc/hevcdec: improve check for PPS changing between slices

2024-06-26 Thread Frank Plowman
On 26/06/2024 13:43, Anton Khirnov wrote: > Compare actual PPS objects rather than just PPS ID, as the former might > change while the latter stays the same. > > Reported-by: Michael Niedermayer > --- > libavcodec/hevc/hevcdec.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff

[FFmpeg-devel] [PATCH] lavc/vvc: Don't discard return codes

2024-06-25 Thread Frank Plowman
Signed-off-by: Frank Plowman --- libavcodec/vvc/thread.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libavcodec/vvc/thread.c b/libavcodec/vvc/thread.c index c90c316661..118d56b67e 100644 --- a/libavcodec/vvc/thread.c +++ b/libavcodec/vvc/thread.c @@ -443,8

Re: [FFmpeg-devel] [PATCH] lavc/vvc: Validate IBC block vector

2024-06-25 Thread Frank Plowman
On 25/06/2024 15:19, Nuo Mi wrote: > On Mon, Jun 24, 2024 at 9:31 PM Frank Plowman wrote: > >> From H.266 (V3) (09/2023) p. 321: >> >> It is a requirement of bitstream conformance that the luma block >> vector bvL shall obey the following constraints: >>

[FFmpeg-devel] [PATCH v2] lavc/vvc: Validate IBC block vector

2024-06-25 Thread Frank Plowman
es crashes on fuzzed bitstreams. Signed-off-by: Frank Plowman --- Changes since v1: * Perform this check when the IBC block vectors are derived, rather than when they are first used. libavcodec/vvc/ctu.c | 19 +++ libavcodec/vvc/mvs.c | 21 +++-- libavcodec/vvc/

[FFmpeg-devel] [PATCH] lavc/vvc: Always set flags for the current picture

2024-06-24 Thread Frank Plowman
, as is done by the HEVC decoder. Additionally, add an assert0 to mitigate the effects of a frame being freed before it is used. Signed-off-by: Frank Plowman --- libavcodec/vvc/refs.c | 2 +- libavcodec/vvc/thread.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git

[FFmpeg-devel] [PATCH] lavc/vvc: Validate IBC block vector

2024-06-24 Thread Frank Plowman
es crashes on fuzzed bitstreams. Signed-off-by: Frank Plowman --- libavcodec/vvc/intra.c | 25 ++--- libavcodec/vvc/thread.c | 4 +--- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/libavcodec/vvc/intra.c b/libavcodec/vvc/intra.c index f77a012f09..11371db

Re: [FFmpeg-devel] [PATCH v2] fate/vvc: add vvc-conformance-RPR_A_4

2024-06-20 Thread Frank Plowman
On 10/06/2024 18:46, Frank Plowman wrote: > BeforeAfter > - > make fate-vvc CPU Time (No ASM) 131.52s 134.83s > libavcodec/vvc/* Line Coverage 95.3%96.9% > inter_template.c Line Co

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

2024-06-15 Thread Frank Plowman
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 chan

Re: [FFmpeg-devel] [PATCH] rtp enc/dec update for vvc

2024-06-14 Thread Frank Plowman
Hi, Thanks for the patch. Unfortunately it looks to be corrupted and does not apply. Also, it looks as though you submitted five near-identical patches. I would suggest you try directing patches to your own mailbox and re-applying them while debugging the formatting issues, rather than sending

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

2024-06-14 Thread Frank Plowman
on the SPS being referred to. Signed-off-by: Frank Plowman --- libavcodec/cbs_h2645.c | 21 - 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/libavcodec/cbs_h2645.c b/libavcodec/cbs_h2645.c index c5f167334d..e2389f124e 100644 --- a/libavcodec/cbs_h2645.c +++ b

Re: [FFmpeg-devel] [PATCH] fate/vvc: add vvc-conformance-RPR_A_Alibaba_4

2024-06-10 Thread Frank Plowman
On 10/06/2024 18:31, James Almer wrote: > On 6/10/2024 2:23 PM, Frank Plowman wrote: >> On 10/06/2024 14:26, Nuo Mi wrote: >>> Hi Frank, >>> Thank you for the patch. >>> Could we follow the naming conventions used for other clips? >>> >> Hi, &

[FFmpeg-devel] [PATCH v2] fate/vvc: add vvc-conformance-RPR_A_4

2024-06-10 Thread Frank Plowman
% Signed-off-by: Frank Plowman --- tests/fate/vvc.mak | 1 + tests/ref/fate/vvc-conformance-RPR_A_4 | 9 + 2 files changed, 10 insertions(+) create mode 100644 tests/ref/fate/vvc-conformance-RPR_A_4 diff --git a/tests/fate/vvc.mak b/tests/fate/vvc.mak index

Re: [FFmpeg-devel] [PATCH] fate/vvc: add vvc-conformance-RPR_A_Alibaba_4

2024-06-10 Thread Frank Plowman
On 10/06/2024 14:26, Nuo Mi wrote: > Hi Frank, > Thank you for the patch. > Could we follow the naming conventions used for other clips? > Hi, I did it this way because I do not have access to the FATE server, so somebody had to upload the clip for me and I felt it was easier if they did not

[FFmpeg-devel] [PATCH] fate/vvc: add vvc-conformance-RPR_A_Alibaba_4

2024-06-09 Thread Frank Plowman
% Signed-off-by: Frank Plowman --- tests/fate/vvc.mak | 1 + tests/ref/fate/vvc-conformance-RPR_A_Alibaba_4 | 9 + 2 files changed, 10 insertions(+) create mode 100644 tests/ref/fate/vvc-conformance-RPR_A_Alibaba_4 diff --git a/tests/fate/vvc.mak b/tests/fate

[FFmpeg-devel] [PATCH v4] lavc/vvc: Prevent overflow in chroma QP derivation

2024-06-09 Thread Frank Plowman
to sps_num_points_in_qp_table_minus1[ i ] + 1, inclusive. Additionally, don't discard the return code from sps_chroma_qp_table. Signed-off-by: Frank Plowman --- Changes since v3: * Add comment noting why qp_{in,out} are not tested themselves. libavcodec/vvc/ps.c | 14 +++--- 1 file changed, 11 insertions

Re: [FFmpeg-devel] [PATCH v2 2/2] lavc/vvc: Prevent overflow in chroma QP derivation

2024-06-06 Thread Frank Plowman
Hi, Thanks for your review. On 05/06/2024 14:50, Nuo Mi wrote: > Hi Frank, > Thank you for the patch > > On Wed, Jun 5, 2024 at 5:24 PM Frank Plowman wrote: > >> On the top of p. 112 in VVC (09/2023): >> >> It is a requirement of bitstream conformance that

[FFmpeg-devel] [PATCH v3] lavc/vvc: Prevent overflow in chroma QP derivation

2024-06-06 Thread Frank Plowman
to sps_num_points_in_qp_table_minus1[ i ] + 1, inclusive. Additionally, don't discard the return code from sps_chroma_qp_table. Signed-off-by: Frank Plowman --- Changes since v2: * Squash discarded return code patch and QP overflow patch. * Combine QpIn and QpOut validation into a single if statement. libavcodec

[FFmpeg-devel] [PATCH v2 2/2] lavc/vvc: Prevent overflow in chroma QP derivation

2024-06-05 Thread Frank Plowman
to sps_num_points_in_qp_table_minus1[ i ] + 1, inclusive. Signed-off-by: Frank Plowman --- libavcodec/vvc/ps.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libavcodec/vvc/ps.c b/libavcodec/vvc/ps.c index bfc3c121fd..c4f64d5da7 100644 --- a/libavcodec/vvc/ps.c +++ b/libavcodec/vvc/ps.c

[FFmpeg-devel] [PATCH v2 1/2] lavc/vvc: Use sps_chroma_qp_table return code

2024-06-05 Thread Frank Plowman
Signed-off-by: Frank Plowman --- libavcodec/vvc/ps.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libavcodec/vvc/ps.c b/libavcodec/vvc/ps.c index 1b23675c98..bfc3c121fd 100644 --- a/libavcodec/vvc/ps.c +++ b/libavcodec/vvc/ps.c @@ -186,8 +186,11 @@ static int

[FFmpeg-devel] [PATCH] lavc/vvc: Prevent overflow in chroma QP derivation

2024-06-05 Thread Frank Plowman
to sps_num_points_in_qp_table_minus1[ i ] + 1, inclusive. Signed-off-by: Frank Plowman --- libavcodec/vvc/ps.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libavcodec/vvc/ps.c b/libavcodec/vvc/ps.c index 1b23675c98..b024caf460 100644 --- a/libavcodec/vvc/ps.c +++ b/libavcodec/vvc/ps.c

[FFmpeg-devel] [PATCH] lavc/vvc: Reallocate pixel buffers if pixel shift changes

2024-06-03 Thread Frank Plowman
Allocations in the following lines depend on the pixel shift, and so these buffers must be reallocated if the pixel shift changes. Patch fixes segmentation faults in fuzzed bitstreams. Signed-off-by: Frank Plowman --- libavcodec/vvc/dec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion

[FFmpeg-devel] [PATCH] lavc/vvc: Don't free uninitialised pic arrays

2024-05-31 Thread Frank Plowman
and ultimately crashes. Patch prevents this by adding an initialised flag associated with the picture arrays. Signed-off-by: Frank Plowman --- libavcodec/vvc/dec.c | 7 +++ libavcodec/vvc/dec.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/libavcodec/vvc/dec.c b/libavcodec/vvc/dec.c

[FFmpeg-devel] [PATCH] lavc/vvc: Validate temporal MVP references

2024-05-26 Thread Frank Plowman
reference picture if it is actually going to be used (i.e. if ph_temporal_mvp_enabled_flag is 1), else legal RPR bitstreams will fail the new checks. Co-authored-by: Nuo Mi Signed-off-by: Frank Plowman --- libavcodec/vvc/refs.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions

Re: [FFmpeg-devel] [PATCH] lavf/dash: Forward strict flag to component demuxers

2024-05-22 Thread Frank Plowman
Thanks for your review Andreas. On 20/05/2024 21:41, Andreas Rheinhardt wrote: > Frank Plowman: >> Before the patch, opening a DASH file containing streams which require >> experimental decoders was problematic. No matter where the -strict -2 >> was put on the com

[FFmpeg-devel] [PATCH v2] lavf/dash: Forward strict flag to component demuxers

2024-05-22 Thread Frank Plowman
-2 flag, which is already present. Decoding appeared to continue correctly however. Patch removes the error message by creating an options object for the demuxer created for the component, which inherits from the parent demuxer. Signed-off-by: Frank Plowman --- Changes since v1: Use nb_streams

[FFmpeg-devel] [PATCH] lavf/dash: Forward strict flag to component demuxers

2024-05-20 Thread Frank Plowman
-2 flag, which is already present. Decoding appeared to continue correctly however. Patch removes the error message by creating an options object for the demuxer created for the component, which inherits from the parent demuxer. Signed-off-by: Frank Plowman --- PS: Can anyone think of other

Re: [FFmpeg-devel] [PATCH 14/24] avfilter/Makefile: Add scale(2ref)->framesync dependency

2024-05-07 Thread Frank Plowman
On 05/05/2024 14:40, Andreas Rheinhardt wrote: > Forgotten in e82a3997cdd6c0894869b33ba42430ac3c57fb3b. > > Signed-off-by: Andreas Rheinhardt > --- > libavfilter/Makefile | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/libavfilter/Makefile b/libavfilter/Makefile >

Re: [FFmpeg-devel] [PATCH] lavf/vf_scale: Add framesync dependency to Makefile

2024-05-07 Thread Frank Plowman
On 07/05/2024 22:04, Frank Plowman wrote: > Since e82a3997cdd6c0894869b33ba42430ac3c57fb3b, the scale filter has > depended on FFFrameSync. Reflect this in the Makefile, fixing compile > errors under some configurations. > > Signed-off-by: Frank Plowman > --- > libavfilter

[FFmpeg-devel] [PATCH] lavf/vf_scale: Add framesync dependency to Makefile

2024-05-07 Thread Frank Plowman
Since e82a3997cdd6c0894869b33ba42430ac3c57fb3b, the scale filter has depended on FFFrameSync. Reflect this in the Makefile, fixing compile errors under some configurations. Signed-off-by: Frank Plowman --- libavfilter/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [FFmpeg-devel] [PATCH] avcodec/vvcdec: ff_vvc_frame_submit, avoid initializing task twice.

2024-04-21 Thread Frank Plowman
On 21/04/2024 15:52, Nuo Mi wrote: > For some error bitstreams, a CTU belongs to two slices/entry points. > If the decoder initializes and submmits the CTU task twice, it may crash the > program > or cause it to enter an infinite loop. > > Reported-by: Frank Plowman >

[FFmpeg-devel] [PATCH] lavc/videodsp: Remove emulated_edge_mc duplicate @param

2024-04-20 Thread Frank Plowman
emulated_edge_mc has no parameter called dst_stride. The description is a duplicate of the description for dst_linesize. Signed-off-by: Frank Plowman --- libavcodec/videodsp.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/libavcodec/videodsp.h b/libavcodec/videodsp.h index e8960b609d

Re: [FFmpeg-devel] [PATCH] lavc/vvc: Skip enhancement layer NAL units

2024-04-18 Thread Frank Plowman
On 18/04/2024 21:23, James Almer wrote: > On 4/18/2024 5:19 PM, Frank Plowman wrote: >> On 18/04/2024 20:43, James Almer wrote: >>> On 4/18/2024 3:59 PM, Frank Plowman wrote: >>>> The native VVC decoder does not yet support quality/spatial/multiview >>&

[FFmpeg-devel] [PATCH v2] lavc/vvc: Skip enhancement layer NAL units

2024-04-18 Thread Frank Plowman
The native VVC decoder does not yet support quality/spatial/multiview scalability. Bitstreams requiring this feature could cause crashes. Patch fixes this by skipping NAL units which are not in the base layer, warning the user while doing so. Signed-off-by: Frank Plowman --- Changes since v1

Re: [FFmpeg-devel] [PATCH] lavc/vvc: Skip enhancement layer NAL units

2024-04-18 Thread Frank Plowman
On 18/04/2024 20:43, James Almer wrote: > On 4/18/2024 3:59 PM, Frank Plowman wrote: >> The native VVC decoder does not yet support quality/spatial/multiview >> scalability.  Bitstreams requiring this feature could cause crashes. >> Patch fixes this by skipping NAL units whic

[FFmpeg-devel] [PATCH] lavc/vvc: Skip enhancement layer NAL units

2024-04-18 Thread Frank Plowman
The native VVC decoder does not yet support quality/spatial/multiview scalability. Bitstreams requiring this feature could cause crashes. Patch fixes this by skipping NAL units which are not in the base layer, warning the user while doing so. Signed-off-by: Frank Plowman --- libavcodec/vvc

Re: [FFmpeg-devel] [RFC] 5 year plan & Inovation

2024-04-17 Thread Frank Plowman
On 17/04/2024 16:22, Michael Niedermayer wrote: > On Wed, Apr 17, 2024 at 04:22:03PM +0200, Lynne wrote: >> Apr 17, 2024, 15:58 by mich...@niedermayer.cc: >>> Some ideas and why they would help FFmpeg: >>> >>> [...] >>> >> >> Just no. >> >>> * ffchat >>> (expand into realtime chat / zoom) this

Re: [FFmpeg-devel] cannot compile the ffmpeg latest on local

2024-04-16 Thread Frank Plowman
On 16/04/2024 11:09, B-2014 Ariyan Kashyap wrote: > Getting this err while running ./configure --enable-shared > > ./configure --enable-shared > nasm/yasm not found or too old. Use --disable-x86asm for a crippled build. > > If you think configure made a mistake, make sure you are using the

[FFmpeg-devel] [PATCH] lavc/vvc: Increase size of ctb_size_y

2024-04-13 Thread Frank Plowman
sps_log2_ctu_size_minus5 = 3. Signed-off-by: Frank Plowman --- libavcodec/vvc/ps.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/vvc/ps.h b/libavcodec/vvc/ps.h index 78f1687fef..6656a06320 100644 --- a/libavcodec/vvc/ps.h +++ b/libavcodec/vvc/ps.h @@ -69,7 +69,7 @@ typedef

Re: [FFmpeg-devel] [PATCH] avcodec/vvc/ps: reset sps_id_used on PS uninit

2024-04-13 Thread Frank Plowman
On 09/04/2024 14:36, Nuo Mi wrote: > On Mon, Apr 8, 2024 at 11:15 PM Frank Plowman wrote: > >> On 08/04/2024 15:12, Nuo Mi wrote: >>> On Mon, Apr 8, 2024 at 4:37 PM Frank Plowman >> wrote: >>> >>>> On 07/04/2024 15:48, James Almer wrote: >>

[FFmpeg-devel] [PATCH] lavc/vvc: Fix out-of-bounds array access

2024-04-09 Thread Frank Plowman
The 2 which has been changed to an 8 in the array length expression is the maximum value of sps_bitdepth_minus8. This was missed when updating to VVCv2, which increased this maximum from 2 to 8. Signed-off-by: Frank Plowman --- libavcodec/vvc/intra.c | 12 1 file changed, 8

[FFmpeg-devel] [PATCH] lavc/vvc: Avoid overflow in coeff scale intermediate

2024-04-09 Thread Frank Plowman
Make intermediate result 64-bits to avoid an overflow before the right shift. Signed-off-by: Frank Plowman --- libavcodec/vvc/intra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/vvc/intra.c b/libavcodec/vvc/intra.c index e515fb9710..5ac7d02c80 100644

[FFmpeg-devel] [PATCH] lavc/vvc: Fix buffer overread in CABAC

2024-04-09 Thread Frank Plowman
this for good measure. Signed-off-by: Frank Plowman --- libavcodec/vvc/dec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/vvc/dec.c b/libavcodec/vvc/dec.c index 27ffbb741d..a4fc40b40a 100644 --- a/libavcodec/vvc/dec.c +++ b/libavcodec/vvc/dec.c @@ -497,9 +497,11 @@ static void

[FFmpeg-devel] [PATCH] lavc/vvc_parser: Fix integer overflow calculating framerate

2024-04-08 Thread Frank Plowman
num_units_in_tick and time_scale are both 32-bit unsigned integers. Storing them as ints was causing overflows. Signed-off-by: Frank Plowman --- libavcodec/vvc_parser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/vvc_parser.c b/libavcodec/vvc_parser.c

[FFmpeg-devel] [PATCH] lavc/vvc: Fix left shifts of negative values

2024-04-08 Thread Frank Plowman
All these variables lie in the range [-12..12] Signed-off-by: Frank Plowman --- libavcodec/vvc/ps.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libavcodec/vvc/ps.c b/libavcodec/vvc/ps.c index 3c71c34bae..1b23675c98 100644 --- a/libavcodec/vvc/ps.c +++ b

Re: [FFmpeg-devel] [PATCH] avcodec/vvc/ps: reset sps_id_used on PS uninit

2024-04-08 Thread Frank Plowman
On 08/04/2024 15:12, Nuo Mi wrote: > On Mon, Apr 8, 2024 at 4:37 PM Frank Plowman wrote: > >> On 07/04/2024 15:48, James Almer wrote: >>> On 4/7/2024 10:38 AM, Nuo Mi wrote: >>>> On Sun, Apr 7, 2024 at 11:05 AM James Almer wrote: >

Re: [FFmpeg-devel] [PATCH] avcodec/vvc/ps: reset sps_id_used on PS uninit

2024-04-08 Thread Frank Plowman
On 07/04/2024 15:48, James Almer wrote: > On 4/7/2024 10:38 AM, Nuo Mi wrote: >> On Sun, Apr 7, 2024 at 11:05 AM James Almer wrote: >> >>> Signed-off-by: James Almer >>> --- >>>   libavcodec/vvc/ps.c | 1 + >>>   1 file changed, 1 insertion(+) >>> >>> diff --git a/libavcodec/vvc/ps.c

[FFmpeg-devel] [PATCH v2] lavc/vvc: Error if SPS ID is duplicated within CVS

2024-04-06 Thread Frank Plowman
CParamSets. If it encounters an SPS with an ID already in use and whose content differs from the previous SPS, it throws an AVERROR_INVALIDDATA. Signed-off-by: Frank Plowman --- Changes since v1: * Track which SPS IDs are in use using a bit field rather than a bool array. * Move sps_id_used

[FFmpeg-devel] [PATCH] lavc/vvc: Error if SPS ID is duplicated within CVS

2024-04-03 Thread Frank Plowman
Key line from the spec is: "All SPS NAL units with a particular value of sps_seq_parameter_set_id in a CVS shall have the same content." Prior to this patch, the VVC decoder's behaviour on encountering a duplicated SPS ID (within the entire bitstream, not restricted to a CVS) was simply to

Re: [FFmpeg-devel] [PATCH] lavc/vvc: Only read split_cu_flag if a split is allowed

2024-04-03 Thread Frank Plowman
On 02/04/2024 22:48, Frank Plowman wrote: Add a check to ensure some split is possible before reading the split_cu_flag. This is present in the spec, in VVCv3 section 7.3.11.4. Its omission could lead to infinite loops and ultimately crashing due to stack overflow. --- libavcodec/vvc

[FFmpeg-devel] [PATCH] lavc/vvc: Only read split_cu_flag if a split is allowed

2024-04-02 Thread Frank Plowman
Add a check to ensure some split is possible before reading the split_cu_flag. This is present in the spec, in VVCv3 section 7.3.11.4. Its omission could lead to infinite loops and ultimately crashing due to stack overflow. --- libavcodec/vvc/vvc_ctu.c | 7 ++- 1 file changed, 6

[FFmpeg-devel] [PATCH] lavc/vvc: Fix check whether QG is in first tile col

2024-03-19 Thread Frank Plowman
The second part of this condition is intended to check whether the current quantisation group is in the first CTU column of the current tile. The issue is that ctb_to_col_bd gives the x-ordinate of the first column of the current tile *in CTUs*, while xQg gives the x-ordinate of the quantisation

Re: [FFmpeg-devel] [PATCH 00/14] avcodec/vvcdec: support subpicture

2024-03-19 Thread Frank Plowman
On 18/03/2024 14:16, Nuo Mi wrote: > see introductions here: https://dashif.org/docs/VVC%20HLS%20overview%20.pdf > > Frank Plowman (1): > avcodec/vvcdec: support rectangular single-slice subpics > > Nuo Mi (13): > avcodec/vvcdec: NoBackwardPredFlag, only check active

Re: [FFmpeg-devel] [PATCH] vvcdec: Mark as experimental

2024-03-15 Thread Frank Plowman
On 15/03/2024 10:22, Kieran Kunhya wrote: > On Thu, 14 Mar 2024, 22:54 Michael Niedermayer, > wrote: > >> On Wed, Feb 07, 2024 at 10:55:18PM +, Kieran Kunhya wrote: >>> On Wed, 7 Feb 2024 at 22:06, Paul B Mahol wrote: >>> On Wed, Feb 7, 2024 at 10:13 PM Kieran Kunhya wrote: >

Re: [FFmpeg-devel] [PATCH] lavc/vvc: AVERROR_PATCHWELCOME for subpictures

2024-03-12 Thread Frank Plowman
On 12/03/2024 03:33, Wang, Fei W wrote: > On Mon, 2024-03-11 at 21:57 -0300, James Almer wrote: >> On 3/11/2024 9:49 PM, Michael Niedermayer wrote: >>> On Mon, Mar 11, 2024 at 06:53:31PM +0000, Frank Plowman wrote: >>>> VVC's subpictures feature is not yet implemen

[FFmpeg-devel] [PATCH] lavc/vvc: AVERROR_PATCHWELCOME for subpictures

2024-03-11 Thread Frank Plowman
VVC's subpictures feature is not yet implemented in the native decoder. Throw an AVERROR_PATCHWELCOME when trying to decode a bitstream using the feature. Fixes crashes when trying to decode bitstreams which use the feature. Signed-off-by: Frank Plowman --- libavcodec/vvc/vvc_ps.c | 15

Re: [FFmpeg-devel] FFmpeg 7.0 blocking issues

2024-03-08 Thread Frank Plowman
On 08/03/2024 14:04, James Almer wrote: > On 3/8/2024 11:02 AM, Kieran Kunhya wrote: >> On Fri, 8 Mar 2024 at 14:00, James Almer wrote: >> >>> On 3/3/2024 4:35 AM, Jean-Baptiste Kempf wrote: n Sat, 2 Mar 2024, at 23:55, Michael Niedermayer wrote: > On Tue, Jan 23, 2024 at 08:22:41PM

Re: [FFmpeg-devel] [PATCH] avcodec/vvcdec: check pred flag to fix undefined beavhiours

2024-03-03 Thread Frank Plowman
On 03/03/2024 03:31, Nuo Mi wrote: > libavcodec/vvc/vvc_inter.c:823:18: runtime error: signed integer overflow: > 1426128896 + 1426128896 cannot be represented in type 'int' > SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior > libavcodec/vvc/vvc_inter.c:823:18 > --- >

[FFmpeg-devel] [PATCH] lavc/vvc: Read subpic ID when only one subpicture is present

2024-02-25 Thread Frank Plowman
"VVC HDR UHDTV1 OpenGOP 3840x2160 50fps HLG10 PiP" V bitstream. Patch fixes this by moving the reads for these syntax elements out a scope. Signed-off-by: Frank Plowman --- Sorry, should probably have put this in with 53ab7ff67e7ee9e7cae5cb0449203a7951cbe029.

Re: [FFmpeg-devel] [PATCH] lavc/vvc: Correct sps_num_subpics_minus1 minimum

2024-02-25 Thread Frank Plowman
On 25/02/2024 19:50, James Almer wrote: > On 2/25/2024 2:51 PM, Frank Plowman wrote: >> The spec says "the value of sps_num_subpics_minus1 shall be in the >> range of 0 to MaxSlicesPerAu − 1, inclusive." >> >> Signed-off-by: Frank Plowman >> --- >

[FFmpeg-devel] [PATCH] lavc/vvc: Increase VVC_MAX_* definitions for level 6.3

2024-02-25 Thread Frank Plowman
Reported-by: James Almer Signed-off-by: Frank Plowman --- libavcodec/vvc.h | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/libavcodec/vvc.h b/libavcodec/vvc.h index 7d165cdb86..c4cec1eb8f 100644 --- a/libavcodec/vvc.h +++ b/libavcodec/vvc.h

[FFmpeg-devel] [PATCH] lavc/vvc: Correct sps_num_subpics_minus1 minimum

2024-02-25 Thread Frank Plowman
The spec says "the value of sps_num_subpics_minus1 shall be in the range of 0 to MaxSlicesPerAu − 1, inclusive." Signed-off-by: Frank Plowman --- libavcodec/cbs_h266_syntax_template.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/cbs_h266_syntax_tem

[FFmpeg-devel] [PATCH] lavc/vvc: Fail inter prediction if using IBC

2024-02-17 Thread Frank Plowman
IBC is not yet implemented. Fail the inter prediction process with AVERROR_PATCHWELCOME if the bitstream uses IBC. Fixes crashes due to out-of-bounds reads when attempting to decode IBC bitstreams. Signed-off-by: Frank Plowman --- libavcodec/vvc/vvc_inter.c | 30

Re: [FFmpeg-devel] [PATCH] avcodec/vvcdec: frame_context_setup, set fc->ref to NULL

2024-02-13 Thread Frank Plowman
On 13/02/2024 02:30, Nuo Mi wrote: > fc->ref points to an old VVCFrame, which cannot be used after > frame_context_setup. > This prevents crashes in decode_nal_units-->ff_vvc_report_frame_finished. > > Signed-off-by: Frank Plowman > --- > libavcodec/vvc/vvcdec.c

Re: [FFmpeg-devel] [PATCH] lavc/vvc: Check fc->ref contains valid reference

2024-02-08 Thread Frank Plowman
On 08/02/2024 21:50, Lynne wrote: > Feb 8, 2024, 22:16 by p...@frankplowman.com: > >> From: Frank Plowman >> >> Depending on where exactly decode_nal_unit failed, it is possible that >> fc->ref holds a VVCFrame which has had ff_vvc_unref_frame called on it &g

[FFmpeg-devel] [REFUND-REQUEST] FOSDEM '24 Expenses

2024-02-06 Thread Frank Plowman
Hello, I am requesting reimbursement for the following expenses made attending FOSDEM 2024, where I delivered a talk about the FFmpeg VVC decoder and met with FFmpeg developers. Expense | Amount (GBP) --+- Return flight MAN <-> CRL |

Re: [FFmpeg-devel] [PATCH] lavu/thread: Check HAVE_PTHREAD_SET_?NAME_NP is defined

2024-02-06 Thread Frank Plowman
On 06/02/2024 11:23, Andreas Rheinhardt wrote: > p...@frankplowman.com: >> From: Frank Plowman >> >> Check HAVE_PTHREAD_SETNAME_NP and HAVE_PTHREAD_SET_NAME_NP are defined >> before using them in macro conditions. Gets rid of lots of -Wundef >> warnings pre

Re: [FFmpeg-devel] [PATCH] lavc/vvc: Error pps_single_slice_per_subpic_flag

2024-02-05 Thread Frank Plowman
On 03/02/2024 16:56, Nuo Mi wrote: On Sat, Feb 3, 2024 at 11:51 PM Frank Plowman wrote: On 03/02/2024 15:46, Nuo Mi wrote: On Sat, Feb 3, 2024 at 9:54 PM Frank Plowman wrote: On 02/02/2024 14:39, Nuo Mi wrote: On Thu, Feb 1, 2024 at 10:01 PM wrote: From: Frank Plowman

Re: [FFmpeg-devel] [PATCH] lavc/vvc: Validate alf_list indexes

2024-02-05 Thread Frank Plowman
On 05/02/2024 13:45, Nuo Mi wrote: On Sun, Feb 4, 2024 at 1:22 AM wrote: From: Frank Plowman Fixes crashes when decoding illegal bitstreams found by fuzzing. Signed-off-by: Frank Plowman --- libavcodec/vvc/vvc_ctu.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions

Re: [FFmpeg-devel] [PATCH] lavc/vvc: Error pps_single_slice_per_subpic_flag

2024-02-03 Thread Frank Plowman
On 03/02/2024 15:46, Nuo Mi wrote: On Sat, Feb 3, 2024 at 9:54 PM Frank Plowman wrote: On 02/02/2024 14:39, Nuo Mi wrote: On Thu, Feb 1, 2024 at 10:01 PM wrote: From: Frank Plowman pps_single_slice_per_subpic_flag is not yet supported. Support is WIP, but in the meantime throw an error

Re: [FFmpeg-devel] [PATCH] lavc/vvc: Error pps_single_slice_per_subpic_flag

2024-02-03 Thread Frank Plowman
On 02/02/2024 14:39, Nuo Mi wrote: On Thu, Feb 1, 2024 at 10:01 PM wrote: From: Frank Plowman pps_single_slice_per_subpic_flag is not yet supported. Support is WIP, but in the meantime throw an error when trying to decode a bitstream with it set, avoiding an out-of-bounds array access

Re: [FFmpeg-devel] [PATCH] lavc/vvc: Add check to num_multi_layer_olss

2024-01-30 Thread Frank Plowman
On 30/01/2024 12:55, Frank Plowman wrote: On 30/01/2024 12:31, Nuo Mi wrote: On Tue, Jan 30, 2024 at 5:41 PM  wrote: From: Frank Plowman Check that vps_each_layer_is_an_ols_flag, which indicates that "at least one OLS specified by the VPS contains more than one layer,&qu

Re: [FFmpeg-devel] [PATCH] lavc/vvc: Add check to num_multi_layer_olss

2024-01-30 Thread Frank Plowman
On 30/01/2024 12:31, Nuo Mi wrote: On Tue, Jan 30, 2024 at 5:41 PM wrote: From: Frank Plowman Check that vps_each_layer_is_an_ols_flag, which indicates that "at least one OLS specified by the VPS contains more than one layer," is set if num_multi_layer_olss is non-zero. Fi

[FFmpeg-devel] [PATCH] lavc/vvc: Increase IntraEdgeParams buffer size

2024-01-29 Thread Frank Plowman
The reference line buffers are used with indices in the range -MAX_TB_SIZE - 3 to refw + FFMAX(1, w/h) * ref_idx + 1, which is at most 5*MAX_TB_SIZE + 1. Fixes buffer overflows. http://fate.ffmpeg.org/report.cgi?slot=armv7-linux-gcc-9=20240124051736 --- libavcodec/vvc/vvcdsp.c | 8 1

Re: [FFmpeg-devel] [PATCH 2/3] avcodec/cbs_h266_syntax_template: sanity check num_multi_layer_olss

2024-01-29 Thread Frank Plowman
On 29/01/2024 21:13, James Almer wrote: On 1/29/2024 5:19 PM, Frank Plowman wrote: Below is a patch which addresses the issue, an integer overflow when calculating the bounds for vps_num_ols_timing_hrd_params_minus1.  There's also a similar fix for vps_num_dpb_params_minus1. diff --git

Re: [FFmpeg-devel] [PATCH 2/3] avcodec/cbs_h266_syntax_template: sanity check num_multi_layer_olss

2024-01-29 Thread Frank Plowman
On 29/01/2024 19:04, James Almer wrote: Well, turns out the current code is fine and my suggested change above is wrong. Fun how that goes. Can you test the following instead? diff --git a/libavcodec/cbs_h266_syntax_template.c b/libavcodec/cbs_h266_syntax_template.c index

Re: [FFmpeg-devel] [PATCH] avformat/ffrtmpcrypt: Fix int-conversion warning

2023-12-22 Thread Frank Plowman
Hi Martin, Thanks for the review. On 22/12/2023 12:15, Martin Storsjö wrote: The change LGTM, but the wording here is slightly confusing IMO. The problem isn't with using per se AVERROR, that's just a macro for generating suitable integers, the issue is more about the fact that we're

[FFmpeg-devel] [PATCH] avformat/ffrtmpcrypt: Fix int-conversion warning

2023-12-22 Thread Frank Plowman
Fedora's naughty list of projects with warnings which may be upgraded to errors in GCC 14 [2]. [1]: https://gcc.gnu.org/pipermail/gcc/2023-May/241264.html [2]: https://www.mail-archive.com/devel@lists.fedoraproject.org/msg196024.html Signed-off-by: Frank Plowman --- libavformat/rtmpdh.c | 21

Re: [FFmpeg-devel] trac spam

2023-12-03 Thread Frank Plowman
On 03/12/2023 08:49, Michael Koch wrote: Does anybody know why the last regex seach pattern in the list doesn't work? I thought it should match if any of the keywords is followed by "http" in the same line, with any number of any characters before, between and after the keywords.

Re: [FFmpeg-devel] [PATCH v2] doc/t2h: Support texinfo 7.0

2023-11-07 Thread Frank Plowman
On 07/11/2023 20:38, epira...@gmail.com wrote: On 7 Nov 2023, at 16:57, Frank Plowman wrote: Resolves #10636 (http://trac.ffmpeg.org/ticket/10636) Texinfo 7.0, released in November 2022, changed the names of various functions. Compiling docs with Texinfo 7.0 results in warnings

Re: [FFmpeg-devel] [PATCH] doc/t2h: Support texinfo 7.0

2023-11-06 Thread Frank Plowman
On 05/11/2023 21:01, Stefano Sabatini wrote: @@ -159,7 +192,18 @@ sub ffmpeg_begin_file($$$) my ($title, $description, $encoding, $date, $css_lines, $doctype, $bodytext, $copying_comment, $after_body_open, $extra_head, $program_and_version, $program_homepage, -

Re: [FFmpeg-devel] FFmpeg 6.0.1 and 5.1.4

2023-11-05 Thread Frank Plowman
On 05/11/2023 14:47, Sebastian Ramacher wrote: On 2023-11-04 00:00:38 +0100, Michael Niedermayer wrote: Hi i intend to do releases from thr release/6.0 and 5.1 branches very soon if theres something you want backported, please do it now. If you want me to wait for something, just say so. I'd

[FFmpeg-devel] [PATCH] x86inc: Add REPX macro to repeat instructions/operations

2023-09-29 Thread Frank Plowman
from x264: https://code.videolan.org/videolan/x264/-/commit/6d10612ab0007f8f60dd2399182efd696da3ffe4 Signed-off-by: Frank Plowman --- libavutil/x86/x86inc.asm | 10 ++ 1 file changed, 10 insertions(+) diff --git a/libavutil/x86/x86inc.asm b/libavutil/x86/x86inc.asm index 251ee797de

Re: [FFmpeg-devel] [PATCH] cbs_h266: add range extension support

2023-07-05 Thread Frank Plowman
On 05/07/2023 13:38, Frank Plowman wrote: On 05/07/2023 12:45, James Almer wrote: On 7/5/2023 8:38 AM, Nuo Mi wrote: From: frankplow ---   libavcodec/cbs_h266.h | 18 ++   libavcodec/cbs_h266_syntax_template.c | 79 +--   2 files changed, 93

Re: [FFmpeg-devel] [PATCH] cbs_h266: add range extension support

2023-07-05 Thread Frank Plowman
On 05/07/2023 12:45, James Almer wrote: On 7/5/2023 8:38 AM, Nuo Mi wrote: From: frankplow ---   libavcodec/cbs_h266.h | 18 ++   libavcodec/cbs_h266_syntax_template.c | 79 +--   2 files changed, 93 insertions(+), 4 deletions(-) diff --git