Re: [FFmpeg-devel] [PATCH v1 3/3] lavfi/{denoise, procamp, scale, sharpness}_vaapi: Add passthrough mode

2023-06-12 Thread Xiang, Haihao
On Di, 2023-05-30 at 08:29 +0800, Fei Wang wrote: > Signed-off-by: Fei Wang > --- >  libavfilter/vaapi_vpp.c    | 15 --- >  libavfilter/vaapi_vpp.h    |  2 ++ >  libavfilter/vf_misc_vaapi.c    |  9 + >  libavfilter/vf_procamp_vaapi.c | 10 ++ >  libavfilter/vf_sc

Re: [FFmpeg-devel] [PATCH 1/5] lavc/aarch64: new optimization for 8-bit hevc_pel_uni_pixels

2023-06-12 Thread Martin Storsjö
On Sun, 4 Jun 2023, logan@myais.com.cn wrote: From: Logan Lyu Signed-off-by: Logan Lyu --- libavcodec/aarch64/hevcdsp_init_aarch64.c | 5 ++ libavcodec/aarch64/hevcdsp_qpel_neon.S| 104 ++ 2 files changed, 109 insertions(+) diff --git a/libavcodec/aarch64/hevcdsp_

Re: [FFmpeg-devel] [PATCH 2/5] lavc/aarch64: new optimization for 8-bit hevc_epel_uni_w_h

2023-06-12 Thread Martin Storsjö
On Sun, 4 Jun 2023, logan@myais.com.cn wrote: From: Logan Lyu Signed-off-by: Logan Lyu --- libavcodec/aarch64/Makefile | 1 + libavcodec/aarch64/hevcdsp_epel_neon.S| 378 ++ libavcodec/aarch64/hevcdsp_init_aarch64.c | 7 +- 3 files changed, 385 inser

Re: [FFmpeg-devel] [PATCH 3/5] lavc/aarch64: new optimization for 8-bit hevc_epel_uni_w_v

2023-06-12 Thread Martin Storsjö
On Sun, 4 Jun 2023, logan@myais.com.cn wrote: From: Logan Lyu Signed-off-by: Logan Lyu --- libavcodec/aarch64/hevcdsp_epel_neon.S| 504 ++ libavcodec/aarch64/hevcdsp_init_aarch64.c | 6 + 2 files changed, 510 insertions(+) diff --git a/libavcodec/aarch64/hevcdsp_e

Re: [FFmpeg-devel] [PATCH 4/5] lavc/aarch64: new optimization for 8-bit hevc_epel_h

2023-06-12 Thread Martin Storsjö
On Sun, 4 Jun 2023, logan@myais.com.cn wrote: From: Logan Lyu Signed-off-by: Logan Lyu --- libavcodec/aarch64/hevcdsp_epel_neon.S| 343 ++ libavcodec/aarch64/hevcdsp_init_aarch64.c | 7 +- 2 files changed, 349 insertions(+), 1 deletion(-) +st2

[FFmpeg-devel] [PATCH 1/6] lavfi/qsvvpp: track the runtime version in vpp context

2023-06-12 Thread Xiang, Haihao
From: Haihao Xiang We may check whether a feature is supported via the runtime version in future. Signed-off-by: Haihao Xiang --- libavfilter/qsvvpp.c | 6 ++ libavfilter/qsvvpp.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/libavfilter/qsvvpp.c b/libavfilter/qsvvpp.c index b233b

[FFmpeg-devel] [PATCH 2/6] lavfi/qsvvpp: copy metadata fields from src to dst

2023-06-12 Thread Xiang, Haihao
From: Haihao Xiang Signed-off-by: Haihao Xiang --- libavfilter/qsvvpp.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/libavfilter/qsvvpp.c b/libavfilter/qsvvpp.c index 779afce66d..61402c8e0a 100644 --- a/libavfilter/qsvvpp.c +++ b/libavfilter/qsvvpp.c @@

[FFmpeg-devel] [PATCH 3/6] lavfi/qsvvpp: check the parameters before initializing vpp session

2023-06-12 Thread Xiang, Haihao
From: Haihao Xiang According to the description about MFXVideoVPP_Query [1], we may call MFXVideoVPP_Query to check the validity of the parameters for vpp session, use the corrected values to initialize the session. [1] https://spec.oneapi.io/versions/latest/elements/oneVPL/source/API_ref/VPL_f

[FFmpeg-devel] [PATCH 5/6] lavfi/qsvvpp: postpone vpp session initialization

2023-06-12 Thread Xiang, Haihao
From: Haihao Xiang So there is a chance to update vpp parameters per frame Signed-off-by: Haihao Xiang --- libavfilter/qsvvpp.c | 38 +++--- libavfilter/qsvvpp.h | 1 + 2 files changed, 32 insertions(+), 7 deletions(-) diff --git a/libavfilter/qsvvpp.c b/libav

[FFmpeg-devel] [PATCH 4/6] lavfi/qsvvpp: store a copy of the sequence parameters

2023-06-12 Thread Xiang, Haihao
From: Haihao Xiang We will postpone the vpp session initialization to when input and output frames are ready, this copy of the sequence parameters will be used to initialize vpp session. Signed-off-by: Haihao Xiang --- libavfilter/qsvvpp.c | 42 ++ libav

[FFmpeg-devel] [PATCH 6/6] lavfi/qsvvpp: use the right picture struct for vpp initilaization

2023-06-12 Thread Xiang, Haihao
From: Haihao Xiang Signed-off-by: Haihao Xiang --- libavfilter/qsvvpp.c | 21 +++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/libavfilter/qsvvpp.c b/libavfilter/qsvvpp.c index f2e8e5fd73..a03de05d9c 100644 --- a/libavfilter/qsvvpp.c +++ b/libavfilter/qsvvpp.

Re: [FFmpeg-devel] [PATCH 5/5] lavc/aarch64: new optimization for 8-bit hevc_epel_uni_w_hv

2023-06-12 Thread Martin Storsjö
On Sun, 4 Jun 2023, logan@myais.com.cn wrote: From: Logan Lyu Signed-off-by: Logan Lyu --- libavcodec/aarch64/hevcdsp_epel_neon.S| 703 ++ libavcodec/aarch64/hevcdsp_init_aarch64.c | 7 + 2 files changed, 710 insertions(+) diff --git a/libavcodec/aarch64/hevcdsp_e

Re: [FFmpeg-devel] [PATCH] Optimization: support for libx264's mb_info

2023-06-12 Thread Kieran Kunhya
> > Looks good to me otherwise, maybe Michael/Anton or someone else want > to have a look? > I don't think we should be adding what is essentially libx264 specific code to the public libavutil API. Kieran ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpe

Re: [FFmpeg-devel] [PATCH 3/5] lavc/aarch64: new optimization for 8-bit hevc_epel_uni_w_v

2023-06-12 Thread Martin Storsjö
On Mon, 12 Jun 2023, Martin Storsjö wrote: On Sun, 4 Jun 2023, logan@myais.com.cn wrote: From: Logan Lyu Signed-off-by: Logan Lyu --- libavcodec/aarch64/hevcdsp_epel_neon.S| 504 ++ libavcodec/aarch64/hevcdsp_init_aarch64.c | 6 + 2 files changed, 510 insertions(

[FFmpeg-devel] [PATCH] avformat/mov: fix overallocation when reading pssh/saiz

2023-06-12 Thread Zhao Zhili
From: Zhao Zhili mov_try_read_block() allocates 1MB at least, which can be more than enough. It was called when reading saiz box, which can appear periodically inside fmp4. This consumes a lot of memory. We can fix mov_try_read_block() by clamp 'block_size' with 'size'. However, the function is

Re: [FFmpeg-devel] [Internet][PATCH 1/6] avcodec/cbs: add API to discard units by AVDiscard

2023-06-12 Thread zhilizhao(赵志立)
> On May 29, 2023, at 20:32, zhilizhao(赵志立) wrote: > > Ping. Any comments on the idea? > >> On May 18, 2023, at 05:23, Zhao Zhili wrote: >> >> From: Zhao Zhili >> >> --- >> libavcodec/cbs.c | 21 + >> libavcodec/cbs.h | 17 + >> libavcode

Re: [FFmpeg-devel] [PATCH] avformat/mov: fix overallocation when reading pssh/saiz

2023-06-12 Thread Marvin Scholz (ePirat)
Hi, > On 12. Jun 2023, at 13:56, Zhao Zhili wrote: > > From: Zhao Zhili > > mov_try_read_block() allocates 1MB at least, which can be more than > enough. It was called when reading saiz box, which can appear > periodically inside fmp4. This consumes a lot of memory. > > We can fix mov_try_re

Re: [FFmpeg-devel] [PATCH] avformat/mov: fix overallocation when reading pssh/saiz

2023-06-12 Thread zhilizhao(赵志立)
> On Jun 12, 2023, at 20:06, Marvin Scholz (ePirat) wrote: > > Hi, > >> On 12. Jun 2023, at 13:56, Zhao Zhili wrote: >> >> From: Zhao Zhili >> >> mov_try_read_block() allocates 1MB at least, which can be more than >> enough. It was called when reading saiz box, which can appear >> periodi

[FFmpeg-devel] [PATCH v24 1/9] avcodec/evc_parser: Added parser implementation for EVC format

2023-06-12 Thread Dawid Kozinski
- Added constants definitions for EVC parser - Provided NAL units parsing following ISO_IEC_23094-1 - EVC parser registration Signed-off-by: Dawid Kozinski --- configure | 2 + libavcodec/Makefile| 2 + libavcodec/bitstream_filters.c | 5 +- libavcodec/evc.

[FFmpeg-devel] [PATCH v24 2/9] avformat/evc_muxer: Added muxer to handle writing EVC encoded data into file or output bytestream

2023-06-12 Thread Dawid Kozinski
- Provided AVOutputFormat structure describing EVC output format (ff_evc_muxer) - Added documentation for EVC muxer Signed-off-by: Dawid Kozinski --- doc/muxers.texi | 6 ++ libavformat/Makefile | 1 + libavformat/allformats.c | 1 + libavformat/rawenc.c | 13

[FFmpeg-devel] [PATCH v24 3/9] avformat/evc_demuxer: Added demuxer to handle reading EVC video files

2023-06-12 Thread Dawid Kozinski
- Provided AVInputFormat struct describing EVC input format (ff_evc_demuxer) Signed-off-by: Dawid Kozinski --- libavcodec/Makefile | 1 + libavcodec/evc_frame_merge_bsf.c | 170 +++ libavformat/Makefile | 1 + libavformat/allformats.c | 1 +

[FFmpeg-devel] [PATCH v24 4/9] avcodec/evc_encoder: Provided support for EVC encoder

2023-06-12 Thread Dawid Kozinski
- Added EVC encoder wrapper - Changes in project configuration file and libavcodec Makefile - Added documentation for xeve wrapper Signed-off-by: Dawid Kozinski --- configure | 4 + doc/encoders.texi | 69 + doc/general_contents.texi | 11 + libavcodec/Makefile

[FFmpeg-devel] [PATCH v24 5/9] avcodec/evc_decoder: Provided support for EVC decoder

2023-06-12 Thread Dawid Kozinski
- Added EVC decoder wrapper - Changes in project configuration file and libavcodec Makefile - Added documentation for xevd wrapper Signed-off-by: Dawid Kozinski --- configure | 4 + doc/decoders.texi | 24 ++ doc/general_contents.texi | 10 +- libavcodec/Makefile

[FFmpeg-devel] [PATCH v24 6/9] avformat/mov_muxer: Extended MOV muxer to handle EVC video content

2023-06-12 Thread Dawid Kozinski
- Changes in mov_write_video_tag function to handle EVC elementary stream - Provided structure EVCDecoderConfigurationRecord that specifies the decoder configuration information for ISO/IEC 23094-1 video content Signed-off-by: Dawid Kozinski --- libavformat/Makefile| 2 +- libavformat/evc

[FFmpeg-devel] [PATCH v24 7/9] avformat/mov_demuxer: Extended MOV demuxer to handle EVC video content

2023-06-12 Thread Dawid Kozinski
- Added evc extension to the list of extensions for ff_mov_demuxer Signed-off-by: Dawid Kozinski --- libavformat/demux.c | 1 + libavformat/mov.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/libavformat/demux.c b/libavformat/demux.c index b3f563ccc7..1b21b8440c 100644 --- a/libavform

[FFmpeg-devel] [PATCH v24 8/9] avcodec/evc: Changes in Changelog file

2023-06-12 Thread Dawid Kozinski
- Changelog update Signed-off-by: Dawid Kozinski --- Changelog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index d51e03b8eb..fa029c5b1a 100644 --- a/Changelog +++ b/Changelog @@ -88,6 +88,8 @@ version 5.1: - remap_opencl filter - added chromakey_

[FFmpeg-devel] [PATCH v24 9/9] avcodec/evc: Changes in MAINTAINERS file

2023-06-12 Thread Dawid Kozinski
- MAINTAINERS update Signed-off-by: Dawid Kozinski --- MAINTAINERS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 07852486e4..a595800af7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -198,6 +198,8 @@ Codecs: libvpx* James Z

[FFmpeg-devel] [PATCH v2] avformat/jpegxl_anim_dec: avoid overrun with jxlp boxes in container

2023-06-12 Thread Leo Izen
This switches the jpegxl_collect_codestream_header function to use avcodec/bytestream2, which better enforces barriers, and should avoid overrunning buffers with jxlp boxes if the size is zero or if the size is so small the box is invalid. Signed-off-by: Leo Izen --- libavformat/jpegxl_anim_dec.

Re: [FFmpeg-devel] [PATCH v24 1/9] avcodec/evc_parser: Added parser implementation for EVC format

2023-06-12 Thread James Almer
On 6/12/2023 9:28 AM, Dawid Kozinski wrote: +int ff_evc_parse_nal_units(EVCParserContext *ctx, const uint8_t *buf, int buf_size, void *logctx) +{ +const uint8_t *data = buf; +int data_size = buf_size; +int bytes_read = 0; +int nalu_size = 0; + +while (data_size > 0) { + +

Re: [FFmpeg-devel] [PATCH] lavc/h264chroma: RISC-V V add motion compensation for 4xH and 2xH chroma blocks

2023-06-12 Thread Rémi Denis-Courmont
Le perjantaina 9. kesäkuuta 2023, 10.17.27 EEST Arnie Chang a écrit : > Optimize the put and avg filtering for 4xH and 2xH blocks > > Signed-off-by: Arnie Chang > diff --git a/libavcodec/riscv/h264_mc_chroma.S > b/libavcodec/riscv/h264_mc_chroma.S index 364bc3156e..c97cdbad86 100644 > --- a/libav

Re: [FFmpeg-devel] [PATCH v24 8/9] avcodec/evc: Changes in Changelog file

2023-06-12 Thread Paul B Mahol
On Mon, Jun 12, 2023 at 2:31 PM Dawid Kozinski wrote: > - Changelog update > > Signed-off-by: Dawid Kozinski > --- > Changelog | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/Changelog b/Changelog > index d51e03b8eb..fa029c5b1a 100644 > --- a/Changelog > +++ b/Changel

Re: [FFmpeg-devel] [PATCH v24 3/9] avformat/evc_demuxer: Added demuxer to handle reading EVC video files

2023-06-12 Thread Paul B Mahol
On Mon, Jun 12, 2023 at 2:29 PM Dawid Kozinski wrote: > - Provided AVInputFormat struct describing EVC input format > (ff_evc_demuxer) > > Signed-off-by: Dawid Kozinski > --- > libavcodec/Makefile | 1 + > libavcodec/evc_frame_merge_bsf.c | 170 +++ > libavformat/

Re: [FFmpeg-devel] [PATCH] lavc/h264chroma: RISC-V V add motion compensation for 4xH and 2xH chroma blocks

2023-06-12 Thread Arnie Chang
On Mon, Jun 12, 2023 at 10:59 PM Rémi Denis-Courmont wrote: > It would seem more simpler and more intuitive to just use `.if` here. > (Ditto > below.) > hi, Do you mean using .if to modify this line of code? +vsetivlit3, \width, e8, m1, ta, mu

Re: [FFmpeg-devel] [PATCH] lavc/h264chroma: RISC-V V add motion compensation for 4xH and 2xH chroma blocks

2023-06-12 Thread Rémi Denis-Courmont
Le maanantaina 12. kesäkuuta 2023, 18.28.34 EEST Arnie Chang a écrit : > On Mon, Jun 12, 2023 at 10:59 PM Rémi Denis-Courmont > > wrote: > > It would seem more simpler and more intuitive to just use `.if` here. > > (Ditto > > below.) > > hi, > Do you mean using .if to modify this line of code? >

Re: [FFmpeg-devel] [PATCH] avcodec: add VMX1 decoder

2023-06-12 Thread Paul B Mahol
On Sat, Jun 10, 2023 at 12:24 PM Andreas Rheinhardt < andreas.rheinha...@outlook.com> wrote: > Paul B Mahol: > > +static av_cold int decode_init(AVCodecContext *avctx) > > +{ > > +VMIXContext *s = avctx->priv_data; > > + > > +avctx->bits_per_raw_sample = 8; > > +avctx->pix_fmt = AV_PIX

Re: [FFmpeg-devel] [RFC/PATCH] bitpacked_dec: Optimization for bitpacked_dec decoder performance

2023-06-12 Thread Paul B Mahol
On Fri, May 12, 2023 at 12:20 AM Marton Balint wrote: > > > On Wed, 10 May 2023, Lance Wang wrote: > > > On Sat, May 6, 2023 at 8:41 PM Devin Heitmueller < > > devin.heitmuel...@ltnglobal.com> wrote: > > > >> On Sat, May 6, 2023 at 8:16 AM James Almer wrote: > >> > Can you bench with the START_T

Re: [FFmpeg-devel] [PATCH] swresample: reuse DSP functions from avutil

2023-06-12 Thread Paul B Mahol
On Wed, Jun 7, 2023 at 10:17 PM Michael Niedermayer wrote: > On Wed, Jun 07, 2023 at 07:29:13PM +0200, Paul B Mahol wrote: > > On Wed, Jun 7, 2023 at 6:01 PM Michael Niedermayer < > mich...@niedermayer.cc> > > wrote: > > > > > On Wed, Jun 07, 2023 at 05:46:25PM +0200, Paul B Mahol wrote: > > > >

Re: [FFmpeg-devel] [PATCH] Optimization: support for libx264's mb_info

2023-06-12 Thread Carotti, Elias
Hi Stefano, Here is the revised patch according to your suggestions. This should allow for efficient inlining of the methods computing the map of skipped macrobloks. Best,  Elias On Sun, 2023-06-11 at 19:15 +0200, Stefano Sabatini wrote: > CAUTION: This email originated from outside of the organi

Re: [FFmpeg-devel] [PATCH] Optimization: support for libx264's mb_info

2023-06-12 Thread Carotti, Elias
On Mon, 2023-06-12 at 18:23 +1000, Kieran Kunhya wrote: > CAUTION: This email originated from outside of the organization. Do > not click links or open attachments unless you can confirm the sender > and know the content is safe. > > > > > > > Looks good to me otherwise, maybe Michael/Anton or

[FFmpeg-devel] [PATCH] pthread_frame: uninit the hwaccel of each frame thread

2023-06-12 Thread Lynne
The issue is that with a threadsafe hwaccel and multiple enabled frame threads, hwaccel->uninit() is never called. Previously, the function was guaranteed to never have any threads with hwaccel contexts, so it never bothered to uninit it. Patch attached. --- diff --git a/libavcodec/pthread_frame.

[FFmpeg-devel] [RFC] [PATCH 1/5] hwcontext: add a new AVHWFramesContext.opaque field

2023-06-12 Thread Lynne
This is a public field, settable before frames context initialization, and propagated to any derived contexts. API users can use it to store state and determine which context is one of theirs. This also allows decoders which create their own contexts to store some state which would be freed only

[FFmpeg-devel] [PATCH 2/5] vulkan_decode: use the new AVHWFramesContext.opaque field

2023-06-12 Thread Lynne
This depends on the previous patch, and allows moving the codec profile to the new AVHWFramesContext.opaque field. Patch attached. >From f992905250062711fab7522906a573ff8ab5f716 Mon Sep 17 00:00:00 2001 From: Lynne Date: Tue, 13 Jun 2023 06:10:20 +0200 Subject: [PATCH 2/5] vulkan_decode: use the

[FFmpeg-devel] [PATCH 3/5] hwcontext_vulkan: call ff_vk_uninit() on device uninit

2023-06-12 Thread Lynne
This fixes three memory leaks from ff_vk_load_props(). Does not depend on any other patches. Patch attached. >From 75945869e8341058edd1fca72b9ccf46d0086ddc Mon Sep 17 00:00:00 2001 From: Lynne Date: Tue, 13 Jun 2023 04:35:29 +0200 Subject: [PATCH 3/5] hwcontext_vulkan: call ff_vk_uninit() on dev

[FFmpeg-devel] [PATCH 4/5] hwcontext_vulkan: free temporary array once unneeded

2023-06-12 Thread Lynne
Fixes a small memory leak. This also prevents leaks on malloc/mutex init errors. Does not depend on any other patches. Patch attached. >From 52cdd121f986d36d18b95077f9c748bc9d7d918d Mon Sep 17 00:00:00 2001 From: Lynne Date: Tue, 13 Jun 2023 04:36:54 +0200 Subject: [PATCH 4/5] hwcontext_vulkan:

[FFmpeg-devel] [PATCH 5/5] vulkan_decode: fix small memory leak

2023-06-12 Thread Lynne
This small memory leak was essentially responsible for keeping decoding working at all. The issue is that the codec profile must be attached to the frames context. We created the codec profile at decoder creation time. Which meant that if the decoder was destroyed, the context became essentially u

Re: [FFmpeg-devel] [RFC] [PATCH 1/5] hwcontext: add a new AVHWFramesContext.opaque field

2023-06-12 Thread Andreas Rheinhardt
Lynne: > +dst->opaque= av_buffer_ref(src->opaque); > +if (!dst->internal->source_frames) { > +ret = AVERROR(ENOMEM); > +goto fail; > +} Don't you want to check for !dst->opaque? - Andreas ___ ffmpeg-devel mailing list ff

Re: [FFmpeg-devel] [RFC] [PATCH 1/5] hwcontext: add a new AVHWFramesContext.opaque field

2023-06-12 Thread Lynne
Jun 13, 2023, 06:43 by andreas.rheinha...@outlook.com: > Lynne: > >> +dst->opaque= av_buffer_ref(src->opaque); >> +if (!dst->internal->source_frames) { >> +ret = AVERROR(ENOMEM); >> +goto fail; >> +} >> > > Don't you want to check for !dst->opaque? > > - Andreas >