[FFmpeg-devel] [PATCH] vulkan_encode: do not align DPB buffer size

2024-10-04 Thread Lynne via ffmpeg-devel
Per subsection B stroke 165 of Chapter 56, drivers are required to do the aligning, not users. --- libavcodec/vulkan_encode.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/libavcodec/vulkan_encode.c b/libavcodec/vulkan_encode.c index 6d1743c7d7..9ad02e8c52 100644

Re: [FFmpeg-devel] [PATCH 4/4] lavc/vulkan: add SPIR-V compilation support

2024-10-04 Thread Lynne via ffmpeg-devel
On 04/10/2024 12:01, epira...@gmail.com wrote: On 4 Oct 2024, at 11:31, Lynne via ffmpeg-devel wrote: This is the same as with libavfilter. We will need SPIR-V compilation for at least three different things, like the VC-2 encoder and decoder, AV1 film grain synthesis for hardware with no

[FFmpeg-devel] [PATCH 4/4] lavc/vulkan: add SPIR-V compilation support

2024-10-04 Thread Lynne via ffmpeg-devel
This is the same as with libavfilter. We will need SPIR-V compilation for at least three different things, like the VC-2 encoder and decoder, AV1 film grain synthesis for hardware with no support for it, and possibly other codecs. --- libavcodec/Makefile | 4 libavcodec/vulkan_glsla

[FFmpeg-devel] [PATCH 3/4] vulkan: move SPIR-V compilation code to libavutil

2024-10-04 Thread Lynne via ffmpeg-devel
The code is not currently used by libavutil, its just where our common Vulkan code is. Since SPIR-V compilation will be needed by lavc, move it, rather than having lavc including lavfi. --- libavfilter/Makefile | 2 - libavfilter/vf_avgblur_vulkan.c | 2 +- libav

[FFmpeg-devel] [PATCH 1/4] lavfi/vulkan: remove redundant header

2024-10-04 Thread Lynne via ffmpeg-devel
--- libavfilter/Makefile| 2 +- libavfilter/vulkan.h| 24 libavfilter/vulkan_filter.h | 2 +- libavfilter/vulkan_spirv.h | 1 - 4 files changed, 2 insertions(+), 27 deletions(-) delete mode 100644 libavfilter/vulkan.h diff --git a/libavfilter/Makefile

[FFmpeg-devel] [PATCH 2/4] lavc/vulkan: remove redundant header

2024-10-04 Thread Lynne via ffmpeg-devel
--- libavcodec/Makefile | 2 +- libavcodec/vulkan.h | 24 libavcodec/vulkan_video.h | 2 +- 3 files changed, 2 insertions(+), 26 deletions(-) delete mode 100644 libavcodec/vulkan.h diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 5aed2fff28..a25

[FFmpeg-devel] [PATCH 5/5] Revert "x86/tx_float: set all operands for shufps"

2024-10-03 Thread Lynne via ffmpeg-devel
This reverts commit 74f5fb6db899dbc4fde9ccf77f37256ddcb9. --- libavutil/x86/tx_float.asm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavutil/x86/tx_float.asm b/libavutil/x86/tx_float.asm index cec7465d6e..434ca60aae 100644 --- a/libavutil/x86/tx_float.asm +++ b/li

[FFmpeg-devel] [PATCH 4/5] Revert "x86/tx_float: add missing check for AVX2"

2024-10-03 Thread Lynne via ffmpeg-devel
This reverts commit f4097e4c1f1bb244cae78c363a69d5e84495b616. --- libavutil/x86/tx_float.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/x86/tx_float.asm b/libavutil/x86/tx_float.asm index 570dcb4c9c..cec7465d6e 100644 --- a/libavutil/x86/tx_float.asm +++ b/libavu

[FFmpeg-devel] [PATCH 3/5] Revert "x86/tx_float: add missing preprocessor wrapper for AVX2 functions"

2024-10-03 Thread Lynne via ffmpeg-devel
This reverts commit 750f378becf15c0552c45a66a66aca7cc506d490. --- libavutil/x86/tx_float.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/x86/tx_float.asm b/libavutil/x86/tx_float.asm index 16165580a6..570dcb4c9c 100644 --- a/libavutil/x86/tx_float.asm +++ b/libavu

[FFmpeg-devel] [PATCH 2/5] Revert "x86/tx_float: change a condition in a preprocessor check"

2024-10-03 Thread Lynne via ffmpeg-devel
This reverts commit 0d8f43c74d0b1039ba70aacb4c9c7768e8bebf9f. --- libavutil/x86/tx_float.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/x86/tx_float.asm b/libavutil/x86/tx_float.asm index 42006848f1..16165580a6 100644 --- a/libavutil/x86/tx_float.asm +++ b/libavu

[FFmpeg-devel] [PATCH 1/5] configure: drop yasm support

2024-10-03 Thread Lynne via ffmpeg-devel
We started defauling to nasm 8 years ago. We are still compatible with yasm 0.8.0, released in 2009. **15 years ago**. The time has more than come to remove support for it. Maintaining compatibility started cutting into writing new code long ago. We still can't have 2-argument instructions, prepro

[FFmpeg-devel] [PATCH 7/8] vulkan_shaderc: add more stages, target Vulkan 1.3 and only output debug if needed

2024-10-02 Thread Lynne via ffmpeg-devel
--- libavfilter/vulkan_shaderc.c | 24 +++- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/libavfilter/vulkan_shaderc.c b/libavfilter/vulkan_shaderc.c index 56a2c0eef5..7144f04f21 100644 --- a/libavfilter/vulkan_shaderc.c +++ b/libavfilter/vulkan_shaderc.c @@ -4

[FFmpeg-devel] [PATCH 8/8] vulkan: don't enable GL_EXT_buffer_reference by default

2024-10-02 Thread Lynne via ffmpeg-devel
Only nlmeans_vulkan uses it. --- libavfilter/vf_nlmeans_vulkan.c | 6 -- libavutil/vulkan.c | 2 -- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libavfilter/vf_nlmeans_vulkan.c b/libavfilter/vf_nlmeans_vulkan.c index 9ad12eb7b6..39460dc194 100644 --- a/libavfilte

[FFmpeg-devel] [PATCH 6/8] vulkan_glslang: add more stages, target Vulkan 1.3 and output debug info

2024-10-02 Thread Lynne via ffmpeg-devel
--- libavfilter/vulkan_glslang.c | 39 +--- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/libavfilter/vulkan_glslang.c b/libavfilter/vulkan_glslang.c index 7ac7d6b2c4..20a00354e0 100644 --- a/libavfilter/vulkan_glslang.c +++ b/libavfilter/vulkan_gls

[FFmpeg-devel] [PATCH 5/8] lavfi/*vulkan: forward FFVulkanContext to SPIR-V compilers

2024-10-02 Thread Lynne via ffmpeg-devel
We need to know what extensions are supported. --- libavfilter/vf_avgblur_vulkan.c | 2 +- libavfilter/vf_blend_vulkan.c | 2 +- libavfilter/vf_bwdif_vulkan.c | 2 +- libavfilter/vf_chromaber_vulkan.c | 2 +- libavfilter/vf_flip_vulkan.c | 2 +- libavfilter/vf_gblur_vulkan.c

[FFmpeg-devel] [PATCH 4/8] hwcontext_vulkan: move device feature struct setup to a new function

2024-10-02 Thread Lynne via ffmpeg-devel
--- libavutil/hwcontext_vulkan.c | 335 --- libavutil/vulkan_functions.h | 1 + 2 files changed, 156 insertions(+), 180 deletions(-) diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index 518c3d642b..9b6a6274e4 100644 --- a/libavutil/hwcon

[FFmpeg-devel] [PATCH 3/8] hwcontext_vulkan: enable VK_KHR_shader_relaxed_extended_instruction

2024-10-02 Thread Lynne via ffmpeg-devel
--- libavutil/hwcontext_vulkan.c | 39 libavutil/vulkan_functions.h | 1 + libavutil/vulkan_loader.h| 1 + 3 files changed, 41 insertions(+) diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index d6500de677..518c3d642b 100644 ---

[FFmpeg-devel] [PATCH 2/8] vulkan_functions: change extension type to a typedef uint64_t

2024-10-02 Thread Lynne via ffmpeg-devel
We were getting a bit too close for comfort to the 32-bit limit on enums. --- libavutil/vulkan_functions.h | 59 +++- 1 file changed, 32 insertions(+), 27 deletions(-) diff --git a/libavutil/vulkan_functions.h b/libavutil/vulkan_functions.h index 90e4d0004d..c565d6

[FFmpeg-devel] [PATCH 1/8] vulkan: always enable GL_EXT_scalar_block_layout

2024-10-02 Thread Lynne via ffmpeg-devel
This makes std430 (which we use everywhere already) fully match C layout. Extension was made mandatory in 1.2. --- libavutil/hwcontext_vulkan.c | 1 + libavutil/vulkan.c | 1 + 2 files changed, 2 insertions(+) diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c inde

Re: [FFmpeg-devel] [PATCH 1/2] configure: suggest installing nasm/yasm before using --disable-x86asm

2024-10-02 Thread Lynne via ffmpeg-devel
On 01/10/2024 15:24, vipyne wrote: --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index c8fb49a7a4..d178ef59dc 100755 --- a/configure +++ b/configure @@ -6460,7 +6460,7 @@ EOF for program in $x86asmexe nasm yasm; do

Re: [FFmpeg-devel] [External] Re: Question Regarding Removal of Blowfish from libavutil in FFmpeg

2024-10-02 Thread Lynne via ffmpeg-devel
On 02/10/2024 11:06, Kumar, Rahul via ffmpeg-devel wrote: Thank you for the prompt response. The primary reason for removing Blowfish from our codebase is to comply with modern security guidelines and industry standards that discourage the use of outdated cryptographic algorithms, like Blowfis

Re: [FFmpeg-devel] [PATCH v2 1/3] avcodec: make a local copy of executor

2024-10-01 Thread Lynne via ffmpeg-devel
On 01/10/2024 09:51, Lynne via ffmpeg-devel wrote: On 01/10/2024 08:55, Nuo Mi wrote: We still need several refactors to improve the current VVC decoder's performance, which will frequently break the API/ABI. To mitigate this, we've copied the executor from avutil to avcodec. Once t

Re: [FFmpeg-devel] [PATCH v2 1/3] avcodec: make a local copy of executor

2024-10-01 Thread Lynne via ffmpeg-devel
On 01/10/2024 08:55, Nuo Mi wrote: We still need several refactors to improve the current VVC decoder's performance, which will frequently break the API/ABI. To mitigate this, we've copied the executor from avutil to avcodec. Once the API/ABI is stable, we will move this class back to avutil -

Re: [FFmpeg-devel] [PATCH] web/index: add release notes for version 7.1

2024-09-30 Thread Lynne via ffmpeg-devel
On 30/09/2024 11:34, Lynne via ffmpeg-devel wrote: On 30/09/2024 11:08, Anton Khirnov wrote: Quoting Lynne via ffmpeg-devel (2024-09-30 09:42:58) ---   src/index | 37 +   1 file changed, 37 insertions(+) diff --git a/src/index b/src/index index fdf7ebb

Re: [FFmpeg-devel] [PATCH] web/index: add release notes for version 7.1

2024-09-30 Thread Lynne via ffmpeg-devel
On 30/09/2024 11:08, Anton Khirnov wrote: Quoting Lynne via ffmpeg-devel (2024-09-30 09:42:58) --- src/index | 37 + 1 file changed, 37 insertions(+) diff --git a/src/index b/src/index index fdf7ebb..76c8b32 100644 --- a/src/index +++ b/src/index @@ -35,6

[FFmpeg-devel] [PATCH] web/index: add release notes for version 7.1

2024-09-30 Thread Lynne via ffmpeg-devel
--- src/index | 37 + 1 file changed, 37 insertions(+) diff --git a/src/index b/src/index index fdf7ebb..76c8b32 100644 --- a/src/index +++ b/src/index @@ -35,6 +35,43 @@ News + October 1st, 2024, FFmpeg 7.1 "Péter" + +FFmpeg 7.1 "Péter", a ne

Re: [FFmpeg-devel] [RFC] 7.1 Release

2024-09-29 Thread Lynne via ffmpeg-devel
On 29/09/2024 02:09, Michael Niedermayer wrote: On Tue, Sep 24, 2024 at 05:47:54PM +0200, Michael Niedermayer wrote: On Wed, Aug 14, 2024 at 02:41:55PM +0200, Michael Niedermayer wrote: Hi all Are there any upcoming LTS releases that want to/could include FFmpeg 7.1 ? If so please reply here a

[FFmpeg-devel] [PATCH 1/5] vulkan: merge FFVkSPIRVShader and FFVkPipeline into FFVkShader

2024-09-29 Thread Lynne via ffmpeg-devel
Pipelines are just shaders. There's no reason to treat them differently. This also lets us implement shader objects and is an overall cleanup. --- libavfilter/vf_avgblur_vulkan.c | 28 +- libavfilter/vf_blend_vulkan.c | 24 +- libavfilter/vf_bwdif_vulkan.c | 29 +- libavfilter/vf_chro

[FFmpeg-devel] [PATCH 5/5] vulkan: check if current buffer has finished execution before picking another

2024-09-29 Thread Lynne via ffmpeg-devel
This saves resources, as dependencies are freed/reclaimed with a lower latency, and provies a speedup. --- libavcodec/vulkan_decode.c | 4 ++-- libavcodec/vulkan_encode.c | 2 +- libavfilter/vf_nlmeans_vulkan.c | 2 +- libavfilter/vulkan_filter.c | 6 +++--- libavutil/hwcontext_v

[FFmpeg-devel] [PATCH 4/5] vulkan: always enable GL_EXT_scalar_block_layout

2024-09-29 Thread Lynne via ffmpeg-devel
This makes std430 (which we use everywhere already) fully match C layout. Extension was made mandatory in 1.2. --- libavutil/hwcontext_vulkan.c | 1 + libavutil/vulkan.c | 1 + 2 files changed, 2 insertions(+) diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c inde

[FFmpeg-devel] [PATCH 2/5] vulkan: move shader data execution state to execution pools

2024-09-29 Thread Lynne via ffmpeg-devel
This finally permits using fully compiled shaders across multiple execution contexts. --- libavutil/vulkan.c | 157 + libavutil/vulkan.h | 81 ++- 2 files changed, 153 insertions(+), 85 deletions(-) diff --git a/libavutil/vulkan.c b

[FFmpeg-devel] [PATCH 3/5] vulkan: use shader objects if supported

2024-09-29 Thread Lynne via ffmpeg-devel
Shader objects finally allow completely independent shaders. --- libavutil/vulkan.c | 51 +++--- libavutil/vulkan.h | 5 ++--- 2 files changed, 50 insertions(+), 6 deletions(-) diff --git a/libavutil/vulkan.c b/libavutil/vulkan.c index 71581b91a9..8b1c1eb7

Re: [FFmpeg-devel] [PATCH 02/10] MAINTAINERS: aacdec seems unmaintained, aacdec_usac seems maintained by Lynne

2024-09-27 Thread Lynne via ffmpeg-devel
On 22/09/2024 23:56, Michael Niedermayer wrote: CC: Lynne Signed-off-by: Michael Niedermayer --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 5b6fbfdc48d..882ecae1d32 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -146,6 +146,8 @@ Codecs:

Re: [FFmpeg-devel] [PATCH] Use the correct Vulkan NULL type

2024-09-23 Thread Lynne via ffmpeg-devel
On 22/09/2024 20:40, nihil-admirari via ffmpeg-devel wrote: From: nihil-admirari <50202386+nihil-admir...@users.noreply.github.com> Fixes build issue for Win32 targets --- libavcodec/vulkan_encode_h264.c | 2 +- libavcodec/vulkan_encode_h265.c | 2 +- 2 files changed, 2 insertions(+), 2 dele

Re: [FFmpeg-devel] [PATCH v2] vulkan_encode: set the quality level in session parameters

2024-09-23 Thread Lynne via ffmpeg-devel
On 23/09/2024 12:56, Víctor Manuel Jáquez Leal wrote: While running this command ./ffmpeg_g -loglevel debug -hwaccel vulkan -init_hw_device vulkan=vk:0,debug=1 -hwaccel_output_format vulkan -i input.y4m -vf 'format=nv12,hwupload' -c:v h264_vulkan -quality 2 output.mp4 -y It hit this validatio

[FFmpeg-devel] [PATCH 4/4] vulkan: add support for regular descriptor pools

2024-09-22 Thread Lynne via ffmpeg-devel
This permits: - The use of Vulkan filtering on many more devices - Better debugging due to lack of descriptor buffer support in layers --- libavfilter/vf_gblur_vulkan.c | 2 +- libavfilter/vf_nlmeans_vulkan.c | 21 +- libavfilter/vulkan_filter.c | 120 +- libavutil/hwcontext_vul

[FFmpeg-devel] [PATCH 1/4] vulkan: separate out descriptor layouts from sets

2024-09-22 Thread Lynne via ffmpeg-devel
Just avoids a single temporary allocation. --- libavutil/vulkan.c | 35 +++ libavutil/vulkan.h | 4 ++-- 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/libavutil/vulkan.c b/libavutil/vulkan.c index da71f241f0..e3fb70da46 100644 --- a/libavutil/vul

[FFmpeg-devel] [PATCH 2/4] hwcontext_vulkan: add the PROFILE_INDEPENDENT only when needed

2024-09-22 Thread Lynne via ffmpeg-devel
--- libavutil/hwcontext_vulkan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index 23abd19eeb..6604dffd30 100644 --- a/libavutil/hwcontext_vulkan.c +++ b/libavutil/hwcontext_vulkan.c @@ -2695,7 +2695,8 @@ static

[FFmpeg-devel] [PATCH 3/4] hwcontext_vulkan: forward debug_mode to check_extensions() for devices

2024-09-22 Thread Lynne via ffmpeg-devel
This allows disabling of certain extensions when debug mode is turned on. --- libavutil/hwcontext_vulkan.c | 25 + 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index 6604dffd30..5e56a215e8 100644

Re: [FFmpeg-devel] PATCH] Make H.274 film grain support optional for H.264. Saves ~779kb.

2024-09-20 Thread Lynne via ffmpeg-devel
On 20/09/2024 20:51, Dale Curtis wrote: Were there any more comments for this patch? - dale On Tue, Aug 13, 2024 at 11:30 PM Christophe Gisquet < christophe.gisq...@gmail.com> wrote: Hi, Le mar. 13 août 2024 à 23:39, Dale Curtis a écrit : On Tue, Aug 13, 2024 at 1:11 PM Hendrik Leppkes

Re: [FFmpeg-devel] [PATCH] avcodec/cuviddec: Add handling HDR10+ sidedata on cuviddec.

2024-09-20 Thread Lynne via ffmpeg-devel
On 20/09/2024 20:41, Carlos Ruiz wrote: It's just that the cuviddec decoder is more of a relic, from before the native hwaccel existed. The only reason it's not straight up deprecated is that it's sometimes nice to have a "second opinion" when issues crop up, and there are a few specific features

Re: [FFmpeg-devel] [PATCH] vulkan_encode: set the quality level in session parameters

2024-09-20 Thread Lynne via ffmpeg-devel
On 20/09/2024 13:33, Víctor Manuel Jáquez Leal wrote: While running this command ./ffmpeg_g -loglevel debug -hwaccel vulkan -init_hw_device vulkan=vk:0,debug=1 -hwaccel_output_format vulkan -i input.y4m -vf 'format=nv12,hwupload' -c:v h264_vulkan -quality 2 output.mp4 -y It hit this validatio

Re: [FFmpeg-devel] [PATCH 2/3] - libavcodec/aom_film_grain: Add apply_grain flag

2024-09-20 Thread Lynne via ffmpeg-devel
On 20/09/2024 09:42, Segall, Andrew wrote: On 9/20/24, 12:15 AM, "ffmpeg-devel on behalf of Lynne via ffmpeg-devel" mailto:ffmpeg-devel-boun...@ffmpeg.org> on behalf of ffmpeg-devel@ffmpeg.org <mailto:ffmpeg-devel@ffmpeg.org>> wrote: CAUTION: This email originat

Re: [FFmpeg-devel] [PATCH 2/3] - libavcodec/aom_film_grain: Add apply_grain flag

2024-09-20 Thread Lynne via ffmpeg-devel
On 20/09/2024 02:44, Segall, Andrew via ffmpeg-devel wrote: Details: Add support for the apply_grain_flag. This allows the film grain process to be enabled/disabled for different display properties. On 9/8/24, 12:06 AM, "Andrew Segall" mailto:aseg...@amazon.com>> wrote: Signed-off-by: Andre

[FFmpeg-devel] [PATCH 3/3] hwcontext_vulkan: add support for implicit DRM synchronization

2024-09-19 Thread Lynne via ffmpeg-devel
More recent kernel versions allow for users to extract a sync_file handle from a DMA-BUF, which can then be imported into Vulkan as a binary semaphore. This finally allows for synchronization between Vulkan and DMA-BUF images, such as those from screen capture software, or VAAPI, avoiding any corr

[FFmpeg-devel] [PATCH 1/3] hwcontext_vulkan: fix VUID-VkPhysicalDeviceImageFormatInfo2-usage-requiredbitmask

2024-09-19 Thread Lynne via ffmpeg-devel
fmt_props.usage was initialized to 0 as create_info.usage was set later. --- libavutil/hwcontext_vulkan.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index d6899df159..1de08c6181 100644 --- a/li

[FFmpeg-devel] [PATCH 2/3] vulkan: add ff_vk_exec_add_dep_bool_sem

2024-09-19 Thread Lynne via ffmpeg-devel
This function simply takes in a binary semaphore as a dependency to an execution. --- libavutil/vulkan.c | 108 - libavutil/vulkan.h | 4 ++ 2 files changed, 102 insertions(+), 10 deletions(-) diff --git a/libavutil/vulkan.c b/libavutil/vulkan.c index

[FFmpeg-devel] [PATCH v2] hw_base_encode_h265: split off SPS/PPS/VPS generation from VAAPI

2024-09-16 Thread Lynne via ffmpeg-devel
--- Only difference between V1 and V2 is that V2 actually makes VAAPI use the exported code, rather than copying it. libavcodec/Makefile | 2 +- libavcodec/hw_base_encode_h265.c | 351 + libavcodec/hw_base_encode_h265.h | 56 + libavcodec/vaapi_enco

Re: [FFmpeg-devel] [PATCH 1/2] lavc: add Vulkan video encoding base code

2024-09-16 Thread Lynne via ffmpeg-devel
On 15/09/2024 11:55, Lynne via ffmpeg-devel wrote: On 09/09/2024 12:37, Lynne wrote: This commit adds the common Vulkan video encoding framework. It makes full use of the asynchronous features of our new common hardware encoding code, and of Vulkan. The code is able to handle anything from H264

Re: [FFmpeg-devel] [WIP PATCH 0/1] avcodec/aacenc: improve bit_rate_tolerance=0

2024-09-15 Thread Lynne via ffmpeg-devel
On 15/09/2024 17:14, Pauli Virtanen wrote: la, 2024-09-14 kello 00:15 +0300, Pauli Virtanen kirjoitti: [clip] - it appears the resulting frame_bits depends also on some other state than s->lambda. iteration with lambda1, lambda2>lambda1, and then again with lambda1 can produce different f

Re: [FFmpeg-devel] [PATCH 1/2] lavc: add Vulkan video encoding base code

2024-09-15 Thread Lynne via ffmpeg-devel
On 09/09/2024 12:37, Lynne wrote: This commit adds the common Vulkan video encoding framework. It makes full use of the asynchronous features of our new common hardware encoding code, and of Vulkan. The code is able to handle anything from H264 to AV1 and MJPEG. --- configure |

Re: [FFmpeg-devel] [PATCH 1/2] lavc: add Vulkan video encoding base code

2024-09-15 Thread Lynne via ffmpeg-devel
On 12/09/2024 15:20, Benjamin Cheng wrote: On Wed Sep 11, 2024 at 12:03 AM EDT, Lynne wrote: On 10/09/2024 15:29, Benjamin Cheng wrote: On Mon Sep 9, 2024 at 6:37 AM EDT, Lynne via ffmpeg-devel wrote: This commit adds the common Vulkan video encoding framework. It makes full use of the

[FFmpeg-devel] [PATCH v2] hw_base_enc: inject side data to crop output for AV1

2024-09-13 Thread Lynne via ffmpeg-devel
Unlike H264/H265, AV1 contains no fields to crop encoded output to specific sizes. AMD's hardware cannot handle encoding of unaligned dimensions for AV1, hence it codes 1920x1080 as 1920x1088. Add side data to crop the output back to the original dimensions. There's an AV1-spec extension planned t

[FFmpeg-devel] [PATCH] hw_base_enc: inject side data to crop output for AV1

2024-09-13 Thread Lynne via ffmpeg-devel
Unlike H264/H265, AV1 contains no fields to crop encoded output to specific sizes. AMD's hardware cannot handle encoding of unaligned dimensions for AV1, hence it codes 1920x1080 as 1920x1088. Add side data to crop the output back to the original dimensions. There's an AV1-spec extension planned t

Re: [FFmpeg-devel] [PATCH] lavc/vaapi_encode_av1: Fix encode fail since 9db68ed0

2024-09-13 Thread Lynne via ffmpeg-devel
On 13/09/2024 05:15, fei.w.wang-at-intel@ffmpeg.org wrote: From: Fei Wang Signed-off-by: Fei Wang --- libavcodec/vaapi_encode_av1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/vaapi_encode_av1.c b/libavcodec/vaapi_encode_av1.c index 6d1be9fc07..1b350cd

[FFmpeg-devel] [PATCH 2/3] hw_base_encode_h265: split off SPS/PPS/VPS generation from VAAPI

2024-09-12 Thread Lynne via ffmpeg-devel
--- libavcodec/hw_base_encode_h265.c | 351 +++ libavcodec/hw_base_encode_h265.h | 56 + 2 files changed, 407 insertions(+) create mode 100644 libavcodec/hw_base_encode_h265.c create mode 100644 libavcodec/hw_base_encode_h265.h diff --git a/libavcodec/hw_base_en

[FFmpeg-devel] [PATCH 1/3] cbs_h265: add raw filler encoding

2024-09-12 Thread Lynne via ffmpeg-devel
From: Dave Airlie --- libavcodec/cbs_h2645.c| 17 libavcodec/cbs_h265.h | 6 ++ libavcodec/cbs_h265_syntax_template.c | 29 +++ 3 files changed, 52 insertions(+) diff --git a/libavcodec/cbs_h2645.c b/libavcodec/cbs_h2

[FFmpeg-devel] [PATCH 3/3] lavc: add hevc_vulkan hardware encoder

2024-09-12 Thread Lynne via ffmpeg-devel
This commit adds a Vulkan hardware HEVC encoder, with full support of the spec - I, P, and B-frames. --- configure |1 + libavcodec/Makefile |3 + libavcodec/allcodecs.c |1 + libavcodec/vulkan_encode_h264.c | 14 +- libavcodec/vulkan_encode

Re: [FFmpeg-devel] [PATCH 1/2] lavc: add Vulkan video encoding base code

2024-09-10 Thread Lynne via ffmpeg-devel
On 10/09/2024 15:29, Benjamin Cheng wrote: On Mon Sep 9, 2024 at 6:37 AM EDT, Lynne via ffmpeg-devel wrote: This commit adds the common Vulkan video encoding framework. It makes full use of the asynchronous features of our new common hardware encoding code, and of Vulkan. The code is able to

[FFmpeg-devel] [PATCH v2 2/2] lavc: add h264_vulkan hardware encoder

2024-09-10 Thread Lynne via ffmpeg-devel
This commit adds the first Vulkan hardware encoder. Currently, P, and **B**-frames are supported. This marks the first implementation to support both. The encoder has feature-parity with VAAPI. --- configure |1 + libavcodec/Makefile |3 + libavcodec/all

[FFmpeg-devel] [PATCH v2 1/2] lavc: add Vulkan video encoding base code

2024-09-10 Thread Lynne via ffmpeg-devel
This commit adds the common Vulkan video encoding framework. It makes full use of the asynchronous features of our new common hardware encoding code, and of Vulkan. The code is able to handle anything from H264 to AV1 and MJPEG. --- configure | 2 + libavcodec/Makefile|

Re: [FFmpeg-devel] [PATCH] fftools/opt_common: add missing newline after printing codecs

2024-09-09 Thread Lynne via ffmpeg-devel
On 09/09/2024 11:57, Anton Khirnov wrote: Quoting Lynne via ffmpeg-devel (2024-09-09 10:34:21) This solves ffmpeg -help bsf=trace_headers => Supported codecs: av1 h264 hevc vvc mjpeg mpeg2video vp8 vp9 --- fftools/opt_common.c | 1 + 1 file changed, 1 insertion(+) Looks ok Pus

[FFmpeg-devel] [PATCH 2/2] lavc: add h264_vulkan hardware encoder

2024-09-09 Thread Lynne via ffmpeg-devel
This commit adds the first Vulkan hardware encoder. Currently, P, and **B**-frames are supported. This marks the first implementation to support both. The encoder has feature-parity with VAAPI. --- configure |1 + libavcodec/Makefile |3 + libavcodec/all

[FFmpeg-devel] [PATCH 1/2] lavc: add Vulkan video encoding base code

2024-09-09 Thread Lynne via ffmpeg-devel
This commit adds the common Vulkan video encoding framework. It makes full use of the asynchronous features of our new common hardware encoding code, and of Vulkan. The code is able to handle anything from H264 to AV1 and MJPEG. --- configure | 2 + libavcodec/Makefile|

[FFmpeg-devel] [PATCH] fftools/opt_common: add missing newline after printing codecs

2024-09-09 Thread Lynne via ffmpeg-devel
This solves ffmpeg -help bsf=trace_headers => Supported codecs: av1 h264 hevc vvc mjpeg mpeg2video vp8 vp9 --- fftools/opt_common.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fftools/opt_common.c b/fftools/opt_common.c index f44fc4c97c..021ed75272 100644 --- a/fftools/opt_common.c +++ b/

Re: [FFmpeg-devel] [PATCH 02/10] hw_base_encode: move VAAPI SPS/PPS constructors to a shared file

2024-09-06 Thread Lynne via ffmpeg-devel
On 06/09/2024 11:48, Tong Wu wrote: Lynne: To: Tong Wu ; FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH 02/10] hw_base_encode: move VAAPI SPS/PPS constructors to a shared file On 04/09/2024 16:09, Tong Wu wrote: Lynne: Subject: [FFmpeg-devel] [PATCH 02/10] hw_b

Re: [FFmpeg-devel] [PATCH] avcodec/amfenc: Add support for on-demand key frames

2024-09-05 Thread Lynne via ffmpeg-devel
On 05/09/2024 07:16, Cameron Gutman wrote: Signed-off-by: Cameron Gutman --- libavcodec/amfenc.c | 34 +- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/libavcodec/amfenc.c b/libavcodec/amfenc.c index 41eaef9758..6f2b211d14 100644 --- a/libavcode

Re: [FFmpeg-devel] [PATCH 03/10] hw_base_encode: allocate DPB image upfront

2024-09-04 Thread Lynne via ffmpeg-devel
On 04/09/2024 16:36, Tong Wu wrote: Lynne: Subject: [FFmpeg-devel] [PATCH 03/10] hw_base_encode: allocate DPB image upfront Vulkan requires this, as it needs to initialize state upfront. --- libavcodec/d3d12va_encode.c | 6 -- libavcodec/hw_base_encode.c | 6 ++ libavcodec/vaapi_encode.c

Re: [FFmpeg-devel] [PATCH 02/10] hw_base_encode: move VAAPI SPS/PPS constructors to a shared file

2024-09-04 Thread Lynne via ffmpeg-devel
On 04/09/2024 16:09, Tong Wu wrote: Lynne: Subject: [FFmpeg-devel] [PATCH 02/10] hw_base_encode: move VAAPI SPS/PPS constructors to a shared file --- libavcodec/Makefile | 2 +- libavcodec/hw_base_encode_h264.c | 265 +++ libavcodec/hw_base_encode_h264.

Re: [FFmpeg-devel] [PATCH 4/6] avcodec/aac/aacdec_usac: Clean ics2->max_sfb when first SCE fails

2024-09-02 Thread Lynne via ffmpeg-devel
On 01/08/2024 19:07, Michael Niedermayer wrote: On Thu, Aug 01, 2024 at 05:11:18PM +0200, Lynne via ffmpeg-devel wrote: On 31/07/2024 21:54, Michael Niedermayer wrote: Fixes: out of array access Fixes: 70734/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_LATM_fuzzer-4741427068731392

Re: [FFmpeg-devel] [PATCH 1/2] MAINTAINERS: aacdec_usac seems not actively maintained

2024-09-02 Thread Lynne via ffmpeg-devel
On 02/09/2024 16:32, Michael Niedermayer wrote: My ping on a patch on 21 Jul has no reaction Signed-off-by: Michael Niedermayer --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index a513bec72a9..d73536370a0 100644 --- a/MAINTAINERS +++ b/MAINTAIN

[FFmpeg-devel] [PATCH v2] hw_base_encode: move VAAPI SPS/PPS constructors to a shared file

2024-09-01 Thread Lynne via ffmpeg-devel
--- libavcodec/Makefile | 2 +- libavcodec/hw_base_encode_h264.c | 265 +++ libavcodec/hw_base_encode_h264.h | 53 +++ libavcodec/vaapi_encode_h264.c | 264 +++--- 4 files changed, 343 insertions(+), 241 deletions(-) create

[FFmpeg-devel] [PATCH 2/2] vulkan(_decode): fix, simplify and improve queries

2024-08-31 Thread Lynne via ffmpeg-devel
The old query code never worked properly, and did some hideous heuristics to read the status bit, and work that into a return code. This is all best left to callers to do, which simplifies our code a lot. This also fixes minor validation errors regarding calling queries which are not in their acti

[FFmpeg-devel] [PATCH 1/2] hwcontext_vulkan: disable more false positive validation checks

2024-08-31 Thread Lynne via ffmpeg-devel
Both of these are fundamentally incompatible with video decoding. --- libavutil/hwcontext_vulkan.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index 763fb9d120..b214791738 100644 --- a/libavutil/hwcontext_vulkan.c +++ b/libavuti

[FFmpeg-devel] [PATCH v2 1/2] vulkan: add a ff_vk_init function

2024-08-31 Thread Lynne via ffmpeg-devel
This function sets the class correctly, and calls functions that all users have to call anyway. --- v1 had stray changes. libavutil/vulkan.c | 57 +- libavutil/vulkan.h | 12 +- 2 files changed, 67 insertions(+), 2 deletions(-) diff --git a/lib

[FFmpeg-devel] [PATCH 2/2] vulkan_decode: use ff_vk_init

2024-08-31 Thread Lynne via ffmpeg-devel
This solves the issue of an av_log function being called with a context with invalid class. Most of the patch was written by Anton Khirnov. --- libavcodec/vulkan_decode.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/libavcodec/vulkan_decode.c b/libavcodec/vul

[FFmpeg-devel] [PATCH 1/2] vulkan: add a ff_vk_init function

2024-08-31 Thread Lynne via ffmpeg-devel
This function sets the class correctly, and calls functions that all users have to call anyway. --- libavutil/vulkan.c | 62 +++--- libavutil/vulkan.h | 12 - 2 files changed, 69 insertions(+), 5 deletions(-) diff --git a/libavutil/vulkan.c b/libavu

[FFmpeg-devel] [PATCH] hwcontext_vulkan: ask for storage images by default

2024-08-31 Thread Lynne via ffmpeg-devel
The issue is that we ask for storage images by default if available, but because that is gated by the format supporting storage images, and the check for the format supporting storage images is gated by the usage, this resulted in a catch-22. --- libavutil/hwcontext_vulkan.c | 3 ++- 1 file change

[FFmpeg-devel] [PATCH 10/10] vulkan_filter: require storage images properly, set usage flags explicitly

2024-08-31 Thread Lynne via ffmpeg-devel
This caused images to be created without a storage usage, which broke at least lavapipe. --- libavfilter/vulkan_filter.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/libavfilter/vulkan_filter.c b/libavfilter/vulkan_filter.c index 64e9b8768a..c31d42b91a 100644 ---

[FFmpeg-devel] [PATCH 09/10] hwcontext_vulkan: add PREP_MODE_GENERAL for non-transfer_dst images

2024-08-31 Thread Lynne via ffmpeg-devel
Vulkan filters don't need images which can be transferred into. --- libavutil/hwcontext_vulkan.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index e4f155db6e..383e75397e 100644 --- a/libavutil/hwcontext_vul

[FFmpeg-devel] [PATCH 08/10] vulkan_video: move imageview creation and DPB fields to common context

2024-08-31 Thread Lynne via ffmpeg-devel
Shared between decoders and encoders. --- libavcodec/vulkan_av1.c| 3 +- libavcodec/vulkan_decode.c | 137 + libavcodec/vulkan_decode.h | 9 --- libavcodec/vulkan_h264.c | 3 +- libavcodec/vulkan_hevc.c | 3 +- libavcodec/vulkan_video.c | 80 ++

[FFmpeg-devel] [PATCH 07/10] vulkan: error out if query is called without being initialized

2024-08-31 Thread Lynne via ffmpeg-devel
--- libavutil/vulkan.c | 5 + 1 file changed, 5 insertions(+) diff --git a/libavutil/vulkan.c b/libavutil/vulkan.c index fe5affa72a..c2a3b5cfa3 100644 --- a/libavutil/vulkan.c +++ b/libavutil/vulkan.c @@ -446,6 +446,11 @@ VkResult ff_vk_exec_get_query(FFVulkanContext *s, FFVkExecContext *e,

[FFmpeg-devel] [PATCH 06/10] vulkan: use correct return codes for query errors

2024-08-31 Thread Lynne via ffmpeg-devel
--- libavutil/vulkan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/vulkan.c b/libavutil/vulkan.c index bb8e7ae786..fe5affa72a 100644 --- a/libavutil/vulkan.c +++ b/libavutil/vulkan.c @@ -444,7 +444,7 @@ VkResult ff_vk_exec_get_query(FFVulkanContext *s, FFVkExecCo

[FFmpeg-devel] [PATCH 05/10] vulkan_video: add utilities for H264 level/profile mapping

2024-08-31 Thread Lynne via ffmpeg-devel
--- libavcodec/vulkan_video.c | 49 +++ libavcodec/vulkan_video.h | 8 +++ 2 files changed, 57 insertions(+) diff --git a/libavcodec/vulkan_video.c b/libavcodec/vulkan_video.c index b9a0ed5022..a676f0332a 100644 --- a/libavcodec/vulkan_video.c +++ b/libavc

[FFmpeg-devel] [PATCH 04/10] hw_base_encode: make recon_frames_ref optional

2024-08-31 Thread Lynne via ffmpeg-devel
Vulkan supports some stupidly odd hardware, that unfortunately, most modern GPUs happen to be. The DPB images for encoders may be required to be preallocated all at once, and rather than be individual frames, be layers of a single frame. As the hw_base_encode code is written with the thought that

[FFmpeg-devel] [PATCH 03/10] hw_base_encode: allocate DPB image upfront

2024-08-31 Thread Lynne via ffmpeg-devel
Vulkan requires this, as it needs to initialize state upfront. --- libavcodec/d3d12va_encode.c | 6 -- libavcodec/hw_base_encode.c | 6 ++ libavcodec/vaapi_encode.c | 5 - 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/libavcodec/d3d12va_encode.c b/libavcodec/d3d12va

[FFmpeg-devel] [PATCH 02/10] hw_base_encode: move VAAPI SPS/PPS constructors to a shared file

2024-08-31 Thread Lynne via ffmpeg-devel
--- libavcodec/Makefile | 2 +- libavcodec/hw_base_encode_h264.c | 265 +++ libavcodec/hw_base_encode_h264.h | 53 +++ libavcodec/vaapi_encode_h264.c | 262 +++--- 4 files changed, 341 insertions(+), 241 deletions(-) create

Re: [FFmpeg-devel] [PATCH] lavc/opus*: move to opus/ subdir

2024-08-29 Thread Lynne via ffmpeg-devel
On 29/08/2024 11:34, Anton Khirnov wrote: --- libavcodec/Makefile | 10 ++- libavcodec/aarch64/opusdsp_init.c | 2 +- libavcodec/opus/Makefile | 30 +++ libavcodec/{opus_celt.c => opus/celt.c} | 6 ++-- l

Re: [FFmpeg-devel] [FEATURE] Cut a video (-ss) with timings non-aligned on keyframes, with minimal re-encoding

2024-08-20 Thread Lynne via ffmpeg-devel
On 20/08/2024 22:33, Michael Niedermayer wrote: On Tue, Aug 20, 2024 at 02:36:53PM +0200, Lynne via ffmpeg-devel wrote: On 20/08/2024 14:13, b...@gget.it wrote: More generally, which is the recommanded way to cut a video with a specific starting point and specific length, with minimal re

Re: [FFmpeg-devel] [FEATURE] Cut a video (-ss) with timings non-aligned on keyframes, with minimal re-encoding

2024-08-20 Thread Lynne via ffmpeg-devel
On 20/08/2024 14:13, b...@gget.it wrote: More generally, which is the recommanded way to cut a video with a specific starting point and specific length, with minimal re-encoding? Millions of hours of CPU-time are probably wasted to reencode already-perfectly-encoded content, just for cutting ;)

Re: [FFmpeg-devel] [PATCH 2/7] checkasm: improve print format

2024-08-19 Thread Lynne via ffmpeg-devel
On 16/08/2024 12:48, J. Dekker wrote: Lynne via ffmpeg-devel writes: On 13/08/2024 16:03, J. Dekker wrote: Port dav1d's checkasm output format to FFmpeg's checkasm, includes relative speedups and aligns results. Signed-off-by: J. Dekker --- tests/checkasm/check

[FFmpeg-devel] [PATCH v2] hw_base_encode: refactor picture allocation/freeing

2024-08-19 Thread Lynne via ffmpeg-devel
This commit cleans up and refactors the mess of private state upon private state that used to be. Now, FFHWBaseEncodePicture is fully initialized upon call-time, and, most importantly, this lets APIs which require initialization data for frames (VkImageViews) to initialize this for both the input

Re: [FFmpeg-devel] [PATCH] hw_base_encode: refactor picture allocation/freeing

2024-08-19 Thread Lynne via ffmpeg-devel
On 19/08/2024 17:07, Tong Wu wrote: Lynne: Subject: [PATCH] hw_base_encode: refactor picture allocation/freeing This commit cleans up and refactors the mess of private state upon private state that used to be. Now, FFHWBaseEncodePicture is fully initialized upon call-time, and, most importantl

[FFmpeg-devel] [PATCH] src/index/news: drop redundant sentence

2024-08-18 Thread Lynne via ffmpeg-devel
The sentence was added as an advice, given the maturity of the xHE-AAC implementation, but didn't deserve its own paragraph, nor its subject deserved being left a referential footnote in the stead of article. --- src/index | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/index b/src/index

[FFmpeg-devel] [PATCH] hw_base_encode: refactor picture allocation/freeing

2024-08-17 Thread Lynne via ffmpeg-devel
This commit cleans up and refactors the mess of private state upon private state that used to be. Now, FFHWBaseEncodePicture is fully initialized upon call-time, and, most importantly, this lets APIs which require initialization data for frames (VkImageViews) to initialize this for both the input

Re: [FFmpeg-devel] [PATCH] vulkan: remove AVClass * from the context, use a logging pointer

2024-08-15 Thread Lynne via ffmpeg-devel
On 14/08/2024 12:18, Andreas Rheinhardt wrote: Lynne via ffmpeg-devel: The issue is that VulkanContext mostly always used the AVClass * from its structure, which we don't set in decode. --- libavcodec/vulkan_decode.c| 2 ++ libavfilter/vf_avgblur_vulkan.c | 2 ++ libavf

[FFmpeg-devel] [PATCH 2/2] hwcontext_vulkan: enable encoding of images if video_maintenance1 is enabled

2024-08-14 Thread Lynne via ffmpeg-devel
Vulkan encoding was designed in a very... consolidated way. You had to know the exact codec and profile that the image was going to eventually be encoded as at... image creation time. Unfortunately, as good as our code is, glimpsing into the exact future isn't what its capable of. video_maintenanc

[FFmpeg-devel] [PATCH 1/2] hwcontext_vulkan: enable VK_KHR_video_maintenance1

2024-08-14 Thread Lynne via ffmpeg-devel
We require it for encoding. --- libavutil/hwcontext_vulkan.c | 12 +++- libavutil/vulkan_functions.h | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index 3e562716d8..a82355e8bf 100644 --- a/libavutil/hwcont

Re: [FFmpeg-devel] [RFC] 7.1 Release

2024-08-14 Thread Lynne via ffmpeg-devel
On 14/08/2024 14:41, Michael Niedermayer wrote: Hi all Are there any upcoming LTS releases that want to/could include FFmpeg 7.1 ? If so please reply here and list the date before which we would have to finish the 7.1 release so it can be included with no problems Otherwise, are there any prefe

[FFmpeg-devel] [PATCH 4/4] hwcontext_vulkan: setup extensions before features

2024-08-14 Thread Lynne via ffmpeg-devel
The issue is that enabling features requires that the device extension is supported. The extensions bitfield was set later, so it was always 0, leading to no features being added. --- libavutil/hwcontext_vulkan.c | 73 +++- 1 file changed, 38 insertions(+), 35 delet

  1   2   3   >