[FFmpeg-devel] [PATCH] lavc/videotoolboxenc: add MJPEG support

2024-03-28 Thread gnattu via ffmpeg-devel
For example: ./ffmpeg -hwaccel videotoolbox\ -i INPUT -c:v mjpeg_videotoolbox\ out.mp4 This encoder does not have many options and can only use ``-q:v` to control quality. Signed-off-by: Gnattu OC --- Changelog| 1 + configure| 2 ++ libavcodec/

[FFmpeg-devel] [PATCH] avfilter: add vf_overlay_videotoolbox

2024-02-20 Thread gnattu via ffmpeg-devel
Overlay filter for VideoToolbox hwframes. Unlike most hardware overlay filters, this filter does not require the two inputs to have the same pixel format; instead, it will perform format conversion automatically with hardware accelerated methods. Signed-off-by: Gnattu OC --- Changelog

[FFmpeg-devel] [PATCH v2] Overlay filter for VideoToolbox hwframes. Unlike most hardware overlay filters, this filter does not require the two inputs to have the same pixel format; instead, it will pe

2024-02-20 Thread gnattu via ffmpeg-devel
Signed-off-by: Gnattu OC --- Changelog | 1 + configure | 1 + doc/filters.texi | 52 +++ libavfilter/Makefile | 3 +++ libavfilter/allfilters.c | 1 + libavfilter/metal/utils.h | 1 - libavfilter/metal/utils.

[FFmpeg-devel] [PATCH v2] avfilter: add vf_overlay_videotoolbox

2024-02-20 Thread gnattu via ffmpeg-devel
Overlay filter for VideoToolbox hwframes. Unlike most hardware overlay filters, this filter does not require the two inputs to have the same pixel format; instead, it will perform format conversion automatically with hardware accelerated methods. Signed-off-by: Gnattu OC --- Changelog

[FFmpeg-devel] [PATCH v3] avfilter: add vf_overlay_videotoolbox

2024-02-20 Thread gnattu via ffmpeg-devel
Overlay filter for VideoToolbox hwframes. Unlike most hardware overlay filters, this filter does not require the two inputs to have the same pixel format; instead, it will perform format conversion automatically with hardware accelerated methods. Signed-off-by: Gnattu OC --- Changelog

[FFmpeg-devel] [PATCH] hwcontext_videotoolbox: add vt_device_derive

2024-02-22 Thread gnattu via ffmpeg-devel
There is no device context to be setup, nor devices to be selected with VideoToolbox. Just a simple return would allow us to use derived device in filters like `hwupload=derive_device=videotoolbox` Signed-off-by: Gnattu OC --- libavutil/hwcontext_videotoolbox.c | 9 + 1 file changed, 9 i

[FFmpeg-devel] [PATCH v4] avfilter: add vf_overlay_videotoolbox

2024-02-27 Thread gnattu via ffmpeg-devel
Overlay filter for VideoToolbox hwframes. Unlike most hardware overlay filters, this filter does not require the two inputs to have the same pixel format; instead, it will perform format conversion automatically with hardware accelerated methods. Signed-off-by: Gnattu OC --- Changes from v3: - F

[FFmpeg-devel] [PATCH] avutil/hwcontext_videotoolbox: Check CVBufferCopyAttachments during configure

2024-07-21 Thread gnattu via ffmpeg-devel
The __builtin_available function does not do compile time check for the availablity of the CVBufferCopyAttachments function which will fail the build. Check the availability during configure. Signed-off-by: Gnattu OC --- configure | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure b

[FFmpeg-devel] [PATCH v2] avutil/hwcontext_videotoolbox: Check CVBufferCopyAttachments during configure

2024-07-21 Thread gnattu via ffmpeg-devel
The __builtin_available function does not do compile time check for the availablity of the CVBufferCopyAttachments function which will fail the build. Check the availability during configure. Signed-off-by: Gnattu OC --- configure | 2 ++ libavutil/hwcontext_videotoolbo

[FFmpeg-devel] [PATCH] avutil/hwcontext_videotoolbox: Allocate attachments dictionary

2024-08-01 Thread gnattu via ffmpeg-devel
From: Gnattu OC Allocate a dedicated attachments dictionary instead of trying to get one from the pixel buffer. The attachments got from the pixel buffer confuses the CVImageBufferCreateColorSpaceFromAttachments method and will make it to output a wrong colorspace that causes problem like #10884.

[FFmpeg-devel] [PATCH] avutil/hwcontext_videotoolbox: Correctly set trc

2024-08-01 Thread gnattu via ffmpeg-devel
The color trc key was assigned a color primaries value which causes the resulting colorspace is always SDR. Fixes #10884. Signed-off-by: Gnattu OC --- libavutil/hwcontext_videotoolbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/hwcontext_videotoolbox.c b/lib

[FFmpeg-devel] [PATCH] avcodec/videotoolboxenc: always release supported_props

2024-08-09 Thread gnattu via ffmpeg-devel
In vtenc_populate_extradata, supported_props should always be released to avoid memory leak. Regression from cd2f8a22e94700c68b1de7968df11e8bebfd315b Signed-off-by: gnattu --- libavcodec/videotoolboxenc.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/libavco

[FFmpeg-devel] [PATCH] avutil/hwcontext_videotoolbox: silence warning for RGB

2024-08-09 Thread gnattu via ffmpeg-devel
Hardware frames with RGB colorspace will not have a YCbCrMatrixKey. Currently, it will spam the console with warning if rgb frame is uploaded. Signed-off-by: Gnattu OC --- libavutil/hwcontext_videotoolbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/hwcontext_v

[FFmpeg-devel] [PATCH] avfilter: inherit input color range for videotoolbox filters

2024-08-15 Thread gnattu via ffmpeg-devel
The color range should be set to match the input when creating the VideoToolbox context. Otherwise, the new context will default to limited range, creates inconsistencies with full range inputs. Signed-off-by: Gnattu OC --- libavfilter/vf_scale_vt.c | 1 + libavfilter/vf_transpose_vt.c

[FFmpeg-devel] [PATCH] avcodec/bsf/dovi_rpu: remove EL when stripping dovi metadata

2024-10-15 Thread gnattu via ffmpeg-devel
When RPU is removed EL should also be removed. This only applies to HEVC as AV1 based Profile 10 does not support EL at all. Signed-off-by: Gnattu OC --- libavcodec/bsf/dovi_rpu.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libavcodec/bsf/dovi_rpu.c b/libavcodec/bsf