Re: [FFmpeg-devel] [PATCH v3 2/2] lavc/vvc: Add max parameter to kth_order_egk_decode

2025-07-24 Thread Nuo Mi
On Sun, Jul 20, 2025 at 1:17 AM Frank Plowman wrote: > Prior to this patch, kth_order_egk_decode could read arbitrarily > large values which then overflowed and caused various issues. > Patch fixes this by making kth_order_egk_decode falliable, > requiring the caller to specify an upper bound and

Re: [FFmpeg-devel] [PATCH v2 2/2] lavc/vvc: Add max parameter to kth_order_egk_decode

2025-07-17 Thread Nuo Mi
Hi Frank, Thank you for v2. On Wed, Jul 16, 2025 at 2:50 AM Frank Plowman wrote: > Prior to this patch, kth_order_egk_decode could read arbitrarily > large values which then overflowed and caused various issues. > Patch fixes this by making kth_order_egk_decode falliable, > requiring the caller

Re: [FFmpeg-devel] [PATCH] lavc/vvc: Add max parameter to kth_order_egk_decode

2025-07-13 Thread Nuo Mi
Hi Frank, thank you for the patch On Sat, Jul 12, 2025 at 6:41 PM Frank Plowman wrote: > Prior to this patch, kth_order_egk_decode could read arbitrarily > large values which then overflowed and caused various issues. > Patch fixes this by making kth_order_egk_decode falliable, > requiring the ca

Re: [FFmpeg-devel] [PATCH 2/4] avcodec/vvc/dec: Don't use GetBit-API when byte-aligned

2025-07-05 Thread Nuo Mi
LGTM for this. Thank you, Andreas. On Fri, Jul 4, 2025 at 9:45 PM Andreas Rheinhardt < ffmpegagent-at-gmail@ffmpeg.org> wrote: > From: Andreas Rheinhardt > > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/vvc/dec.c | 29 - > 1 file changed, 16 insertions(+

Re: [FFmpeg-devel] [PATCH 6/8] avcodec/vvc/ctu: Check palette_escape_val

2025-06-22 Thread Nuo Mi
On Sun, Jun 22, 2025 at 2:41 PM Andreas Rheinhardt < andreas.rheinha...@outlook.com> wrote: > Nuo Mi: > > On Fri, Jun 20, 2025 at 8:40 AM Michael Niedermayer < > mich...@niedermayer.cc> > > wrote: > > > >> Fixes: integer overflow > >>

Re: [FFmpeg-devel] [PATCH 7/8] avcodec/vvc/cabac: Check k in kth_order_egk_decode()

2025-06-21 Thread Nuo Mi
On Fri, Jun 20, 2025 at 8:40 AM Michael Niedermayer wrote: > The return value is int we can thus not handle 31 or more bits > > Fixes: integer overflow > Fixes: > 418396701/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VVC_fuzzer-4730994378997760 > > Found-by: continuous fuzzing process > htt

Re: [FFmpeg-devel] [PATCH 6/8] avcodec/vvc/ctu: Check palette_escape_val

2025-06-21 Thread Nuo Mi
On Fri, Jun 20, 2025 at 8:40 AM Michael Niedermayer wrote: > Fixes: integer overflow > Fixes: > 418314174/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VVC_fuzzer-4871731867353088 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signe

Re: [FFmpeg-devel] [PATCH] avcodec/aarch64/vvc: Optimize derive_bdof_vx_vy

2025-06-21 Thread Nuo Mi
On Fri, Jun 20, 2025 at 9:15 PM Zhao Zhili < quinkblack-at-foxmail@ffmpeg.org> wrote: > From: Zhao Zhili > >Before After > - > apply_bdof_8_8x16_c: | 7375.5 ( 1.00x) | 7473.8 (

Re: [FFmpeg-devel] [PATCH] lavc/vvc: Fix condition for using default scaling factor

2025-06-21 Thread Nuo Mi
On Sat, Jun 21, 2025 at 8:20 PM Frank Plowman wrote: > Add handling here for > sps_scaling_matrix_for_alternative_colour_space_disabled_flag. > > Also add parentheses to make behaviour a little more explicit, > where &&'s precedence over || was used implicitly previously. > > Reported-by: Michael

Re: [FFmpeg-devel] [PATCH] avcodec/vvc/dec: fix possible null-pointer dereference

2025-06-12 Thread Nuo Mi
On Thu, Jun 12, 2025 at 1:53 AM Marvin Scholz < epirat07-at-gmail@ffmpeg.org> wrote: > When checking for filmgrain here, needs_fg can be true even when > film_grain_characteristics is NULL (when aom_film_grain.enable is true), > therefore this check could end up dereferencing film_grain_charac

Re: [FFmpeg-devel] [PATCH] avcodec/vvc: parse all SEI messages

2025-06-12 Thread Nuo Mi
On Thu, Jun 12, 2025 at 2:52 AM Marvin Scholz < epirat07-at-gmail@ffmpeg.org> wrote: > While the current code iterated over the messages, it always returned > in the first iteration. Instead keep iterating and warn for failure to > parse. At time of writing, none of the parsing functions seems

Re: [FFmpeg-devel] [PATCH] lavc/vvc: Support pps_mixed_nalu_types_in_pic_flag

2025-06-07 Thread Nuo Mi
On Sun, Jun 1, 2025 at 9:45 PM Frank Plowman wrote: > Add support for the pps_mixed_nalu_types_in_pic_flag, which permits > using different NALU types for different VCL NAL units of a single > picture. > > Fixes decoding of the only two Main 10 conformance bitstreams which > could not previously

Re: [FFmpeg-devel] [PATCH] lavc/vvc: Fix unchecked return code and shadowing

2025-06-07 Thread Nuo Mi
On Mon, Jun 2, 2025 at 9:08 PM Nuo Mi wrote: > > > On Sun, Jun 1, 2025 at 4:59 AM Frank Plowman > wrote: > >> Signed-off-by: Frank Plowman >> --- >> libavcodec/vvc/dec.c | 8 ++-- >> 1 file changed, 6 insertions(+), 2 deletions(-) >> >>

Re: [FFmpeg-devel] [PATCH v3 2/2] MAINTAINERS: Add myself as vvc maintainer

2025-06-07 Thread Nuo Mi
On Wed, Jun 4, 2025 at 9:12 AM Michael Niedermayer wrote: > On Mon, Jun 02, 2025 at 09:47:56AM +0800, Nuo Mi wrote: > > From: Frank Plowman > > > > My OpenPGP key is available at > > > > > https://keys.openpgp.org/vks/v1/by-fingerprint/34E248D6B7DF4769

Re: [FFmpeg-devel] [PATCH] lavc/vvc: Fix unchecked return code and shadowing

2025-06-02 Thread Nuo Mi
On Sun, Jun 1, 2025 at 4:59 AM Frank Plowman wrote: > Signed-off-by: Frank Plowman > --- > libavcodec/vvc/dec.c | 8 ++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/libavcodec/vvc/dec.c b/libavcodec/vvc/dec.c > index deb1b07b23..ac3f453440 100644 > --- a/libavcodec/v

Re: [FFmpeg-devel] [PATCH v3 2/2] MAINTAINERS: Add myself as vvc maintainer

2025-06-02 Thread Nuo Mi
On Mon, Jun 2, 2025 at 9:48 AM Nuo Mi wrote: > From: Frank Plowman > > My OpenPGP key is available at > > > https://keys.openpgp.org/vks/v1/by-fingerprint/34E248D6B7DF476970C7330403A84C6A098F2C6B > > and > > > https://keyserver.ub

[FFmpeg-devel] [PATCH v3 2/2] MAINTAINERS: Add myself as vvc maintainer

2025-06-01 Thread Nuo Mi
vp9 Ronald Bultje vqavideo.cMike Melanson - vvc [2] Nuo Mi, Wu Jianhua + vvc [2] Nuo Mi, Wu Jianhua, Frank Plowman wmaprodec.c Sascha Sommer wmavoi

[FFmpeg-devel] [PATCH v3 1/2] MAINTAINERS: add myself as vvc maintainer

2025-06-01 Thread Nuo Mi
David Conrad, Ronald Bultje vp9 Ronald Bultje vqavideo.cMike Melanson - vvc [2] Nuo Mi + vvc [2] Nuo Mi, Wu Jianhua wmaprodec.c Sascha Sommer

Re: [FFmpeg-devel] 回复: [PATCH v1 09/19] avcodec/h274: add ff_h274_hash functions

2025-05-30 Thread Nuo Mi
On Sat, May 24, 2025 at 10:02 PM Nuo Mi wrote: > > > On Fri, May 9, 2025 at 2:37 AM Wu Jianhua wrote: > >> Andreas Rheinhardt: >> > toq...@gmail.com: >> >> From: Wu Jianhua >> >> >> >> Sign

Re: [FFmpeg-devel] [PATCH] avformat/movenc: fix VVC encoding with leading pictures

2025-05-30 Thread Nuo Mi
On Tue, May 27, 2025 at 10:52 PM Gabriel Hege wrote: > On 25.05.25 04:08, Nuo Mi wrote: > > On Thu, May 22, 2025 at 4:35 PM Gabriel Hege wrote: > > > >> > >> On 17.05.25 04:26, Nuo Mi wrote: > >>> On Fri, May 16, 2025 at 7:05 PM Gabriel Hege wrot

Re: [FFmpeg-devel] [PATCH] MAINTAINERS: Add myself as vvc maintainer

2025-05-30 Thread Nuo Mi
100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -266,7 +266,7 @@ Codecs: >vp8 David Conrad, Ronald Bultje >vp9 Ronald Bultje >vqavideo.cMike Melanson > - vvc

Re: [FFmpeg-devel] [PATCH] avformat/movenc: fix VVC encoding with leading pictures

2025-05-24 Thread Nuo Mi
On Thu, May 22, 2025 at 4:35 PM Gabriel Hege wrote: > > On 17.05.25 04:26, Nuo Mi wrote: > > On Fri, May 16, 2025 at 7:05 PM Gabriel Hege wrote: > > > >> This is a resubmission with a corrected commit message. > >> > >> > >> The default

Re: [FFmpeg-devel] [PATCH v2] lavc/h2645_parse: More descriptive NALU header error

2025-05-24 Thread Nuo Mi
On Sun, May 25, 2025 at 2:13 AM Michael Niedermayer wrote: > On Thu, May 22, 2025 at 07:43:02PM +0100, Frank Plowman wrote: > > Signed-off-by: Frank Plowman > > --- > > Changes since v1: Spotted just after sending this that there was ongoing > > effort to remove av_strerror calls in favour of av

Re: [FFmpeg-devel] [PATCH] lavc/vvc: Fix divide-by-zero in LMCS param derivation

2025-05-24 Thread Nuo Mi
On Sat, May 24, 2025 at 8:13 PM Frank Plowman wrote: > Add three missing requirements on bitstream conformance from 7.4.3.19 of > H.266 (V3). Issue found using fuzzing. > Thank you, Frank. Applied with slight style changes. > > Signed-off-by: Frank Plowman > --- > libavcodec/vvc/ps.c | 18 +++

Re: [FFmpeg-devel] 回复: [PATCH v1 09/19] avcodec/h274: add ff_h274_hash functions

2025-05-24 Thread Nuo Mi
On Fri, May 9, 2025 at 2:37 AM Wu Jianhua wrote: > Andreas Rheinhardt: > > toq...@gmail.com: > >> From: Wu Jianhua > >> > >> Signed-off-by: Wu Jianhua > >> --- > >> libavcodec/h274.c | 163 ++ > >> libavcodec/h274.h | 7 ++ > >> 2 files changed, 17

Re: [FFmpeg-devel] [PATCH v2] lavc/vvc: Detect subpic overlaps at CTU level

2025-05-24 Thread Nuo Mi
On Sun, May 18, 2025 at 9:16 PM Frank Plowman wrote: > On 29/04/2025 14:24, Nuo Mi wrote: > > Hi Frank, > > Thank you for the detail. > > > > On Mon, Apr 28, 2025 at 10:35 PM Frank Plowman > > wrote: > > > >> On 28/04/2025 14:33, Nuo Mi w

Re: [FFmpeg-devel] [PATCH v1] lavc/vvc: Validate num_signalled_palette_entries

2025-05-19 Thread Nuo Mi
On Sun, May 18, 2025 at 2:51 PM Frank Plowman wrote: > On 18/05/2025 02:42, Nuo Mi wrote: > > Hi Frank, > > 👍,your fuzzing infrastructure caught this issue as well. > > How about this: > > > https://patchwork.ffmpeg.org/project/ffmpeg/patch/20250517055150.807683-1-

Re: [FFmpeg-devel] [PATCH v1] lavc/vvc: Validate num_signalled_palette_entries

2025-05-17 Thread Nuo Mi
Hi Frank, 👍,your fuzzing infrastructure caught this issue as well. How about this: https://patchwork.ffmpeg.org/project/ffmpeg/patch/20250517055150.807683-1-nuomi2...@gmail.com/ On Sun, May 18, 2025 at 5:05 AM Frank Plowman wrote: > "The value of CurrentPaletteSize[ startComp ] shall be in the r

[FFmpeg-devel] [PATCH] lavc/vvc/plt: validate run and signalled_entries

2025-05-16 Thread Nuo Mi
Fixes a crash triggered by a fuzzed clip: https://github.com/ffvvc/tests/tree/main/fuzz/passed/000256.bit Reproduce with: ffmpeg -i 000256.bit -f null - --- libavcodec/vvc/ctu.c | 28 +++- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/libavcodec/vvc/ctu.c

Re: [FFmpeg-devel] [PATCH v1 01/23] avcodec/vvc/cabac: add 9.3.3.5 k-th order Exp - Golomb binarization process

2025-05-16 Thread Nuo Mi
On Wed, May 14, 2025 at 9:46 PM Wu Jianhua wrote: > Wu Jianhua: > > From: Wu Jianhua > > > > Signed-off-by: Wu Jianhua > > --- > > libavcodec/vvc/cabac.c | 21 + > > 1 file changed, 21 insertions(+) > > > > diff --git a/libavcodec/vvc/cabac.c b/libavcodec/vvc/cabac.c > > in

Re: [FFmpeg-devel] [PATCH] avformat/movenc: fix VVC encoding with leading pictures

2025-05-16 Thread Nuo Mi
On Fri, May 16, 2025 at 7:05 PM Gabriel Hege wrote: > This is a resubmission with a corrected commit message. > > > The default behavior for VVenC (since v1.10.0) is to create an IDR with > leading pictures for the first picture in decoding order (POC 32). This > leads to FFmpeg generating an edi

Re: [FFmpeg-devel] [PATCH] build: fix windows build issue introduced by 45bea45

2025-05-16 Thread Nuo Mi
m happy to make the change. On Fri, May 16, 2025 at 4:31 AM softworkz . wrote: > > > > -Original Message- > > From: ffmpeg-devel On Behalf Of Nuo Mi > > Sent: Donnerstag, 15. Mai 2025 14:46 > > To: ffmpeg-devel@ffmpeg.org > > Cc: Nuo Mi > > Subj

Re: [FFmpeg-devel] [PATCH v2 6/7] checkasm: hevc sao_edge, benchmarking inside the width loop is meaningless

2025-05-15 Thread Nuo Mi
On Thu, May 15, 2025 at 9:05 AM softworkz . wrote: > > > > -Original Message- > > From: ffmpeg-devel On Behalf Of Nuo Mi > > Sent: Samstag, 3. Mai 2025 11:13 > > To: ffmpeg-devel@ffmpeg.org > > Cc: Nuo Mi > > Subject: [FFmpeg-dev

[FFmpeg-devel] [PATCH] build: fix windows build issue introduced by 45bea45

2025-05-15 Thread Nuo Mi
We defined CR to 2 in libavcodec/vvc/dec.h, but the CR used by _IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY winnt.h reorder the header will avoid the issue. --- tests/checkasm/vvc_sao.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/checkasm/vvc_sao.c b/tests/checkasm/vvc_sao.

Re: [FFmpeg-devel] [PATCH 5/5] checkasm: add vvc_sao

2025-05-14 Thread Nuo Mi
On Sat, May 10, 2025 at 8:45 PM Nuo Mi wrote: > > > On Wed, May 7, 2025 at 5:26 AM Martin Storsjö wrote: > >> On Sat, 3 May 2025, Nuo Mi wrote: >> >> > Hi Martin,Great, it works! >> > HEVC is included in v2. >> >> Thanks great, thanks for l

Re: [FFmpeg-devel] [PATCH v1 23/23] Changelog: VVC supports all content of SCC

2025-05-10 Thread Nuo Mi
On Thu, May 1, 2025 at 10:48 PM wrote: > From: Wu Jianhua > > Signed-off-by: Wu Jianhua > --- > Changelog | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/Changelog b/Changelog > index a09dcd82c2..4f47b30038 100644 > --- a/Changelog > +++ b/Changelog > @@ -11,6 +11,8

Re: [FFmpeg-devel] [PATCH 5/5] checkasm: add vvc_sao

2025-05-10 Thread Nuo Mi
On Wed, May 7, 2025 at 5:26 AM Martin Storsjö wrote: > On Sat, 3 May 2025, Nuo Mi wrote: > > > Hi Martin,Great, it works! > > HEVC is included in v2. > > Thanks great, thanks for looking into it! The checkasm aspects of patches > 5-7/7 look good to me. > Thank yo

Re: [FFmpeg-devel] [PATCH 5/5] checkasm: add vvc_sao

2025-05-03 Thread Nuo Mi
Hi Martin, Great, it works! HEVC is included in v2. Thank you! On Sat, May 3, 2025 at 4:45 AM Martin Storsjö wrote: > On Fri, 2 May 2025, Nuo Mi wrote: > > > On Fri, May 2, 2025 at 3:49 PM Martin Storsjö wrote: > > On Fri, 2 May 2025, Nuo Mi wrote: > > >

[FFmpeg-devel] [PATCH v2 7/7] checkasm: hevc sao, use checkasm_check_padded

2025-05-03 Thread Nuo Mi
--- tests/checkasm/hevc_sao.c | 45 +-- 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/tests/checkasm/hevc_sao.c b/tests/checkasm/hevc_sao.c index f597eb5254..37f6ba8c5c 100644 --- a/tests/checkasm/hevc_sao.c +++ b/tests/checkasm/hevc_sao.c @@ -

[FFmpeg-devel] [PATCH v2 6/7] checkasm: hevc sao_edge, benchmarking inside the width loop is meaningless

2025-05-03 Thread Nuo Mi
--- tests/checkasm/hevc_sao.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/checkasm/hevc_sao.c b/tests/checkasm/hevc_sao.c index ad47423f10..f597eb5254 100644 --- a/tests/checkasm/hevc_sao.c +++ b/tests/checkasm/hevc_sao.c @@ -119,21 +119,21 @@ static vo

[FFmpeg-devel] [PATCH v2 5/7] checkasm: add vvc_sao

2025-05-03 Thread Nuo Mi
) vvc_sao_edge_128_10_avx2: 6162.2 ( 7.63x) vvc_sao_edge_128_12_c: 49647.3 ( 1.00x) vvc_sao_edge_128_12_avx2: 6127.1 ( 8.10x) Co-authored-by: Nuo Mi --- tests/checkasm/Makefile | 2 +- tests/checkasm

[FFmpeg-devel] [PATCH v2 4/7] x86/vvcdec: sao, add avx2 support

2025-05-03 Thread Nuo Mi
From: Shaun Loo This is a part of Google Summer of Code 2023 Co-authored-by: Nuo Mi --- libavcodec/x86/h26x/h2656_sao.asm | 8 +-- libavcodec/x86/vvc/Makefile | 2 + libavcodec/x86/vvc/dsp_init.c | 41 +++ libavcodec/x86/vvc/sao.asm| 73

[FFmpeg-devel] [PATCH v2 3/7] x86/hevcdec: refact, remove duplicate code in HEVC_SAO_{BAND, EDGE}_FILTER

2025-05-03 Thread Nuo Mi
From: Shaun Loo This is a part of Google Summer of Code 2023 Co-authored-by: Nuo Mi --- libavcodec/x86/hevc/sao_10bit.asm | 100 ++ 1 file changed, 48 insertions(+), 52 deletions(-) diff --git a/libavcodec/x86/hevc/sao_10bit.asm b/libavcodec/x86/hevc

[FFmpeg-devel] [PATCH v2 2/7] x86/hevcdec: sao, refact out h26x macros

2025-05-03 Thread Nuo Mi
From: Shaun Loo This is a part of Google Summer of Code 2023 Co-authored-by: Nuo Mi --- libavcodec/x86/h26x/h2656_sao.asm | 301 libavcodec/x86/h26x/h2656_sao_10bit.asm | 301 libavcodec/x86/hevc/sao.asm | 278

[FFmpeg-devel] [PATCH v2 1/7] x86/vvcdec: misc, reordered functions in dsp_init for improved readability

2025-05-03 Thread Nuo Mi
--- libavcodec/x86/vvc/dsp_init.c | 48 +-- 1 file changed, 29 insertions(+), 19 deletions(-) diff --git a/libavcodec/x86/vvc/dsp_init.c b/libavcodec/x86/vvc/dsp_init.c index dc833bb0f1..bb68ba0b1e 100644 --- a/libavcodec/x86/vvc/dsp_init.c +++ b/libavcodec/x86/vvc

[FFmpeg-devel] [PATCH 2/7] x86/hevcdec: sao, refact out h26x macros

2025-05-03 Thread Nuo Mi
From: Shaun Loo This is a part of Google Summer of Code 2023 Co-authored-by: Nuo Mi --- libavcodec/x86/h26x/h2656_sao.asm | 301 libavcodec/x86/h26x/h2656_sao_10bit.asm | 301 libavcodec/x86/hevc/sao.asm | 278

[FFmpeg-devel] [PATCH 1/7] x86/vvcdec: misc, reordered functions in dsp_init for improved readability

2025-05-03 Thread Nuo Mi
--- libavcodec/x86/vvc/dsp_init.c | 48 +-- 1 file changed, 29 insertions(+), 19 deletions(-) diff --git a/libavcodec/x86/vvc/dsp_init.c b/libavcodec/x86/vvc/dsp_init.c index dc833bb0f1..bb68ba0b1e 100644 --- a/libavcodec/x86/vvc/dsp_init.c +++ b/libavcodec/x86/vvc

Re: [FFmpeg-devel] [PATCH 5/5] checkasm: add vvc_sao

2025-05-02 Thread Nuo Mi
On Fri, May 2, 2025 at 3:49 PM Martin Storsjö wrote: > On Fri, 2 May 2025, Nuo Mi wrote: > > > From: Shaun Loo > > > > This is a part of Google Summer of Code 2023 > > > > AVX2: > > - vvc_sao.sao_band [OK] > > - vvc_sao.sao_edge [OK] > >

[FFmpeg-devel] [PATCH 5/5] checkasm: add vvc_sao

2025-05-02 Thread Nuo Mi
) vvc_sao_edge_128_10_avx2: 6162.2 ( 7.63x) vvc_sao_edge_128_12_c: 49647.3 ( 1.00x) vvc_sao_edge_128_12_avx2: 6127.1 ( 8.10x) Co-authored-by: Nuo Mi --- tests/checkasm/Makefile | 2 +- tests/checkasm

[FFmpeg-devel] [PATCH 4/5] x86/vvcdec: sao, add avx2 support

2025-05-02 Thread Nuo Mi
From: Shaun Loo This is a part of Google Summer of Code 2023 Co-authored-by: Nuo Mi --- libavcodec/x86/h26x/h2656_sao.asm | 8 +-- libavcodec/x86/vvc/Makefile | 2 + libavcodec/x86/vvc/dsp_init.c | 41 +++ libavcodec/x86/vvc/sao.asm| 73

[FFmpeg-devel] [PATCH 3/5] x86/hevcdec: refact, remove duplicate code in HEVC_SAO_{BAND, EDGE}_FILTER

2025-05-02 Thread Nuo Mi
From: Shaun Loo This is a part of Google Summer of Code 2023 Co-authored-by: Nuo Mi --- libavcodec/x86/hevc/sao_10bit.asm | 100 ++ 1 file changed, 48 insertions(+), 52 deletions(-) diff --git a/libavcodec/x86/hevc/sao_10bit.asm b/libavcodec/x86/hevc

[FFmpeg-devel] [PATCH 2/5] x86/hevcdec: sao, refact out h26x macros

2025-05-02 Thread Nuo Mi
From: Shaun Loo This is a part of Google Summer of Code 2023 Co-authored-by: Nuo Mi --- libavcodec/x86/h26x/h2656_sao.asm | 301 libavcodec/x86/h26x/h2656_sao_10bit.asm | 301 libavcodec/x86/hevc/sao.asm | 278

[FFmpeg-devel] [PATCH 1/5] x86/vvcdec: misc, reordered functions in dsp_init for improved readability

2025-05-02 Thread Nuo Mi
--- libavcodec/x86/vvc/dsp_init.c | 48 +-- 1 file changed, 29 insertions(+), 19 deletions(-) diff --git a/libavcodec/x86/vvc/dsp_init.c b/libavcodec/x86/vvc/dsp_init.c index dc833bb0f1..bb68ba0b1e 100644 --- a/libavcodec/x86/vvc/dsp_init.c +++ b/libavcodec/x86/vvc

Re: [FFmpeg-devel] [PATCH v2] lavc/vvc: Detect subpic overlaps at CTU level

2025-04-29 Thread Nuo Mi
Hi Frank, Thank you for the detail. On Mon, Apr 28, 2025 at 10:35 PM Frank Plowman wrote: > On 28/04/2025 14:33, Nuo Mi wrote: > > Hi Frank, > > Thank you for the v2. > > Could we remove all asserts? > > Asserts can cause the application to crash at runtime. > >

Re: [FFmpeg-devel] [PATCH v2] lavc/vvc: Detect subpic overlaps at CTU level

2025-04-28 Thread Nuo Mi
Hi Frank, Thank you for the v2. Could we remove all asserts? Asserts can cause the application to crash at runtime. On Sun, Apr 27, 2025 at 4:48 PM Frank Plowman wrote: > In d5dbcc00d889fb17948b025a468b00ddbea9e058, it was hoped that detection > of subpicture overlaps could be performed at the t

Re: [FFmpeg-devel] [PATCH] lavc/vvc: Detect subpic overlaps at CTU level

2025-04-26 Thread Nuo Mi
On Fri, Apr 18, 2025 at 10:40 PM Frank Plowman wrote: > In d5dbcc00d889fb17948b025a468b00ddbea9e058, it was hoped that detection > of subpicture overlaps could be performed at the tile level, so as to > avoid introducing per-CTU checks. Unfortunately since that patch, > fuzzing has indicated ther

Re: [FFmpeg-devel] 回复: [PATCH v1 17/19] avcodec/vvc: support fields

2025-04-23 Thread Nuo Mi
Hi Andreas, Thank you for the review. Hi Jianhua, Thank you for the patches. I will merge this weekend if there are no objections. On Wed, Apr 2, 2025 at 2:11 AM Wu Jianhua wrote: > Andreas Rheinhardt : > > toq...@gmail.com: > >> From: Wu Jianhua > >> > >> passed files: > >> FIELD_A_Panas

Re: [FFmpeg-devel] [PATCH] avcodec/libvvenc: use av_vlog to print external library log messages

2025-04-18 Thread Nuo Mi
LGTM, Nit: Would a lookup table be better? On Fri, Apr 18, 2025 at 12:42 AM James Almer wrote: > And improve the vvencMsgLevel <-> AV_LOG_* mapping. > > Signed-off-by: James Almer > --- > libavcodec/libvvenc.c | 35 +++ > 1 file changed, 27 insertions(+), 8 dele

Re: [FFmpeg-devel] [PATCH] fate/vvc: Add vvc-wpp-single-slice-pic

2025-04-16 Thread Nuo Mi
Thank you, Frank. Hi samples-request, could you help On Wed, Apr 9, 2025 at 12:29 AM Frank Plowman wrote: > On 24/03/2025 18:10, Frank Plowman wrote: > > A sample with a particular partitioning structure that could not be read > > correctly before 26c5d8cf5d6dcd520e781754d986e9907d74270e > > >

Re: [FFmpeg-devel] [PATCH] avutil/hash: add 16-bit CRC type CCITT_AUG

2025-03-29 Thread Nuo Mi
On Sat, Mar 29, 2025 at 6:21 AM Michael Niedermayer wrote: > Hi > > On Tue, Mar 25, 2025 at 10:59:28PM +0800, Nuo Mi wrote: > > It is also referred to as: > > SPI-FUJITSU > > AUG-CCITT > > CRC-CCITT (0x1D0F) > > This CRC type used by

[FFmpeg-devel] [PATCH] avutil/hash: add 16-bit CRC type CCITT_AUG

2025-03-25 Thread Nuo Mi
It is also referred to as: SPI-FUJITSU AUG-CCITT CRC-CCITT (0x1D0F) This CRC type used by H.274 --- libavutil/hash.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libavutil/hash.c b/libavutil/hash.c index fbc24194de..3659c71c7f 100644 --- a/libavutil/hash

Re: [FFmpeg-devel] [PATCH 1/3] avcodec/vvc/Makefile: Move VVC decoder->h2645data dep to, lavc/Makefile

2025-03-18 Thread Nuo Mi
+1 for VVC patches. Thank you, Andreas On Tue, Mar 18, 2025 at 4:00 PM Andreas Rheinhardt < andreas.rheinha...@outlook.com> wrote: > Patches attached. > > - Andreas > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman

Re: [FFmpeg-devel] [PATCH v2] lavc/vvc: Fix NumEntryPoints derivation

2025-03-14 Thread Nuo Mi
On Thu, Mar 6, 2025 at 2:40 AM Frank Plowman wrote: > If pps_single_slice_per_subpic_flag is 1, > slice_{width,height}_in_tiles are undefined and we must instead get the > dimensions of the slice by referring to the corresponding subpicture. > Signed-off-by: Frank Plowman > --- > Changes since

Re: [FFmpeg-devel] [PATCH v2] lavc/vvc: Fix NumEntryPoints derivation

2025-03-10 Thread Nuo Mi
On Sun, Mar 9, 2025 at 9:57 PM Nuo Mi wrote: > > > On Thu, Mar 6, 2025 at 2:40 AM Frank Plowman > wrote: > >> If pps_single_slice_per_subpic_flag is 1, >> slice_{width,height}_in_tiles are undefined and we must instead get the >> dimensions of the slice

Re: [FFmpeg-devel] [PATCH v2] lavc/vvc: Fix NumEntryPoints derivation

2025-03-09 Thread Nuo Mi
On Thu, Mar 6, 2025 at 2:40 AM Frank Plowman wrote: > If pps_single_slice_per_subpic_flag is 1, > slice_{width,height}_in_tiles are undefined and we must instead get the > dimensions of the slice by referring to the corresponding subpicture. > > Signed-off-by: Frank Plowman > --- > Changes since

Re: [FFmpeg-devel] [PATCH] lavc/vvc: Stricter bound on pps_exp_slice_height_in_ctus_minus1

2025-03-09 Thread Nuo Mi
On Sun, Mar 2, 2025 at 8:13 PM Frank Plowman wrote: > When pps_num_exp_slices_in_tile[i] is nonzero, the ith tile is made up > of pps_num_exp_slices_in_tile[i] slices stacked atop one another, where > the height of the jth slice in the ith tile is given by > pps_exp_slice_height_in_ctus_minus1[i]

Re: [FFmpeg-devel] [PATCH v2] avcodec/aarch64/vvc: Optimize vvc_avg{8, 10, 12}

2025-03-09 Thread Nuo Mi
On Fri, Mar 7, 2025 at 9:56 PM Martin Storsjö wrote: > On Mon, 3 Mar 2025, Krzysztof Pyrkosz via ffmpeg-devel wrote: > > > This patch replaces integer widening with halving addition, and > > multi-step "emulated" rounding shift with a single asm instruction doing > > exactly that. > > > > Benchma

Re: [FFmpeg-devel] [PATCH 2/2] lavc/vvc: Fix pps_single_slice_picture

2025-03-02 Thread Nuo Mi
On Sun, Feb 23, 2025 at 8:05 PM Frank Plowman wrote: > Signed-off-by: Frank Plowman > Applied this one. Thank you, Frank > --- > libavcodec/vvc/ps.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/libavcodec/vvc/ps.c b/libavcodec/vvc/ps.c > index fae6655cc0..603a6d42

Re: [FFmpeg-devel] [PATCH 1/2] lavc/vvc: Fix NumEntryPoints derivation

2025-03-02 Thread Nuo Mi
On Sun, Feb 23, 2025 at 8:05 PM Frank Plowman wrote: > If pps_single_slice_per_subpic_flag is 1, > slice_{width,height}_in_ctus are undefined and we must instead get the > dimensions of the slice by referring to the corresponding subpicture. > > Signed-off-by: Frank Plowman > --- > libavcodec/c

Re: [FFmpeg-devel] [PATCH 2/2] lavc/vvc: Fix pps_single_slice_picture

2025-03-02 Thread Nuo Mi
On Tue, Feb 25, 2025 at 3:16 AM Frank Plowman wrote: > On 24/02/2025 02:23, James Almer wrote: > > On 2/23/2025 9:04 AM, Frank Plowman wrote: > >> Signed-off-by: Frank Plowman > >> --- > >> libavcodec/vvc/ps.c | 3 ++- > >> 1 file changed, 2 insertions(+), 1 deletion(-) > >> > >> diff --git a

Re: [FFmpeg-devel] [PATCH] lavc/vvcdec: fix undefined reference to ff_h2645_pixel_aspect

2025-03-02 Thread Nuo Mi
On Mon, Feb 24, 2025 at 2:44 AM Frank Plowman wrote: > On 23/02/2025 13:37, Nuo Mi wrote: > > This issue was introduced by commit > bb8e95b650de30d6e07196761d1fc61857f5462d > > > > Reproduce steps: > > ./configure --enable-ffmpeg --disable-everything --enable-dec

Re: [FFmpeg-devel] [PATCH v3 2/2] lavc/vvc: Ensure subpictures don't overlap

2025-02-23 Thread Nuo Mi
On Sun, Feb 23, 2025 at 1:36 AM Frank Plowman wrote: > On 22/02/2025 07:51, Nuo Mi wrote: > > From: Frank Plowman > > > > This is essentially a re-implementation of > > > https://patchwork.ffmpeg.org/project/ffmpeg/patch/20241005223955.54158-1-p...@frankplowman.c

[FFmpeg-devel] [PATCH] lavc/vvcdec: fix undefined reference to ff_h2645_pixel_aspect

2025-02-23 Thread Nuo Mi
This issue was introduced by commit bb8e95b650de30d6e07196761d1fc61857f5462d Reproduce steps: ./configure --enable-ffmpeg --disable-everything --enable-decoder=vvc --enable-parser=vvc --enable-demuxer=vvc --enable-protocol=file,pipe --enable-encoder=rawvideo,wrapped_avframe --enable-muxer=rawvid

[FFmpeg-devel] [PATCH v3 2/2] lavc/vvc: Ensure subpictures don't overlap

2025-02-22 Thread Nuo Mi
From: Frank Plowman This is essentially a re-implementation of https://patchwork.ffmpeg.org/project/ffmpeg/patch/20241005223955.54158-1-p...@frankplowman.com/ That patch was not applied last time. Instead we opted to identify issues which could be caused by invalid subpicture layouts and remedy

Re: [FFmpeg-devel] [PATCH 2/2] lavc/vvc: Ensure subpictures don't overlap

2025-02-22 Thread Nuo Mi
On Thu, Feb 20, 2025 at 4:29 AM Frank Plowman wrote: > Hi, > > Thanks for your review. > > On 16/02/2025 15:19, Nuo Mi wrote: > > Hi Frank, > > Thank you for the patch. > > > > On Sun, Feb 9, 2025 at 11:45 PM Frank Plowman > wrote: > >

[FFmpeg-devel] [PATCH v3 1/2] lavc/vvc: Fix slice map construction for small subpics

2025-02-21 Thread Nuo Mi
From: Frank Plowman In the case pps_subpic_less_than_one_tile_slice is called, the subpicture is smaller than the tile and so there are multiple subpictures in the tile. Of course, then, not all the subpictures can start in the top-left corner as the code before the patch does. Patch fixes this

Re: [FFmpeg-devel] [PATCH] lavc/vvc: Fix derivation of inverse LMCS idx

2025-02-21 Thread Nuo Mi
On Thu, Feb 20, 2025 at 4:33 AM Frank Plowman wrote: > Ping > Sorry for missing this. Thank you for the patch, applied > > On 02/02/2025 12:10, Frank Plowman wrote: > > The clamping of idxYInv from H.266(V3) section 8.8.2.3 was missing. > > This could lead to OOB reads from lmcs->pivot or input_

Re: [FFmpeg-devel] [PATCH 2/2] lavc/vvcdec: export stream level VUI information

2025-02-21 Thread Nuo Mi
On Wed, Feb 19, 2025 at 5:38 AM Barry Warburton wrote: > LGTM. > Thank you, Barry, Applied. > > On 03/02/2025 09:17, Nuo Mi wrote: > > Previously, VUI information was not exposed. > > If the container lacks HDR metadata, HDR videos appear washed out > > &g

Re: [FFmpeg-devel] [PATCH 2/2] lavc/vvc: Ensure subpictures don't overlap

2025-02-16 Thread Nuo Mi
Hi Frank, Thank you for the patch. On Sun, Feb 9, 2025 at 11:45 PM Frank Plowman wrote: > This is essentially a re-implementation of > > https://patchwork.ffmpeg.org/project/ffmpeg/patch/20241005223955.54158-1-p...@frankplowman.com/ > > That patch was not applied last time. Instead we opted to

Re: [FFmpeg-devel] [PATCH] lavc/vvc: Set fc->ref to NULL at top of decode_nal_units

2025-02-15 Thread Nuo Mi
On Sun, Feb 9, 2025 at 5:43 AM Frank Plowman wrote: > In the fail: block of decode_nal_units, a check as to whether fc->ref is > nonzero is used. Before this patch, fc->ref was set to NULL in > frame_context_setup. The issue is that, by the time frame_context_setup > is called, falliable functi

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/vvc/refs: Check content_ref in set_pict_type()

2025-02-08 Thread Nuo Mi
On Fri, Feb 7, 2025 at 4:25 AM Frank Plowman wrote: > On 02/02/2025 21:17, Michael Niedermayer wrote: > > Fixes: > 390565846/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VVC_fuzzer-4990028521996288 > > Fixes: Null pointer dereference > > > > Found-by: continuous fuzzing process > https://git

[FFmpeg-devel] [PATCH 2/2] lavc/vvcdec: export stream level VUI information

2025-02-03 Thread Nuo Mi
Previously, VUI information was not exposed. If the container lacks HDR metadata, HDR videos appear washed out Command: mp4box -add hdr.mp4#video:colr=nclc,1,1,1 -new new.mp4 && ffprobe new.mp4 Before: Stream #0:0[0x1](und): Video: vvc (vvc1 / 0x31637676), yuv420p10le(bt709), 1920x1080, 12164 kb

[FFmpeg-devel] [PATCH 1/2] lavc/vvcdec: refact, set AVCodecContext->has_b_frames in sps_export_stream_params

2025-02-03 Thread Nuo Mi
--- libavcodec/vvc/dec.c | 1 - libavcodec/vvc/ps.c | 29 +++-- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/libavcodec/vvc/dec.c b/libavcodec/vvc/dec.c index 51dd60ae92..68fb26352e 100644 --- a/libavcodec/vvc/dec.c +++ b/libavcodec/vvc/dec.c @@ -812,7

Re: [FFmpeg-devel] [PATCH 3/3] lavc/vvcdec: ensure slices contain nonzero CTUs

2025-01-29 Thread Nuo Mi
On Wed, Jan 29, 2025 at 4:40 PM Frank Plowman wrote: > On 26/01/2025 03:10, Nuo Mi wrote: > > fixes https://github.com/ffvvc/tests/tree/main/fuzz/passed/000323.bit > > > > Co-authored-by: Frank Plowman > > --- > > libavcodec/vvc/ps.c | 11 +-- > &

Re: [FFmpeg-devel] [PATCH v3] lavc/vvc: Stop c->pix_fmt and s->pix_fmt diverging

2025-01-25 Thread Nuo Mi
On Sat, Jan 18, 2025 at 11:12 PM Nuo Mi wrote: > > > On Sat, Jan 18, 2025 at 4:18 AM Frank Plowman > wrote: > >> When the chroma format changes mid-sequence, c->pix_fmt and s->pix_fmt >> can get out-of-sync. More specifically, >> 1. export_frame_p

[FFmpeg-devel] [PATCH 2/3] lavc/vvcdec: remove unneeded VVCContext->pix_fmt

2025-01-25 Thread Nuo Mi
AVCodecContext->sw_pix_fmt is used to hold the software pixel format. Co-authored-by: Frank Plowman --- libavcodec/vvc/dec.c | 17 ++--- libavcodec/vvc/dec.h | 2 -- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/libavcodec/vvc/dec.c b/libavcodec/vvc/dec.c index daf

[FFmpeg-devel] [PATCH 3/3] lavc/vvcdec: ensure slices contain nonzero CTUs

2025-01-25 Thread Nuo Mi
fixes https://github.com/ffvvc/tests/tree/main/fuzz/passed/000323.bit Co-authored-by: Frank Plowman --- libavcodec/vvc/ps.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/libavcodec/vvc/ps.c b/libavcodec/vvc/ps.c index c9f7c5c80f..01b4615eda 100644 --- a/libavcod

[FFmpeg-devel] [PATCH 1/3] lavc/vvcdec: remove unneeded set_output_format

2025-01-25 Thread Nuo Mi
Downstream can determine the format from the output frame format Co-authored-by: Frank Plowman --- libavcodec/vvc/dec.c | 23 ++- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/libavcodec/vvc/dec.c b/libavcodec/vvc/dec.c index 1cb168de7e..daf537294f 100644 ---

Re: [FFmpeg-devel] [PATCH v2] avcodec/vvc: Add support for output_corrupt/showall flags

2025-01-18 Thread Nuo Mi
On Sun, Jan 19, 2025 at 12:40 AM Zhao Zhili < quinkblack-at-foxmail@ffmpeg.org> wrote: > > > > On Jan 18, 2025, at 23:30, Nuo Mi wrote: > > > > Hi Zhili, > > Thank you for v2, > > +1 > > > > Nit: The if statement is too long. Move it afte

Re: [FFmpeg-devel] [PATCH v2] avcodec/vvc: Add support for output_corrupt/showall flags

2025-01-18 Thread Nuo Mi
Hi Zhili, Thank you for v2, +1 Nit: The if statement is too long. Move it after generate_missing_ref and break it up to simplify the logic. like: if (!ref) { ref = generate_missing_ref(s, fc, poc); if (!ref) return AVERROR(ENOMEM); } +if (ref->flags &

Re: [FFmpeg-devel] [PATCH v3] lavc/vvc: Stop c->pix_fmt and s->pix_fmt diverging

2025-01-18 Thread Nuo Mi
uffers are not allocated for the > new pixel format. > > Patch fixes this by not setting c->pix_fmt in set_output_format. > > Signed-off-by: Frank Plowman > --- > @Nuo Mi, Fei Wang: > Does this look okay? I am not really sure why c->pix_fmt was set again > in set_output_fo

Re: [FFmpeg-devel] [PATCH] avcodec/vvc: Add support for output_corrupt/showall flags

2025-01-15 Thread Nuo Mi
On Mon, Jan 13, 2025 at 4:46 PM Zhao Zhili < quinkblack-at-foxmail@ffmpeg.org> wrote: > From: Zhao Zhili > > Hi Zhili, Thank you for the patch. This will fail on GDR clips, such as: GDR_B_NOKIA_2.bit GDR_C_NOKIA_2.bit By design, a GDR frame refers to missing frames and gradually ref

Re: [FFmpeg-devel] [PATCH] avcodec/vvcdec: set pict_type and AV_FRAME_FLAG_KEY

2025-01-14 Thread Nuo Mi
e: > >> Sounds very good, thanks! >> >> Issue: https://trac.ffmpeg.org/ticket/11406 >> >> I would be glad to try it. >> >> >> On Wed, Jan 8, 2025 at 2:04 PM Nuo Mi wrote: >> >>> >>> >>> On Wed, Jan 8, 2025

Re: [FFmpeg-devel] [PATCH] lavc/vvcdec: show frames info with ffprobe and other tools.

2025-01-14 Thread Nuo Mi
information could be retrieved solely from the parser or the CBS > > > > > On Sun, Jan 12, 2025 at 4:38 AM Nuo Mi wrote: > > > On Sun, Jan 12, 2025 at 6:24 AM James Almer wrote: > > > > > On 1/11/2025 3:40 AM, Nuo Mi wrote: > > > > Tested with: &g

Re: [FFmpeg-devel] [PATCH] lavc/vvc: Check slice structure

2025-01-11 Thread Nuo Mi
Thank you, Frank, Applied with some minor changes. On Sat, Jan 11, 2025 at 5:31 AM Frank Plowman wrote: > The criteria for slice structure validity is similar to that of > subpicture structure validity that we saw not too long ago [1]. > The relationship between tiles and slices must satisfy the

Re: [FFmpeg-devel] [PATCH] avformat/matroska: add support for VVC streams

2025-01-11 Thread Nuo Mi
On Sat, Jan 11, 2025 at 11:49 PM James Almer wrote: > As defined in > https://github.com/ietf-wg-cellar/matroska-specification/blob/master/codec_specs.md#v_mpegiisovvc > > Signed-off-by: James Almer > --- > libavformat/matroska.c| 1 + > libavformat/matroskaenc.c | 10 -- > 2 files

Re: [FFmpeg-devel] [PATCH] lavc/vvc: Fix pix_fmt change detection

2025-01-11 Thread Nuo Mi
On Sat, Jan 11, 2025 at 9:18 PM Frank Plowman wrote: > In some scenarios, the VVCContext.pix_fmt and the > AVCodecContext.pix_fmt can get out-of-sync. It is more robust here > to check the AVCodecContext.pix_fmt, as we already do for the width and > height, seeing as the AVCodecContext.pix_fmt i

Re: [FFmpeg-devel] [PATCH] lavc/vvcdec: show frames info with ffprobe and other tools.

2025-01-11 Thread Nuo Mi
On Sun, Jan 12, 2025 at 6:24 AM James Almer wrote: > On 1/11/2025 3:40 AM, Nuo Mi wrote: > > Tested with: > > ``` > > wget > https://www.itu.int/wftp3/av-arch/jvet-site/bitstream_exchange/VVC/draft_conformance/draft6/CodingToolsSets_E_Tencent_1.zip > > unzip C

[FFmpeg-devel] [PATCH v2] lavc/vvc/refs: export keyframe and picture type in output frames

2025-01-11 Thread Nuo Mi
Tested with: ``` wget https://www.itu.int/wftp3/av-arch/jvet-site/bitstream_exchange/VVC/draft_conformance/draft6/CodingToolsSets_E_Tencent_1.zip unzip CodingToolsSets_E_Tencent_1.zip CodingToolsSets_E_Tencent_1.bit ffprobe -hide_banner CodingToolsSets_E_Tencent_1.bit -select_streams v -show_fra

[FFmpeg-devel] [PATCH] lavc/vvcdec: show frames info with ffprobe and other tools.

2025-01-10 Thread Nuo Mi
Tested with: ``` wget https://www.itu.int/wftp3/av-arch/jvet-site/bitstream_exchange/VVC/draft_conformance/draft6/CodingToolsSets_E_Tencent_1.zip unzip CodingToolsSets_E_Tencent_1.zip CodingToolsSets_E_Tencent_1.bit ffprobe -hide_banner CodingToolsSets_E_Tencent_1.bit -select_streams v -show_fra

  1   2   3   4   5   6   7   8   9   10   >