[FFmpeg-devel] [PATCH v2 2/2] avcodec/hevc_parser: fix missing zero_byte at frame beginning

2023-12-26 Thread Zhao Zhili
From: Zhao Zhili The start code is matched against 0x01, zero_byte was treated as last byte of last frame rather than the beginning of next frame. --- libavcodec/hevc_parser.c | 4 tests/fate/hevc.mak | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git

Re: [FFmpeg-devel] [PATCH 5/5] avcodec/dxva2(h264|mpeg2|vc1): use av_assert0 instead of assert

2023-12-26 Thread Xiang, Haihao
On Ma, 2023-12-25 at 22:18 +0800, Tong Wu wrote: > Signed-off-by: Tong Wu > --- >  libavcodec/dxva2.c   |  6 +++--- >  libavcodec/dxva2_h264.c  | 16 >  libavcodec/dxva2_mpeg2.c |  2 +- >  libavcodec/dxva2_vc1.c   |  2 +- >  4 files changed, 13 insertions(+), 13 deletions(-) >

Re: [FFmpeg-devel] [PATCH 4/5] avcodec/d3d12va_decode: remove assertion from get_surface_index

2023-12-26 Thread Xiang, Haihao
On Ma, 2023-12-25 at 22:18 +0800, Tong Wu wrote: > Return zero for failed case and avoid aborting the program. > > Signed-off-by: Tong Wu > --- >  libavcodec/d3d12va_decode.c | 2 -- >  1 file changed, 2 deletions(-) > > diff --git a/libavcodec/d3d12va_decode.c b/libavcodec/d3d12va_decode.c >

Re: [FFmpeg-devel] [PATCH v1 1/2] avcodec/av1dec: Move message of OBU info back to the beginning

2023-12-26 Thread Xiang, Haihao
On Di, 2023-12-26 at 11:31 +0800, fei.w.wang-at-intel@ffmpeg.org wrote: > From: Fei Wang > > So that can show OBU info even it doesn't have decomposed content. > > Signed-off-by: Fei Wang > --- >  libavcodec/av1dec.c | 3 ++- >  1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git

[FFmpeg-devel] [PATCH v2 6/7] avcodec/hevc: Add asm opt for the following functions

2023-12-26 Thread jinbo
tests/checkasm/checkasm: C LSX LASX put_hevc_qpel_uni_h4_8_c: 5.7 1.2 put_hevc_qpel_uni_h6_8_c: 12.22.7 put_hevc_qpel_uni_h8_8_c: 21.53.2 put_hevc_qpel_uni_h12_8_c: 47.29.2 7.2 put_hevc_qpel_uni_h16_8_c: 87.0

[FFmpeg-devel] [PATCH v2 7/7] avcodec/hevc: Add ff_hevc_idct_32x32_lasx asm opt

2023-12-26 Thread jinbo
From: yuanhecai tests/checkasm/checkasm: C LSX LASX hevc_idct_32x32_8_c: 1243.0 211.7 101.7 Speedup of decoding H265 4K 30FPS 30Mbps on 3A6000 with 8 threads is 1fps(56fps-->57fps). --- libavcodec/loongarch/Makefile | 3

[FFmpeg-devel] [PATCH v2 5/7] avcodec/hevc: Add epel_uni_w_hv4/6/8/12/16/24/32/48/64 asm opt

2023-12-26 Thread jinbo
tests/checkasm/checkasm: C LSX LASX put_hevc_epel_uni_w_hv4_8_c: 9.5 2.2 put_hevc_epel_uni_w_hv6_8_c: 18.55.0 3.7 put_hevc_epel_uni_w_hv8_8_c: 30.76.0 4.5 put_hevc_epel_uni_w_hv12_8_c: 63.714.010.7 put_hevc_epel_uni_w_hv16_8_c:

[FFmpeg-devel] [PATCH v2 4/7] avcodec/hevc: Add qpel_uni_w_v|h4/6/8/12/16/24/32/48/64 asm opt

2023-12-26 Thread jinbo
tests/checkasm/checkasm: C LSX LASX put_hevc_qpel_uni_w_h4_8_c:6.5 1.7 1.2 put_hevc_qpel_uni_w_h6_8_c:14.54.5 3.7 put_hevc_qpel_uni_w_h8_8_c:24.55.7 4.5 put_hevc_qpel_uni_w_h12_8_c: 54.717.512.0

[FFmpeg-devel] [PATCH v2 2/7] avcodec/hevc: Add add_residual_4/8/16/32 asm opt

2023-12-26 Thread jinbo
After this patch, the peformance of decoding H265 4K 30FPS 30Mbps on 3A6000 with 8 threads improves 2fps (45fps-->47fsp). --- libavcodec/loongarch/Makefile | 3 +- libavcodec/loongarch/hevc_add_res.S | 162 ++

[FFmpeg-devel] [PATCH v2 3/7] avcodec/hevc: Add pel_uni_w_pixels4/6/8/12/16/24/32/48/64 asm opt

2023-12-26 Thread jinbo
tests/checkasm/checkasm: C LSX LASX put_hevc_pel_uni_w_pixels4_8_c:2.7 1.0 put_hevc_pel_uni_w_pixels6_8_c:6.2 2.0 1.5 put_hevc_pel_uni_w_pixels8_8_c:10.72.5 1.7 put_hevc_pel_uni_w_pixels12_8_c: 23.05.5 5.0

[FFmpeg-devel] [PATCH v2] [loongarch] Add hevc 128-bit & 256-bit asm optimizatons

2023-12-26 Thread jinbo
v2: Add patch 7/7. [PATCH v2 1/7] avcodec/hevc: Add init for sao_edge_filter [PATCH v2 2/7] avcodec/hevc: Add add_residual_4/8/16/32 asm opt [PATCH v2 3/7] avcodec/hevc: Add pel_uni_w_pixels4/6/8/12/16/24/32/48/64 asm opt [PATCH v2 4/7] avcodec/hevc: Add qpel_uni_w_v|h4/6/8/12/16/24/32/48/64 asm

[FFmpeg-devel] [PATCH v2 1/7] avcodec/hevc: Add init for sao_edge_filter

2023-12-26 Thread jinbo
Forgot to init c->sao_edge_filter[idx] when idx=0/1/2/3. After this patch, the speedup of decoding H265 4K 30FPS 30Mbps on 3A6000 is about 7% (42fps==>45fps). Change-Id: I521999b397fa72b931a23c165cf45f276440cdfb --- libavcodec/loongarch/hevcdsp_init_loongarch.c | 4 1 file changed, 4

[FFmpeg-devel] [PATCH 2/2] avcodec/hevc_parser: fix missing zero_byte at frame beginning

2023-12-26 Thread Zhao Zhili
From: Zhao Zhili The start code is matched against 0x01, zero_byte was treated as last byte of last frame rather than the beginning of next frame. --- libavcodec/hevc_parser.c | 4 tests/fate/hevc.mak | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git

[FFmpeg-devel] [PATCH 1/2] avcodec/hevc_mp4toannexb_bsf: use HEVCNALUnitType instead of integer literal

2023-12-26 Thread Zhao Zhili
From: Zhao Zhili --- libavcodec/hevc_mp4toannexb_bsf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/hevc_mp4toannexb_bsf.c b/libavcodec/hevc_mp4toannexb_bsf.c index f9a025a36b..d91229a895 100644 --- a/libavcodec/hevc_mp4toannexb_bsf.c +++

[FFmpeg-devel] [PATCH 2/2] libavfilter/vf_dnn_detect: Add two outputs ssd support

2023-12-26 Thread wenbin . chen-at-intel . com
From: Wenbin Chen For this kind of model, we can directly use its output as final result just like ssd model. The difference is that it splits output into two tensors. [x_min, y_min, x_max, y_max, confidence] and [lable_id]. Model example refer to:

[FFmpeg-devel] [PATCH 1/2] libavfilter/dnn_backend_openvino: Add dynamic output support

2023-12-26 Thread wenbin . chen-at-intel . com
From: Wenbin Chen Add dynamic outputs support. Some models don't have fixed output size. Its size changes according to result. Now openvino can run these kinds of models. Signed-off-by: Wenbin Chen --- libavfilter/dnn/dnn_backend_openvino.c | 134 +++-- 1 file changed, 59

Re: [FFmpeg-devel] [PATCH v2] configure: Enable section_data_rel_ro for FreeBSD and NetBSD aarch64 / arm

2023-12-26 Thread Brad Smith
On December 26, 2023 7:35:09 a.m. Michael Niedermayer wrote: On Mon, Dec 25, 2023 at 09:04:54PM -0500, Brad Smith wrote: On 2023-12-24 9:08 p.m., Michael Niedermayer wrote: On Sun, Dec 24, 2023 at 02:33:31PM -0500, Brad Smith wrote: configure: Enable section_data_rel_ro for FreeBSD and

Re: [FFmpeg-devel] [PATCH] avcodec/d3d12va_decode: don't change the resource state if the referenced frame is the same as the current frame

2023-12-26 Thread Wu, Tong1
>From: ffmpeg-devel On Behalf Of Wu >Jianhua >Sent: Tuesday, December 26, 2023 9:21 PM >To: FFmpeg development discussions and patches de...@ffmpeg.org> >Subject: [FFmpeg-devel] [PATCH] avcodec/d3d12va_decode: don't change the >resource state if the referenced frame is the same as the current

Re: [FFmpeg-devel] [PATCH] lavfi: add quirc filter

2023-12-26 Thread James Almer
On 12/26/2023 10:25 PM, Stefano Sabatini wrote: On date Tuesday 2023-12-26 17:20:33 +0100, Stefano Sabatini wrote: --- Changelog| 1 + configure| 4 + doc/filters.texi | 35 libavfilter/Makefile | 1 + libavfilter/allfilters.c |

Re: [FFmpeg-devel] [PATCH] lavfi: add quirc filter

2023-12-26 Thread Stefano Sabatini
On date Tuesday 2023-12-26 17:20:33 +0100, Stefano Sabatini wrote: > --- > Changelog| 1 + > configure| 4 + > doc/filters.texi | 35 > libavfilter/Makefile | 1 + > libavfilter/allfilters.c | 1 + > libavfilter/vf_quirc.c | 183

Re: [FFmpeg-devel] [PATCH] lavfi: add quirc filter

2023-12-26 Thread Stefano Sabatini
On date Tuesday 2023-12-26 20:08:10 +0100, Andreas Rheinhardt wrote: > Stefano Sabatini: [...] > > +static int query_formats(AVFilterContext *ctx) > > +{ > > +static const enum AVPixelFormat pix_fmts[] = {AV_PIX_FMT_GRAY8, > > AV_PIX_FMT_NONE}; > > +return

Re: [FFmpeg-devel] [PATCH] lavfi: add quirc filter

2023-12-26 Thread Stefano Sabatini
On date Tuesday 2023-12-26 16:21:55 -0300, James Almer wrote: > On 12/26/2023 1:20 PM, Stefano Sabatini wrote: > > +static int filter_frame(AVFilterLink *inlink, AVFrame *frame) > > +{ > > +AVFilterContext *ctx = inlink->dst; > > +AVFilterLink *outlink = ctx->outputs[0]; > > +

Re: [FFmpeg-devel] Mailinglist conduct [was: Re: [PATCH] lavc: remove the QOA decoder]

2023-12-26 Thread James Almer
On 12/26/2023 7:40 PM, Paul B Mahol wrote: On Tue, Dec 26, 2023 at 11:20 PM Ronald S. Bultje wrote: Paul, On Thu, Dec 21, 2023 at 3:05 PM Paul B Mahol wrote: Say what serious feature you contributed ? - Nothing. the CC requests that you please refrain from attacking fellow FFmpeg

Re: [FFmpeg-devel] Mailinglist conduct [was: Re: [PATCH] lavc: remove the QOA decoder]

2023-12-26 Thread Paul B Mahol
On Tue, Dec 26, 2023 at 11:20 PM Ronald S. Bultje wrote: > Paul, > > On Thu, Dec 21, 2023 at 3:05 PM Paul B Mahol wrote: > > > Say what serious feature you contributed ? - Nothing. > > > > the CC requests that you please refrain from attacking fellow FFmpeg > contributors ("what serious feature

Re: [FFmpeg-devel] [PATCH 3/6] Add CRYO APC muxer

2023-12-26 Thread Michael Niedermayer
Hi On Tue, Dec 26, 2023 at 04:52:47PM +0100, Tomas Härdin wrote: > [...] > + > +static int apc_write_header(AVFormatContext *s) > +{ > +AVIOContext *pb = s->pb; > +AVCodecParameters *par; > +AVStream *st; > + > +if (s->nb_streams != 1) { > +av_log(s, AV_LOG_ERROR, "Must

[FFmpeg-devel] [PATCH 2/2] avcodec/proresenc: fix alpha plane encoding bitstream

2023-12-26 Thread Clément Bœsch
These functions encode a slice of alpha (1 to 8 macroblocks) which are expected to be encoded as a repeated sequence of "[diff][run-1]", where diff is the running difference of the alpha value and run is how many times that value is expected to be duplicated (within the limit of a grand total of

[FFmpeg-devel] [PATCH 1/2] avcodec/proresenc: make transparency honored in mov/QT

2023-12-26 Thread Clément Bœsch
In the mov muxer (in mov_write_video_tag()), bits_per_coded_sample will be written under certain conditions and is required to be 32 for the transparency to be honored in QuickTime. prores_kostya already has this setting but prores_anatoliy and prores_videotoolbox didn't. ---

[FFmpeg-devel] Mailinglist conduct [was: Re: [PATCH] lavc: remove the QOA decoder]

2023-12-26 Thread Ronald S. Bultje
Paul, On Thu, Dec 21, 2023 at 3:05 PM Paul B Mahol wrote: > Say what serious feature you contributed ? - Nothing. > the CC requests that you please refrain from attacking fellow FFmpeg contributors ("what serious feature [have] you contributed? - Nothing") on the mailinglist. Signed

Re: [FFmpeg-devel] [PATCH] lavfi: add quirc filter

2023-12-26 Thread James Almer
On 12/26/2023 1:20 PM, Stefano Sabatini wrote: +static int filter_frame(AVFilterLink *inlink, AVFrame *frame) +{ +AVFilterContext *ctx = inlink->dst; +AVFilterLink *outlink = ctx->outputs[0]; +QuircContext *quirc = ctx->priv; +int codes_count; +int i, w, h; +uint8_t

Re: [FFmpeg-devel] [PATCH 1/3] avcodec/osq: Implement flush()

2023-12-26 Thread Andreas Rheinhardt
Michael Niedermayer: > Fixes: out of array access > Fixes: > 62164/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_OSQ_fuzzer-6227491892887552 > Fixes: > 62164/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_OSQ_fuzzer-6268561729126400 > Fixes: >

Re: [FFmpeg-devel] [PATCH] lavfi: add quirc filter

2023-12-26 Thread Andreas Rheinhardt
Stefano Sabatini: > --- > Changelog| 1 + > configure| 4 + > doc/filters.texi | 35 > libavfilter/Makefile | 1 + > libavfilter/allfilters.c | 1 + > libavfilter/vf_quirc.c | 183 +++ > 6 files

Re: [FFmpeg-devel] [PATCH v2] avcodec/jpegxl_parser: check ANS cluster alphabet size vs bundle size

2023-12-26 Thread Michael Niedermayer
On Tue, Dec 26, 2023 at 08:23:35AM -0600, Leo Izen wrote: > On 12/25/23 15:09, Michael Niedermayer wrote: > > On Mon, Dec 25, 2023 at 12:04:17PM -0500, Leo Izen wrote: > > > The specification doesn't mention that clusters cannot have alphabet > > > sizes greater than 1 <<

Re: [FFmpeg-devel] [PATCH 2/3] avcodec/osq: avoid several signed integer overflows

2023-12-26 Thread James Almer
On 12/26/2023 1:37 PM, Michael Niedermayer wrote: Fixes: signed integer overflow: 178459578 + 2009763270 cannot be represented in type 'int' Fixes: 62285/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_OSQ_fuzzer-5013423686287360 Found-by: continuous fuzzing process

[FFmpeg-devel] [PATCH 3/3] avformat/concatdec: clip outpoint - inpoint overflow in get_best_effort_duration()

2023-12-26 Thread Michael Niedermayer
An alternative would be to limit all time/duration fields to below 64bit Fixes: signed integer overflow: -9300 - 922337203683900 cannot be represented in type 'long long' Fixes: 64546/clusterfuzz-testcase-minimized-ffmpeg_dem_CONCAT_fuzzer-5110813828186112 Found-by: continuous fuzzing

[FFmpeg-devel] [PATCH 2/3] avcodec/osq: avoid several signed integer overflows

2023-12-26 Thread Michael Niedermayer
Fixes: signed integer overflow: 178459578 + 2009763270 cannot be represented in type 'int' Fixes: 62285/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_OSQ_fuzzer-5013423686287360 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg

[FFmpeg-devel] [PATCH 1/3] avcodec/osq: Implement flush()

2023-12-26 Thread Michael Niedermayer
Fixes: out of array access Fixes: 62164/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_OSQ_fuzzer-6227491892887552 Fixes: 62164/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_OSQ_fuzzer-6268561729126400 Fixes:

[FFmpeg-devel] [PATCH] lavfi: add quirc filter

2023-12-26 Thread Stefano Sabatini
--- Changelog| 1 + configure| 4 + doc/filters.texi | 35 libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/vf_quirc.c | 183 +++ 6 files changed, 225 insertions(+) create

[FFmpeg-devel] [PATCH 6/6] Add myself as APC maintainer

2023-12-26 Thread Tomas Härdin
From 616ab30780e72beb3f07ef0cb2f26ac1c8181524 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= Date: Tue, 26 Dec 2023 16:45:33 +0100 Subject: [PATCH 6/6] Add myself as APC maintainer --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS

[FFmpeg-devel] [PATCH 5/6] Add ADPCM IMA CRYO APC encoder

2023-12-26 Thread Tomas Härdin
Hopefully I got the testing right From 047ba1051d5e03b2a54d2aad514dd4501750bc71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= Date: Tue, 26 Dec 2023 14:32:20 +0100 Subject: [PATCH 5/6] Add ADPCM IMA CRYO APC encoder No trellis quantization yet --- Changelog

[FFmpeg-devel] [PATCH 4/6] Un-mark IMA APC as intra-only

2023-12-26 Thread Tomas Härdin
From dd84044af61931988e43bd58c202fe4e7ca7069a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= Date: Tue, 26 Dec 2023 16:30:35 +0100 Subject: [PATCH 4/6] Un-mark IMA APC as intra-only Packets must be decoded in order. There is no way to seek and get a bitexact decode. ---

[FFmpeg-devel] [PATCH 3/6] Add CRYO APC muxer

2023-12-26 Thread Tomas Härdin
From 14f3dd40a49ebf5ea020465732511e9d79a2e14a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= Date: Tue, 26 Dec 2023 14:32:10 +0100 Subject: [PATCH 3/6] Add CRYO APC muxer --- Changelog | 1 + doc/general_contents.texi | 2 +- libavformat/Makefile | 1

[FFmpeg-devel] [PATCH 2/6] apc: Read duration from file

2023-12-26 Thread Tomas Härdin
From b3756e6258d18139fb2b67e3d9bc795bafd1b065 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= Date: Tue, 26 Dec 2023 14:31:59 +0100 Subject: [PATCH 2/6] apc: Read duration from file --- libavformat/apc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

[FFmpeg-devel] [PATCH 1/6] doc/general_contents.texi: Add missing ADPCM IMA APC entry

2023-12-26 Thread Tomas Härdin
Rebased and addressed some comments from last time. Also discovered some issues like the IMA APC codec not being listed. This is for the Cryo game modding community. /Tomas From 490754ea1580d4d02bba83150ca09ca8f960c6fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= Date: Tue, 26

Re: [FFmpeg-devel] [PATCH v2] avcodec/jpegxl_parser: check ANS cluster alphabet size vs bundle size

2023-12-26 Thread Leo Izen
On 12/25/23 15:09, Michael Niedermayer wrote: On Mon, Dec 25, 2023 at 12:04:17PM -0500, Leo Izen wrote: The specification doesn't mention that clusters cannot have alphabet sizes greater than 1 << bundle->log_alphabet_size, but the reference implementation rejects these entropy streams as

[FFmpeg-devel] Mailinglist conduct [was: Re: [PATCH] lavc: remove the QOA decoder]

2023-12-26 Thread Ronald S. Bultje
Hi Nicolas, On Thu, Dec 21, 2023 at 3:31 PM Nicolas George wrote: > Paul B Mahol (12023-12-21): > > Say what serious feature you contributed ? - Nothing. > > I did not want to say it, but since it is now in the open: Not nothing: > negative. His naysaying discouraged me from working further on

[FFmpeg-devel] [PATCH] avcodec/d3d12va_decode: don't change the resource state if the referenced frame is the same as the current frame

2023-12-26 Thread Wu Jianhua
avcodec/d3d12va_decode: don't change the resource state if the referenced frame is the same as the current frame This commit removes the follow warning and error: D3D12 WARNING: ID3D12CommandList::ResourceBarrier: Called on the same subresource(s) of

Re: [FFmpeg-devel] [PATCH] lavc: remove the QOA decoder

2023-12-26 Thread Michael Niedermayer
On Mon, Dec 25, 2023 at 11:22:40AM -0600, Leo Izen wrote: > On 12/21/23 21:32, Michael Niedermayer wrote: > > > > Can you think of a way to add some lines of code to this that makes it more > > maintainable ? > > > > if yes, then i think you proofed that adding code can reduce maintaince > >

Re: [FFmpeg-devel] [PATCH v2] configure: Enable section_data_rel_ro for FreeBSD and NetBSD aarch64 / arm

2023-12-26 Thread Michael Niedermayer
On Mon, Dec 25, 2023 at 09:04:54PM -0500, Brad Smith wrote: > On 2023-12-24 9:08 p.m., Michael Niedermayer wrote: > > On Sun, Dec 24, 2023 at 02:33:31PM -0500, Brad Smith wrote: > > > configure: Enable section_data_rel_ro for FreeBSD and NetBSD aarch64 / arm > > > > > > Fixes the build. It's a