Re: [FFmpeg-devel] [PATCH] avcodec/libsvtav1: guard against bit_rate being zero

2022-11-20 Thread James Almer
On 11/19/2022 11:33 PM, Christopher Degawa wrote: division by zero occurs if it's not specified Signed-off-by: Christopher Degawa --- libavcodec/libsvtav1.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c index 48cd58a0b3

Re: [FFmpeg-devel] [PATCH 0/2] lavc/videotoolbox: use objpool instead of allocating memory each frame

2022-11-20 Thread Zhao Zhili
On Sat, 2022-11-19 at 16:35 -0500, Rick Kern wrote: > objpool was only being used in fftools, but it's useful in other > components to reduce alloation time and memory fragmentation. > > This patch set moves objpool to libavutil, so it can be used by > lavc/videotoolboxenc for data being passed fr

[FFmpeg-devel] Developer meeting Dec 2

2022-11-20 Thread Jean-Baptiste Kempf
Hello Guys & Girls, Some of us are planning to meet this 2nd of December, in Barcelona. There is no predefinite agenda, just meet, discuss and code around FFmpeg. Everybody that feels part of this community is invited. It might be a good idea to do a developer call at the end of the day (16:00 w

Re: [FFmpeg-devel] [PATCH v2] avcodec/av1_vaapi: add direct film grain mode

2022-11-20 Thread Mark Thompson
On 20/11/2022 02:59, Ruijing Dong wrote: Adding direct film grain mode for av1 decoder, which outputs alongside film grain. AV_HWACCEL_FLAG_DIRECT_FILM_GRAIN is the new flag introduced to enable this path. issue: By using AMD av1 decoder via VAAPI, when used with film grain content, the output

[FFmpeg-devel] [PATCH] avfilter/framepool: use aligned height when allocating plane buffers

2022-11-20 Thread James Almer
Fixes tickets #10051 and #10052. Signed-off-by: James Almer --- libavfilter/framepool.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libavfilter/framepool.c b/libavfilter/framepool.c index 0404589055..7e830c5a3b 100644 --- a/libavfilter/framepool.c +++ b/libavfilter/

Re: [FFmpeg-devel] [PATCH] avfilter/framepool: use aligned height when allocating plane buffers

2022-11-20 Thread Paul B Mahol
On 11/20/22, James Almer wrote: > Fixes tickets #10051 and #10052. > Not real fix, more like big hack. > Signed-off-by: James Almer > --- > libavfilter/framepool.c | 6 ++ > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/libavfilter/framepool.c b/libavfilter/framepool.c >

Re: [FFmpeg-devel] [PATCH] avfilter/framepool: use aligned height when allocating plane buffers

2022-11-20 Thread James Almer
On 11/20/2022 2:40 PM, Paul B Mahol wrote: On 11/20/22, James Almer wrote: Fixes tickets #10051 and #10052. Not real fix, more like big hack. This is in line with other frame pools like the lavc one. If you know a better fix, then please send a patch. Signed-off-by: James Almer ---

[FFmpeg-devel] [PATCH v2] avcodec/libsvtav1: only set max_buf_sz if both bitrate and rc_buf_sz is set

2022-11-20 Thread Christopher Degawa
maximum_buffer_size_ms should only be set if both are specified or if the user sets it through -svtav1-params buf-sz=val Signed-off-by: Christopher Degawa --- libavcodec/libsvtav1.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav

Re: [FFmpeg-devel] [PATCH v2] avcodec/libsvtav1: only set max_buf_sz if both bitrate and rc_buf_sz is set

2022-11-20 Thread James Almer
On 11/20/2022 4:07 PM, Christopher Degawa wrote: maximum_buffer_size_ms should only be set if both are specified or if the user sets it through -svtav1-params buf-sz=val Signed-off-by: Christopher Degawa --- libavcodec/libsvtav1.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

Re: [FFmpeg-devel] [PATCH] avfilter/framepool: use aligned height when allocating plane buffers

2022-11-20 Thread StreamNG Harold Camargo
Hello, unsuscribe. bye Harold F. Camargo R. Stream NG Cel. 318 3227862 Bogotá Colombia www.stream-ng.com El dom, 20 nov 2022 a las 12:06, James Almer () escribió: > Fixes tickets #10051 and #10052. > > Signed-off-by: James Almer > --- > libavfilter/framepool.c | 6 ++ > 1 file changed, 2

Re: [FFmpeg-devel] [PATCH 2/3] avcodec/apac: reset buffer on error

2022-11-20 Thread Michael Niedermayer
On Thu, Nov 17, 2022 at 01:12:18AM +0100, Paul B Mahol wrote: > On 11/17/22, Michael Niedermayer wrote: > > Fixes: repeatly parsing the same data after each 1 byte packet > > Fixes: Timeout > > Fixes: > > 51943/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APAC_fuzzer-5779018251370496 > > > >

Re: [FFmpeg-devel] [PATCH 10/12] avcodec: add MediaCodec encoder

2022-11-20 Thread Aman Karmani
On Sat, Nov 19, 2022 at 9:13 AM "zhilizhao(赵志立)" wrote: > > > > On Nov 19, 2022, at 17:15, Aman Karmani wrote: > > > > > > > > On Sun, Oct 23, 2022 at 8:17 PM Zhao Zhili > wrote: > > From: Zhao Zhili > > > > Signed-off-by: Zhao Zhili > > --- > > Changelog | 1 + > > c

[FFmpeg-devel] [PATCH v2 6/7] avcodec/flashsvenc: Avoid copying frame

2022-11-20 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/flashsvenc.c | 39 +++ 1 file changed, 15 insertions(+), 24 deletions(-) diff --git a/libavcodec/flashsvenc.c b/libavcodec/flashsvenc.c index f42ef73b37..f3d95c3fe5 100644 --- a/libavcodec/flashsvenc.c +++ b/lib

Re: [FFmpeg-devel] [PATCH 2/7] avcodec/flashsvenc: Account for header in packet size

2022-11-20 Thread James Almer
On 11/18/2022 11:59 PM, Andreas Rheinhardt wrote: Fixes ticket #10053. Signed-off-by: Andreas Rheinhardt --- libavcodec/flashsvenc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/flashsvenc.c b/libavcodec/flashsvenc.c index 35793400fa..9d065bb92d 100644 ---

[FFmpeg-devel] [PATCH 1/6] swscale/utils: Factor initializing single slice context out

2022-11-20 Thread Andreas Rheinhardt
Initializing slice threads currently uses the function (sws_init_context()) that is also used for initializing user-facing contexts with the only difference being that nb_threads is set to one before initializing the slice contexts. Yet sws_init_context() also initializes lots of stuff that is not

[FFmpeg-devel] [PATCH 2/6] swscale/utils: Don't allocate AVFrames for slice contexts

2022-11-20 Thread Andreas Rheinhardt
Only the parent context's AVFrames are ever used. Signed-off-by: Andreas Rheinhardt --- libswscale/utils.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/libswscale/utils.c b/libswscale/utils.c index c6fa07f752..053c6bb76b 100644 --- a/libswscale/utils.c +++

[FFmpeg-devel] [PATCH 3/6] swscale/utils: Avoid calling ff_thread_once() unnecessarily

2022-11-20 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libswscale/utils.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libswscale/utils.c b/libswscale/utils.c index 053c6bb76b..fb788fc330 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -1340,13 +1340,10 @@ static av_cold

[FFmpeg-devel] [PATCH 4/6] swscale/utils: Move functions to avoid forward declarations

2022-11-20 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libswscale/utils.c | 407 ++--- 1 file changed, 200 insertions(+), 207 deletions(-) diff --git a/libswscale/utils.c b/libswscale/utils.c index fb788fc330..cdd89e4b58 100644 --- a/libswscale/utils.c +++ b/libswscale/uti

[FFmpeg-devel] [PATCH 5/6] swscale/utils: Derive range from YUVJ-pix-fmt only once

2022-11-20 Thread Andreas Rheinhardt
Currently, it is done once per slice-thread, leading to one warning per slice-thread in case a YUVJ pixel format has been originally used. This also fixes the anomaly that said parameter are only updated for the user-facing context (whose values are retrievable via av_opt_get()) if slice-threading

[FFmpeg-devel] [PATCH 6/6] swscale/utils: Fix indentation

2022-11-20 Thread Andreas Rheinhardt
Forgotten after c1eb3e7fecdc270e03a700d61ef941600a6af491. Signed-off-by: Andreas Rheinhardt --- libswscale/utils.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/libswscale/utils.c b/libswscale/utils.c index 5a728afd89..90734f66ef 100644 --- a/libswsca

[FFmpeg-devel] [PATCH v2 1/6] avcodec/flashsvenc: Fix packet size calculation

2022-11-20 Thread Andreas Rheinhardt
The earlier code did not account for the frame header as well as the block headers; furthermore, in case a large part of a block is unused (due to padding), the output size may exceed 3 * width * height (where the dimensions correspond to the visible pixels) due to the overhead of the zlib header,

[FFmpeg-devel] [PATCH v2 2/6] avcodec/flashsvenc: Remove unused buffer

2022-11-20 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/flashsvenc.c | 9 - 1 file changed, 9 deletions(-) diff --git a/libavcodec/flashsvenc.c b/libavcodec/flashsvenc.c index 4cedb53fe4..d627b12351 100644 --- a/libavcodec/flashsvenc.c +++ b/libavcodec/flashsvenc.c @@ -64,7 +64,6 @@ typedef str

[FFmpeg-devel] [PATCH v2 3/6] avcodec/flashsvenc: Use const where appropriate

2022-11-20 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/flashsvenc.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/libavcodec/flashsvenc.c b/libavcodec/flashsvenc.c index d627b12351..bd912fb401 100644 --- a/libavcodec/flashsvenc.c +++ b/libavcodec/flashsvenc.c @@ -70,15 +7

[FFmpeg-devel] [PATCH v2 4/6] avcodec/flashsvenc: Change check for first frame

2022-11-20 Thread Andreas Rheinhardt
AVCodecContext.frame_number is actually only incremented in case encoding was successfull; if e.g. the ff_alloc_packet() below fails, it won't be incremented and therefore it is possible for the previous_frame buffer to be allocated for multiple first frames, leaking every one except the last. So c

[FFmpeg-devel] [PATCH v2 5/6] avcodec/flashsvenc: Avoid copying frame

2022-11-20 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/flashsvenc.c | 39 +++ 1 file changed, 15 insertions(+), 24 deletions(-) diff --git a/libavcodec/flashsvenc.c b/libavcodec/flashsvenc.c index ba693ca8f3..c4b16dff84 100644 --- a/libavcodec/flashsvenc.c +++ b/lib

[FFmpeg-devel] [PATCH v2 6/6] avcodec/flashsvenc: Remove unnecessary or unused variable

2022-11-20 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/flashsvenc.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libavcodec/flashsvenc.c b/libavcodec/flashsvenc.c index c4b16dff84..3a35876d9c 100644 --- a/libavcodec/flashsvenc.c +++ b/libavcodec/flashsvenc.c @@ -65,8 +65,6

[FFmpeg-devel] [PATCH] lavc/qsvdec: update HDR side data on output AVFrame

2022-11-20 Thread Xiang, Haihao
From: Haihao Xiang The SDK may provides HDR metadata for HDR streams via mfxExtBuffer attached on output mfxFrameSurface1 Signed-off-by: Haihao Xiang --- libavcodec/qsv_internal.h | 6 libavcodec/qsvdec.c | 73 +++ 2 files changed, 79 insertions(

Re: [FFmpeg-devel] [PATCH v6 3/3] avcodec/qsvdec: Implement SEI parsing for QSV decoders

2022-11-20 Thread Xiang, Haihao
On Tue, 2022-10-25 at 04:03 +, softworkz wrote: > From: softworkz > > Signed-off-by: softworkz > --- > libavcodec/Makefile | 2 +- > libavcodec/qsvdec.c | 321 > 2 files changed, 322 insertions(+), 1 deletion(-) > > diff --git a/libavcodec/Mak

Re: [FFmpeg-devel] [PATCH] lavu/pixfmt: Update the description for AV_PIX_FMT_QSV

2022-11-20 Thread Xiang, Haihao
On Thu, 2022-11-17 at 10:37 +0800, Xiang, Haihao wrote: > From: Haihao Xiang > > Since D3D11 was introduced for QSV in FFmpeg 5.0, there is an implied > API/ABI change for user-supplied frames [1], hence update the > description for AV_PIX_FMT_QSV. > > [1] https://ffmpeg.org/pipermail/ffmpeg-dev

Re: [FFmpeg-devel] [PATCH v2] Changelog: Add missing lines for QSV

2022-11-20 Thread Xiang, Haihao
On Thu, 2022-11-17 at 10:33 +0800, Xiang, Haihao wrote: > From: Haihao Xiang > > Signed-off-by: Haihao Xiang > --- > Changelog | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/Changelog b/Changelog > index 166aa8b5e7..806eed7d12 100644 > --- a/Changelog > +++ b/Changelog > @@ -20,6

Re: [FFmpeg-devel] [PATCH v2] libavfilter/x86/vf_convolution: fix sobel swap issue on WIN64

2022-11-20 Thread Xiang, Haihao
On Mon, 2022-11-14 at 13:34 -0300, James Almer wrote: > On 11/14/2022 12:20 PM, bin.wang-at-intel@ffmpeg.org wrote: > > From: "Wang, Bin" > > > > Signed-off-by: Wang, Bin > > --- > > libavfilter/x86/vf_convolution.asm | 11 ++- > > 1 file changed, 6 insertions(+), 5 deletions(-) >

Re: [FFmpeg-devel] [PATCH 10/12] avcodec: add MediaCodec encoder

2022-11-20 Thread zhilizhao(赵志立)
> On Nov 21, 2022, at 07:44, Aman Karmani wrote: > > On Sat, Nov 19, 2022 at 9:13 AM "zhilizhao(赵志立)" > wrote: > >> >> >>> On Nov 19, 2022, at 17:15, Aman Karmani wrote: >>> >>> >>> >>> On Sun, Oct 23, 2022 at 8:17 PM Zhao Zhili >> wrote: >>> From: Zhao Zhili >>> >>> Signed-off-by: Z