Re: [FFmpeg-devel] [PATCH 1/2] lavf/dvenc: improve error messaging

2024-01-21 Thread Stefano Sabatini
On date Sunday 2024-01-21 07:36:48 +0100, Anton Khirnov wrote: > Quoting Stefano Sabatini (2024-01-20 16:24:07) > > if ((c->sys->time_base.den != 25 && c->sys->time_base.den != 50) || > > c->sys->time_base.num != 1) { > > -if (c->ast[0] && c->ast[0]->codecpar->sample_rate != 48000) >

Re: [FFmpeg-devel] [PATCH 1/2 v2] avutil: add a Tile Grid API

2024-01-21 Thread James Almer
On 1/21/2024 3:27 AM, Anton Khirnov wrote: Quoting James Almer (2024-01-20 23:04:06) This includes a struct and helpers. It will be used to support container level cropping and tiled image formats, but should be generic enough for general usage. Signed-off-by: James Almer --- Extended to inclu

[FFmpeg-devel] [vaapi-cavs 1/7] cavs: add cavs profile defs

2024-01-21 Thread jianfeng.zheng
Signed-off-by: jianfeng.zheng --- libavcodec/defs.h | 3 +++ libavcodec/profiles.c | 6 ++ libavcodec/profiles.h | 1 + 3 files changed, 10 insertions(+) diff --git a/libavcodec/defs.h b/libavcodec/defs.h index 00d840ec19..d59816a70f 100644 --- a/libavcodec/defs.h +++ b/libavcodec/defs.h

[FFmpeg-devel] [vaapi-cavs 2/7] cavs: skip bits between pic header and slc header

2024-01-21 Thread jianfeng.zheng
Signed-off-by: jianfeng.zheng --- libavcodec/cavs.h| 2 + libavcodec/cavsdec.c | 87 2 files changed, 89 insertions(+) diff --git a/libavcodec/cavs.h b/libavcodec/cavs.h index 244c322b35..ad49abff92 100644 --- a/libavcodec/cavs.h +++ b/libavcodec

[FFmpeg-devel] [vaapi-cavs 3/7] cavs: time code debug

2024-01-21 Thread jianfeng.zheng
Signed-off-by: jianfeng.zheng --- libavcodec/cavsdec.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c index 9742bd1011..9ad0f29b01 100644 --- a/libavcodec/cavsdec.c +++ b/libavcodec/cavsdec.c @@ -1061,6 +1061,7 @@ sta

[FFmpeg-devel] [vaapi-cavs 4/7] cavs: fix dpb reorder issues when 'low_delay' is varied

2024-01-21 Thread jianfeng.zheng
Consider multi sequences in one stream, 'low_delay' may change between sequences. Signed-off-by: jianfeng.zheng --- libavcodec/cavs.c| 12 + libavcodec/cavs.h| 2 + libavcodec/cavsdec.c | 105 +-- 3 files changed, 95 insertions(+), 24 deleti

[FFmpeg-devel] [vaapi-cavs 5/7] cavs: decode wqm and slice weighting for future usage

2024-01-21 Thread jianfeng.zheng
Signed-off-by: jianfeng.zheng --- libavcodec/cavs.h| 26 +++- libavcodec/cavsdec.c | 142 +-- 2 files changed, 147 insertions(+), 21 deletions(-) diff --git a/libavcodec/cavs.h b/libavcodec/cavs.h index f490657959..33ef10e850 100644 --- a/libavcod

[FFmpeg-devel] [vaapi-cavs 7/7] cavs: support vaapi hwaccel decoding

2024-01-21 Thread jianfeng.zheng
see https://github.com/intel/libva/pull/738 Signed-off-by: jianfeng.zheng --- configure | 14 libavcodec/Makefile | 1 + libavcodec/cavs.h | 4 + libavcodec/cavsdec.c | 101 +-- libavcodec/hwaccels.h | 1 + libavcodec/vaapi_c

[FFmpeg-devel] [vaapi-cavs 6/7] cavs: set profile & level for AVCodecContext

2024-01-21 Thread jianfeng.zheng
Signed-off-by: jianfeng.zheng --- libavcodec/cavsdec.c | 5 - tests/ref/fate/cavs-demux | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c index 8d3ba530a6..5036ef50f7 100644 --- a/libavcodec/cavsdec.c +++ b/libavcodec/cavsd

Re: [FFmpeg-devel] [PATCH v1 2/2] vaapi: add vaapi_avs2 support

2024-01-21 Thread Jianfeng Zheng
Zhao Zhili 于2024年1月20日周六 12:22写道: > > > > -Original Message- > > From: ffmpeg-devel On Behalf Of > > jianfeng.zheng > > Sent: 2024年1月19日 23:53 > > To: ffmpeg-devel@ffmpeg.org > > Cc: jianfeng.zheng > > Subject: [FFmpeg-devel] [PATCH v1 2/2] vaapi: add vaapi_avs2 support > > > > see http

[FFmpeg-devel] [PATCH] flv: fix stereo flag when writing PCMA/PCMU

2024-01-21 Thread Alessandro Ros
Currently, when writing PCMA or PCMU tracks with FLV or RTMP, the stereo flag and sample rate flag inside RTMP audio messages are overridden, making impossible to distinguish between mono and stereo tracks. This patch fixes the issue by restoring the same flag mechanism of all other codecs, that ta

Re: [FFmpeg-devel] [PATCH v4 0/2] GSoC 2023: Add Audio Overlay Filter

2024-01-21 Thread Harshit Karwal
Ping On Tue, 16 Jan 2024 at 5:46 PM, Harshit Karwal wrote: > Includes some fixes authored by Paul over the v3 patch I sent earlier, and > FATE tests for the filter. > > Harshit Karwal (2): > avfilter: add audio overlay filter > fate: Add tests for aoverlay filter > > doc/filters.texi

Re: [FFmpeg-devel] [PATCH 1/2 v2] avutil: add a Tile Grid API

2024-01-21 Thread Anton Khirnov
Quoting James Almer (2024-01-21 13:06:28) > On 1/21/2024 3:27 AM, Anton Khirnov wrote: > > Quoting James Almer (2024-01-20 23:04:06) > >> This includes a struct and helpers. It will be used to support container > >> level > >> cropping and tiled image formats, but should be generic enough for gene

Re: [FFmpeg-devel] [PATCH 1/2] lavf/dvenc: improve error messaging

2024-01-21 Thread Anton Khirnov
Quoting Stefano Sabatini (2024-01-21 11:30:27) > > > -if (((c->n_ast > 1) && (c->sys->n_difchan < 2)) || > > > -((c->n_ast > 2) && (c->sys->n_difchan < 4))) { > > > -/* only 2 stereo pairs allowed in 50Mbps mode */ > > > -goto bail_out; > > > +if ((c->n_ast > 1) && (

Re: [FFmpeg-devel] [PATCH 7/8] fftools/ffmpeg_demux: implement -bsf for input

2024-01-21 Thread Anton Khirnov
Quoting Stefano Sabatini (2024-01-20 12:32:42) > On date Wednesday 2024-01-17 10:02:31 +0100, Anton Khirnov wrote: > > Quoting Stefano Sabatini (2024-01-06 13:12:19) > > > > > > This looks spurious, since this suggests the example is about the > > > listing, and it's applying a weird order of exam

Re: [FFmpeg-devel] [PATCH 1/2 v2] avutil: add a Tile Grid API

2024-01-21 Thread James Almer
On 1/21/2024 2:29 PM, Anton Khirnov wrote: Quoting James Almer (2024-01-21 13:06:28) On 1/21/2024 3:27 AM, Anton Khirnov wrote: Quoting James Almer (2024-01-20 23:04:06) This includes a struct and helpers. It will be used to support container level cropping and tiled image formats, but should

Re: [FFmpeg-devel] [PATCH 7/8] fftools/ffmpeg_demux: implement -bsf for input

2024-01-21 Thread Stefano Sabatini
On date Sunday 2024-01-21 18:43:36 +0100, Anton Khirnov wrote: > Quoting Stefano Sabatini (2024-01-20 12:32:42) [...] > > When you present an example you usually start with an explanation > > (what it does) and then present the command, not the other way around. > > I don't, neither does most lite

Re: [FFmpeg-devel] [PATCH 1/2 v2] avutil: add a Tile Grid API

2024-01-21 Thread Anton Khirnov
Quoting James Almer (2024-01-21 18:47:43) > On 1/21/2024 2:29 PM, Anton Khirnov wrote: > > Honestly this whole new API strikes me as massively overthinking it. All > > you should need to describe an arbitrary partition of an image into > > sub-rectangles is an array of (x, y, width, height). Instea

Re: [FFmpeg-devel] 0001-fix-segment-fault-in-function-decode

2024-01-21 Thread Stefano Sabatini
On date Saturday 2024-01-13 05:57:18 +0800, 陈督 wrote: > > > /*When it is not a planar arrangement, data[1] is empty, > > and all the data is interleaved in data[0]. > > This can result in a segmentation fault when accessing data[ch] .*/ > > //So I delete the code below: > > f

Re: [FFmpeg-devel] [PATCH 7/8] fftools/ffmpeg_demux: implement -bsf for input

2024-01-21 Thread Anton Khirnov
Quoting Stefano Sabatini (2024-01-21 19:22:35) > On date Sunday 2024-01-21 18:43:36 +0100, Anton Khirnov wrote: > > Quoting Stefano Sabatini (2024-01-20 12:32:42) > [...] > > > When you present an example you usually start with an explanation > > > (what it does) and then present the command, not t

Re: [FFmpeg-devel] [PATCH 1/2 v2] avutil: add a Tile Grid API

2024-01-21 Thread James Almer
On 1/21/2024 3:29 PM, Anton Khirnov wrote: Quoting James Almer (2024-01-21 18:47:43) On 1/21/2024 2:29 PM, Anton Khirnov wrote: Honestly this whole new API strikes me as massively overthinking it. All you should need to describe an arbitrary partition of an image into sub-rectangles is an array

Re: [FFmpeg-devel] [PATCH 1/2 v2] avutil: add a Tile Grid API

2024-01-21 Thread Anton Khirnov
Quoting James Almer (2024-01-21 19:38:50) > On 1/21/2024 3:29 PM, Anton Khirnov wrote: > > Quoting James Almer (2024-01-21 18:47:43) > >> On 1/21/2024 2:29 PM, Anton Khirnov wrote: > >>> Honestly this whole new API strikes me as massively overthinking it. All > >>> you should need to describe an ar

Re: [FFmpeg-devel] [PATCH 7/8] fftools/ffmpeg_demux: implement -bsf for input

2024-01-21 Thread Stefano Sabatini
On date Sunday 2024-01-21 19:35:01 +0100, Anton Khirnov wrote: > Quoting Stefano Sabatini (2024-01-21 19:22:35) > > On date Sunday 2024-01-21 18:43:36 +0100, Anton Khirnov wrote: > > > Quoting Stefano Sabatini (2024-01-20 12:32:42) > > [...] > > > > When you present an example you usually start wit

Re: [FFmpeg-devel] [PATCH 1/2] lavf/dvenc: improve error messaging

2024-01-21 Thread Stefano Sabatini
On date Sunday 2024-01-21 18:39:19 +0100, Anton Khirnov wrote: > Quoting Stefano Sabatini (2024-01-21 11:30:27) [...] > Also, can the second case even trigger? Seems like the block above > ensures n_ast is never larger than 2. Yes, this seems a miss from commit eafa8e859297813dcf0e6b43e85720be

Re: [FFmpeg-devel] [PATCH 1/2 v2] avutil: add a Tile Grid API

2024-01-21 Thread James Almer
On 1/21/2024 4:02 PM, Anton Khirnov wrote: Quoting James Almer (2024-01-21 19:38:50) On 1/21/2024 3:29 PM, Anton Khirnov wrote: Quoting James Almer (2024-01-21 18:47:43) On 1/21/2024 2:29 PM, Anton Khirnov wrote: Honestly this whole new API strikes me as massively overthinking it. All you sho

[FFmpeg-devel] [PATCH] liavcodec: add bit-rate support to RoQ video encoder

2024-01-21 Thread Victor Luchits
One can now use the bitrate option (-b) to specify bit rate of the video stream in the RoQ encoder. The option only becomes effective for values above 800kbit/s, which is roughly equivalent to bandwidth of a 1x-speed CD-ROM drive, minus the bandwidth taken up by stereo DPCM stream. Values below th

Re: [FFmpeg-devel] [PATCH] liavcodec: add bit-rate support to RoQ video encoder

2024-01-21 Thread Michael Niedermayer
On Sun, Jan 21, 2024 at 11:19:43PM +0300, Victor Luchits wrote: > One can now use the bitrate option (-b) to specify bit rate of the video > stream in the RoQ encoder. The option only becomes effective for values > above 800kbit/s, which is roughly equivalent to bandwidth of a 1x-speed > CD-ROM dri

Re: [FFmpeg-devel] [PATCH 1/2 v2] avutil: add a Tile Grid API

2024-01-21 Thread James Almer
On 1/21/2024 4:29 PM, James Almer wrote: On 1/21/2024 4:02 PM, Anton Khirnov wrote: Quoting James Almer (2024-01-21 19:38:50) On 1/21/2024 3:29 PM, Anton Khirnov wrote: Quoting James Almer (2024-01-21 18:47:43) On 1/21/2024 2:29 PM, Anton Khirnov wrote: Honestly this whole new API strikes me

[FFmpeg-devel] [PATCH] liavcodec: add bit-rate support to RoQ video encoder

2024-01-21 Thread Victor Luchits
One can now use the bitrate option (-b) to specify bit rate of the video stream in the RoQ encoder. The option only becomes effective for values above 800kbit/s, which is roughly equivalent to bandwidth of a 1x-speed CD-ROM drive, minus the bandwidth taken up by stereo DPCM stream. Values below th

[FFmpeg-devel] [PATCH] lavc/aarch64: fix include for cpu.h

2024-01-21 Thread Ramiro Polla
--- libavcodec/aarch64/idctdsp_init_aarch64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/aarch64/idctdsp_init_aarch64.c b/libavcodec/aarch64/idctdsp_init_aarch64.c index eec21aa5a2..8efd5f5323 100644 --- a/libavcodec/aarch64/idctdsp_init_aarch64.c +++ b/libavco

Re: [FFmpeg-devel] [PATCH v1 2/2] vaapi: add vaapi_avs2 support

2024-01-21 Thread Liu Steven
> On Jan 21, 2024, at 22:47, Jianfeng Zheng wrote: > > Zhao Zhili 于2024年1月20日周六 12:22写道: >> >> >>> -Original Message- >>> From: ffmpeg-devel On Behalf Of >>> jianfeng.zheng >>> Sent: 2024年1月19日 23:53 >>> To: ffmpeg-devel@ffmpeg.org >>> Cc: jianfeng.zheng >>> Subject: [FFmpeg-devel

Re: [FFmpeg-devel] [PATCH v4 1/2] avfilter: add audio overlay filter

2024-01-21 Thread Stefano Sabatini
On date Tuesday 2024-01-16 17:46:42 +0530, Harshit Karwal wrote: > Co-authored-by: Paul B Mahol > Signed-off-by: Harshit Karwal > --- > doc/filters.texi | 40 +++ > libavfilter/Makefile | 1 + > libavfilter/af_aoverlay.c | 538 ++ > libavfilte

[FFmpeg-devel] [PATCH 1/9] avcodec/vaapi_encode: move pic->input_surface initialization to encode_alloc

2024-01-21 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 3/9] avcodec/vaapi_encode: extract set_output_property to base layer

2024-01-21 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 4/9] avcodec/vaapi_encode: extract rc parameter configuration to base layer

2024-01-21 Thread tong1 . wu-at-intel . com
From: Tong Wu VAAPI and D3D12VA can share rate control configuration codes. Hence, it can be moved to base layer for simplification. Signed-off-by: Tong Wu --- libavcodec/hw_base_encode.c| 151 libavcodec/hw_base_encode.h| 34 ++ libavcodec/vaapi_encode.c

[FFmpeg-devel] [PATCH 6/9] avcodec/vaapi_encode: extract a get_recon_format function to base layer

2024-01-21 Thread tong1 . wu-at-intel . com
From: Tong Wu Get constraints and set recon frame format can be shared with other HW encoder such as D3D12. Extract this part as a new function to base layer. Signed-off-by: Tong Wu --- libavcodec/hw_base_encode.c | 58 + libavcodec/hw_base_encode.h | 2 ++

[FFmpeg-devel] [PATCH 7/9] avutil/hwcontext_d3d12va: add Flags for resource creation

2024-01-21 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 | 5 + libavutil/version.h | 2 +- 4 files changed, 10 insertions(+),

[FFmpeg-devel] [PATCH 5/9] avcodec/vaapi_encode: extract gop configuration to base layer

2024-01-21 Thread tong1 . wu-at-intel . com
From: Tong Wu Signed-off-by: Tong Wu --- libavcodec/hw_base_encode.c | 54 + libavcodec/hw_base_encode.h | 3 +++ libavcodec/vaapi_encode.c | 52 +++ 3 files changed, 61 insertions(+), 48 deletions(-) diff --git a/libavcode

[FFmpeg-devel] [PATCH 9/9] Changelog: add D3D12VA HEVC encoder changelog

2024-01-21 Thread tong1 . wu-at-intel . com
From: Tong Wu Signed-off-by: Tong Wu --- Changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/Changelog b/Changelog index c40b6d08fd..b3b5c16e0a 100644 --- a/Changelog +++ b/Changelog @@ -22,6 +22,7 @@ version : - ffmpeg CLI -bsf option may now be used for input as well as output - f

[FFmpeg-devel] [PATCH 8/9] avcodec: add D3D12VA hardware HEVC encoder

2024-01-21 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] libavfi/dnn: add LibTorch as one of DNN backend

2024-01-21 Thread wenbin . chen-at-intel . com
From: Wenbin Chen PyTorch is an open source machine learning framework that accelerates the path from research prototyping to production deployment. Official websit: https://pytorch.org/. We call the C++ library of PyTorch as LibTorch, the same below. To build FFmpeg with LibTorch, please take f

[FFmpeg-devel] [PATCH] configure: autodetect libglslang ldflags

2024-01-21 Thread Matthew White via ffmpeg-devel
Since glslang 14.0.0, OGLCompiler and HLSL stub libraries have been fully removed from the build. This fixes the configuration by detecting if the stub libraries are still present (glslang releases before version 14.0.0). ffbuild/config.log: /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-