[FFmpeg-devel] [PATCH 1/2] lavu/hwcontext_qsv: add support for AV_PIX_FMT_VUYX

2022-08-29 Thread Xiang, Haihao
From: Haihao Xiang AV_PIX_FMT_VUYX is used in FFmpeg for 8bit 4:4:4 content on Intel HW, and MFX_FOURCC_AYUV is used in the SDK --- libavutil/hwcontext_qsv.c | 8 1 file changed, 8 insertions(+) diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontext_qsv.c index 510f422562..a3350e

[FFmpeg-devel] [PATCH 2/2] lavc/qsv: Add support for decoding & encoding 8bit 4:4:4 content

2022-08-29 Thread Xiang, Haihao
From: Haihao Xiang AV_PIX_FMT_VUYX is used in FFmpeg and MFX_FOURCC_AYUV is used in the SDK --- libavcodec/qsv.c | 12 libavcodec/qsvdec.c | 2 ++ libavcodec/qsvenc_hevc.c | 1 + libavcodec/qsvenc_vp9.c | 1 + 4 files changed, 16 insertions(+) diff --git a/libavcod

Re: [FFmpeg-devel] [PATCH 1/2] lavu/hwcontext_qsv: add support for AV_PIX_FMT_VUYX

2022-08-29 Thread James Almer
On 8/29/2022 4:27 AM, Xiang, Haihao wrote: From: Haihao Xiang AV_PIX_FMT_VUYX is used in FFmpeg for 8bit 4:4:4 content on Intel HW, and MFX_FOURCC_AYUV is used in the SDK Sounds like you want the VUYA pixfmt instead. --- libavutil/hwcontext_qsv.c | 8 1 file changed, 8 insertion

[FFmpeg-devel] [PATCH v1 2/3] swscale/la: Add yuv2rgb_lasx.c and rgb2rgb_lasx.c files

2022-08-29 Thread Hao Chen
ffmpeg -i ~/media/1_h264_1080p_30fps_3Mbps.mp4 -f rawvideo -pix_fmt rgb24 -y /dev/null -an before: 178fps after: 210fps Signed-off-by: Hao Chen --- libswscale/loongarch/Makefile | 2 + libswscale/loongarch/rgb2rgb_lasx.c | 52 +++ libswscale/loongarch/swscale_init_

[FFmpeg-devel] Add loongarch SIMD optimization in swscale lib.

2022-08-29 Thread Hao Chen
[PATCH v1 1/3] swscale/la: Optimize hscale functions with lasx. [PATCH v1 2/3] swscale/la: Add yuv2rgb_lasx.c and rgb2rgb_lasx.c [PATCH v1 3/3] swscale/la: Add output_lasx.c file. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/m

[FFmpeg-devel] [PATCH v1 1/3] swscale/la: Optimize hscale functions with lasx.

2022-08-29 Thread Hao Chen
ffmpeg -i ~/media/1_h264_1080p_30fps_3Mbps.mp4 -f rawvideo -s 640x480 -y /dev/null -an before: 101fps after: 138fps Signed-off-by: Hao Chen --- libswscale/loongarch/Makefile | 3 + libswscale/loongarch/input_lasx.c | 192 libswscale/loongarch/swscale_init_loo

[FFmpeg-devel] [PATCH v1 2/3] swscale/la: Add yuv2rgb_lasx.c and rgb2rgb_lasx.c files

2022-08-29 Thread Hao Chen
ffmpeg -i ~/media/1_h264_1080p_30fps_3Mbps.mp4 -f rawvideo -pix_fmt rgb24 -y /dev/null -an before: 178fps after: 210fps Signed-off-by: Hao Chen --- libswscale/loongarch/Makefile | 2 + libswscale/loongarch/rgb2rgb_lasx.c | 52 +++ libswscale/loongarch/swscale_init_

[FFmpeg-devel] [PATCH v1 3/3] swscale/la: Add output_lasx.c file.

2022-08-29 Thread Hao Chen
ffmpeg -i ~/media/1_h264_1080p_30fps_3Mbps.mp4 -f rawvideo -s 640x480 -pix_fmt rgb24 -y /dev/null -an before: 150fps after: 183fps Signed-off-by: Hao Chen --- libswscale/loongarch/Makefile |3 +- libswscale/loongarch/output_lasx.c| 1982 + libswsc

[FFmpeg-devel] Add LoongArch SIMD optimization in swscale lib.

2022-08-29 Thread Hao Chen
[PATCH v1 1/3] swscale/la: Optimize hscale functions with lasx. [PATCH v1 2/3] swscale/la: Add yuv2rgb_lasx.c and rgb2rgb_lasx.c [PATCH v1 3/3] swscale/la: Add output_lasx.c file. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/m

[FFmpeg-devel] [PATCH v1 1/3] swscale/la: Optimize hscale functions with lasx.

2022-08-29 Thread Hao Chen
ffmpeg -i ~/media/1_h264_1080p_30fps_3Mbps.mp4 -f rawvideo -s 640x480 -y /dev/null -an before: 101fps after: 138fps Signed-off-by: Hao Chen --- libswscale/loongarch/Makefile | 3 + libswscale/loongarch/input_lasx.c | 192 libswscale/loongarch/swscale_init_loo

[FFmpeg-devel] [PATCH v1 2/3] swscale/la: Add yuv2rgb_lasx.c and rgb2rgb_lasx.c files

2022-08-29 Thread Hao Chen
ffmpeg -i ~/media/1_h264_1080p_30fps_3Mbps.mp4 -f rawvideo -pix_fmt rgb24 -y /dev/null -an before: 178fps after: 210fps Signed-off-by: Hao Chen --- libswscale/loongarch/Makefile | 2 + libswscale/loongarch/rgb2rgb_lasx.c | 52 +++ libswscale/loongarch/swscale_init_

[FFmpeg-devel] [PATCH v1 3/3] swscale/la: Add output_lasx.c file.

2022-08-29 Thread Hao Chen
ffmpeg -i ~/media/1_h264_1080p_30fps_3Mbps.mp4 -f rawvideo -s 640x480 -pix_fmt rgb24 -y /dev/null -an before: 150fps after: 183fps Signed-off-by: Hao Chen --- libswscale/loongarch/Makefile |3 +- libswscale/loongarch/output_lasx.c| 1982 + libswsc

Re: [FFmpeg-devel] [PATCH v1 3/3] swscale/la: Add output_lasx.c file.

2022-08-29 Thread Andreas Rheinhardt
Hao Chen: > ffmpeg -i ~/media/1_h264_1080p_30fps_3Mbps.mp4 -f rawvideo -s 640x480 -pix_fmt > rgb24 -y /dev/null -an > before: 150fps > after: 183fps > > Signed-off-by: Hao Chen > --- > libswscale/loongarch/Makefile |3 +- > libswscale/loongarch/output_lasx.c| 198

Re: [FFmpeg-devel] [PATCH v3] avcodec/videotoolboxenc: Add CBR option to H264 and HEVC encoder

2022-08-29 Thread Rick Kern
On Sun, Aug 28, 2022 at 4:27 PM Sebastian Beckmann < beckmann.sebast...@outlook.de> wrote: > Adds an option to use constant bitrate instead of average bitrate to the > videotoolbox encoders. This is enabled via -constant_bit_rate true. > macOS 13 is required for this option to work. > > Signed-off

Re: [FFmpeg-devel] [PATCH v3] avcodec/videotoolboxenc: Add CBR option to H264 and HEVC encoder

2022-08-29 Thread Sebastian Beckmann
> The patch doesn't apply. Can you create a .patch file with git format-patch > and send the file as an attachment? Sometimes email clients/providers > corrupt inline patches. v3-0001-avcodec-videotoolboxenc-Add-CBR-option-to-H264-an.patch Description: v3-0001-avcodec-videotoolboxenc-Add-CBR-op

Re: [FFmpeg-devel] [PATCH v3] avcodec/videotoolboxenc: Add CBR option to H264 and HEVC encoder

2022-08-29 Thread Rick Kern
On Mon, Aug 29, 2022 at 9:05 AM Sebastian Beckmann < beckmann.sebast...@outlook.de> wrote: > > > The patch doesn't apply. Can you create a .patch file with git > format-patch > > and send the file as an attachment? Sometimes email clients/providers > > corrupt inline patches. > Thanks, pushed.

[FFmpeg-devel] [PATCH 18/18] avcodec/codec_internal: Add macros for update_thread_context(_for_user)

2022-08-29 Thread Andreas Rheinhardt
It reduces typing: Before this patch, there were 11 callbacks that exceeded the 80 char line length limit; now there are zero. It also allows to remove ONLY_IF_THREADS_ENABLED() in libavutil/internal.h. Signed-off-by: Andreas Rheinhardt --- libavcodec/cfhd.c | 2 +- libavcodec/codec_i

Re: [FFmpeg-devel] [PATCH 1/2] lavu/hwcontext_qsv: add support for AV_PIX_FMT_VUYX

2022-08-29 Thread Xiang, Haihao
On Mon, 2022-08-29 at 08:17 -0300, James Almer wrote: > On 8/29/2022 4:27 AM, Xiang, Haihao wrote: > > From: Haihao Xiang > > > > AV_PIX_FMT_VUYX is used in FFmpeg for 8bit 4:4:4 content on Intel HW, > > and MFX_FOURCC_AYUV is used in the SDK > > Sounds like you want the VUYA pixfmt instead. AV

[FFmpeg-devel] [PATCH 3/3] lavu/fifo: clarify interaction of AV_FIFO_FLAG_AUTO_GROW with av_fifo_write()

2022-08-29 Thread Anton Khirnov
--- libavutil/fifo.h | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavutil/fifo.h b/libavutil/fifo.h index 89872d0972..70f9376d97 100644 --- a/libavutil/fifo.h +++ b/libavutil/fifo.h @@ -124,9 +124,12 @@ int av_fifo_grow2(AVFifo *f, size_t inc); /** * Write data into

[FFmpeg-devel] [PATCH 1/3] lavu/fifo: add the header to its own doxy group

2022-08-29 Thread Anton Khirnov
Also, drop mentions of it being a circular buffer, as this is an internal implementation detail that should be invisible to the caller. --- libavutil/fifo.h | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/libavutil/fifo.h b/libavutil/fifo.h index 4eed364afc..6c6

[FFmpeg-devel] [PATCH 2/3] lavu/fifo: clarify interaction of AV_FIFO_FLAG_AUTO_GROW with av_fifo_can_write()

2022-08-29 Thread Anton Khirnov
--- libavutil/fifo.h | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libavutil/fifo.h b/libavutil/fifo.h index 6c6bd78842..89872d0972 100644 --- a/libavutil/fifo.h +++ b/libavutil/fifo.h @@ -97,7 +97,13 @@ void av_fifo_auto_grow_limit(AVFifo *f, size_t max_elems); size_

[FFmpeg-devel] Matroska and output_ts_offset

2022-08-29 Thread Peter Zebühr
Hello, I noticed the other day that if I try to mux opus in webm with a timestamp offset set I don't get the expected timestamps out on my packets. Example: ffmpeg -f lavfi -i "sine=frequency=1000:duration=60" -output_ts_offset 200ms -c:a libopus sine_200ms_offset.webm Now if I inspect

Re: [FFmpeg-devel] Matroska and output_ts_offset

2022-08-29 Thread Andreas Rheinhardt
Peter Zebühr: > Hello, > > I noticed the other day that if I try to mux opus in webm with a timestamp > offset set I don't get the expected timestamps out on my packets. Example: > > ffmpeg -f lavfi -i "sine=frequency=1000:duration=60" -output_ts_offset > 200ms -c:a libopus sine_200ms_off

[FFmpeg-devel] [PATCH 1/2] avformat/file: Add a specialized url_check callback for pipe protocol

2022-08-29 Thread Neil Roberts
Using file_check for the pipe protocol doesn't make sense. For example, for a URL like “pipe:0” it would end up checking whether the “pipe:0” file exists. This patch instead makes it check the access modes on the corresponding file descriptor using fcntl. Signed-off-by: Neil Roberts --- libavfor

[FFmpeg-devel] [PATCH 2/2] avformat/tests: Add a test for avio_check with the pipe protocol

2022-08-29 Thread Neil Roberts
Creates a UNIX pipe and then verifies that avio_check returns the right access flags for the two ends of the pipe. Signed-off-by: Neil Roberts --- libavformat/Makefile | 1 + libavformat/tests/.gitignore | 1 + libavformat/tests/pipe.c | 101 +++ t

Re: [FFmpeg-devel] Matroska and output_ts_offset

2022-08-29 Thread Peter Zebühr
> On 29 Aug 2022, at 16:37, Andreas Rheinhardt > wrote: > > The Matroska muxer is buggy wrt. to the ts_offset relating to codec > delay. You can see it in lines 1839-1841 which are commented out. > Commenting them out happened in commit > 82e4f39883932c1b1e5c7792a1be12dec6ab603d, merging the lib

Re: [FFmpeg-devel] [PATCH 2/3] lavu/fifo: clarify interaction of AV_FIFO_FLAG_AUTO_GROW with av_fifo_can_write()

2022-08-29 Thread James Almer
On 8/29/2022 11:07 AM, Anton Khirnov wrote: --- libavutil/fifo.h | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libavutil/fifo.h b/libavutil/fifo.h index 6c6bd78842..89872d0972 100644 --- a/libavutil/fifo.h +++ b/libavutil/fifo.h @@ -97,7 +97,13 @@ void av_fifo_auto

Re: [FFmpeg-devel] Matroska and output_ts_offset

2022-08-29 Thread Andreas Rheinhardt
Peter Zebühr: >> On 29 Aug 2022, at 16:37, Andreas Rheinhardt >> wrote: >> >> The Matroska muxer is buggy wrt. to the ts_offset relating to codec >> delay. You can see it in lines 1839-1841 which are commented out. >> Commenting them out happened in commit >> 82e4f39883932c1b1e5c7792a1be12dec6ab6

Re: [FFmpeg-devel] [PATCH] avcodec/vpx_rac: Adjust vpx_rac_is_end) threshold

2022-08-29 Thread Andreas Rheinhardt
Michael Niedermayer: > A threshold of 180 is needed and sufficient for the sample, twice this is > used to > cover potentially worse samples > > fate/vp5 changes as the sample file is truncated and the damaged part is > handled > differently > > Fixes: ticket #9754 > > Signed-off-by: Michael N

Re: [FFmpeg-devel] [PATCH 2/3] lavu/fifo: clarify interaction of AV_FIFO_FLAG_AUTO_GROW with av_fifo_can_write()

2022-08-29 Thread James Almer
On 8/29/2022 12:00 PM, James Almer wrote: On 8/29/2022 11:07 AM, Anton Khirnov wrote: ---   libavutil/fifo.h | 8 +++-   1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libavutil/fifo.h b/libavutil/fifo.h index 6c6bd78842..89872d0972 100644 --- a/libavutil/fifo.h +++ b/libavuti

Re: [FFmpeg-devel] [PATCH 1/3] lavu/fifo: add the header to its own doxy group

2022-08-29 Thread Michael Niedermayer
On Mon, Aug 29, 2022 at 04:07:15PM +0200, Anton Khirnov wrote: > Also, drop mentions of it being a circular buffer, as this is an > internal implementation detail that should be invisible to the caller. > --- > libavutil/fifo.h | 15 ++- > 1 file changed, 14 insertions(+), 1 deletion(-

Re: [FFmpeg-devel] [PATCH 2/3] lavu/fifo: clarify interaction of AV_FIFO_FLAG_AUTO_GROW with av_fifo_can_write()

2022-08-29 Thread Marvin Scholz
On 29 Aug 2022, at 18:03, James Almer wrote: > On 8/29/2022 12:00 PM, James Almer wrote: >> On 8/29/2022 11:07 AM, Anton Khirnov wrote: >>> --- >>>   libavutil/fifo.h | 8 +++- >>>   1 file changed, 7 insertions(+), 1 deletion(-) >>> >>> diff --git a/libavutil/fifo.h b/libavutil/fifo.h >>> in

Re: [FFmpeg-devel] [PATCH 1/2] avformat/file: Add a specialized url_check callback for pipe protocol

2022-08-29 Thread Michael Niedermayer
On Mon, Aug 29, 2022 at 04:43:19PM +0200, Neil Roberts wrote: > Using file_check for the pipe protocol doesn't make sense. For example, > for a URL like “pipe:0” it would end up checking whether the “pipe:0” > file exists. This patch instead makes it check the access modes on the > corresponding fi

Re: [FFmpeg-devel] [PATCH] avcodec/vpx_rac: Adjust vpx_rac_is_end) threshold

2022-08-29 Thread Michael Niedermayer
On Mon, Aug 29, 2022 at 05:29:03PM +0200, Andreas Rheinhardt wrote: > Michael Niedermayer: > > A threshold of 180 is needed and sufficient for the sample, twice this is > > used to > > cover potentially worse samples > > > > fate/vp5 changes as the sample file is truncated and the damaged part is

Re: [FFmpeg-devel] Converting build to CMake

2022-08-29 Thread Jaime Rios
I might take a look at the dependencies and see what projects could be converted to CMake first, before even thinking about ffmpeg. On Sun, Aug 28, 2022 at 10:15 PM Martijn van Beurden wrote: > Op ma 29 aug. 2022 om 01:17 schreef Jaime Rios : > > > The reason I ask is that I am not a fan of ha

[FFmpeg-devel] [PATCH] avcodec: add a bsf to reorder DTS into PTS

2022-08-29 Thread James Almer
Starting with an h264 implementation. Can be extended to support other codecs. Addresses ticket #502. Signed-off-by: James Almer --- configure | 1 + libavcodec/Makefile| 1 + libavcodec/bitstream_filters.c | 1 + libavcodec/dts2pts_bsf.c | 477 +

Re: [FFmpeg-devel] [PATCH 2/3] lavu/fifo: clarify interaction of AV_FIFO_FLAG_AUTO_GROW with av_fifo_can_write()

2022-08-29 Thread Anton Khirnov
Quoting James Almer (2022-08-29 17:00:54) > On 8/29/2022 11:07 AM, Anton Khirnov wrote: > > --- > > libavutil/fifo.h | 8 +++- > > 1 file changed, 7 insertions(+), 1 deletion(-) > > > > diff --git a/libavutil/fifo.h b/libavutil/fifo.h > > index 6c6bd78842..89872d0972 100644 > > --- a/libavu