Re: [FFmpeg-devel] [PATCH v2 1/2] avutil/frame: Add av_frame_copy_side_data() and av_frame_remove_all_side_data()

2022-11-27 Thread Xiang, Haihao
On Thu, 2022-11-03 at 11:41 +, softworkz wrote: > From: softworkz > > Signed-off-by: softworkz > Signed-off-by: Anton Khirnov > --- > doc/APIchanges | 4 +++ > libavutil/frame.c | 67 +++-- > libavutil/frame.h | 32 ++ >

[FFmpeg-devel] [PATCH v2 4/4] lavfi/vf_vpp_qsv: scale_mode can be applied to color conversion

2022-11-27 Thread Xiang, Haihao
From: Haihao Xiang Signed-off-by: Haihao Xiang --- libavfilter/vf_vpp_qsv.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavfilter/vf_vpp_qsv.c b/libavfilter/vf_vpp_qsv.c index 4a053f9145..a14b3de7b5 100644 --- a/libavfilter/vf_vpp_qsv.c +++ b/libavfilter/vf_vpp

[FFmpeg-devel] [PATCH v2 3/4] lavfi/qsvvpp: provide a default framerate if needed

2022-11-27 Thread Xiang, Haihao
From: Haihao Xiang VPP in the SDK requires the frame rate to be set to a valid value, otherwise init will fail, so always set a default framerate when the input link doesn't have a valid framerate. Signed-off-by: Haihao Xiang --- libavfilter/qsvvpp.c | 8 1 file changed, 8 insertions(

[FFmpeg-devel] [PATCH v2 2/4] lavfi/qsvvpp: avoid overriding the returned value

2022-11-27 Thread Xiang, Haihao
From: Haihao Xiang It means more than one output is ready when MFXVideoVPP_RunFrameVPPAsync() returns MFX_ERR_MORE_SURFACE [1]. Currently the returned value from MFXVideoVPP_RunFrameVPPAsync() might be overridden, so the check of 'ret == MFX_ERR_MORE_SURFACE' is always false when MFX_ERR_MORE_SUR

[FFmpeg-devel] [PATCH v2 1/4] lavfi/qsvvpp: change the output frame's width and height

2022-11-27 Thread Xiang, Haihao
From: "Chen,Wenbin" Make sure the size of the output frame always matches the agreed upon image size. Signed-off-by: Wenbin Chen --- libavfilter/qsvvpp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libavfilter/qsvvpp.c b/libavfilter/qsvvpp.c index 8428ee89ab..bf719

[FFmpeg-devel] [PATCH v2] lavc/qsvenc_h264: don't support P010 format

2022-11-27 Thread Xiang, Haihao
From: Haihao Xiang The SDK will return error if feeding h264_qsv encoder p010 input. $ ffmpeg -f lavfi -i testsrc -vf "format=p010" -c:v h264_qsv -f null - [...] [h264_qsv @ 0x55584888b080] Current pixel format is unsupported [h264_qsv @ 0x55584888b080] some encoding parameters are not supported

Re: [FFmpeg-devel] [PATCH] lavc/qsvenc_h264: don't support P010 format

2022-11-27 Thread Xiang, Haihao
On Sat, 2022-11-26 at 02:54 +, Soft Works wrote: > > -Original Message- > > From: ffmpeg-devel On Behalf Of > > James Almer > > Sent: Saturday, November 26, 2022 3:36 AM > > To: ffmpeg-devel@ffmpeg.org > > Subject: Re: [FFmpeg-devel] [PATCH] lavc/qsvenc_h264: don't support > > P010 for

Re: [FFmpeg-devel] [PATCH 1/3] avcodec/mpeg12dec: Check input size

2022-11-27 Thread Kieran Kunhya
On Sun, 27 Nov 2022 at 22:34, Michael Niedermayer wrote: > Fixes: Timeout > Fixes: > 53599/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IPU_fuzzer-4950102511058944 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by >

Re: [FFmpeg-devel] [PATCH 1/3] avutil/tx: Use unsigned in ff_tx_fft_sr_combine() to avoid undefined behavior

2022-11-27 Thread Michael Niedermayer
On Tue, Nov 22, 2022 at 12:58:21AM +0100, Michael Niedermayer wrote: > Fixes: signed integer overflow: -1284837070 - 982101618 cannot be represented > in type 'int' > Fixes: > 53105/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AC3_FIXED_fuzzer-4848015827664896 > > Found-by: continuous fuzzi

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/pictordec: Check that the image fits in the input

2022-11-27 Thread Michael Niedermayer
On Sat, Nov 26, 2022 at 10:42:30AM +1100, Peter Ross wrote: > On Fri, Nov 25, 2022 at 03:11:32PM +0100, Anton Khirnov wrote: > > Quoting Michael Niedermayer (2022-11-25 14:38:46) > > > t On Fri, Nov 25, 2022 at 05:45:29PM +1100, Peter Ross wrote: > > > > On Tue, Nov 22, 2022 at 11:56:51PM +0100,

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/ffv1dec: restructure slice coordinate reading a bit

2022-11-27 Thread Michael Niedermayer
On Tue, Nov 22, 2022 at 11:56:52PM +0100, Michael Niedermayer wrote: > Fixes: signed integer overflow: -1094995528 * 8224 cannot be represented in > type 'int' > Fixes: > 53508/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFV1_fuzzer-474551033462784 > > Found-by: continuous fuzzing process

[FFmpeg-devel] [PATCH 3/3] tools/target_dec_fuzzer: Adjust threshold for RSCC

2022-11-27 Thread Michael Niedermayer
Fixes: Timeout Fixes: 53681/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RSCC_fuzzer-6627455180079104 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 changed,

[FFmpeg-devel] [PATCH 2/3] avcodec/vqcdec: Check width & 15

2022-11-27 Thread Michael Niedermayer
Various parts of the code assume that width can be divided by various powers of 2 without rounding Fixes: out of array access Fixes: 53623/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VQC_fuzzer-6209269924233216 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/

[FFmpeg-devel] [PATCH 1/3] avcodec/mpeg12dec: Check input size

2022-11-27 Thread Michael Niedermayer
Fixes: Timeout Fixes: 53599/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IPU_fuzzer-4950102511058944 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/mpeg12dec.c | 3 +++ 1 file changed, 3

[FFmpeg-devel] [PATCH 2/2] avcodec/libfdk-aacenc: add support for 6.1(back) channel layout

2022-11-27 Thread James Almer
Signed-off-by: James Almer --- libavcodec/libfdk-aacenc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/libfdk-aacenc.c b/libavcodec/libfdk-aacenc.c index dc2ac377d0..4aaeb1aeaa 100644 --- a/libavcodec/libfdk-aacenc.c +++ b/libavcodec/libfdk-aacenc.c @@ -190,6 +190,7 @@ static

[FFmpeg-devel] [PATCH 1/2] avcodec/libfdk-aacenc: add support for 7.1(top) channel layout

2022-11-27 Thread James Almer
Signed-off-by: James Almer --- libavcodec/libfdk-aacenc.c | 4 1 file changed, 4 insertions(+) diff --git a/libavcodec/libfdk-aacenc.c b/libavcodec/libfdk-aacenc.c index d589964453..dc2ac377d0 100644 --- a/libavcodec/libfdk-aacenc.c +++ b/libavcodec/libfdk-aacenc.c @@ -195,6 +195,8 @@ stati

Re: [FFmpeg-devel] [PATCH] avfilter: add showcwt multimedia filter

2022-11-27 Thread Paul B Mahol
On 11/26/22, Paul B Mahol wrote: > On 11/25/22, Paul B Mahol wrote: >> Hello, >> >> Patch attached. >> > > Improved patch attached. > > Added slide & direction options. > Gonna push soon. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ff

Re: [FFmpeg-devel] [PATCH 30/30] lavc/libaomenc: pass through frame durations to encoded packets

2022-11-27 Thread James Almer
On 11/27/2022 2:03 PM, Anton Khirnov wrote: --- libavcodec/libaomenc.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libavcodec/libaomenc.c b/libavcodec/libaomenc.c index bd576fdd3a..c117ca4ee6 100644 --- a/libavcodec/libaomenc.c +++ b/libavcodec/libaomenc.c @@ -10

Re: [FFmpeg-devel] [PATCH 17/30] lavc: support AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE in all no-delay encoders

2022-11-27 Thread James Almer
On 11/27/2022 2:03 PM, Anton Khirnov wrote: diff --git a/libavcodec/encode.c b/libavcodec/encode.c index 7e2d54ae9b..e4270b6c34 100644 --- a/libavcodec/encode.c +++ b/libavcodec/encode.c @@ -220,6 +220,18 @@ int ff_encode_encode_cb(AVCodecContext *avctx, AVPacket *avpkt, av

Re: [FFmpeg-devel] [PATCH 17/30] lavc: support AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE in all no-delay encoders

2022-11-27 Thread Anton Khirnov
Quoting Michael Niedermayer (2022-11-27 18:43:49) > On Sun, Nov 27, 2022 at 06:03:38PM +0100, Anton Khirnov wrote: > > --- > [...] > > diff --git a/libavcodec/libilbc.c b/libavcodec/libilbc.c > > index 9ef6e16bc5..0787b5c313 100644 > > --- a/libavcodec/libilbc.c > > +++ b/libavcodec/libilbc.c > > @

Re: [FFmpeg-devel] Ping on help output, logging and VAAPI overlay

2022-11-27 Thread Soft Works
Friendly reminder on these two: > Print filter input/output formats in help output > https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=7737 > > > Add option to log timing > https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=7290 Thanks, softworkz _

Re: [FFmpeg-devel] [PATCH v3 0/5] Fix FFmpeg compilation without DCE

2022-11-27 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of > Carl Eugen Hoyos > Sent: Sunday, November 27, 2022 6:45 PM > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [PATCH v3 0/5] Fix FFmpeg compilation > without DCE > > Am So., 27. Nov.

Re: [FFmpeg-devel] [PATCH v3 0/5] Fix FFmpeg compilation without DCE

2022-11-27 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of > Hendrik Leppkes > Sent: Sunday, November 27, 2022 6:51 PM > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [PATCH v3 0/5] Fix FFmpeg compilation > without DCE > > > > > And does ru

Re: [FFmpeg-devel] [PATCH v3 0/5] Fix FFmpeg compilation without DCE

2022-11-27 Thread Carl Eugen Hoyos
Am So., 27. Nov. 2022 um 18:16 Uhr schrieb Soft Works : > > > > > -Original Message- > > From: ffmpeg-devel On Behalf Of > > Carl Eugen Hoyos > > Sent: Sunday, November 27, 2022 5:47 PM > > To: FFmpeg development discussions and patches > de...@ffmpeg.org> > > Subject: Re: [FFmpeg-devel]

Re: [FFmpeg-devel] [PATCH v3 0/5] Fix FFmpeg compilation without DCE

2022-11-27 Thread Hendrik Leppkes
> > And does running configure output VS project files, so that > you can compile inside VS (I think this existed at some > earlier time at least, but I was under the impression that > it's broken)..? > This was never a feature, and likely never will be. We have our own build system and its the on

Re: [FFmpeg-devel] [PATCH]configure: Assume target-os=win32 for toolchain msvc

2022-11-27 Thread Carl Eugen Hoyos
Am So., 27. Nov. 2022 um 18:16 Uhr schrieb Hendrik Leppkes : > > On Sun, Nov 27, 2022 at 6:13 PM Carl Eugen Hoyos wrote: > > > > Hi! > > > > Attached patch slightly simplifies building with MSVC. > > > > Please comment, Carl Eugen > > I don't think any toolchain value should make assumptions about

Re: [FFmpeg-devel] [PATCH 17/30] lavc: support AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE in all no-delay encoders

2022-11-27 Thread Michael Niedermayer
On Sun, Nov 27, 2022 at 06:03:38PM +0100, Anton Khirnov wrote: > --- [...] > diff --git a/libavcodec/libilbc.c b/libavcodec/libilbc.c > index 9ef6e16bc5..0787b5c313 100644 > --- a/libavcodec/libilbc.c > +++ b/libavcodec/libilbc.c > @@ -126,7 +126,8 @@ const FFCodec ff_libilbc_decoder = {

[FFmpeg-devel] [PATCH] lavc/videotoolbox: validate vt context in the decoder callback

2022-11-27 Thread Alessandro Di Nepi
The commit d7f4ad88a0df3c1339e142957bf2c40cd056b8ce introduced a race condition where the passed opaque pointer reference might be NULL, when the decoding process starts. This patch checks that vtctx has a value before accessing it. This patch fixes #10079. Signed-off-by: Alessandro Di Nepi ---

Re: [FFmpeg-devel] [PATCH]configure: Assume target-os=win32 for toolchain msvc

2022-11-27 Thread Hendrik Leppkes
On Sun, Nov 27, 2022 at 6:13 PM Carl Eugen Hoyos wrote: > > Hi! > > Attached patch slightly simplifies building with MSVC. > > Please comment, Carl Eugen I don't think any toolchain value should make assumptions about the host it is running on, because between WSL and Wine, you can certainly do a

Re: [FFmpeg-devel] [PATCH v3 0/5] Fix FFmpeg compilation without DCE

2022-11-27 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of > Carl Eugen Hoyos > Sent: Sunday, November 27, 2022 5:47 PM > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [PATCH v3 0/5] Fix FFmpeg compilation > without DCE > > Am So., 27. Nov.

[FFmpeg-devel] [PATCH]configure: Assume target-os=win32 for toolchain msvc

2022-11-27 Thread Carl Eugen Hoyos
Hi! Attached patch slightly simplifies building with MSVC. Please comment, Carl Eugen 0001-configure-Assume-host-os-win32-for-toolchain-msvc.patch Description: Binary data ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailma

[FFmpeg-devel] [PATCH 04/30] lavc/libx264: factor out setting up ROI

2022-11-27 Thread Anton Khirnov
--- libavcodec/libx264.c | 143 +++ 1 file changed, 77 insertions(+), 66 deletions(-) diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index 8f03eecabf..470e9bc8c7 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -333,6 +333,79 @@ sta

[FFmpeg-devel] [PATCH 05/30] lavc/libx264: reindent after previous commit

2022-11-27 Thread Anton Khirnov
--- libavcodec/libx264.c | 104 +-- 1 file changed, 52 insertions(+), 52 deletions(-) diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index 470e9bc8c7..1e9ca73cdf 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -338,70 +338,70 @@ st

[FFmpeg-devel] [PATCH 28/30] lavc/libx264: pass through frame durations to encoded packets

2022-11-27 Thread Anton Khirnov
--- libavcodec/libx264.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index 8944a7df36..b87db78fb4 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -52,6 +52,7 @@ typedef struct X264Opaque { int64_t reordered_opaque; i

[FFmpeg-devel] [PATCH 17/30] lavc: support AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE in all no-delay encoders

2022-11-27 Thread Anton Khirnov
--- libavcodec/ac3enc_fixed.c | 2 +- libavcodec/ac3enc_float.c | 2 +- libavcodec/adpcmenc.c | 3 ++- libavcodec/alacenc.c| 3 ++- libavcodec/aliaspixenc.c| 2 +- libavcodec/aptxenc.c| 4 ++-- libavcodec/asvenc.c | 4 ++-- l

[FFmpeg-devel] [PATCH 23/30] lavc/ffv1enc: handle frame durations and AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE

2022-11-27 Thread Anton Khirnov
--- libavcodec/ffv1enc.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c index 0237ac48eb..553abb558f 100644 --- a/libavcodec/ffv1enc.c +++ b/libavcodec/ffv1enc.c @@ -1233,7 +1233,20 @@ static int encode_frame(AVCodec

[FFmpeg-devel] [PATCH 19/30] lavc/librav1e: handle frame durations and AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE

2022-11-27 Thread Anton Khirnov
--- libavcodec/librav1e.c | 61 +-- 1 file changed, 53 insertions(+), 8 deletions(-) diff --git a/libavcodec/librav1e.c b/libavcodec/librav1e.c index 4f424caf5b..669bfd5428 100644 --- a/libavcodec/librav1e.c +++ b/libavcodec/librav1e.c @@ -22,6 +22,7 @@

[FFmpeg-devel] [PATCH 11/30] lavc/libx264: use a local variable to shorten code

2022-11-27 Thread Anton Khirnov
--- libavcodec/libx264.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index 1819809a48..b680e2098e 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -410,6 +410,7 @@ static int setup_frame(AVCodecContext *

[FFmpeg-devel] [PATCH 18/30] lavc/encode: pass through frame durations to encoded packets

2022-11-27 Thread Anton Khirnov
The generic code can only handle the no-delay case. Encoders with delay need to be handled individually, which will be done in the following commits. --- doc/APIchanges | 2 +- libavcodec/avcodec.h | 7 +++ libavcodec/encode.c| 14 -- libavcodec/options_

[FFmpeg-devel] [PATCH 22/30] lavc/adxenc: support AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE

2022-11-27 Thread Anton Khirnov
--- libavcodec/adxenc.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/libavcodec/adxenc.c b/libavcodec/adxenc.c index e1bf344b01..9e0ceb61eb 100644 --- a/libavcodec/adxenc.c +++ b/libavcodec/adxenc.c @@ -185,6 +185,18 @@ static int adx_encode_frame(AVCodecCont

[FFmpeg-devel] [PATCH 20/30] lavc/nvenc: handle frame durations and AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE

2022-11-27 Thread Anton Khirnov
--- libavcodec/nvenc.c | 102 libavcodec/nvenc.h | 2 +- libavcodec/nvenc_av1.c | 3 +- libavcodec/nvenc_h264.c | 3 +- libavcodec/nvenc_hevc.c | 3 +- 5 files changed, 89 insertions(+), 24 deletions(-) diff --git a/libavcodec/nvenc.c b/

[FFmpeg-devel] [PATCH 16/30] lavc: add a codec flag for propagating opaque from frames to packets

2022-11-27 Thread Anton Khirnov
This is intended to be a more convenient replacement for reordered_opaque. Add support for it in the two encoders that offer AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE: libx264 and libx265. Other encoders will be supported in future commits. --- doc/APIchanges | 3 +++ libavcodec/avcodec.

[FFmpeg-devel] [PATCH 12/30] lavc/libx264: print an error on invalid opaque pointer

2022-11-27 Thread Anton Khirnov
--- libavcodec/libx264.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index b680e2098e..e8ca3d896b 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -596,6 +596,8 @@ static int X264_frame(AVCodecContext *ctx, AVPacket *pkt, const

[FFmpeg-devel] [PATCH 08/30] lavc/libx264: reindent after previous commit

2022-11-27 Thread Anton Khirnov
--- libavcodec/libx264.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index 8b4b986f12..f0f8990cf9 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -478,12 +478,12 @@ static int setup_frame(AVCodecContext

[FFmpeg-devel] [PATCH 14/30] lavc/libx264: do not leave an invalid array size on alloc error

2022-11-27 Thread Anton Khirnov
--- libavcodec/libx264.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index a1b044d4e9..2bbd9044b6 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -1107,8 +1107,10 @@ static av_cold int X264_init(AVCodecContext *

[FFmpeg-devel] [PATCH 25/30] lavc/pngenc: stop setting dts unnecessarily for APNG

2022-11-27 Thread Anton Khirnov
APNG is not marked as supporting reordering, so dts will be set from pts by the generic code. --- libavcodec/pngenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/pngenc.c b/libavcodec/pngenc.c index a54cfcdd69..009874cef5 100644 --- a/libavcodec/pngenc.c +++ b/li

[FFmpeg-devel] [PATCH 21/30] lavc/adxenc: rescale packet duration according to timebase

2022-11-27 Thread Anton Khirnov
The timebase does not always have to be 1/samplerate. --- libavcodec/adxenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/adxenc.c b/libavcodec/adxenc.c index 153c91b852..e1bf344b01 100644 --- a/libavcodec/adxenc.c +++ b/libavcodec/adxenc.c @@ -184,7 +184,7 @@ st

[FFmpeg-devel] [PATCH 15/30] lavc/libx265: restructure handling reordered_opaque

2022-11-27 Thread Anton Khirnov
Current code stores a pointer to allocated data in libx265 and frees it when the encoded packet is retrieved. This will leak if the packet is never retrieved, e.g. if the encoder is closed without being flushed. Restructure the code such that only indices to an array stored in our private data are

[FFmpeg-devel] [PATCH 30/30] lavc/libaomenc: pass through frame durations to encoded packets

2022-11-27 Thread Anton Khirnov
--- libavcodec/libaomenc.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libavcodec/libaomenc.c b/libavcodec/libaomenc.c index bd576fdd3a..c117ca4ee6 100644 --- a/libavcodec/libaomenc.c +++ b/libavcodec/libaomenc.c @@ -1094,6 +1094,7 @@ static int storeframe(AVCodecCon

[FFmpeg-devel] [PATCH 29/30] lavc/libx265: pass through frame durations to encoded packets

2022-11-27 Thread Anton Khirnov
--- libavcodec/libx265.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c index 7ba547a7e7..088ddef3fc 100644 --- a/libavcodec/libx265.c +++ b/libavcodec/libx265.c @@ -43,6 +43,7 @@ typedef struct ReorderedData { int64_t reordered_opaque; +

[FFmpeg-devel] [PATCH 10/30] lavc/libx264: reindent after previous commit

2022-11-27 Thread Anton Khirnov
--- libavcodec/libx264.c | 94 ++-- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index 342d07a829..1819809a48 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -338,13 +338,13 @@ st

[FFmpeg-devel] [PATCH 13/30] lavc/libx264: zero reordered opaque on alloc

2022-11-27 Thread Anton Khirnov
This is safer. --- libavcodec/libx264.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index e8ca3d896b..a1b044d4e9 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -1105,8 +1105,8 @@ static av_cold int X264_init(A

[FFmpeg-devel] [PATCH 27/30] lavc/libtheoraenc: stop setting dts unnecessarily

2022-11-27 Thread Anton Khirnov
Theora is not marked as supporting reordering, so dts will be set from pts by the generic code. --- libavcodec/libtheoraenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/libtheoraenc.c b/libavcodec/libtheoraenc.c index 9b8404ce31..e36a948511 100644 --- a/libavcod

[FFmpeg-devel] [PATCH 26/30] lavc/libtheoraenc: handle frame durations and AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE

2022-11-27 Thread Anton Khirnov
--- libavcodec/libtheoraenc.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/libavcodec/libtheoraenc.c b/libavcodec/libtheoraenc.c index da16c6372e..9b8404ce31 100644 --- a/libavcodec/libtheoraenc.c +++ b/libavcodec/libtheoraenc.c @@ -347,6 +347,19 @@ static

[FFmpeg-devel] [PATCH 24/30] lavc/pngenc: handle frame durations and AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE

2022-11-27 Thread Anton Khirnov
--- libavcodec/pngenc.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/libavcodec/pngenc.c b/libavcodec/pngenc.c index d1448bd0cd..a54cfcdd69 100644 --- a/libavcodec/pngenc.c +++ b/libavcodec/pngenc.c @@ -977,6 +977,19 @@ static int encode_apng(AVCodecContext

[FFmpeg-devel] [PATCH 07/30] lavc/libx264: do not ignore memory allocation errors

2022-11-27 Thread Anton Khirnov
--- libavcodec/libx264.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index f776d65588..8b4b986f12 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -468,21 +468,22 @@ static int setup_frame(AVCodecCon

[FFmpeg-devel] [PATCH 09/30] lavc/libx264: reorder control flow in setup_roi() to reduce nesting depth

2022-11-27 Thread Anton Khirnov
--- libavcodec/libx264.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index f0f8990cf9..342d07a829 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -338,13 +338,6 @@ static int setup_ro

[FFmpeg-devel] [PATCH 06/30] lavc/libx264: unify cleanup in setup_frame()

2022-11-27 Thread Anton Khirnov
--- libavcodec/libx264.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index 1e9ca73cdf..f776d65588 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -489,10 +489,8 @@ static int setup_frame(AVCode

[FFmpeg-devel] [PATCH 02/30] lavc/libx264: reindent after previous commit

2022-11-27 Thread Anton Khirnov
--- libavcodec/libx264.c | 260 +-- 1 file changed, 130 insertions(+), 130 deletions(-) diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index 009cad4bdf..36c36d0e09 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -358,157 +358,157 @

[FFmpeg-devel] [PATCH 03/30] lavc/libx264: use a local variable for input frame in setup_frame()

2022-11-27 Thread Anton Khirnov
--- libavcodec/libx264.c | 50 ++-- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index 36c36d0e09..8f03eecabf 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -337,7 +337,8 @@ stat

[FFmpeg-devel] [PATCH 01/30] lavc/libx264: factor out setting up the input frame

2022-11-27 Thread Anton Khirnov
X264_frame() is currently too large and complex. --- libavcodec/libx264.c | 45 +--- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index ca0b5a145b..009cad4bdf 100644 --- a/libavcodec/libx264.c ++

[FFmpeg-devel] [PATCH 3/3] avcodec/mediacodecenc: configure profile

2022-11-27 Thread Zhao Zhili
From: Zhao Zhili --- libavcodec/mediacodecenc.c | 5 + 1 file changed, 5 insertions(+) diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c index 693faca118..69246ad693 100644 --- a/libavcodec/mediacodecenc.c +++ b/libavcodec/mediacodecenc.c @@ -213,6 +213,11 @@ static av_co

[FFmpeg-devel] [PATCH 2/3] avcodec/mediacodec_wrapper: use hardcoded value of profiles from MediaCodecInfo

2022-11-27 Thread Zhao Zhili
From: Zhao Zhili Those are static const values and documented at https://developer.android.com/reference/android/media/MediaCodecInfo.CodecProfileLevel No runtime query is needed. Now the method can be used without JVM. --- libavcodec/mediacodec_wrapper.c | 98 +++--

[FFmpeg-devel] [PATCH 1/3] avcodec/mediacodecenc: add option to select codec by name

2022-11-27 Thread Zhao Zhili
From: Zhao Zhili --- libavcodec/mediacodecenc.c | 8 +++- libavcodec/version.h | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c index a4390a9df6..693faca118 100644 --- a/libavcodec/mediacodecenc.c +++ b/libav

Re: [FFmpeg-devel] [PATCH v3 0/5] Fix FFmpeg compilation without DCE

2022-11-27 Thread Carl Eugen Hoyos
Am So., 27. Nov. 2022 um 17:29 Uhr schrieb Soft Works : > How do you set this up when you are compiling with MSVC? My configure line to compile with MSVC is: $ src/configure --enable-gpl --toolchain=msvc --host-os=win32 But maybe I misunderstand your question? Carl Eugen ___

Re: [FFmpeg-devel] [PATCH v3 0/5] Fix FFmpeg compilation without DCE

2022-11-27 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of > Carl Eugen Hoyos > Sent: Sunday, November 27, 2022 4:52 PM > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [PATCH v3 0/5] Fix FFmpeg compilation > without DCE > > Am Sa., 26. Nov.

[FFmpeg-devel] [PATCH] lavc/videotoolbox: validate vt context in the decoder callback

2022-11-27 Thread Alessandro Di Nepi
The commit d7f4ad88a0df3c1339e142957bf2c40cd056b8ce introduced a race condition where the passed opaque pointer reference might be NULL, when the decoding process starts. This patch checks that vtctx has a value before accessing it. This patch fixes #10079. Signed-off-by: Alessandro Di Nepi ---

Re: [FFmpeg-devel] [PATCH v3 0/5] Fix FFmpeg compilation without DCE

2022-11-27 Thread Carl Eugen Hoyos
Am Sa., 26. Nov. 2022 um 20:17 Uhr schrieb L. E. Segovia : > > Hi again, > > Pinging again for review. I've asked for clarification about how should > the EXTERNAL_ checks be dealt with, but I've not received any > response here. As said before: I regularly compile with MSVC without this patch set

Re: [FFmpeg-devel] [PATCH v2 07/31] avutil: use av_dict_iterate

2022-11-27 Thread James Almer
On 11/26/2022 11:46 AM, Marvin Scholz wrote: --- libavutil/opt.c| 12 ++-- libavutil/tests/dict.c | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libavutil/opt.c b/libavutil/opt.c index a3940f47fb..0a909a8b22 100644 --- a/libavutil/opt.c +++ b/libavutil

Re: [FFmpeg-devel] [PATCH 07/31] avutil: use av_dict_iterate

2022-11-27 Thread James Almer
On 11/26/2022 11:42 AM, Marvin Scholz wrote: On 25 Nov 2022, at 13:50, Andreas Rheinhardt wrote: Marvin Scholz: --- libavutil/opt.c| 12 ++-- libavutil/tests/dict.c | 10 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/libavutil/opt.c b/libavut