[FFmpeg-devel] [PATCH v2 5/7] avcodec/mediacodecenc: remove the strategy to create DTS

2022-12-07 Thread Zhao Zhili
From: Zhao Zhili Use input PTS as DTS has multiple problems: 1. If there is no reordering, it's better to just use the output PTS as DTS, since encoder may change the timestamp value (do it on purpose or rounding error). 2. If there is reordering, input PTS should be shift a few frames as DTS to

[FFmpeg-devel] [PATCH v2 2/7] avcodec/mediacodecenc: add bitrate_mode option

2022-12-07 Thread Zhao Zhili
From: Zhao Zhili --- libavcodec/mediacodecenc.c | 25 + libavcodec/version.h | 2 +- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c index 4f9185342f..ec0e0b3a86 100644 --- a/libavcodec/mediacod

[FFmpeg-devel] [PATCH v2 3/7] avcodec/mediacodecenc: add level option

2022-12-07 Thread Zhao Zhili
From: Zhao Zhili --- libavcodec/mediacodecenc.c | 143 - libavcodec/version.h | 2 +- 2 files changed, 142 insertions(+), 3 deletions(-) diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c index ec0e0b3a86..2f78567451 100644 --- a/lib

[FFmpeg-devel] [PATCH v2 0/7] MediaCodec encoder: Fix width/height alignment issue and add more options

2022-12-07 Thread Zhao Zhili
From: Zhao Zhili v2: Reorder 1/7 and 2/7. Zhao Zhili (7): avcodec/mediacodecenc: make each encoder has its own option avcodec/mediacodecenc: add bitrate_mode option avcodec/mediacodecenc: add level option avcodec/mediacodecenc: use bsf to handle crop avcodec/mediacodecenc: remove the s

[FFmpeg-devel] [PATCH v2 1/7] avcodec/mediacodecenc: make each encoder has its own option

2022-12-07 Thread Zhao Zhili
From: Zhao Zhili --- libavcodec/mediacodecenc.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c index 69246ad693..4f9185342f 100644 --- a/libavcodec/mediacodecenc.c +++ b/libavcodec/mediacodecenc

[FFmpeg-devel] [PATCH v2 6/7] avcodec/mediacodecenc: add max-bframes support

2022-12-07 Thread Zhao Zhili
From: Zhao Zhili --- libavcodec/mediacodecenc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c index 8e28a50e0d..e9cff8167a 100644 --- a/libavcodec/mediacodecenc.c +++ b/libavcodec/mediacodecenc.c @@ -264,6 +264,8 @@ static av_cold i

[FFmpeg-devel] [PATCH v2 7/7] avcodec/mediacodecenc: add pts_as_dts option

2022-12-07 Thread Zhao Zhili
From: Zhao Zhili It works since most of Android devices don't output B frames by default. The behavior is documented by Android now, although there is some exception in history, which should have been fixed now. --- libavcodec/mediacodecenc.c | 8 libavcodec/version.h | 2 +- 2 fi

[FFmpeg-devel] [PATCH v2 4/7] avcodec/mediacodecenc: use bsf to handle crop

2022-12-07 Thread Zhao Zhili
From: Zhao Zhili It's well known that mediacodec encoder requires 16x16 alignment. Use our bsf to fix the crop info. --- configure | 2 ++ libavcodec/mediacodecenc.c | 65 +++--- 2 files changed, 63 insertions(+), 4 deletions(-) diff --git a/con

Re: [FFmpeg-devel] [PATCH] avfilter: add corr video filter

2022-12-07 Thread Paul B Mahol
Will apply in 5 minutes. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [FFmpeg-cvslog] avfilter/framesync: add a new option to set how to sync streams based on secondary input timestamps

2022-12-07 Thread Paul B Mahol
Ping. doc entry is still missing. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] [PATCH 2/2] avcodec/mjpegdec: add support for frame threading

2022-12-07 Thread Timo Rothenpieler
In my tests, this lead to a notable speed increase with the amount of threads used. Decoding a 720p sample gave the following results: 1 Thread: 1428 FPS 2 Threads: 2501 FPS 8 Threads: 7575 FPS Automatic: 11326 FPS (On a 16 Core/32 Threads system) --- libavcodec/jpeglsdec.c | 2 +- libavcodec/mj

[FFmpeg-devel] [PATCH 1/2] lavc: convert frame threading to the receive_frame() pattern

2022-12-07 Thread Timo Rothenpieler
From: Anton Khirnov Reorganize the code such that the frame threading code does not call the decoders directly, but instead calls back into the generic decoding code. This avoids duplicating the logic that wraps the decoder invocation and will be useful in the following commits. --- libavcodec/d

[FFmpeg-devel] [PATCH v2] lavc: convert frame threading to the receive_frame() pattern

2022-12-07 Thread Timo Rothenpieler
From: Anton Khirnov Reorganize the code such that the frame threading code does not call the decoders directly, but instead calls back into the generic decoding code. This avoids duplicating the logic that wraps the decoder invocation and will be useful in the following commits. --- libavcodec/d

[FFmpeg-devel] [PATCH v3] lavc: convert frame threading to the receive_frame() pattern

2022-12-07 Thread Timo Rothenpieler
From: Anton Khirnov Reorganize the code such that the frame threading code does not call the decoders directly, but instead calls back into the generic decoding code. This avoids duplicating the logic that wraps the decoder invocation and will be useful in the following commits. --- libavcodec/d

[FFmpeg-devel] [PATCH] configure: support lsan as toolchain

2022-12-07 Thread James Darnley
--- configure | 5 + 1 file changed, 5 insertions(+) diff --git a/configure b/configure index f4eedfc207..eaa5ef6b20 100755 --- a/configure +++ b/configure @@ -4315,6 +4315,11 @@ case "$toolchain" in add_cflags -fsanitize=address add_ldflags -fsanitize=address ;; +

Re: [FFmpeg-devel] Defect: MediaCodec Encoder - Pixel ColorSpace of many Adreno GPUs not supported

2022-12-07 Thread Zhao Zhili
> From: ffmpeg-devel On Behalf Of Ben Temple > Sent: 2022年12月7日 6:53 > To: ffmpeg-devel@ffmpeg.org; Zhao Zhili > Subject: [FFmpeg-devel] Defect: MediaCodec Encoder - Pixel ColorSpace of many > Adreno GPUs not supported > > MediaCodec Encoder: Pixel ColorSpace of many Adreno GPUs is not supporte

Re: [FFmpeg-devel] Defect: MediaCodec Encoder - Pixel ColorSpace of many Adreno GPUs not supported

2022-12-07 Thread Ben Temple
My apologies for using the incorrect channel. I mis-read the new ticket description that states that *patches* must come through the mailing list, not new tickets. I've created a ticket here: https://trac.ffmpeg.org/ticket/10096 where we can continue the discussion. As a quick side-note, using -p

[FFmpeg-devel] [PATCH 1/5] avcodec/mjpegdec: Restrict AVID MJPEG to non-SMVJPEG

2022-12-07 Thread Andreas Rheinhardt
AVID content is not supposed to be SMVJPEG; given that both these codecs involve manipulating image dimensions and cropping dimensions, it makes sense to restrict the AVID codepaths to non-SMVJPEG codecs in order not to have to think about what if SMVJPEG happens to have a codec tag indicating AVID

[FFmpeg-devel] [PATCH 2/5] avcodec/mjpegdec: Move special SMVJPEG-code to SMVJPEG-only function

2022-12-07 Thread Andreas Rheinhardt
This automatically avoids runtime checks for whether the decoder is SMVJPEG. Signed-off-by: Andreas Rheinhardt --- libavcodec/mjpegdec.c | 27 --- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 28e283907

[FFmpeg-devel] [PATCH 3/5] avcodec/mjpegdec: Avoid checks whose results are known at compile-time

2022-12-07 Thread Andreas Rheinhardt
Namely the result of the check for smv_next_frame > 0 in smv_process_frame(). Signed-off-by: Andreas Rheinhardt --- libavcodec/mjpegdec.c | 39 ++- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c in

[FFmpeg-devel] [PATCH 4/5] avcodec/mjpegdec: Only use receive_frame for SMVJPEG

2022-12-07 Thread Andreas Rheinhardt
Only one codec using mjpegdec.c actually creates multiple frames from a single packet, namely SMVJPEG. The other can use the ordinary decode callback just fine. This e.g. has the advantage of confining the special SP5X/AMV code to sp5xdec.c. This reverts most of commit e9a2a8777317d91af658f774c684

[FFmpeg-devel] [PATCH 5/5] avcodec/mjpegdec: Move smv_process_frame() to other SMV stuff

2022-12-07 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/mjpegdec.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index aa1a6b5208..ea6f724049 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/m

Re: [FFmpeg-devel] [PATCH v3] lavc: convert frame threading to the receive_frame() pattern

2022-12-07 Thread Michael Niedermayer
On Wed, Dec 07, 2022 at 02:20:23PM +0100, Timo Rothenpieler wrote: > From: Anton Khirnov > > Reorganize the code such that the frame threading code does not call the > decoders directly, but instead calls back into the generic decoding > code. This avoids duplicating the logic that wraps the deco

Re: [FFmpeg-devel] A question about http connections

2022-12-07 Thread Steven Liu
Basel Sayeh 于2022年12月6日周二 22:48写道: > > Hello > > I'm thinking of implementing code to check the server response for the > hls/dash encoders (incase the output was a URL). Hi Basel, What about check the message in libavformat/http? > > Is it ok to implement it inside hlsenc_io_close/dashenc_io_cl

Re: [FFmpeg-devel] [PATCH] lavfi/vf_scale_qsv: remove PI, PHI and E

2022-12-07 Thread Xiang, Haihao
On Wo, 2022-12-07 at 10:51 +0530, Gyan Doshi wrote: > > On 2022-12-07 08:13 am, Xiang, Haihao wrote: > > From: Haihao Xiang > > > > PI, PHI and E are defined in libavutil/eval.c, and user may use these > > constants for scale_qsv filter, so we needn't re-define these variables > > in vf_scale_qs

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

2022-12-07 Thread Peter Ross
On Sun, Nov 27, 2022 at 11:34:34PM +0100, Michael Niedermayer wrote: > 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-6209269924233

Re: [FFmpeg-devel] [PATCH] lavd/v4l2: add HEVC streams support

2022-12-07 Thread Dmitry Buzdyk
Reminder On Thu, 2022-11-10 at 01:40 +0600, Dima Buzdyk wrote: > Signed-off-by: Dima Buzdyk > --- >  libavcodec/hevc_parser.c  | 4 >  libavdevice/v4l2-common.c | 3 +++ >  libavdevice/v4l2.c    | 2 +- >  3 files changed, 8 insertions(+), 1 deletion(-) > > diff --git a/libavcodec/hevc_par

Re: [FFmpeg-devel] [RFC PATCH] lavd/v4l2: cover all bufer if bytesperline is set by driver

2022-12-07 Thread Dmitry Buzdyk
Reminder On Thu, 2022-11-10 at 01:36 +0600, Dima Buzdyk wrote: > Some drivers may set bytesperline if hardware use padding bytes for > alignment. In this case lavd/v4l2 will expect W*H bytes per frame, > but > driver will provide Pitch*H bytes which makes v4l2 unhappy. > > This change adjusts fra