Re: [FFmpeg-devel] [PATCH] avcodec/av1dec: check avctx->hwaccel when hwaccel pix_fmt selected

2020-09-28 Thread Xiang, Haihao
On Mon, 2020-09-28 at 23:35 -0300, James Almer wrote: > On 9/28/2020 11:33 PM, Xiang, Haihao wrote: > > On Sat, 2020-09-26 at 13:05 -0300, James Almer wrote: > > > On 9/25/2020 4:35 AM, Xiang, Haihao wrote: > > > > Since commit e46f34e8 was merged, I also saw the same error message when > > > > I >

[FFmpeg-devel] [PATCH v2 2/2] libswcale/input: use more accurate rgbf32 yuv conversions

2020-09-28 Thread mindmark
From: Mark Reid --- libswscale/input.c | 12 ++- tests/ref/fate/filter-pixfmts-scale | 8 +- tests/ref/fate/sws-floatimg-cmp | 122 ++-- 3 files changed, 70 insertions(+), 72 deletions(-) diff --git a/libswscale/input.c b/libswscale/input.c index

[FFmpeg-devel] [PATCH v2 1/2] libswscale/tests: add floatimg_cmp test

2020-09-28 Thread mindmark
From: Mark Reid changes since v1: - made into fate test - fixed c90 warnings - tests more intermediate formats - tested on BE mips too --- libswscale/Makefile | 1 + libswscale/tests/.gitignore | 1 + libswscale/tests/floatimg_cmp.c | 296 t

Re: [FFmpeg-devel] [PATCH] avcodec/av1dec: check avctx->hwaccel when hwaccel pix_fmt selected

2020-09-28 Thread James Almer
On 9/28/2020 11:33 PM, Xiang, Haihao wrote: > On Sat, 2020-09-26 at 13:05 -0300, James Almer wrote: >> On 9/25/2020 4:35 AM, Xiang, Haihao wrote: >>> Since commit e46f34e8 was merged, I also saw the same error message when I >>> tested my QSV av1 patch ( >>> http://ffmpeg.org/pipermail/ffmpeg-devel

Re: [FFmpeg-devel] [PATCH] lavc/qsvenc: let the SDK to choose the encoding mode by default

2020-09-28 Thread Xiang, Haihao
> it would be good to describe the change a bit more clearly, > something like: Allows MediaSDK *runtime *to choose LowPower/non-LowPower > modes, if not explicitly set. Thanks for the comment, I will update the commit log. Regards Haihao > regards > Max > > On Mon, Sep 28, 2020 at 9:32 AM Hai

Re: [FFmpeg-devel] [PATCH] avcodec/av1dec: check avctx->hwaccel when hwaccel pix_fmt selected

2020-09-28 Thread Xiang, Haihao
On Sat, 2020-09-26 at 13:05 -0300, James Almer wrote: > On 9/25/2020 4:35 AM, Xiang, Haihao wrote: > > On Fri, 2020-09-25 at 06:10 +, Wang, Fei W wrote: > > > > -Original Message- > > > > From: ffmpeg-devel On Behalf Of Wang, > > > > Fei W > > > > Sent: Tuesday, September 22, 2020 11:2

Re: [FFmpeg-devel] [PATCH 2/2] libswcale/input: fix incorrect rgbf32 yuv conversions

2020-09-28 Thread Mark Reid
On Mon, Sep 28, 2020 at 10:38 AM Michael Niedermayer wrote: > On Sat, Sep 26, 2020 at 10:01:30PM -0700, Mark Reid wrote: > > On Mon, Sep 14, 2020 at 6:31 PM Mark Reid wrote: > > > > > > > > > > > On Mon, Sep 14, 2020 at 2:44 PM Michael Niedermayer > > > > wrote: > > > > > >> On Sun, Sep 13, 202

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/mv30: Fix several integer overflows in idct_1d()

2020-09-28 Thread Michael Niedermayer
On Sun, Jul 26, 2020 at 12:16:37AM +0200, Michael Niedermayer wrote: > Fixes: signed integer overflow: -1846510390 + -361755993 cannot be > represented in type 'int' > Fixes: > 23941/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MV30_fuzzer-5654696631730176 > > Found-by: continuous fuzzing p

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/pgxdec: Fix invalid shift in write_frame_*

2020-09-28 Thread Michael Niedermayer
On Sun, Jul 26, 2020 at 04:43:12AM +0200, Andreas Rheinhardt wrote: > Michael Niedermayer: > > Fixes: left shift of negative value -121 > > Fixes: > > 23911/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PGX_fuzzer-4986800258154496 > > > > Found-by: continuous fuzzing process > > https://gith

Re: [FFmpeg-devel] [PATCH v2] avformat/movenc: handle tracks w/o AVStreams in calculate_mpeg4_bit_rates

2020-09-28 Thread Jan Ekström
On Mon, Sep 28, 2020 at 11:57 PM Jan Ekström wrote: > > The generated text streams for chapters lack an AVStream since they > are but an internal concept within movenc. > > Fixes #8190 Yes, I have now twice missed the fact that it is #8910 and not #8190. But fret not, I have noticed my mistake by

[FFmpeg-devel] [PATCH v2] avformat/movenc: handle tracks w/o AVStreams in calculate_mpeg4_bit_rates

2020-09-28 Thread Jan Ekström
The generated text streams for chapters lack an AVStream since they are but an internal concept within movenc. Fixes #8190 --- libavformat/movenc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 20768cd45f..c1ff922e88 100

[FFmpeg-devel] [PATCH] avcodec/qsv: Fix leak of options on error

2020-09-28 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/qsv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c index 7816d2f93c..6e3154e1a3 100644 --- a/libavcodec/qsv.c +++ b/libavcodec/qsv.c @@ -361,6 +361,7 @@ static int ff_qsv_set_display_hand

Re: [FFmpeg-devel] [PATCH 1/2] avformat/iff: Check data_size not overflowing int64

2020-09-28 Thread Michael Niedermayer
On Mon, Sep 28, 2020 at 08:30:50AM +1000, Peter Ross wrote: > On Sun, Sep 27, 2020 at 10:20:52PM +0200, Michael Niedermayer wrote: > > Fixes: Infinite loop > > Fixes: > > 25844/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5660803318153216 > > > > Found-by: continuous fuzzing process > >

[FFmpeg-devel] [PATCH 2/3] avformat/movenc: Don't forget to free fragment buffers

2020-09-28 Thread Andreas Rheinhardt
The buffers used when fragmented output is enabled have up until now not been freed in the deinit function; they leak e.g. if one errors out of mov_write_trailer() before one reaches the point where they are normally written out and freed. This can e.g. happen if allocating new vos_data fails at th

Re: [FFmpeg-devel] [PATCH 2/2] libswcale/input: fix incorrect rgbf32 yuv conversions

2020-09-28 Thread Michael Niedermayer
On Sat, Sep 26, 2020 at 10:01:30PM -0700, Mark Reid wrote: > On Mon, Sep 14, 2020 at 6:31 PM Mark Reid wrote: > > > > > > > On Mon, Sep 14, 2020 at 2:44 PM Michael Niedermayer > > wrote: > > > >> On Sun, Sep 13, 2020 at 04:04:42PM -0700, Mark Reid wrote: > >> > On Sun, Sep 13, 2020 at 8:55 AM Mi

[FFmpeg-devel] [PATCH 3/3] avformat/movenc: Avoid allocation for timecode track

2020-09-28 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/movenc.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index c12dd1e672..a481272ff1 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -6160,11 +6160,12 @@

[FFmpeg-devel] [PATCH 1/3] avformat/movenc: Free old vos_data before overwriting it

2020-09-28 Thread Andreas Rheinhardt
Otherwise the old data leaks whenever extradata needs to be rewritten (e.g. when encoding FLAC with our encoder that sends an updated extradata packet at the end). Signed-off-by: Andreas Rheinhardt --- libavformat/movenc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/movenc.c

Re: [FFmpeg-devel] [PATCH 2/2] libswcale/input: fix incorrect rgbf32 yuv conversions

2020-09-28 Thread Michael Niedermayer
On Sat, Sep 26, 2020 at 10:01:30PM -0700, Mark Reid wrote: > On Mon, Sep 14, 2020 at 6:31 PM Mark Reid wrote: > > > > > > > On Mon, Sep 14, 2020 at 2:44 PM Michael Niedermayer > > wrote: > > > >> On Sun, Sep 13, 2020 at 04:04:42PM -0700, Mark Reid wrote: > >> > On Sun, Sep 13, 2020 at 8:55 AM Mi

[FFmpeg-devel] [PATCH] avformat/movenc: exit calculate_mpeg4_bit_rates early if track lacks required values

2020-09-28 Thread Jan Ekström
Missed due to lack of FATE tests, but chapters are a movenc track w/o an AVStream. We also expect the codecpar in the track, which we are utilizing without checks. Thus, cause an early exit if it is missing as well. Fixes #8190 --- libavformat/movenc.c | 6 ++ 1 file changed, 6 insertions(+)

Re: [FFmpeg-devel] [PATCH] avformat/movenc: Fix segfault upon allocation error

2020-09-28 Thread Jan Ekström
On Mon, Sep 28, 2020 at 6:14 PM Andreas Rheinhardt wrote: > > Signed-off-by: Andreas Rheinhardt > --- > libavformat/movenc.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/libavformat/movenc.c b/libavformat/movenc.c > index 63adae5e0a..a90bbfa458 100644 > --- a/libavformat/movenc.c

[FFmpeg-devel] [PATCH] avformat/movenc: Fix segfault upon allocation error

2020-09-28 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/movenc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 63adae5e0a..a90bbfa458 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -6254,6 +6254,9 @@ static void mov_free(AVForm

Re: [FFmpeg-devel] [PATCH 18/25] avcodec/utils: Only call codec->close if init has been called

2020-09-28 Thread Michael Niedermayer
On Sat, Sep 26, 2020 at 12:27:57PM +0200, Andreas Rheinhardt wrote: > avcodec_open2() also called the AVCodec's close function if an error > happened before init had ever been called if the AVCodec has the > FF_CODEC_CAP_INIT_CLEANUP flag set. This is against the documentation of > said flag: "The

[FFmpeg-devel] [PATCH] avcodec/h264_slice: use av_buffer_replace() to simplify code

2020-09-28 Thread James Almer
Based on eff289ce9f030f023e218ee7ce354d4f0e035b6d. Signed-off-by: James Almer --- libavcodec/h264_slice.c | 34 -- 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c index db7302a8b5..74575bccd4 100644

Re: [FFmpeg-devel] [PATCH v2] avcodec/dpx: Read alternative frame rate from television header

2020-09-28 Thread Harry Mallon
> On 14 Aug 2020, at 11:03, Harry Mallon wrote: > > Signed-off-by: Harry Mallon > --- > libavcodec/dpx.c | 15 ++- > 1 file changed, 14 insertions(+), 1 deletion(-) > > diff --git a/libavcodec/dpx.c b/libavcodec/dpx.c > index b1833ed9ef..7e3ac0af2e 100644 > --- a/libavcodec/dpx.c >

Re: [FFmpeg-devel] [PATCH 1/8] avcodec/cbs: add a flush callback to CodedBitstreamType

2020-09-28 Thread James Almer
On 9/25/2020 11:43 AM, James Almer wrote: > Used to reset the codec's private internal state. > > Signed-off-by: James Almer > --- > libavcodec/cbs.c | 6 ++ > libavcodec/cbs.h | 5 + > libavcodec/cbs_internal.h | 3 +++ > 3 files changed, 14 insertions(+) Will apply t

Re: [FFmpeg-devel] [PATCH 2/3] avcodec/exr: Fix overflow with many blocks

2020-09-28 Thread Michael Niedermayer
On Sun, Sep 27, 2020 at 10:21:25AM +0200, Andreas Rheinhardt wrote: > Michael Niedermayer: > > Fixes: signed integer overflow: 1073741827 * 8 cannot be represented in > > type 'int' > > Fixes: > > 25621/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-6304841641754624 > > > > Found-b

[FFmpeg-devel] [PATCH] avformat/movenc: Don't free AVCodecParameters manually

2020-09-28 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/movenc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 20768cd45f..891c833520 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -6255,9 +6255,7 @@ static void

[FFmpeg-devel] [PATCH v2] avformat/movenc: Don't free AVCodecParameters manually

2020-09-28 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- Sorry, I missed that my tree is dirty before sending the last patch. libavformat/movenc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 20768cd45f..63adae5e0a 100644 --- a/libavformat

Re: [FFmpeg-devel] [PATCH] lavc/qsvenc: let the SDK to choose the encoding mode by default

2020-09-28 Thread Max Dmitrichenko
it would be good to describe the change a bit more clearly, something like: Allows MediaSDK *runtime *to choose LowPower/non-LowPower modes, if not explicitly set. regards Max On Mon, Sep 28, 2020 at 9:32 AM Haihao Xiang wrote: > The SDK may support LowPower and non-LowPower modes, some feature

[FFmpeg-devel] [PATCH] lavc/qsvenc: add support for Screen Content Coding (SCC) extension

2020-09-28 Thread Haihao Xiang
This patch adds support for SCC encoding on ICL+ platform Sample pipeline: ffmpeg -init_hw_device qsv=qsv:hw -f lavfi -i testsrc -vf \ "format=nv12,hwupload=extra_hw_frames=64,format=qsv" -c:v hevc_qsv \ -profile:v scc -low_power 1 out.h265 --- libavcodec/qsvenc.c | 3 +++ libavcodec/qsvenc_

[FFmpeg-devel] [PATCH] lavc/qsvenc: let the SDK to choose the encoding mode by default

2020-09-28 Thread Haihao Xiang
The SDK may support LowPower and non-LowPower modes, some features are available only under one of the two modes. It is hard for user to know whether a feature is supported under the given mode, so let the SDK to choose a mode for encoding by default. --- libavcodec/qsvenc.c | 6 -- libavcodec