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

2025-01-18 Thread Zhao Zhili
overy_flag || > GDR_IS_RECOVERED(s))) { > +if (!(s->avctx->flags & AV_CODEC_FLAG_OUTPUT_CORRUPT) && > +!(s->avctx->flags2 & AV_CODEC_FLAG2_SHOW_ALL)) { > +return AVERROR_INVALIDDATA; > +} > +

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

2025-01-18 Thread Zhao Zhili
From: Zhao Zhili --- v3: Use temporary variable to make the condition check more readable v2: Fix GDR stream libavcodec/vvc/refs.c | 20 +++- libavcodec/vvc/refs.h | 1 + 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/libavcodec/vvc/refs.c b/libavcodec/vvc

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

2025-01-15 Thread Zhao Zhili
From: Zhao Zhili --- v2: Fix GDR stream. libavcodec/vvc/refs.c | 17 - libavcodec/vvc/refs.h | 1 + 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/libavcodec/vvc/refs.c b/libavcodec/vvc/refs.c index bc3b3d0d13..fb19a2d394 100644 --- a/libavcodec/vvc/refs.c

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

2025-01-15 Thread Zhao Zhili
> On Jan 15, 2025, at 22:02, Zhao Zhili > wrote: > > > >> On Jan 15, 2025, at 21:19, Nuo Mi wrote: >> >> On Mon, Jan 13, 2025 at 4:46 PM Zhao Zhili < >> quinkblack-at-foxmail....@ffmpeg.org> wrote: >> >>> From: Zhao Zhili >

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

2025-01-15 Thread Zhao Zhili
> On Jan 15, 2025, at 21:19, Nuo Mi wrote: > > 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, su

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

2025-01-13 Thread Zhao Zhili
From: Zhao Zhili --- libavcodec/vvc/refs.c | 16 +++- libavcodec/vvc/refs.h | 1 + 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/libavcodec/vvc/refs.c b/libavcodec/vvc/refs.c index bc3b3d0d13..a204e7d800 100644 --- a/libavcodec/vvc/refs.c +++ b/libavcodec/vvc

Re: [FFmpeg-devel] [PATCH v2 0/3] avcodec/hevc: Add alpha video decoding support

2025-01-10 Thread Zhao Zhili
Ping. > On Dec 15, 2024, at 14:38, Zhao Zhili wrote: > > From: Zhao Zhili > > v2: > 1. It works with x265 streams > 2. Remove the requirement on SEI. SEI alpha channel information is > required on the producer side but not for decoder. > > Zhao Zhili

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

2025-01-10 Thread Zhao Zhili
From: Zhao Zhili hevc decoder output corrupted frames when the reference frames are missing. The output_corrupt flag has no effect. ffplay shows artifacting after seek when playback TS stream. This patch mark those frames with AV_FRAME_FLAG_CORRUPT flag when output_corrupt flag is set, and drop

[FFmpeg-devel] [PATCH v2] avcodec/mediacodecenc: Support config qp range

2025-01-10 Thread Zhao Zhili
From: Zhao Zhili --- v2: Fix option valid range libavcodec/mediacodecenc.c | 64 +- libavcodec/version.h | 2 +- 2 files changed, 64 insertions(+), 2 deletions(-) diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c index 464903d628

Re: [FFmpeg-devel] [PATCH] avcodec/cuviddec: Fix missing HW_CONFIG_METHOD_HW_FRAMES_CTX flag

2025-01-10 Thread Zhao Zhili
Ping. > On Dec 18, 2024, at 15:13, Zhao Zhili > wrote: > > From: Zhao Zhili > > --- > libavcodec/cuviddec.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/libavcodec/cuviddec.c b/libavcodec/cuviddec.c > index 3fae9c12eb..502bcc7fc2 100644 >

Re: [FFmpeg-devel] [PATCH] avcodec/librsvgdec: fix compile error when librsvg < 2.52

2025-01-09 Thread Zhao Zhili
> On Jan 10, 2025, at 09:24, Lu Yao wrote: > > When compiling with an earlier version of lbrsvg, the following error > occurs: > "src/libavcodec/librsvgdec.c: In function 'librsvg_decode_frame'" > "src/libavcodec/librsvgdec.c:93:5: error: 'viewport' undeclared" > > Fixes: 86ed68420d3b ("avco

[FFmpeg-devel] [PATCH] avcodec/mediacodecenc: Support config qp range

2025-01-06 Thread Zhao Zhili
From: Zhao Zhili --- libavcodec/mediacodecenc.c | 64 +- libavcodec/version.h | 2 +- 2 files changed, 64 insertions(+), 2 deletions(-) diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c index 464903d628..d1a0388d7e 100644 --- a

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

2025-01-05 Thread Zhao Zhili
From: Zhao Zhili hevc decoder output corrupted frames when the reference frames are missing. The output_corrupt flag has no effect. ffplay shows artifacting after seek when playback TS stream. This patch mark those frames with AV_FRAME_FLAG_CORRUPT flag when output_corrupt flag is set, and drop

Re: [FFmpeg-devel] Democratization

2025-01-02 Thread Zhao Zhili
> On Jan 3, 2025, at 00:41, Rémi Denis-Courmont wrote: > > Le torstaina 2. tammikuuta 2025, 16.17.31 EET Michael Niedermayer a écrit : >>People will have shares proportional to their contribution to FFmpeg. > > That would be a giant step backward in terms of "democratisation". In > democr

Re: [FFmpeg-devel] [PATCH v2] avformat/http: Add max_request_size option

2025-01-02 Thread Zhao Zhili
> 在 2025年1月2日,上午5:52,Nicolas Frattaroli 写道: > > In some cases, webservers may return content more quickly if one > sends many small requests rather than one big request. Clients may > wish to opt-in to this workaround. > > For this purpose, add a max_request_size AVOption, which returns > EOF

Re: [FFmpeg-devel] [FFmpeg-cvslog] avcodec/libx265: ignore user set alpha x265-param

2024-12-26 Thread Zhao Zhili
> 在 2024年12月27日,上午12:42,James Almer 写道: > > ffmpeg | branch: master | James Almer | Thu Dec 26 > 13:41:04 2024 -0300| [7e778586e7efceacae33b12b9b3673838060f8f2] | committer: > James Almer > > avcodec/libx265: ignore user set alpha x265-param > > It makes no difference when the input has an

Re: [FFmpeg-devel] Your message to ffmpeg-devel awaits moderator approval

2024-12-23 Thread Zhao Zhili
> On Dec 23, 2024, at 14:44, Anton Khirnov wrote: > > Quoting Michael Niedermayer (2024-12-21 04:57:26) >> > > This is frankly a load of bullshit, and I find it insulting that you > expect people to swallow it. > > At least in the past five years, ML moderators have NEVER used their > powers

Re: [FFmpeg-devel] [PATCH v3] libavcodec/v4l2_buffers.c: set AVFrame interlaced flags

2024-12-23 Thread Zhao Zhili
> On Dec 19, 2024, at 20:45, Zhao Zhili wrote: > > >> On Dec 19, 2024, at 08:28, James Almer wrote: >> >> On 12/18/2024 6:59 PM, Scott Theisen wrote: >>> Originally from: >>> https://github.com/MythTV/mythtv/commit/669955c6cb29196b4b5120

Re: [FFmpeg-devel] [PATCH v3] libavcodec/v4l2_buffers.c: set AVFrame interlaced flags

2024-12-19 Thread Zhao Zhili
> On Dec 19, 2024, at 08:28, James Almer wrote: > > On 12/18/2024 6:59 PM, Scott Theisen wrote: >> Originally from: >> https://github.com/MythTV/mythtv/commit/669955c6cb29196b4b5120451b5b998d67a65749 >> --- >> v3: >> remove unnecessary clearing of already 0 valued flags >> use switch-case; I don

Re: [FFmpeg-devel] [PATCH 2/2] libavcodec/v4l2: use libdrm

2024-12-17 Thread Zhao Zhili
> On Dec 18, 2024, at 12:23, Scott Theisen wrote: > > On 12/17/24 11:10, Zhao Zhili wrote: >>> On Dec 17, 2024, at 06:48, Scott Theisen wrote: >>> >>> On 12/15/24 22:15, Zhao Zhili wrote: >>>>> On Dec 15, 2024, at 12:14, Scott Theisen wrote

[FFmpeg-devel] [PATCH] avcodec/cuviddec: Fix missing HW_CONFIG_METHOD_HW_FRAMES_CTX flag

2024-12-17 Thread Zhao Zhili
From: Zhao Zhili --- libavcodec/cuviddec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/cuviddec.c b/libavcodec/cuviddec.c index 3fae9c12eb..502bcc7fc2 100644 --- a/libavcodec/cuviddec.c +++ b/libavcodec/cuviddec.c @@ -1162,6 +1162,7 @@ static const AVCodecHWConfigInternal

Re: [FFmpeg-devel] [PATCH 2/2] libavcodec/v4l2: use libdrm

2024-12-17 Thread Zhao Zhili
> On Dec 17, 2024, at 06:48, Scott Theisen wrote: > > On 12/15/24 22:15, Zhao Zhili wrote: >> >>> On Dec 15, 2024, at 12:14, Scott Theisen wrote: >>> >>> Based on patches by Lukas Rusak from >>> https://github.com/lrusak/FFmpeg/commits/v4

Re: [FFmpeg-devel] [PATCH 2/2] avutil/mem_internal: Don't include stdalign.h on MSVC

2024-12-17 Thread Zhao Zhili
> On Dec 17, 2024, at 21:13, Martin Storsjö wrote: > > It's currently actually not used in MSVC builds, since > 6e49b8699657b808b7dc80033f2c3f2d0e029fa3. > > Older versions of MSVC (or, in particular, older versions of UCRT) > don't have stdalign.h; it's available since WinSDK 10.0.22000.0, >

Re: [FFmpeg-devel] [PATCH 1/2] aarch64: vvc: Fix building the dmvr_hv assembly with older MSVC versions

2024-12-17 Thread Zhao Zhili
> On Dec 17, 2024, at 21:13, Martin Storsjö wrote: > > Explicitly use ldur for unaligned offsets; newer versions of > armasm64 implicitly convert ldr to ldur as necessary, but older > versions require it explicitly written out. > > This fixes these build errors: > >ffmpeg\libavcodec\aarch

Re: [FFmpeg-devel] [PATCH] avutil/vulkan_glslang: Fix build failure

2024-12-16 Thread Zhao Zhili
> On Dec 17, 2024, at 11:04, Lynne via ffmpeg-devel > wrote: > > On 17/12/2024 11:42, Zhao Zhili wrote: >>> On Dec 17, 2024, at 09:12, Lynne via ffmpeg-devel >>> wrote: >>> >>> On 16/12/2024 20:55, Zhao Zhili wrote: >>>> From:

[FFmpeg-devel] [PATCH v2] avutil/vulkan_glslang: Fix build failure

2024-12-16 Thread Zhao Zhili
From: Zhao Zhili compile_only isn't available until 13.1.0. Let default initialization set it to zero, so the code works with version before and after 13.1.0. --- libavutil/vulkan_glslang.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/vulkan_glslan

Re: [FFmpeg-devel] [PATCH] avutil/vulkan_glslang: Fix build failure

2024-12-16 Thread Zhao Zhili
> On Dec 17, 2024, at 09:12, Lynne via ffmpeg-devel > wrote: > > On 16/12/2024 20:55, Zhao Zhili wrote: >> From: Zhao Zhili >> compile_only was added since glslang 13.1.0. >> --- >> libavutil/vulkan_glslang.c | 2 ++ >> 1 file changed,

[FFmpeg-devel] [PATCH] avcodec/bit_depth_template: Remove empty macro INIT_CLIP

2024-12-16 Thread Zhao Zhili
From: Zhao Zhili --- libavcodec/bit_depth_template.c | 3 --- libavcodec/h264pred_template.c | 3 --- libavcodec/h264qpel_template.c | 9 - libavcodec/mips/h264qpel_mmi.c | 2 -- 4 files changed, 17 deletions(-) diff --git a/libavcodec/bit_depth_template.c b/libavcodec

[FFmpeg-devel] [PATCH] avutil/vulkan_glslang: Fix build failure

2024-12-16 Thread Zhao Zhili
From: Zhao Zhili compile_only was added since glslang 13.1.0. --- libavutil/vulkan_glslang.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavutil/vulkan_glslang.c b/libavutil/vulkan_glslang.c index 9e1b8f4d8d..9e7a33223b 100644 --- a/libavutil/vulkan_glslang.c +++ b/libavutil

Re: [FFmpeg-devel] [PATCH 2/2] libavcodec/v4l2: use libdrm

2024-12-15 Thread Zhao Zhili
> On Dec 15, 2024, at 12:14, Scott Theisen wrote: > > Based on patches by Lukas Rusak from > https://github.com/lrusak/FFmpeg/commits/v4l2-drmprime-v4 > > libavcodec: v4l2m2m: output AVDRMFrameDescriptor > https://github.com/lrusak/FFmpeg/commit/2cb8052ac65a56d8a3f347a1e6f12d4449a5a614 > > li

Re: [FFmpeg-devel] [PATCH WIP 5/5] avcodec/hevc: Add alpha layer support

2024-12-14 Thread Zhao Zhili
> On Dec 14, 2024, at 17:43, Anton Khirnov wrote: > > Quoting Zhao Zhili (2024-12-11 05:23:33) >> From: Zhao Zhili >> >> --- >> libavcodec/hevc/hevcdec.c | 75 ++- >> libavcodec/hevc/hevcdec.h | 2 ++ >> lib

Re: [FFmpeg-devel] [PATCH WIP 4/5] avcodec/hevc/sei: Add support for alpha channel information

2024-12-14 Thread Zhao Zhili
> On Dec 14, 2024, at 23:20, James Almer wrote: > > On 12/11/2024 1:23 AM, Zhao Zhili wrote: >> From: Zhao Zhili >> --- >> libavcodec/hevc/sei.c | 30 ++ >> libavcodec/hevc/sei.h | 14 ++ >> 2 files changed, 44 i

Re: [FFmpeg-devel] [PATCH WIP 4/5] avcodec/hevc/sei: Add support for alpha channel information

2024-12-14 Thread Zhao Zhili
> On Dec 14, 2024, at 23:20, James Almer wrote: > > On 12/11/2024 1:23 AM, Zhao Zhili wrote: >> From: Zhao Zhili >> --- >> libavcodec/hevc/sei.c | 30 ++ >> libavcodec/hevc/sei.h | 14 ++ >> 2 files changed, 44 i

[FFmpeg-devel] [PATCH v2 3/3] avcodec/hevc: Add alpha layer support

2024-12-14 Thread Zhao Zhili
From: Zhao Zhili --- libavcodec/hevc/hevcdec.c | 72 ++- libavcodec/hevc/hevcdec.h | 2 ++ libavcodec/hevc/refs.c| 10 +- 3 files changed, 82 insertions(+), 2 deletions(-) diff --git a/libavcodec/hevc/hevcdec.c b/libavcodec/hevc/hevcdec.c index

[FFmpeg-devel] [PATCH v2 1/3] avcodec/hevc: Rewrite scalability_mask_flag parse in decode_vps_ext

2024-12-14 Thread Zhao Zhili
From: Zhao Zhili Remove a for loop and make it easy to extend to support other types of scalability. Move ScalabilityMask to hevc header file so it can be used in hevc decoder. --- libavcodec/hevc/hevc.h | 7 +++ libavcodec/hevc/ps.c | 33 +++-- libavcodec

[FFmpeg-devel] [PATCH v2 2/3] avcodec/hevc/ps: Add basic HEVC_SCALABILITY_AUXILIARY support

2024-12-14 Thread Zhao Zhili
From: Zhao Zhili Only implementing what's needed for HEVC with alpha. --- libavcodec/hevc/hevc.h | 5 ++ libavcodec/hevc/ps.c | 126 + libavcodec/hevc/ps.h | 4 ++ 3 files changed, 98 insertions(+), 37 deletions(-) diff --git a/libavcodec

[FFmpeg-devel] [PATCH v2 0/3] avcodec/hevc: Add alpha video decoding support

2024-12-14 Thread Zhao Zhili
From: Zhao Zhili v2: 1. It works with x265 streams 2. Remove the requirement on SEI. SEI alpha channel information is required on the producer side but not for decoder. Zhao Zhili (3): avcodec/hevc: Rewrite scalability_mask_flag parse in decode_vps_ext avcodec/hevc/ps: Add basic

[FFmpeg-devel] [PATCH WIP 0/5] avcodec/hevc: Add alpha video decoding support

2024-12-10 Thread Zhao Zhili
From: Zhao Zhili What works: 1. Create a sample with macOS videotoolbox ffmpeg -i base.mp4 -i alpha.mp4 \ -c:v hevc_videotoolbox -alpha_quality 0.5 -b:v 2M \ -filter_complex '[0:v]scale,format=bgra[v0];[1:v]scale=640x480,format=gray[v1];[v0][v1]alphamerge[v2]' \

[FFmpeg-devel] [PATCH WIP 5/5] avcodec/hevc: Add alpha layer support

2024-12-10 Thread Zhao Zhili
From: Zhao Zhili --- libavcodec/hevc/hevcdec.c | 75 ++- libavcodec/hevc/hevcdec.h | 2 ++ libavcodec/hevc/refs.c| 10 +- 3 files changed, 85 insertions(+), 2 deletions(-) diff --git a/libavcodec/hevc/hevcdec.c b/libavcodec/hevc/hevcdec.c index

[FFmpeg-devel] [PATCH WIP 4/5] avcodec/hevc/sei: Add support for alpha channel information

2024-12-10 Thread Zhao Zhili
From: Zhao Zhili --- libavcodec/hevc/sei.c | 30 ++ libavcodec/hevc/sei.h | 14 ++ 2 files changed, 44 insertions(+) diff --git a/libavcodec/hevc/sei.c b/libavcodec/hevc/sei.c index e11a33773c..56983fe96e 100644 --- a/libavcodec/hevc/sei.c +++ b

[FFmpeg-devel] [PATCH WIP 2/5] avcodec/hevc: Rewrite scalability_mask_flag parse in decode_vps_ext

2024-12-10 Thread Zhao Zhili
From: Zhao Zhili Remove a for loop and make it easy to extend to support other types of scalability. --- libavcodec/hevc/hevc.h | 10 +- libavcodec/hevc/ps.c | 25 +++-- libavcodec/hevc/ps.h | 2 ++ 3 files changed, 22 insertions(+), 15 deletions(-) diff --git

[FFmpeg-devel] [PATCH WIP 1/5] avcodec/hevc: Move ScalabilityMask to hevc header file

2024-12-10 Thread Zhao Zhili
From: Zhao Zhili So it can be used in hevc decoder. --- libavcodec/hevc/hevc.h | 7 +++ libavcodec/hevc/ps.c | 8 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/libavcodec/hevc/hevc.h b/libavcodec/hevc/hevc.h index 8bd59142db..eae28b3b04 100644 --- a/libavcodec

[FFmpeg-devel] [PATCH WIP 3/5] avcodec/hevc/ps: Add basic HEVC_SCALABILITY_AUXILIARY support

2024-12-10 Thread Zhao Zhili
From: Zhao Zhili Only implementing what's needed for HEVC with alpha. --- libavcodec/hevc/ps.c | 64 +--- libavcodec/hevc/ps.h | 1 + 2 files changed, 43 insertions(+), 22 deletions(-) diff --git a/libavcodec/hevc/ps.c b/libavcodec/hevc/ps.c

[FFmpeg-devel] [PATCH 2/2] aarch64/vvc: Use faster clip operation

2024-12-09 Thread Zhao Zhili
From: Zhao Zhili Replace sqxtn+smin+smax by sqxtun+umin. --- libavcodec/aarch64/vvc/inter.S | 41 +++--- 1 file changed, 18 insertions(+), 23 deletions(-) diff --git a/libavcodec/aarch64/vvc/inter.S b/libavcodec/aarch64/vvc/inter.S index b6b079b569..7a752019ee

[FFmpeg-devel] [PATCH 1/2] aarch64/vvc: Fix clip in alf

2024-12-09 Thread Zhao Zhili
From: Zhao Zhili Fix test failure: ./tests/checkasm/checkasm --test=vvc_alf 3607569773 --- libavcodec/aarch64/vvc/alf.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/aarch64/vvc/alf.S b/libavcodec/aarch64/vvc/alf.S index c624093640..8801b3afb6 100644 --- a

Re: [FFmpeg-devel] [RFC PATCH] tests/color_utils: Reduce precision requirement to resolve test failure

2024-12-07 Thread Zhao Zhili
Why 5215ec677c5510dcffc5c91003be145315df82fa isn’t on the mailing list? I send the patch and cc to Haas at the first place. > On Dec 6, 2024, at 11:23, Zhao Zhili > wrote: > > From: Zhao Zhili > > --- > libavutil/tests/color_utils.c | 2 +- > 1 file changed, 1

[FFmpeg-devel] [RFC PATCH] tests/color_utils: Reduce precision requirement to resolve test failure

2024-12-05 Thread Zhao Zhili
From: Zhao Zhili --- libavutil/tests/color_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/tests/color_utils.c b/libavutil/tests/color_utils.c index 27ba8b529e..b8200e91fa 100644 --- a/libavutil/tests/color_utils.c +++ b/libavutil/tests/color_utils.c

Re: [FFmpeg-devel] [PATCH] avcodec/mediacodecdec: rename MediaCodecH264DecContext to MediaCodecContext

2024-12-04 Thread Zhao Zhili
> On Dec 4, 2024, at 20:45, luckysk wrote: > > We support multiple video and audio formats, not just H264 LGTM. > --- > libavcodec/mediacodecdec.c | 18 +- > 1 file changed, 9 insertions(+), 9 deletions(-) > > diff --git a/libavcodec/mediacodecdec.c b/libavcodec/mediacodecdec

[FFmpeg-devel] [PATCH] avcodec/mediacodecenc: Check fifo write result and simplify fifo operation

2024-12-04 Thread Zhao Zhili
From: Zhao Zhili --- libavcodec/mediacodecenc.c | 105 - 1 file changed, 58 insertions(+), 47 deletions(-) diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c index 62bd7b4fda..464903d628 100644 --- a/libavcodec/mediacodecenc.c +++ b

Re: [FFmpeg-devel] [PATCH 4/4] avcodec/mediacodecenc: add async mode support

2024-12-04 Thread Zhao Zhili
> On Nov 27, 2024, at 14:37, Anton Khirnov wrote: > > Quoting Zhao Zhili (2024-11-06 13:31:34) >> @@ -78,6 +80,17 @@ typedef struct MediaCodecEncContext { >> int extract_extradata; >> // Ref. MediaFormat KEY_OPERATING_RATE >> int opera

Re: [FFmpeg-devel] [FFmpeg-cvslog] tests/checkasm: Add partial support for wasm

2024-12-04 Thread Zhao Zhili
> On Dec 4, 2024, at 17:56, Martin Storsjö wrote: > > On Wed, 4 Dec 2024, Zhao Zhili wrote: > >> ffmpeg | branch: master | Zhao Zhili | Wed Nov 20 >> 20:45:35 2024 +0800| [ea3d21c349db5bbfee7840857de81e4b2fc757fa] | committer: >> Zhao Zhili >> >&g

[FFmpeg-devel] [PATCH] tests/checkasm: Simplify logic for WASI signal handling

2024-12-04 Thread Zhao Zhili
From: Zhao Zhili --- tests/checkasm/checkasm.c | 10 ++ tests/checkasm/checkasm.h | 13 +++-- 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/tests/checkasm/checkasm.c b/tests/checkasm/checkasm.c index 544e3ee9ba..b00c3c2a9f 100644 --- a/tests/checkasm/checkasm.c

[FFmpeg-devel] [PATCH 2/2] aarch64/vvc: Add apply_bdof

2024-12-03 Thread Zhao Zhili
From: Zhao Zhili Test on rpi 5 with gcc 12: apply_bdof_8_8x16_c: 7315.2 ( 1.00x) apply_bdof_8_8x16_neon: 1876.8 ( 3.90x) apply_bdof_8_16x8_c: 7170.5 ( 1.00x) apply_bdof_8_16x8_neon

[FFmpeg-devel] [PATCH 1/2] aarch64/vvc: Reuse ff_vvc_put_pel_pixels for chroma

2024-12-03 Thread Zhao Zhili
From: Zhao Zhili --- libavcodec/aarch64/vvc/dsp_init.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/libavcodec/aarch64/vvc/dsp_init.c b/libavcodec/aarch64/vvc/dsp_init.c index e47f1ab4cc..4a7daf57a8 100644 --- a/libavcodec/aarch64/vvc/dsp_init.c +++ b/libavcodec/aarch64/vvc

Re: [FFmpeg-devel] [PATCH v2 0/3] Add WASM simd support

2024-12-02 Thread Zhao Zhili
> On Nov 27, 2024, at 20:35, Zhao Zhili wrote: > > Ping. Ping again. > >> On Nov 20, 2024, at 20:44, Zhao Zhili wrote: >> >> From: Zhao Zhili >> >> v2: >> 1. Remove unused include >> 2. Remove words on intrinsics vs hand

Re: [FFmpeg-devel] [PATCH] avutil/mem_internal: Don't use alignas for MSVC

2024-12-02 Thread Zhao Zhili
> On Dec 2, 2024, at 20:11, Hendrik Leppkes wrote: > > On Mon, Dec 2, 2024 at 11:28 AM Zhao Zhili > wrote: >> >> >>> On Dec 2, 2024, at 00:53, James Almer wrote: >>> >>> On 11/30/2024 6:13 AM, Zhao Zhili wrote: >>>> F

Re: [FFmpeg-devel] [PATCH] avutil/mem_internal: Don't use alignas for MSVC

2024-12-02 Thread Zhao Zhili
> On Dec 2, 2024, at 00:53, James Almer wrote: > > On 11/30/2024 6:13 AM, Zhao Zhili wrote: >> From: Zhao Zhili >> MSVC messed up standard C features, again. >> --- >> libavutil/mem_internal.h | 4 >> 1 file changed, 4 insertions(+) >> diff

Re: [FFmpeg-devel] [PATCH v2] lavc/x86/videodsp: Drop MMX usage

2024-11-30 Thread Zhao Zhili
> -Original Message- > From: ffmpeg-devel On Behalf Of Frank > Plowman > Sent: 2024年11月29日 6:21 > To: ffmpeg-devel@ffmpeg.org > Subject: Re: [FFmpeg-devel] [PATCH v2] lavc/x86/videodsp: Drop MMX usage > > Ping Pushed, thanks. > > On 16/11/2024 17:59, Frank Plowman wrote: > > Remove t

Re: [FFmpeg-devel] [PATCH 42/42] tests/fate/hevc: add a test for switching between single and multi-view

2024-11-30 Thread Zhao Zhili
> 在 2024年12月1日,上午1:22,James Almer 写道: > > On 11/30/2024 2:19 PM, Zhao Zhili wrote: >>> -Original Message- >>> From: ffmpeg-devel On Behalf Of James >>> Almer >>> Sent: 2024年12月1日 0:51 >>> To: ffmpeg-devel@ffmpeg.org >>> S

Re: [FFmpeg-devel] [PATCH 42/42] tests/fate/hevc: add a test for switching between single and multi-view

2024-11-30 Thread Zhao Zhili
> -Original Message- > From: ffmpeg-devel On Behalf Of James Almer > Sent: 2024年12月1日 0:51 > To: ffmpeg-devel@ffmpeg.org > Subject: Re: [FFmpeg-devel] [PATCH 42/42] tests/fate/hevc: add a test for > switching between single and multi-view > > On 11/30/2024 1

Re: [FFmpeg-devel] [PATCH 42/42] tests/fate/hevc: add a test for switching between single and multi-view

2024-11-30 Thread Zhao Zhili
> -Original Message- > From: ffmpeg-devel On Behalf Of Anton > Khirnov > Sent: 2024年8月27日 23:05 > To: ffmpeg-devel@ffmpeg.org > Subject: [FFmpeg-devel] [PATCH 42/42] tests/fate/hevc: add a test for > switching between single and multi-view > > --- > tests/fate/hevc.mak | 10

[FFmpeg-devel] [PATCH] avutil/mem_internal: Don't use alignas for MSVC

2024-11-30 Thread Zhao Zhili
From: Zhao Zhili MSVC messed up standard C features, again. --- libavutil/mem_internal.h | 4 1 file changed, 4 insertions(+) diff --git a/libavutil/mem_internal.h b/libavutil/mem_internal.h index 249ec3a642..2eb4aef5b0 100644 --- a/libavutil/mem_internal.h +++ b/libavutil/mem_internal.h

Re: [FFmpeg-devel] [PATCH v2 0/3] Add WASM simd support

2024-11-27 Thread Zhao Zhili
Ping. > On Nov 20, 2024, at 20:44, Zhao Zhili wrote: > > From: Zhao Zhili > > v2: > 1. Remove unused include > 2. Remove words on intrinsics vs handwritten assembly in wasm context. > > Zhao Zhili (3): > configure: Add wasm as a fake arch > tests/check

Re: [FFmpeg-devel] [PATCH 4/4] avcodec/mediacodecenc: add async mode support

2024-11-26 Thread Zhao Zhili
> On Nov 27, 2024, at 14:37, Anton Khirnov wrote: > > Quoting Zhao Zhili (2024-11-06 13:31:34) >> @@ -78,6 +80,17 @@ typedef struct MediaCodecEncContext { >> int extract_extradata; >> // Ref. MediaFormat KEY_OPERATING_RATE >> int opera

Re: [FFmpeg-devel] [PATCH 1/2] libavcodec: various: remove empty directories originally for legacy DSP code

2024-11-25 Thread Zhao Zhili
> On Jun 1, 2024, at 23:49, Sean McGovern wrote: > > On Thu, May 30, 2024 at 5:21 PM Sean McGovern wrote: >> >> --- >> libavcodec/bfin/README | 6 -- >> libavcodec/sh4/README | 6 -- >> libavcodec/sparc/README | 6 -- >> 3 files changed, 18 deletions(-) >> delete mode 100644 libav

Re: [FFmpeg-devel] [PATCH 2/2] avfilter/scale_vt: implement frame crop

2024-11-25 Thread Zhao Zhili
> On Nov 25, 2024, at 12:48, Koushik Dutta wrote: > > The crop filter has no effect on scale_vt: > > -vf crop=100:100,scale_vt=300x300 > > Hardware frames (AV_PIX_FMT_FLAG_HWACCEL) are expected to use the crop_* > properties, > as seen in the implementation vf_crop.c. > > The current worka

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

2024-11-25 Thread Zhao Zhili
> On Nov 25, 2024, at 04:49, Marvin Scholz wrote: > > I do some development and usage of FFmpeg regularly on macOS and sent > some patches to fix issues specific to Darwin in the past so I think it > makes sense to add myself as maintainer so people know they can ping me > if required, for Darw

[FFmpeg-devel] [PATCH] MAINTAINERS: Blackfin has been removed ten years ago

2024-11-25 Thread Zhao Zhili
From: Zhao Zhili --- MAINTAINERS | 1 - 1 file changed, 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index e99a1653ec..36559c585a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -519,7 +519,6 @@ RISC-V [2] Rémi Denis-Courmont Windows MinGW

Re: [FFmpeg-devel] [RFC] libpostproc splitout

2024-11-25 Thread Zhao Zhili
> On Nov 25, 2024, at 12:43, Anton Khirnov wrote: > > Quoting Tomas Härdin (2024-11-08 11:44:03) >> 15k sounds like money better spent on something else, for example >> improving the build system. > > What actual problems are there with our build systems. It works better > than most and is qui

Re: [FFmpeg-devel] [PATCH 1/4] avfilter/scale_vt: implement frame crop

2024-11-24 Thread Zhao Zhili
> On Nov 21, 2024, at 00:40, Koushik Dutta wrote: > > Is anyone reviewing videotoolbox or qsv filters? The scale_cuda > version of this patch was merged. > > On Sat, Oct 19, 2024 at 10:58 PM Koushik Dutta wrote: >> >> The crop filter has no effect on scale_vt: >> >> -vf crop=100:100,scale_v

Re: [FFmpeg-devel] [PATCH] avformat/smoothstreamingenc: check return value of avcodec_parameters_copy()

2024-11-21 Thread Zhao Zhili
> On Oct 13, 2024, at 01:18, Marth64 wrote: > > Written in the dominant style of the surrounding code block. > > Signed-off-by: Marth64 > --- > libavformat/smoothstreamingenc.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/libavformat/smoothstreamingenc.c > b/li

Re: [FFmpeg-devel] [PATCH] avformat/smoothstreamingenc: check return value of avcodec_parameters_copy()

2024-11-21 Thread Zhao Zhili
> On Nov 21, 2024, at 15:02, Marth64 wrote: > > Hi Zhao Zhili: > >> We don’t use braces in such case generally. >> And please split assignment and check >> into two lines next time. > > I agree but was trying to fix it in the style of the > surroun

Re: [FFmpeg-devel] [PATCH 1/4] avfilter/scale_vt: implement frame crop

2024-11-20 Thread Zhao Zhili
> 在 2024年11月21日,上午12:40,Koushik Dutta 写道: > > Is anyone reviewing videotoolbox or qsv filters? The scale_cuda > version of this patch was merged. Sorry I missed the scale_vt patch. I’m not good at tracking patches on mailing list. I will take a look this week. > >> On Sat, Oct 19, 2024 at 1

[FFmpeg-devel] [PATCH v2 0/3] Add WASM simd support

2024-11-20 Thread Zhao Zhili
From: Zhao Zhili v2: 1. Remove unused include 2. Remove words on intrinsics vs handwritten assembly in wasm context. Zhao Zhili (3): configure: Add wasm as a fake arch tests/checkasm: Add partial support for wasm avcodec/hevc: Add wasm simd128 idct Makefile| 3

[FFmpeg-devel] [PATCH v2 1/3] configure: Add wasm as a fake arch

2024-11-20 Thread Zhao Zhili
From: Zhao Zhili And add wasm simd128 flag, so we can add simd128 optimizations. It can be enabled by put -msimd128 to extra cflags. There is no runtime detection on simd128 support yet. I think that needs to be done with JavaScript. --- Makefile | 3 ++- configure

[FFmpeg-devel] [PATCH v2 3/3] avcodec/hevc: Add wasm simd128 idct

2024-11-20 Thread Zhao Zhili
From: Zhao Zhili Benchmark with wasmtime: wasmtime checkasm --test=hevc_idct --benchmark hevc_idct_4x4_8_c: 20.8 ( 1.00x) hevc_idct_4x4_8_simd128:10.2 ( 2.02x) hevc_idct_4x4_10_c: 21.0

[FFmpeg-devel] [PATCH v2 2/3] tests/checkasm: Add partial support for wasm

2024-11-20 Thread Zhao Zhili
From: Zhao Zhili WASI mssing signal and siglongjmp support. This patch workaround build error and add simd128 flag. Please note that many tests use large array on stack, so you need to increase the stack size when build checkasm, e.g., --extra-ldflags='-Wl,-z,stack-size=10485760'

[FFmpeg-devel] [PATCH] avfilter/textutils: Add missing time_internal.h

2024-11-18 Thread Zhao Zhili
From: Zhao Zhili This fix build error on Windows with MSVC. We need time_internal.h for gmtime_r and localtime_r. Signed-off-by: Zhao Zhili --- libavfilter/textutils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavfilter/textutils.c b/libavfilter/textutils.c index e6b5239b20

[FFmpeg-devel] [PATCH v2 2/3] avutil/mem_internal: define DECLARE_ALIGNED as C11's alignas

2024-11-15 Thread Zhao Zhili
From: Zhao Zhili alignas is portable than compiler's specific __attribute__. It do have a limitation, that alignas don't support specify aligment on the declarations of struct (it works for specify alignment on struct fields), which only used by avcodec/cavs, and is removed now. ---

[FFmpeg-devel] [PATCH 3/3] avutil/mem_internal: local align should always work

2024-11-15 Thread Zhao Zhili
From: Zhao Zhili --- configure| 7 --- libavutil/mem_internal.h | 28 2 files changed, 4 insertions(+), 31 deletions(-) diff --git a/configure b/configure index 0e9ed6dc3c..b9fb3cd5af 100755 --- a/configure +++ b/configure @@ -2246,7 +2246,6

[FFmpeg-devel] [PATCH 2/3] avutil/mem_internal: define DECLARE_ALIGNED as C11's _Alignas

2024-11-15 Thread Zhao Zhili
From: Zhao Zhili _Alignas is portable than compiler's specific __attribute__. It do have a limitation, that _Alignas don't support specify aligment on the declarations of struct (it works for specify alignment on struct fields), which only used by avcodec/cavs, and is removed now. ---

[FFmpeg-devel] [PATCH 1/3] avcodec/cavs: Limit align requirement to variable than type

2024-11-15 Thread Zhao Zhili
From: Zhao Zhili There are another three cavs_vector variables, ff_cavs_dir_mv, ff_cavs_intra_mv and un_mv. They don't need align to 8. --- libavcodec/cavs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/cavs.h b/libavcodec/cavs.h index 244c3

Re: [FFmpeg-devel] [PATCH 3/3] avcodec/hevc: Add wasm simd128 idct

2024-11-14 Thread Zhao Zhili
> Le 13 novembre 2024 16:16:36 GMT+02:00, Zhao Zhili <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>> a écrit : > >From: Zhao Zhili ><https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>> > > > >We don't use intrinsics normally for performance reas

[FFmpeg-devel] [PATCH 3/3] avcodec/hevc: Add wasm simd128 idct

2024-11-13 Thread Zhao Zhili
From: Zhao Zhili We don't use intrinsics normally for performance reasons. However, WASM isn't machine instruction. I suspect that in this scenario, handwritten assembly may not bring much performance compared with intrinsics. And I don't want to dig into the WASM ABI. S

[FFmpeg-devel] [PATCH 2/3] tests/checkasm: Add partial support for wasm

2024-11-13 Thread Zhao Zhili
From: Zhao Zhili WASI mssing signal and siglongjmp support. This patch workaround build error and add simd128 flag. Please note that many tests use large array on stack, so you need to increase the stack size when build checkasm, e.g., --extra-ldflags='-Wl,-z,stack-size=10485760'

[FFmpeg-devel] [PATCH 1/3] configure: Add wasm as a fake arch

2024-11-13 Thread Zhao Zhili
From: Zhao Zhili And add wasm simd128 flag, so we can add simd128 optimizations. It can be enabled by put -msimd128 to extra cflags. There is no runtime detection on simd128 support yet. I think that needs to be done with JavaScript. --- Makefile | 3 ++- configure

Re: [FFmpeg-devel] Patch for libx265 memory leak

2024-11-11 Thread Zhao Zhili
Hi Chen, > On Nov 12, 2024, at 01:09, chen wrote: > > From 4067c58be8e719a55d89e68aaa9d3db19b88b32f Mon Sep 17 00:00:00 2001 > > From: Chen > > Date: Fri, 8 Nov 2024 22:21:19 -0800 > > Subject: [PATCH] Fix memory leak in the libx265 > > > > > --- > > libavcodec/libx265.c | 4 +++- > > 1

[FFmpeg-devel] [PATCH 2/4] avcodec/mediacodecenc: Add operating_rate option

2024-11-06 Thread Zhao Zhili
From: Zhao Zhili For example, with ./ffmpeg -operating_rate 400 -hwaccel mediacodec -i test.mp4 -an \ -c:v h264_mediacodec -operating_rate 400 -b:v 5M -f null - The transcoding speed is 254 FPS. Without -operating_rate on dec/enc, the speed is 148 FPS. With -operating_rate on decoder only, the

[FFmpeg-devel] [PATCH 4/4] avcodec/mediacodecenc: add async mode support

2024-11-06 Thread Zhao Zhili
From: Zhao Zhili It has better performance than poll in a loop. --- configure | 2 +- libavcodec/mediacodecenc.c | 296 + libavcodec/version.h | 2 +- 3 files changed, 266 insertions(+), 34 deletions(-) diff --git a/configure b

[FFmpeg-devel] [PATCH 1/4] avcodec/mediacodecdec: Add operating_rate option

2024-11-06 Thread Zhao Zhili
From: Zhao Zhili The codec wants to know whether the usecase is realtime playback or full-speed transcoding, or playback at a higher speed. The codec runs faster when operating_rate higher than framerate. --- libavcodec/mediacodecdec.c | 8 1 file changed, 8 insertions(+) diff --git a

Re: [FFmpeg-devel] [PATCH 1/4] avcodec/mediacodecdec: Add operating_rate option

2024-11-06 Thread Zhao Zhili
> On Nov 6, 2024, at 20:33, Zhao Zhili wrote: > > From: Zhao Zhili > > The codec wants to know whether the usecase is realtime playback > or full-speed transcoding, or playback at a higher speed. The codec > runs faster when operating_rate higher than framerate. > —

[FFmpeg-devel] [PATCH 1/4] avcodec/mediacodecdec: Add operating_rate option

2024-11-06 Thread Zhao Zhili
From: Zhao Zhili The codec wants to know whether the usecase is realtime playback or full-speed transcoding, or playback at a higher speed. The codec runs faster when operating_rate higher than framerate. --- libavcodec/mediacodecdec.c | 8 1 file changed, 8 insertions(+) diff --git a

[FFmpeg-devel] [PATCH 3/4] avcodec/mediacodec_wrapper: add async mode support

2024-11-06 Thread Zhao Zhili
From: Zhao Zhili --- libavcodec/mediacodec_wrapper.c | 130 libavcodec/mediacodec_wrapper.h | 28 +++ 2 files changed, 158 insertions(+) diff --git a/libavcodec/mediacodec_wrapper.c b/libavcodec/mediacodec_wrapper.c index 96c88a..283bbe72d6 100644

[FFmpeg-devel] [PATCH] fftools/ffplay_renderer: Fix a typo

2024-11-06 Thread Zhao Zhili
From: Zhao Zhili The typo has no real effect except confusing. Signed-off-by: Zhao Zhili Reported-by: Chen Haibo --- fftools/ffplay_renderer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fftools/ffplay_renderer.c b/fftools/ffplay_renderer.c index 618149e7b2

Re: [FFmpeg-devel] [PATCH v2] fftools/ffplay: fix crash when vk renderer is null

2024-11-06 Thread Zhao Zhili
> On Nov 1, 2024, at 04:50, Leandro Santiago wrote: > > When vulkan rendering is requested by the user and fails, ffplay should > exit graciously instead of crash due to a null pointer deref. > > Signed-off-by: Leandro Santiago > --- > fftools/ffplay.c | 5 + > 1 file changed, 5 insertion

Re: [FFmpeg-devel] [PATCH] avformat/gifdec: There is an overflow int64_t receiving with int

2024-11-04 Thread Zhao Zhili
> On Nov 5, 2024, at 08:36, wzq via ffmpeg-devel > wrote: > > From: wzqzero <1918583...@qq.com> > > When converting a two-minute 3840 x 2160 video to a GIF file, > the viewing duration is shorter than the source duration when you use ffmpeg > -i, > which is due to data overflow, > which caus

Re: [FFmpeg-devel] [FFmpeg-cvslog] fate/vvc: Add a sample which lose frames before 5c66a3

2024-11-01 Thread Zhao Zhili
 > 在 2024年11月2日,上午7:01,Michael Niedermayer 写道: > > On Fri, Nov 01, 2024 at 09:11:47AM +0000, Zhao Zhili wrote: >> ffmpeg | branch: master | Zhao Zhili | Wed Sep 18 >> 14:56:22 2024 +0800| [1864025458021a2d2c542f56e268ee1106f84460] | committer: >> Zhao Zhili >

[FFmpeg-devel] [PATCH] x86/vvc: Fix build error for arch x86_32

2024-11-01 Thread Zhao Zhili
From: Zhao Zhili There were static functions which built for x86_32, but the simd functions they reference only available for x86_64. --- libavcodec/x86/vvc/vvcdsp_init.c | 5 + 1 file changed, 5 insertions(+) diff --git a/libavcodec/x86/vvc/vvcdsp_init.c b/libavcodec/x86/vvc/vvcdsp_init.c

Re: [FFmpeg-devel] [PATCH] fftools/ffplay: fix crash when vk renderer is null

2024-10-31 Thread Zhao Zhili
> On Oct 31, 2024, at 21:40, Leandro Santiago wrote: > > When vulkan rendering is requested by the user and fails, ffplay should > exit graciously instead of crash due to a null pointer deref. > > Signed-off-by: Leandro Santiago > --- > fftools/ffplay.c | 5 + > 1 file changed, 5 insertio

Re: [FFmpeg-devel] [RFC] libavutil split out

2024-10-30 Thread Zhao Zhili
> On Oct 31, 2024, at 08:13, Timo Rothenpieler wrote: > > On 31.10.2024 01:08, Michael Niedermayer wrote: >> Hi >> Theres a problem with libavutil, or maybe more than one >> a library implementing a codec that tries do use libavutil and itself is >> used by libavcodec. Creates a (build) dependa

  1   2   3   4   5   6   7   8   9   10   >