Re: [FFmpeg-devel] [PATCH] lavu/pixdesc: favour formats where bit depth exactly matches

2022-09-08 Thread Xiang, Haihao
On Thu, 2022-09-08 at 20:46 -0700, Philip Langdale wrote: > Since introducing the various packed formats used by VAAPI (and p012), > we've noticed that there's actually a gap in how > av_find_best_pix_fmt_of_2 works. It doesn't actually assign any value > to having the same bit depth as the source

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

2022-09-08 Thread Hao Chen
ffmpeg -i 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 + libswscale/loon

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

2022-09-08 Thread Hao Chen
ffmpeg -i 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 | 202 libswscale/loongarch/swscale_init_loongarch.c

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

2022-09-08 Thread Hao Chen
v2: Some modifications were made according to the comments of the reviewers. v3: Update and run CI test again. v4: Resolve the warning for the build. [PATCH v4 1/3] swscale/la: Optimize hscale functions with lasx. [PATCH v4 2/3] swscale/la: Add yuv2rgb_lasx.c and rgb2rgb_lasx.c [PATCH v4 3/3] swsc

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

2022-09-08 Thread Hao Chen
ffmpeg -i 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_loongarc

Re: [FFmpeg-devel] [PATCH 2/2] libavformat/hls: Free keys

2022-09-08 Thread Steven Liu
Michael Niedermayer 于2022年9月9日周五 06:45写道: > > Fixes: memleak > Fixes: > 50703/clusterfuzz-testcase-minimized-ffmpeg_dem_HLS_fuzzer-6399058578636800 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by: Michael Niedermayer > --

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

2022-09-08 Thread Hao Chen
ffmpeg -i 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 + libswscale/loon

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

2022-09-08 Thread Hao Chen
ffmpeg -i 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_loongarc

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

2022-09-08 Thread Hao Chen
ffmpeg -i 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 | 202 libswscale/loongarch/swscale_init_loongarch.c

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

2022-09-08 Thread Hao Chen
v2: Some modifications were made according to the comments of the reviewers. v3: Update and run CI test again. [PATCH v3 1/3] swscale/la: Optimize hscale functions with lasx. [PATCH v3 2/3] swscale/la: Add yuv2rgb_lasx.c and rgb2rgb_lasx.c [PATCH v3 3/3] swscale/la: Add output_lasx.c file. __

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

2022-09-08 Thread Shiyou Yin
> 2022年9月6日 16:12,Shiyou Yin 写道: > >> >> 2022年8月29日 20:30,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 >

Re: [FFmpeg-devel] [PATCH] swsresample/swresample: abort on invalid layouts

2022-09-08 Thread James Almer
On 9/8/2022 7:47 PM, Andreas Rheinhardt wrote: James Almer: If it's unsupported or invalid, then there's no point trying to rebuild it using a value that may have been derived from the same layout to begin with. Move the checks before the attempts at copying the layout while at it. Fixes ticke

Re: [FFmpeg-devel] [PATCH] swsresample/swresample: abort on invalid layouts

2022-09-08 Thread Andreas Rheinhardt
James Almer: > If it's unsupported or invalid, then there's no point trying to rebuild it > using a value that may have been derived from the same layout to begin with. > > Move the checks before the attempts at copying the layout while at it. > > Fixes ticket #9908. > > Signed-off-by: James Alm

[FFmpeg-devel] [PATCH 2/2] libavformat/hls: Free keys

2022-09-08 Thread Michael Niedermayer
Fixes: memleak Fixes: 50703/clusterfuzz-testcase-minimized-ffmpeg_dem_HLS_fuzzer-6399058578636800 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavformat/hls.c | 1 + 1 file changed, 1 insertion(+)

[FFmpeg-devel] [PATCH 1/2] tools/target_dec_fuzzer: Adjust threshold for UTVIDEO

2022-09-08 Thread Michael Niedermayer
Fixes: Timeout Fixes: 47969/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_UTVIDEO_fuzzer-5097256832860160 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- tools/target_dec_fuzzer.c | 1 + 1 file chang

[FFmpeg-devel] [PATCH] swsresample/swresample: abort on invalid layouts

2022-09-08 Thread James Almer
If it's unsupported or invalid, then there's no point trying to rebuild it using a value that may have been derived from the same layout to begin with. Move the checks before the attempts at copying the layout while at it. Fixes ticket #9908. Signed-off-by: James Almer --- libswresample/swresa

Re: [FFmpeg-devel] [PATCH 2/2] swscale/input: Avoid calls to av_pix_fmt_desc_get()

2022-09-08 Thread Andreas Rheinhardt
Michael Niedermayer: > On Thu, Sep 08, 2022 at 09:38:51PM +0200, Andreas Rheinhardt wrote: >> Michael Niedermayer: >>> Hi >>> >>> On Thu, Sep 08, 2022 at 04:38:11AM +0200, Andreas Rheinhardt wrote: Up until now, libswscale/input.c used a macro to read an input pixel which involved a call

Re: [FFmpeg-devel] [PATCH 2/3] avcodec/fmvc: buffer size is stride based not 4*width

2022-09-08 Thread Michael Niedermayer
On Sun, Sep 04, 2022 at 11:42:49PM +0200, Michael Niedermayer wrote: > On Fri, Sep 02, 2022 at 06:48:57PM +0200, Paul B Mahol wrote: > > On Fri, Sep 2, 2022 at 6:32 PM Michael Niedermayer > > wrote: > > > > > On Mon, Jun 13, 2022 at 09:13:19PM +0200, Michael Niedermayer wrote: > > > > On Mon, Jun

Re: [FFmpeg-devel] [PATCH 1/3] avcodec/fmvc: Move frame allocation to a later stage

2022-09-08 Thread Michael Niedermayer
On Sat, Jun 11, 2022 at 01:10:43AM +0200, Michael Niedermayer wrote: > This way more things are checked before allocation > > Signed-off-by: Michael Niedermayer > --- > libavcodec/fmvc.c | 21 +++-- > 1 file changed, 15 insertions(+), 6 deletions(-) will apply [...] -- Michael

[FFmpeg-devel] [PATCH v2] avcodec/jpeg2000: Add support for High-Throughput JPEG 2000 (HTJ2K) decoding.

2022-09-08 Thread etemesicaleb
From: caleb Rebased this patch on master branch --- libavcodec/Makefile|2 +- libavcodec/j2kenc.c| 26 +- libavcodec/jpeg2000.h | 103 ++- libavcodec/jpeg2000dec.c | 193 ++ libavcodec/jpeg2000htdec.c | 1212 libavcodec/jpeg

Re: [FFmpeg-devel] [PATCH 2/2] swscale/input: Avoid calls to av_pix_fmt_desc_get()

2022-09-08 Thread Michael Niedermayer
On Thu, Sep 08, 2022 at 09:38:51PM +0200, Andreas Rheinhardt wrote: > Michael Niedermayer: > > Hi > > > > On Thu, Sep 08, 2022 at 04:38:11AM +0200, Andreas Rheinhardt wrote: > >> Up until now, libswscale/input.c used a macro to read > >> an input pixel which involved a call to av_pix_fmt_desc_get(

Re: [FFmpeg-devel] [PATCH 1/1] fate/opus: add silk LBRR test (refs #9890)

2022-09-08 Thread Tristan Matthews
On Thu, Sep 8, 2022 at 3:58 PM Tristan Matthews wrote: > This adds a fate test for a sample with LBRR packets. > > It requires that these files be uploaded: > https://people.videolan.org/~tmatth/9890-fate/silk-lbrr.mka > https://people.videolan.org/~tmatth/9890-fate/silk-lbrr.dec > > --- > tests

[FFmpeg-devel] [PATCH 1/1] fate/opus: add silk LBRR test (refs #9890)

2022-09-08 Thread Tristan Matthews
This adds a fate test for a sample with LBRR packets. It requires that these files be uploaded: https://people.videolan.org/~tmatth/9890-fate/silk-lbrr.mka https://people.videolan.org/~tmatth/9890-fate/silk-lbrr.dec --- tests/fate/opus.mak | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

Re: [FFmpeg-devel] [PATCH 2/2] swscale/input: Avoid calls to av_pix_fmt_desc_get()

2022-09-08 Thread Andreas Rheinhardt
Michael Niedermayer: > Hi > > On Thu, Sep 08, 2022 at 04:38:11AM +0200, Andreas Rheinhardt wrote: >> Up until now, libswscale/input.c used a macro to read >> an input pixel which involved a call to av_pix_fmt_desc_get() >> to find out whether the input pixel format is BE or LE >> despite this bein

Re: [FFmpeg-devel] [PATCH 2/2] swscale/input: Avoid calls to av_pix_fmt_desc_get()

2022-09-08 Thread Michael Niedermayer
Hi On Thu, Sep 08, 2022 at 04:38:11AM +0200, Andreas Rheinhardt wrote: > Up until now, libswscale/input.c used a macro to read > an input pixel which involved a call to av_pix_fmt_desc_get() > to find out whether the input pixel format is BE or LE > despite this being known at compile-time (there

Re: [FFmpeg-devel] [PATCH] avfilter/vf_showinfo: remove backspaces

2022-09-08 Thread Michael Niedermayer
On Thu, Jul 21, 2022 at 08:28:04PM +0200, Michael Niedermayer wrote: > They mess with storing editing and comparing the results > > Signed-off-by: Michael Niedermayer > --- > libavfilter/vf_showinfo.c | 11 +++ > 1 file changed, 7 insertions(+), 4 deletions(-) will apply [...] -- Mich

Re: [FFmpeg-devel] [PATCH] avformat/matroska: Support HDR10+ metadata in Matroska.

2022-09-08 Thread Mohammad Izadi
Michael, I appreciate it if you can take a look and give me your feedback. On Thu, Sep 8, 2022 at 9:31 AM Michael Niedermayer wrote: > On Wed, Sep 07, 2022 at 02:12:46PM +0100, Derek Buitenhuis wrote: > > On 9/6/2022 10:47 PM, Mohammad Izadi wrote: > > > +if (side_data && side_data_size > 0

Re: [FFmpeg-devel] [PATCH] avformat/matroska: Support HDR10+ metadata in Matroska.

2022-09-08 Thread Michael Niedermayer
On Wed, Sep 07, 2022 at 02:12:46PM +0100, Derek Buitenhuis wrote: > On 9/6/2022 10:47 PM, Mohammad Izadi wrote: > > +if (side_data && side_data_size > 0) > > + > > ff_write_dynamic_hdr10_plus_to_full_itu_t_t35((AVDynamicHDRPlus*)side_data, > > &hdr10_plus_itu_t_t35, &hdr10_plus_itu_t_t

Re: [FFmpeg-devel] [PATCH] lavu: header and documentation for AVWriter

2022-09-08 Thread Anton Khirnov
Quoting Nicolas George (2022-09-07 15:30:09) > Anton Khirnov (12022-09-02): > > As I already said to you in private, I do not think the motivation and > > use cases for this have been sufficiently established. > > > > You claim this will bring massive advantages all over the place. You > > should

[FFmpeg-devel] [PATCH] avcodec/flac_parser: fix triggered assert

2022-09-08 Thread Paul B Mahol
Patch attached. From a726d0a26c9f60d65167a83789f9c222cfda5728 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Thu, 8 Sep 2022 09:59:09 +0200 Subject: [PATCH] avcodec/flac_parser: avoid returning too negative number If return value is very small parser code will assert. Signed-off-by: Paul B Ma

Re: [FFmpeg-devel] [PATCH v2] avformat/imfdec: check track valid before use it

2022-09-08 Thread Pierre-Anthony Lemieux
See [1] for a patchset that is intended to address the coverity issue and simplify error handling. [1] https://patchwork.ffmpeg.org/project/ffmpeg/patch/20220907200233.21255-1-...@sandflow.com/ On Sat, Aug 27, 2022 at 10:25 AM Pierre-Anthony Lemieux wrote: > > On Sat, Aug 27, 2022 at 5:25 AM St

[FFmpeg-devel] [PATCH v1 1/1] avfilter/vf_tonemap: add herimte tone mapping

2022-09-08 Thread mirsfang
From: mirs Signed-off-by: mirs add tonemapping hermite,this looks close real hdr display format patch email --- libavfilter/vf_tonemap.c | 65 1 file changed, 65 insertions(+) diff --git a/libavfilter/vf_tonemap.c b/libavfilter/vf_tonemap.c index d10

[FFmpeg-devel] [PATCH 2/2] avcodec/dca_core: Only call emms_c() if needed

2022-09-08 Thread Andreas Rheinhardt
It is not needed on x64, because the AV_COPY* and AV_ZERO* macros never use MMX on x64. Signed-off-by: Andreas Rheinhardt --- libavcodec/dca_core.c | 8 1 file changed, 8 insertions(+) diff --git a/libavcodec/dca_core.c b/libavcodec/dca_core.c index 1655116eed..bbf36ea678 100644 --- a/

[FFmpeg-devel] [PATCH 1/2] avutil/x86/intreadwrite: Add ability to detect whether MMX code is used

2022-09-08 Thread Andreas Rheinhardt
It can be used to call emms_c() only when needed. Signed-off-by: Andreas Rheinhardt --- libavutil/x86/intreadwrite.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavutil/x86/intreadwrite.h b/libavutil/x86/intreadwrite.h index 4061d19231..40f375b013 100644 --- a/libavutil/x86/intreadwr

[FFmpeg-devel] Fix bugs on Mips platform.

2022-09-08 Thread Hao Chen
[PATCH v1 1/2] Fix bugs in me_cmp_msa.c file. [PATCH v1 2/2] Fix hevc decoding bugs on MIPS paltform. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpe

[FFmpeg-devel] [PATCH v1 1/2] Fix bugs in me_cmp_msa.c file.

2022-09-08 Thread Hao Chen
From: Lu Wang This patch fixes a bug where the fate-checkasm-motion fails when h is not a multiple of 8. --- libavcodec/mips/me_cmp_msa.c | 201 ++- 1 file changed, 173 insertions(+), 28 deletions(-) diff --git a/libavcodec/mips/me_cmp_msa.c b/libavcodec/mips/me_

[FFmpeg-devel] [PATCH v1 1/1] avfilter/vf_tonemap: add herimte tone mapping

2022-09-08 Thread mirsfang
From: mirs Signed-off-by: mirs add tonemapping hermite,this looks close real hdr display --- libavfilter/vf_tonemap.c | 65 1 file changed, 65 insertions(+) diff --git a/libavfilter/vf_tonemap.c b/libavfilter/vf_tonemap.c index d1087e6bd9..3fb2bdfa2c

Re: [FFmpeg-devel] [PATCH] avcodec: Vorbis decode: don't use a flag to determine if frames have been output

2022-09-08 Thread Paul B Mahol
On 9/8/22, jyrk...@nekonyansoft.com wrote: > From: Jyrki Vesterinen > > If a developer using FFmpeg libraries seeks into an earlier position and > calls > avcodec_flush_buffers() afterwards as recommended, the Vorbis decoder will > drop > the next frame, since buffer flushing clears the first_fra

[FFmpeg-devel] [PATCH] avcodec: Vorbis decode: don't use a flag to determine if frames have been output

2022-09-08 Thread jyrkive
From: Jyrki Vesterinen If a developer using FFmpeg libraries seeks into an earlier position and calls avcodec_flush_buffers() afterwards as recommended, the Vorbis decoder will drop the next frame, since buffer flushing clears the first_frame flag. As a result, the audio samples the calling code

Re: [FFmpeg-devel] [PATCH] avcodec: Vorbis decode: don't use a flag to determine if frames have been output

2022-09-08 Thread jyrkive
Thanks, Paul. I'm not very familiar with the FFmpeg codebase. This new patch attempts to implement your suggestion. Works fine in my tests, at least. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

[FFmpeg-devel] [PATCH] ffmpeg: fix increment of sync_opts

2022-09-08 Thread Xiaolei Yu
The encoder time base could been overridden by the command line argument and may not always be 1/ost->frame_rate. --- fftools/ffmpeg.c | 2 +- tests/fate/ffmpeg.mak| 5 + tests/ref/fate/enc_time_base-vfr | 25 + 3 files changed, 31 insertio

Re: [FFmpeg-devel] [PATCH] avcodec: Vorbis decode: don't use a flag to determine if frames have been output

2022-09-08 Thread Paul B Mahol
On Thu, Sep 8, 2022 at 10:26 AM wrote: > From: Jyrki Vesterinen > > If a developer using FFmpeg libraries seeks into an earlier position and > calls > avcodec_flush_buffers() afterwards as recommended, the Vorbis decoder will > drop > the next frame, since buffer flushing clears the first_frame

[FFmpeg-devel] [PATCH] avcodec: Vorbis decode: don't use a flag to determine if frames have been output

2022-09-08 Thread jyrkive
From: Jyrki Vesterinen If a developer using FFmpeg libraries seeks into an earlier position and calls avcodec_flush_buffers() afterwards as recommended, the Vorbis decoder will drop the next frame, since buffer flushing clears the first_frame flag. As a result, the audio samples the calling code