Re: [FFmpeg-devel] [PATCH] avcodec/mediacodec: Add support of dynamic bitrate

2024-05-28 Thread Zhao Zhili
> 在 2024年5月29日,上午5:56,Dmitrii Okunev 写道: > > MediaCodec supports parameter "video-bitrate" to change the bitrate > on fly. This commit adds capability to use it. > > It adds option -bitrate_ctrl_socket to the encoder which makes > the encoder to create an UNIX socket and listen for messages >

Re: [FFmpeg-devel] [PATCH v12 15/15] avcodec/hw_base_encode: add avctx pointer for FFHWBaseEncodeContext

2024-05-28 Thread Lynne via ffmpeg-devel
On 29/05/2024 00:53, Wu, Tong1 wrote: From: ffmpeg-devel On Behalf Of Lynne via ffmpeg-devel Sent: Wednesday, May 29, 2024 1:08 AM To: ffmpeg-devel@ffmpeg.org Cc: Lynne Subject: Re: [FFmpeg-devel] [PATCH v12 15/15] avcodec/hw_base_encode: add avctx pointer for FFHWBaseEncodeContext On 28/05/20

Re: [FFmpeg-devel] [PATCH v12 15/15] avcodec/hw_base_encode: add avctx pointer for FFHWBaseEncodeContext

2024-05-28 Thread Wu, Tong1
>From: ffmpeg-devel On Behalf Of Lynne >via ffmpeg-devel >Sent: Wednesday, May 29, 2024 1:08 AM >To: ffmpeg-devel@ffmpeg.org >Cc: Lynne >Subject: Re: [FFmpeg-devel] [PATCH v12 15/15] avcodec/hw_base_encode: add >avctx pointer for FFHWBaseEncodeContext > >On 28/05/2024 17:48, tong1.wu-at-intel

Re: [FFmpeg-devel] [PATCH] avcodec/mediacodec: Add support of dynamic bitrate

2024-05-28 Thread Dmitrii Okunev
Sorry for re-posting the patch twice. To send to the mailing list I had to change the settings of my local postfix and made a mistake. Anyway, just for convenience providing the list of changes since the previous revision of the patch: < on fly. This commit add possibility to use it. --- > on

[FFmpeg-devel] [PATCH] avcodec/mediacodec: Add support of dynamic bitrate

2024-05-28 Thread Dmitrii Okunev
MediaCodec supports parameter "video-bitrate" to change the bitrate on fly. This commit adds capability to use it. It adds option -bitrate_ctrl_socket to the encoder which makes the encoder to create an UNIX socket and listen for messages to change the bitrate. An example of ffmpeg execution:

[FFmpeg-devel] [PATCH] avcodec/mediacodec: Add support of dynamic bitrate

2024-05-28 Thread Dmitrii Okunev
MediaCodec supports parameter "video-bitrate" to change the bitrate on fly. This commit adds capability to use it. It adds option -bitrate_ctrl_socket to the encoder which makes the encoder to create an UNIX socket and listen for messages to change the bitrate. An example of ffmpeg execution:

Re: [FFmpeg-devel] [PATCH] checkasm: add linear least square tests

2024-05-28 Thread James Almer
On 5/28/2024 4:57 PM, Rémi Denis-Courmont wrote: --- tests/checkasm/Makefile | 1 + tests/checkasm/checkasm.c | 1 + tests/checkasm/checkasm.h | 1 + tests/checkasm/lls.c | 110 ++ tests/fate/checkasm.mak | 1 + 5 files changed, 114 inse

[FFmpeg-devel] [PATCH] checkasm: add linear least square tests

2024-05-28 Thread Rémi Denis-Courmont
--- tests/checkasm/Makefile | 1 + tests/checkasm/checkasm.c | 1 + tests/checkasm/checkasm.h | 1 + tests/checkasm/lls.c | 110 ++ tests/fate/checkasm.mak | 1 + 5 files changed, 114 insertions(+) create mode 100644 tests/checkasm/lls.c diff

[FFmpeg-devel] [PATCH v1 2/2][GSoC 2024] tests/checkasm/vvc_mc: for SAD, only test valid subblock sizes

2024-05-28 Thread Stone Chen
According to the VVC specification (section 8.5.1), the maximum width/height of a subblock passed for DMVR SAD is 16. This along with previous constraint requiring width * height >= 128 means that 8x16, 16x8, and 16x16 are the only allowed sizes. This changes check_vvc_sad() to only test and b

[FFmpeg-devel] [PATCH v1 1/2][GSoC 2024] libavcode/x86/vvc: change label to vvc_sad_16 to reflect block sizes

2024-05-28 Thread Stone Chen
According to the VVC specification (section 8.5.1), the maximum width/height of a subblock passed for DMVR SAD is 16. This along with previous constraint requiring width * height >= 128 means that 8x16, 16x8, and 16x16 are the only allowed sizes. This re-labels vvc_sad_16_128 to vvc_sad_16 to r

Re: [FFmpeg-devel] [PATCH v4 1/4] doc: Explain what "context" means

2024-05-28 Thread Stefano Sabatini
On date Sunday 2024-05-26 13:06:52 +0100, Andrew Sayers wrote: > It feels like we've got through most of the mid-level "how FFmpeg works" > stuff, > and now we're left with language choices (e.g "options" vs. "introspection") > and philosophical discussions (e.g. the relationship between contexts

Re: [FFmpeg-devel] [RFC 00/13] flvdec/flvenc: add support for enhanced rtmp codecs and multitrack/multichannel

2024-05-28 Thread Timo Rothenpieler
On 28.05.2024 17:14, Andrew Sayers wrote: On Tue, May 21, 2024 at 11:02:09AM +0200, Timo Rothenpieler wrote: This is based on the preliminary spec for enhanced rtmp v2: https://veovera.org/docs/enhanced/enhanced-rtmp-v2 The spec is not final, and can still undergo breaking changes, hence this s

[FFmpeg-devel] lavfi: add perlin noise generator

2024-05-28 Thread Stefano Sabatini
On date Monday 2024-05-27 23:37:33 +0200, Stefano Sabatini wrote: > Hi, > > still missing documentation and might be optimized (and maybe extended > to support gray16 - this should be simple), comments are welcome. Updated with documentation. >From 607459e7a184ab2d111b65f5017fb7f76e3bd58d Mon Sep

[FFmpeg-devel] [PATCH v4 1/1] avcodec: add external enc libvvenc for H266/VVC

2024-05-28 Thread Christian Bartnik
From: Thomas Siedel Add external encoder VVenC for H266/VVC encoding. Register new encoder libvvenc. Add libvvenc to wrap the vvenc interface. libvvenc implements encoder option: preset,qp,qpa,period, passlogfile,stats,vvenc-params,level,tier. Enable encoder by adding --enable-libvvenc in configu

[FFmpeg-devel] [PATCH v4 0/1] Add support for H266/VVC encoding

2024-05-28 Thread Christian Bartnik
This patch is based on the latest patchset from Thomas Siedel (thomas...@spin-digital.com). The libvvenc patch has been changed with following changes: avcodec: add external encoder libvvenc for H266/VVC - complete makeover (renaming,cleanup) - remove struct VVenCOptions, move option members to

Re: [FFmpeg-devel] [PATCH v12 15/15] avcodec/hw_base_encode: add avctx pointer for FFHWBaseEncodeContext

2024-05-28 Thread Lynne via ffmpeg-devel
On 28/05/2024 17:48, tong1.wu-at-intel@ffmpeg.org wrote: From: Tong Wu An avctx pointer is added to FFHWBaseEncodeContext. This is to make FFHWBaseEncodeContext a standalone component for ff_hw_base_* functions. This patch also removes some unnecessary AVCodecContext arguments. Signed-off-

Re: [FFmpeg-devel] [PATCH v11 07/14] avcodec/vaapi_encode: extract the init and close function to base layer

2024-05-28 Thread Wu, Tong1
>From: Lynne >Sent: Monday, May 27, 2024 10:04 AM >To: Wu, Tong1 ; FFmpeg development discussions and >patches >Subject: Re: [FFmpeg-devel] [PATCH v11 07/14] avcodec/vaapi_encode: extract >the init and close function to base layer > >On 27/05/2024 02:35, Wu, Tong1 wrote: >>> From: ffmpeg-devel O

[FFmpeg-devel] [PATCH v12 15/15] avcodec/hw_base_encode: add avctx pointer for FFHWBaseEncodeContext

2024-05-28 Thread tong1 . wu-at-intel . com
From: Tong Wu An avctx pointer is added to FFHWBaseEncodeContext. This is to make FFHWBaseEncodeContext a standalone component for ff_hw_base_* functions. This patch also removes some unnecessary AVCodecContext arguments. Signed-off-by: Tong Wu --- libavcodec/d3d12va_encode.c | 6 +++--- liba

[FFmpeg-devel] [PATCH v12 14/15] Changelog: add D3D12VA HEVC encoder changelog

2024-05-28 Thread tong1 . wu-at-intel . com
From: Tong Wu Signed-off-by: Tong Wu --- Changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Changelog b/Changelog index 12770e4296..c5d57b3813 100644 --- a/Changelog +++ b/Changelog @@ -11,7 +11,7 @@ version : - vf_scale2ref deprecated - qsv_params option added for

[FFmpeg-devel] [PATCH v12 07/15] avcodec/vaapi_encode: extract the init and close function to base layer

2024-05-28 Thread tong1 . wu-at-intel . com
From: Tong Wu Related parameters such as device context, frame context are also moved to base layer. Signed-off-by: Tong Wu --- libavcodec/hw_base_encode.c | 49 ++ libavcodec/hw_base_encode.h | 17 +++ libavcodec/vaapi_encode.c | 90 +++---

[FFmpeg-devel] [PATCH v12 13/15] avcodec: add D3D12VA hardware HEVC encoder

2024-05-28 Thread tong1 . wu-at-intel . com
From: Tong Wu This implementation is based on D3D12 Video Encoding Spec: https://microsoft.github.io/DirectX-Specs/d3d/D3D12VideoEncoding.html Sample command line for transcoding: ffmpeg.exe -hwaccel d3d12va -hwaccel_output_format d3d12 -i input.mp4 -c:v hevc_d3d12va output.mp4 Signed-off-by: T

[FFmpeg-devel] [PATCH v12 12/15] avutil/hwcontext_d3d12va: add Flags for resource creation

2024-05-28 Thread tong1 . wu-at-intel . com
From: Tong Wu Flags field is added to support diffferent resource creation. Signed-off-by: Tong Wu --- doc/APIchanges| 3 +++ libavutil/hwcontext_d3d12va.c | 2 +- libavutil/hwcontext_d3d12va.h | 8 libavutil/version.h | 2 +- 4 files changed, 13 insertions(+

[FFmpeg-devel] [PATCH v12 11/15] avcodec/vaapi_encode: extract a free funtion to base layer

2024-05-28 Thread tong1 . wu-at-intel . com
From: Tong Wu Signed-off-by: Tong Wu --- libavcodec/hw_base_encode.c | 11 +++ libavcodec/hw_base_encode.h | 2 ++ libavcodec/vaapi_encode.c | 6 +- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/libavcodec/hw_base_encode.c b/libavcodec/hw_base_encode.c index 31

[FFmpeg-devel] [PATCH v12 10/15] avcodec/vaapi_encode: extract a get_recon_format function to base layer

2024-05-28 Thread tong1 . wu-at-intel . com
From: Tong Wu Surface size and block size parameters are also moved to base layer. Signed-off-by: Tong Wu --- libavcodec/hw_base_encode.c | 58 +++ libavcodec/hw_base_encode.h | 12 + libavcodec/vaapi_encode.c | 81 - libavc

[FFmpeg-devel] [PATCH v12 09/15] avcodec/vaapi_encode: extract set_output_property to base layer

2024-05-28 Thread tong1 . wu-at-intel . com
From: Tong Wu Signed-off-by: Tong Wu --- libavcodec/hw_base_encode.c | 40 + libavcodec/hw_base_encode.h | 3 +++ libavcodec/vaapi_encode.c | 44 ++--- 3 files changed, 45 insertions(+), 42 deletions(-) diff --git a/libavcodec/

[FFmpeg-devel] [PATCH v12 06/15] avcodec/vaapi_encode: move the dpb logic from VAAPI to base layer

2024-05-28 Thread tong1 . wu-at-intel . com
From: Tong Wu Move receive_packet function to base. This requires adding *alloc, *issue, *output, *free as hardware callbacks. HWBaseEncodePicture is introduced as the base layer structure. The related parameters in VAAPIEncodeContext are also extracted to HWBaseEncodeContext. Then DPB management

[FFmpeg-devel] [PATCH v12 08/15] avcodec/vaapi_encode: extract gop configuration and two options to base layer

2024-05-28 Thread tong1 . wu-at-intel . com
From: Tong Wu idr_interval and desired_b_depth are moved to HW_BASE_ENCODE_COMMON_OPTIONS. Signed-off-by: Tong Wu --- libavcodec/hw_base_encode.c | 54 + libavcodec/hw_base_encode.h | 19 + libavcodec/vaapi_encode.c | 52 +++

[FFmpeg-devel] [PATCH v12 05/15] avcodec/vaapi_encode: move pic->input_surface initialization to encode_alloc

2024-05-28 Thread tong1 . wu-at-intel . com
From: Tong Wu When allocating the VAAPIEncodePicture, pic->input_surface can be initialized right in the place. This movement simplifies the send_frame logic and is the preparation for moving vaapi_encode_send_frame to the base layer. Signed-off-by: Tong Wu --- libavcodec/vaapi_encode.c | 8 +

[FFmpeg-devel] [PATCH v12 04/15] avcodec/vaapi_encode: add picture type name to base

2024-05-28 Thread tong1 . wu-at-intel . com
From: Tong Wu Signed-off-by: Tong Wu --- libavcodec/hw_base_encode.h | 6 ++ libavcodec/vaapi_encode.c | 4 +--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/libavcodec/hw_base_encode.h b/libavcodec/hw_base_encode.h index c14c174102..858450afa8 100644 --- a/libavcodec/hw

[FFmpeg-devel] [PATCH v12 03/15] avcodec/vaapi_encode: add async_depth to common options

2024-05-28 Thread tong1 . wu-at-intel . com
From: Tong Wu Signed-off-by: Tong Wu --- libavcodec/hw_base_encode.h | 10 +- libavcodec/vaapi_encode.c | 13 - libavcodec/vaapi_encode.h | 7 --- libavcodec/vaapi_encode_av1.c | 1 + libavcodec/vaapi_encode_h264.c | 1 + libavcodec/vaapi_encode_h26

[FFmpeg-devel] [PATCH v12 02/15] avcodec/hw_base_encode: add FF_HW_ prefix for two enums

2024-05-28 Thread tong1 . wu-at-intel . com
From: Tong Wu PICTURE_TYPE_* and FLAG_* are added FF_HW_ prefix after being moved to base layer. Signed-off-by: Tong Wu --- libavcodec/hw_base_encode.h | 20 ++--- libavcodec/vaapi_encode.c | 50 - libavcodec/vaapi_encode_av1.c | 12

[FFmpeg-devel] [PATCH v12 01/15] avcodec/vaapi_encode: introduce a base layer for vaapi encode

2024-05-28 Thread tong1 . wu-at-intel . com
From: Tong Wu Since VAAPI and future D3D12VA implementation may share some common parameters, a base layer encode context is introduced as vaapi context's base. Signed-off-by: Tong Wu --- libavcodec/hw_base_encode.h | 56 + libavcodec/vaapi_encode.h | 39 +

Re: [FFmpeg-devel] [PATCH] avcodec/mediacodec: Add support of dynamic bitrate

2024-05-28 Thread Andrew Sayers
On Mon, May 27, 2024 at 01:49:47PM +0100, Dmitrii Okunev wrote: > MediaCodec supports parameter "video-bitrate" to change the bitrate > on fly. This commit add possibility to use it. > > It adds option -bitrate_ctrl_socket to the encoder which makes > the encoder to create an UNIX socket and liste

Re: [FFmpeg-devel] [PATCH v3 2/3] avfilter/af_volumedetect.c: Add 32bit float audio support

2024-05-28 Thread Andrew Sayers
On Mon, May 20, 2024 at 11:16:05PM +0300, Yigithan Yigit wrote: > --- > libavfilter/af_volumedetect.c | 159 -- > 1 file changed, 133 insertions(+), 26 deletions(-) > > diff --git a/libavfilter/af_volumedetect.c b/libavfilter/af_volumedetect.c > index 327801a7f9..d

Re: [FFmpeg-devel] [RFC 00/13] flvdec/flvenc: add support for enhanced rtmp codecs and multitrack/multichannel

2024-05-28 Thread Andrew Sayers
On Tue, May 21, 2024 at 11:02:09AM +0200, Timo Rothenpieler wrote: > This is based on the preliminary spec for enhanced rtmp v2: > https://veovera.org/docs/enhanced/enhanced-rtmp-v2 > > The spec is not final, and can still undergo breaking changes, hence this set > is purely for comments and revi

Re: [FFmpeg-devel] [PATCH v10 12/13] avcodec: add D3D12VA hardware HEVC encoder

2024-05-28 Thread Andrew Sayers
On Wed, May 22, 2024 at 09:26:25AM +0800, tong1.wu-at-intel@ffmpeg.org wrote: > +static int d3d12va_create_encoder_heap(AVCodecContext* avctx) Nitpick: s/\* / \*/ I'm trying to write typo-detection bot. This is the only problem it noticed in this patchset, but more nits incoming elsewhere.

Re: [FFmpeg-devel] [PATCH 5/7] avcodec/vc2enc: Avoid relocations for short strings

2024-05-28 Thread Lynne via ffmpeg-devel
On 28/05/2024 04:49, Andreas Rheinhardt wrote: These strings are so short that they can be put directly into the containing structure, avoiding the pointer and putting it into .rodata. Also use chars for interlaced and level while at it, as these are so small. Signed-off-by: Andreas Rheinhardt

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/diracdec: Mark flush as av_cold

2024-05-28 Thread Lynne via ffmpeg-devel
On 28/05/2024 16:03, Andreas Rheinhardt wrote: Signed-off-by: Andreas Rheinhardt --- libavcodec/diracdec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/diracdec.c b/libavcodec/diracdec.c index 5bf0dcc2db..76209aebba 100644 --- a/libavcodec/diracdec.c +++

[FFmpeg-devel] [PATCH 1/2] avcodec/diracdec: Use FF_CODEC_CAP_INIT_CLEANUP

2024-05-28 Thread Andreas Rheinhardt
This was one of the few decoders incompatible with the flag. Also only call free_sequence_buffers(), dirac_decode_flush() in dirac_decode_end(). Signed-off-by: Andreas Rheinhardt --- libavcodec/diracdec.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libavcodec/d

[FFmpeg-devel] [PATCH 2/2] avcodec/diracdec: Mark flush as av_cold

2024-05-28 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/diracdec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/diracdec.c b/libavcodec/diracdec.c index 5bf0dcc2db..76209aebba 100644 --- a/libavcodec/diracdec.c +++ b/libavcodec/diracdec.c @@ -351,7 +351,7 @@ static

[FFmpeg-devel] [PATCH v2 03/10] lavc/hevcdec: allocate local_ctx as array of structs rather than pointers

2024-05-28 Thread Anton Khirnov
It is more efficient and easier to manage. --- libavcodec/hevcdec.c | 57 +--- libavcodec/hevcdec.h | 6 - 2 files changed, 37 insertions(+), 26 deletions(-) diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c index e84f45e3f8..88a481c043 100644 -

Re: [FFmpeg-devel] [PATCH] area changed: scdet filter

2024-05-28 Thread Paul B Mahol
On Tue, May 28, 2024 at 9:51 AM wrote: > > -Original Message- > > From: radu.taraib...@gmail.com > > Sent: duminică, 19 mai 2024 19:05 > > To: ffmpeg-devel@ffmpeg.org > > Subject: RE: [PATCH] area changed: scdet filter > > > > > > > -Original Message- > > > From: radu.taraib...@g

Re: [FFmpeg-devel] [PATCH v2] avformat/hls: update current segment reference before use

2024-05-28 Thread J. Dekker
"J. Dekker" writes: > Kacper Michajłow writes: > >> It may be invalidated by the time it is used. >> >> Fixes use after free when accessing current segment. >> >> Fixes: #10825 >> Signed-off-by: Kacper Michajłow >> --- >> libavformat/hls.c | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff

[FFmpeg-devel] [PATCH 1/1] avfilter/framesync: fix forward EOF pts

2024-05-28 Thread Nicolas Gaullier
Note1: when the EOF pts is not accurate enough, the last frame can be dropped by vf_fps with default rounding. Note2: vf_scale use framesync since e82a3997cdd6c0894869b33ba42430ac3, so this is a very commonplace scenario. For example: ./ffprobe -f lavfi testsrc=d=1,scale,fps -of flat \ -count_f

[FFmpeg-devel] [PATCH 0/1] avfilter/framesync: fix forward EOF pts

2024-05-28 Thread Nicolas Gaullier
This a new ping but I post the patch again to get fate cleanly completed on patchwork. BTW, the initial design of framesync/EOF was in n3.4-dev-1799-g4e0e9ce2dc, so one can say that time has past... Thank you in advance for the review. Nicolas Nicolas Gaullier (1): avfilter/framesync: fix forwa

Re: [FFmpeg-devel] [PATCH] area changed: scdet filter

2024-05-28 Thread radu.taraibuta
> -Original Message- > From: radu.taraib...@gmail.com > Sent: duminică, 19 mai 2024 19:05 > To: ffmpeg-devel@ffmpeg.org > Subject: RE: [PATCH] area changed: scdet filter > > > > -Original Message- > > From: radu.taraib...@gmail.com > > Sent: luni, 13 mai 2024 18:52 > > To: ffmpe