[FFmpeg-devel] [PATCH 00/16] NVidia Tegra hardware decoding backend

2024-05-30 Thread averne
horizon --enable-pic --enable-gpl --enable-nvtegra ``` It should probably be noted that NVDEC usage on discrete gpus is very similar. As far as I know, the main difference is that the interfacing is done through the GPFIFO block (same block that manages the 3D engine), instead of host1x. Thank you for

[FFmpeg-devel] [PATCH 01/16] avutil/buffer: add helper to allocate aligned memory

2024-05-30 Thread averne
This is useful eg. for memory-mapped buffers that need page-aligned memory, when dealing with hardware devices Signed-off-by: averne --- libavutil/buffer.c | 31 +++ libavutil/buffer.h | 7 +++ 2 files changed, 38 insertions(+) diff --git a/libavutil/buffer.c

[FFmpeg-devel] [PATCH 02/16] configure, avutil: add support for HorizonOS

2024-05-30 Thread averne
kernel and system daemons, termed sysmodules). Signed-off-by: averne --- configure | 8 libavutil/cpu.c | 7 +++ 2 files changed, 15 insertions(+) diff --git a/configure b/configure index 96b181fd21..09fb2aed1b 100755 --- a/configure +++ b/configure @@ -5967,6 +5967,10 @@ case

[FFmpeg-devel] [PATCH 03/16] avutil: add ioctl definitions for tegra devices

2024-05-30 Thread averne
ost1x. Signed-off-by: averne --- libavutil/Makefile | 2 + libavutil/nvhost_ioctl.h | 511 +++ libavutil/nvmap_ioctl.h | 451 ++ 3 files changed, 964 insertions(+) create mode 100644 libavutil/nvhost_ioctl.h create mode 1

[FFmpeg-devel] [PATCH 05/16] avutil: add common code for nvtegra

2024-05-30 Thread averne
command lists sent to the engines). Signed-off-by: averne --- configure |2 + libavutil/Makefile |4 + libavutil/nvtegra.c| 1035 libavutil/nvtegra.h| 258 + libavutil/nvtegra_host1x.h | 94

[FFmpeg-devel] [PATCH 06/16] avutil: add nvtegra hwcontext

2024-05-30 Thread averne
) did not support 10+ bit formats, these go through two separate copy steps for the luma and chroma planes. The second method copies on the CPU, and is used as a fallback if the VIC constraints are not satisfied. Signed-off-by: averne --- libavutil/Makefile | 7 +- libavutil

[FFmpeg-devel] [PATCH 07/16] hwcontext_nvtegra: add dynamic frequency scaling routines

2024-05-30 Thread averne
To save on energy, the clock speed of multimedia engines should be adapted to their workload. Signed-off-by: averne --- libavutil/hwcontext_nvtegra.c | 165 ++ libavutil/hwcontext_nvtegra.h | 7 ++ 2 files changed, 172 insertions(+) diff --git a/libavutil

[FFmpeg-devel] [PATCH 08/16] nvtegra: add common hardware decoding code

2024-05-30 Thread averne
This includes decode common de/initialization code, decode-job management, and constraint checks. Signed-off-by: averne --- configure | 1 + libavcodec/Makefile | 2 + libavcodec/hwconfig.h | 2 + libavcodec/nvtegra_decode.c | 517

[FFmpeg-devel] [PATCH 09/16] nvtegra: add mpeg1/2 hardware decoding

2024-05-30 Thread averne
This is probably the most straightforward codec to implement on NVDEC. Since mpeg2 is a superset of mpeg1, both are supported by the same backend. Signed-off-by: averne --- configure | 4 + libavcodec/Makefile | 2 + libavcodec/hwaccels.h | 2 + libavcodec

[FFmpeg-devel] [PATCH 10/16] nvtegra: add mpeg4 hardware decoding

2024-05-30 Thread averne
Signed-off-by: averne --- configure | 2 + libavcodec/Makefile| 1 + libavcodec/h263dec.c | 6 + libavcodec/hwaccels.h | 1 + libavcodec/mpeg4videodec.c | 3 + libavcodec/nvtegra_mpeg4.c | 344 + 6 files changed

[FFmpeg-devel] [PATCH 11/16] nvtegra: add vc1 hardware decoding

2024-05-30 Thread averne
Since L4T does not hook up the vc1 code to a user-facing library, this was written solely based on static reverse engineering. Signed-off-by: averne --- configure| 3 + libavcodec/Makefile | 1 + libavcodec/hwaccels.h| 2 + libavcodec/nvtegra_vc1.c | 455

[FFmpeg-devel] [PATCH 16/16] nvtegra: add mjpeg hardware decoding

2024-05-30 Thread averne
This uses NVJPG, a hardware engine separate from NVDEC. On the tegra 210 (and possibly later hardware), it has the specificity of being unable to decode to tiled surfaces, along with some quirks that have been observed to hang the hardware. Signed-off-by: averne --- configure

[FFmpeg-devel] [PATCH 15/16] nvtegra: add vp9 hardware decoding

2024-05-30 Thread averne
This hardware block was based on/licensed from the hantro implementation (as evidenced by the identical structures). Relevant V4L2 kernel code was referenced when implementing backward entropy updates. Signed-off-by: averne --- configure| 2 + libavcodec/Makefile | 1

[FFmpeg-devel] [PATCH 12/16] nvtegra: add h264 hardware decoding

2024-05-30 Thread averne
Due to the hardware modus operandi, dpb references must stay at a fixed slot for their entire lifetime. Signed-off-by: averne --- configure | 2 + libavcodec/Makefile | 1 + libavcodec/h264_slice.c | 6 +- libavcodec/h264dec.c | 3 + libavcodec/hwaccels.h

[FFmpeg-devel] [PATCH 13/16] nvtegra: add hevc hardware decoding

2024-05-30 Thread averne
Same remark as for h264. In addition, a number of bits to be skipped must be calculated. This is done in the main header parsing routine, instead of reimplementing it in the hwaccel backend. On the tegra 210, this is the only hardware codec that can output 10-bit data. Signed-off-by: averne

[FFmpeg-devel] [PATCH 14/16] nvtegra: add vp8 hardware decoding

2024-05-30 Thread averne
Signed-off-by: averne --- configure| 2 + libavcodec/Makefile | 1 + libavcodec/hwaccels.h| 1 + libavcodec/nvtegra_vp8.c | 334 +++ libavcodec/vp8.c | 6 + 5 files changed, 344 insertions(+) create mode 100644

Re: [FFmpeg-devel] [PATCH 02/16] configure, avutil: add support for HorizonOS

2024-05-31 Thread averne
Le 30/05/2024 à 22:37, Rémi Denis-Courmont a écrit : > Le torstaina 30. toukokuuta 2024, 22.43.04 EEST averne a écrit : >> HorizonOS (HOS) is the operating system of the Nintendo Switch. >> This patch enables integration with the homebrew toolchain developped by the >> devkitP

Re: [FFmpeg-devel] [PATCH 03/16] avutil: add ioctl definitions for tegra devices

2024-05-31 Thread averne
Le 30/05/2024 à 22:42, Rémi Denis-Courmont a écrit : > Le torstaina 30. toukokuuta 2024, 22.43.05 EEST averne a écrit : >> These files are taken with minimal modifications from nvidia's Linux4Tegra >> (L4T) tree. nvmap enables management of memory-mapped buffers for hardwar

Re: [FFmpeg-devel] [PATCH 01/16] avutil/buffer: add helper to allocate aligned memory

2024-05-31 Thread averne
Le 30/05/2024 à 22:38, Rémi Denis-Courmont a écrit : > Le torstaina 30. toukokuuta 2024, 22.43.03 EEST averne a écrit : >> This is useful eg. for memory-mapped buffers that need page-aligned memory, >> when dealing with hardware devices >> >> Signed-off-by: averne &g

Re: [FFmpeg-devel] [PATCH 05/16] avutil: add common code for nvtegra

2024-05-31 Thread averne
Le 31/05/2024 à 10:32, Rémi Denis-Courmont a écrit : > > > Le 30 mai 2024 22:43:07 GMT+03:00, averne a écrit : >> This includes a new pixel format for nvtegra hardware frames, and several >> objects for interaction with hardware blocks. >> In particular, this

Re: [FFmpeg-devel] [PATCH 03/16] avutil: add ioctl definitions for tegra devices

2024-06-02 Thread averne
Le 31/05/2024 à 23:16, Timo Rothenpieler a écrit : > On 31.05.2024 23:06, averne wrote: >> Le 30/05/2024 à 22:42, Rémi Denis-Courmont a écrit : >>> Le torstaina 30. toukokuuta 2024, 22.43.05 EEST averne a écrit : >>>> These files are taken with minimal modificat

Re: [FFmpeg-devel] [PATCH 01/16] avutil/buffer: add helper to allocate aligned memory

2024-06-02 Thread averne
Le 31/05/2024 à 23:44, Michael Niedermayer a écrit : > On Fri, May 31, 2024 at 11:06:49PM +0200, averne wrote: >> Le 30/05/2024 à 22:38, Rémi Denis-Courmont a écrit : >>> Le torstaina 30. toukokuuta 2024, 22.43.03 EEST averne a écrit : >>>> This is useful eg. for m

Re: [FFmpeg-devel] [PATCH 05/16] avutil: add common code for nvtegra

2024-06-29 Thread averne
Le 05/06/2024 à 22:29, Mark Thompson a écrit : > On 30/05/2024 20:43, averne wrote: >> This includes a new pixel format for nvtegra hardware frames, and several >> objects for interaction with hardware blocks. >> In particular, this contains code for channels (handles to

Re: [FFmpeg-devel] [PATCH 06/16] avutil: add nvtegra hwcontext

2024-06-29 Thread averne
Le 05/06/2024 à 22:47, Mark Thompson a écrit :> > On 30/05/2024 20:43, averne wrote: >> This includes hwdevice and hwframes objects. >> As the multimedia engines work with tiled surfaces (block linear in nvidia >> jargon), two frame transfer methods are implemented. >&

Re: [FFmpeg-devel] [PATCH 07/16] hwcontext_nvtegra: add dynamic frequency scaling routines

2024-06-29 Thread averne
Le 05/06/2024 à 22:50, Mark Thompson a écrit : > On 30/05/2024 20:43, averne wrote: >> To save on energy, the clock speed of multimedia engines should be adapted >> to their workload. >> >> Signed-off-by: averne >> --- >&g

[FFmpeg-devel] (no subject)

2021-07-29 Thread averne
This allow to specify additional parameters with `./configure -ar='ar -...`. Previously this resulted in an error (no operation specified). ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsu

[FFmpeg-devel] [PATCH] configure: Add dash before arflags

2021-07-29 Thread averne
--- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index b61a189b07..428180273b 100755 --- a/configure +++ b/configure @@ -4869,10 +4869,10 @@ if $ar 2>&1 | grep -q Microsoft; then arflags="-nologo" ar_o='-out:$@' elif $ar 2>&1 |

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

2024-09-20 Thread averne
Le 20/09/2024 à 20:41, Carlos Ruiz a écrit :> The native hevc codec doesn't > support resizing, so you decode video at full 4k on the gpu, which means > allocating > something like 5-10 surfaces at 3840x2160 which becomes 250MB of GPU memory, > and then you have immediately take all of those frames

[FFmpeg-devel] [PATCH v2] nvdec/vc1: add marker insertion logic

2025-04-08 Thread averne
.: https://drive.google.com/file/d/1WJyiRhcdU4FHTW3sVMitS7UdrZM1NBy-/view?usp=sharing This was investigated using my nvdec tracing tool: https://github.com/averne/NvdecTrace Signed-off-by: averne --- libavcodec/nvdec_vc1.c | 45 - 1 file changed, 44

Re: [FFmpeg-devel] [PATCH] nvdec/vc1: add marker insertion logic

2025-04-08 Thread averne
Le 08/04/2025 à 11:19, Zhao Zhili a écrit : > Sorry for the long delay. No problem, thank you for the review. > >> On Mar 5, 2025, at 01:17, averne wrote: >> >> >> --- >> Insert the relevant marker into the bitstream on >> slice submission. >>

[FFmpeg-devel] [PATCH] nvdec/vc1: add marker insertion logic

2025-03-04 Thread averne
nvdec tracing tool: https://github.com/averne/NvdecTrace Signed-off-by: averne --- libavcodec/nvdec_vc1.c | 50 -- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/libavcodec/nvdec_vc1.c b/libavcodec/nvdec_vc1.c index

Re: [FFmpeg-devel] [PATCH] nvdec/vc1: add marker insertion logic

2025-03-12 Thread averne
Bump Le 04/03/2025 à 18:17, averne a écrit : > > > --- > Insert the relevant marker into the bitstream on > slice submission. > This is analogous to the logic found in DXVA and > D3D hwaccels. > > Fixes decoding of various VC-1 streams, eg.: > h

[FFmpeg-devel] [PATCH] h264: fix reference reordering

2025-03-24 Thread averne
/sigdb/spevideo/VideoForm-s.aspx?val=102002641), on my WIP hwaccel backend (https://github.com/averne/FFmpeg/tree/envideo). Potentially fixes more hwaccels using this value (dxva2, vaapi, vdpau, vulkan). This patch was verified to not cause any regression of the software decoder. Signed-off-by: averne

[FFmpeg-devel] [PATCH 1/3] vulkan: fix leak in FFVkExecPool

2025-06-10 Thread averne
--- libavutil/vulkan.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavutil/vulkan.c b/libavutil/vulkan.c index a989e080abd372b8977dce107100b9370fac8305..eea80d0775a87ed6683cb58d30ba9ba8d6c1dd26 100644 --- a/libavutil/vulkan.c +++ b/libavutil/vulkan.c @@ -298,6 +298,8 @@ void ff_vk_ex

[FFmpeg-devel] [PATCH 0/3] Fix memory leaks in vulkan ffv1 decoding

2025-06-10 Thread averne
This fixes a few leaks reported by LeakSanitizer. I tested this on my Intel laptop running anv, with these patches no more leaks are detected. Signed-off-by: averne --- averne (3): vulkan: fix leak in FFVkExecPool vulkan/ffv1dec: fix leak in FFVulkanDecodeShared vulkan/ffv1dec

[FFmpeg-devel] [PATCH 3/3] vulkan/ffv1dec: fix FFVkSPIRVCompiler leak

2025-06-10 Thread averne
--- libavcodec/vulkan_ffv1.c | 58 +++- 1 file changed, 23 insertions(+), 35 deletions(-) diff --git a/libavcodec/vulkan_ffv1.c b/libavcodec/vulkan_ffv1.c index 8329b5d7dfad18de96884ea2c1f6f186682e430c..b02bc71683fd7d06dad3f4cf667ee3e8c57f3c83 100644

[FFmpeg-devel] [PATCH 2/3] vulkan/ffv1dec: fix leak in FFVulkanDecodeShared

2025-06-10 Thread averne
--- libavcodec/vulkan_ffv1.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/vulkan_ffv1.c b/libavcodec/vulkan_ffv1.c index c839f4c3879e158e0c0bfb4f5a833fff0b83d2f0..8329b5d7dfad18de96884ea2c1f6f186682e430c 100644 --- a/libavcodec/vulkan_ffv1.c +++ b/libavcodec/vulkan_ffv1.c @@