Re: [FFmpeg-devel] [PATCH] avutil/frame: deprecate palette_has_changed

2023-05-17 Thread Anton Khirnov
Quoting James Almer (2023-05-18 03:45:09) > Not only this is information that relies on the concept of a sequence of > frames, which is completely out of place as a field in AVFrame, but its > usefulness is also very limited. I think the wording can be stronger: there are NO known or intended

Re: [FFmpeg-devel] [PATCH 6/6] fate/cbs: add tests for discard_units

2023-05-17 Thread Zhao Zhili
On Thu, 2023-05-18 at 05:23 +0800, Zhao Zhili wrote: > From: Zhao Zhili > > --- > tests/fate/cbs.mak | 28 ++ > tests/ref/fate/cbs-h264-discard-bidir| 37 + > tests/ref/fate/cbs-h264-discard-nonintra | 8 +++ >

[FFmpeg-devel] [PATCH] avutil/frame: deprecate palette_has_changed

2023-05-17 Thread James Almer
Not only this is information that relies on the concept of a sequence of frames, which is completely out of place as a field in AVFrame, but its usefulness is also very limited. Signed-off-by: James Almer --- doc/APIchanges | 3 +++ libavcodec/8bps.c | 13 -

Re: [FFmpeg-devel] [PATCH v2 1/4] cbs_av1: Add tracing headers for metadata types

2023-05-17 Thread Mark Thompson
On 23/02/2023 13:14, James Almer wrote: On 1/24/2023 7:46 PM, Mark Thompson wrote: Make it a little easier to interpret metadata in trace output. ---   libavcodec/cbs_av1_syntax_template.c | 10 ++   1 file changed, 10 insertions(+) ... Set LGTM. Set applied. (Apologies for the

Re: [FFmpeg-devel] [PATCH] avcodec/hevc_ps: add proper bound checks around cm_ref_layer_id in colour_mapping_table.

2023-05-17 Thread James Almer
On 5/17/2023 2:28 PM, Michael Niedermayer wrote: From: Clement Lecigne Signed-off-by: Michael Niedermayer --- libavcodec/hevc_ps.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c index a55bced0f7..313ebef151

Re: [FFmpeg-devel] [PATCH 30/36] fftools/ffmpeg_dec: deobfuscate subtitle decoding

2023-05-17 Thread Michael Niedermayer
On Wed, May 17, 2023 at 12:20:23PM +0200, Anton Khirnov wrote: > It is currently handled in the same loop as audio and video, but this > obscures the actual flow, because only one iteration is ever performed > for subtitles. > > Also, avoid a pointless packet reference. > --- >

Re: [FFmpeg-devel] [PATCH 31/36] fftools/ffmpeg_dec: restructure audio/video decoding loop

2023-05-17 Thread Michael Niedermayer
On Wed, May 17, 2023 at 10:04:09PM +0200, Michael Niedermayer wrote: > On Wed, May 17, 2023 at 12:20:24PM +0200, Anton Khirnov wrote: > > It currently emulates the long-removed > > avcodec_decode_audio4/avcodec_decode_video2 APIs, which obfuscates the > > actual decoding flow. Restructure the

Re: [FFmpeg-devel] [PATCH 31/36] fftools/ffmpeg_dec: restructure audio/video decoding loop

2023-05-17 Thread Michael Niedermayer
On Wed, May 17, 2023 at 12:20:24PM +0200, Anton Khirnov wrote: > It currently emulates the long-removed > avcodec_decode_audio4/avcodec_decode_video2 APIs, which obfuscates the > actual decoding flow. Restructure the decoding calls so that they > naturally follow the new

[FFmpeg-devel] [PATCH] lavfi/vf_libplacebo: allow linking to shared library with dllimport

2023-05-17 Thread Kacper Michajłow
Address of dll imported variables can't be used for constant initialization in C language modes. --- libavfilter/vf_libplacebo.c | 39 - 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/libavfilter/vf_libplacebo.c b/libavfilter/vf_libplacebo.c

[FFmpeg-devel] [PATCH] avcodec/hevc_ps: add proper bound checks around cm_ref_layer_id in colour_mapping_table.

2023-05-17 Thread Michael Niedermayer
From: Clement Lecigne Signed-off-by: Michael Niedermayer --- libavcodec/hevc_ps.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c index a55bced0f7..313ebef151 100644 --- a/libavcodec/hevc_ps.c +++

Re: [FFmpeg-devel] [PATCH] doc/ffmpeg: Extend documentation for sws_flags option

2023-05-17 Thread Tobias Rapp
On 17/05/2023 15:15, Gyan Doshi wrote: On 2023-05-17 05:22 pm, Tobias Rapp wrote: Clarify that -sws_flags are only applied to simple filtergraphs as a default, not complex filtergraphs. Add a reference to the scaler options. LGTM Regards, Gyan Applied. Thanks for review, Tobias

Re: [FFmpeg-devel] [PATCH] lavc/h264chroma: RISC-V V add motion compensation for 8x8 chroma blocks

2023-05-17 Thread Lynne
May 17, 2023, 09:13 by arnie.ch...@sifive.com: > Optimize the put and avg filtering for 8x8 chroma blocks > > Signed-off-by: Arnie Chang > --- > libavcodec/h264chroma.c | 2 + > libavcodec/h264chroma.h | 1 + > libavcodec/riscv/Makefile | 3

[FFmpeg-devel] [PATCH] avformat/yuvmpegenc: add support for rawvideo input

2023-05-17 Thread James Almer
The demuxer exports rawvideo, so there's no reason for the muxer to only work with wrapped_avframe. Signed-off-by: James Almer --- libavformat/yuv4mpegenc.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libavformat/yuv4mpegenc.c b/libavformat/yuv4mpegenc.c index

[FFmpeg-devel] [PATCH 6/6] fate/cbs: add tests for discard_units

2023-05-17 Thread Zhao Zhili
From: Zhao Zhili --- tests/fate/cbs.mak | 28 ++ tests/ref/fate/cbs-h264-discard-bidir| 37 + tests/ref/fate/cbs-h264-discard-nonintra | 8 +++ tests/ref/fate/cbs-h264-discard-nonkey | 3 ++ tests/ref/fate/cbs-h264-discard-nonref | 67

[FFmpeg-devel] [PATCH 2/6] avcodec/cbs_h2645: add discarded_unit implementation for H.264

2023-05-17 Thread Zhao Zhili
From: Zhao Zhili --- libavcodec/cbs_h2645.c | 53 ++ 1 file changed, 53 insertions(+) diff --git a/libavcodec/cbs_h2645.c b/libavcodec/cbs_h2645.c index 80e48829af..c616ac2202 100644 --- a/libavcodec/cbs_h2645.c +++ b/libavcodec/cbs_h2645.c @@ -1213,6

[FFmpeg-devel] [PATCH 5/6] avcodec/filter_units_bsf: reindent after previous commit

2023-05-17 Thread Zhao Zhili
From: Zhao Zhili --- libavcodec/filter_units_bsf.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/libavcodec/filter_units_bsf.c b/libavcodec/filter_units_bsf.c index e4c2cadbd5..9336753148 100644 --- a/libavcodec/filter_units_bsf.c +++

[FFmpeg-devel] [PATCH 1/6] avcodec/cbs: add API to discard units by AVDiscard

2023-05-17 Thread Zhao Zhili
From: Zhao Zhili --- libavcodec/cbs.c | 21 + libavcodec/cbs.h | 17 + libavcodec/cbs_internal.h | 6 ++ 3 files changed, 44 insertions(+) diff --git a/libavcodec/cbs.c b/libavcodec/cbs.c index 504197e06d..cf5211249b 100644 ---

[FFmpeg-devel] [PATCH 3/6] avcodec/cbs_h2645: add discard_unit implementation for H.265

2023-05-17 Thread Zhao Zhili
From: Zhao Zhili --- libavcodec/cbs_h2645.c | 74 ++ 1 file changed, 74 insertions(+) diff --git a/libavcodec/cbs_h2645.c b/libavcodec/cbs_h2645.c index c616ac2202..f2e59f1ac7 100644 --- a/libavcodec/cbs_h2645.c +++ b/libavcodec/cbs_h2645.c @@ -1265,6

[FFmpeg-devel] [PATCH 4/6] avcodec/filter_units_bsf: add skip frame support

2023-05-17 Thread Zhao Zhili
From: Zhao Zhili --- libavcodec/filter_units_bsf.c | 42 +-- libavcodec/version.h | 2 +- 2 files changed, 41 insertions(+), 3 deletions(-) diff --git a/libavcodec/filter_units_bsf.c b/libavcodec/filter_units_bsf.c index 38756baf42..e4c2cadbd5 100644

Re: [FFmpeg-devel] [PATCH] doc/ffmpeg: Extend documentation for sws_flags option

2023-05-17 Thread Gyan Doshi
On 2023-05-17 05:22 pm, Tobias Rapp wrote: Clarify that -sws_flags are only applied to simple filtergraphs as a default, not complex filtergraphs. Add a reference to the scaler options. LGTM Regards, Gyan --- doc/ffmpeg.texi | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-)

Re: [FFmpeg-devel] [REFUND-REQUEST] Travel cost & more for CLT 2023

2023-05-17 Thread Michael Niedermayer
On Wed, May 10, 2023 at 03:36:17AM +0200, Thomas Volkert wrote: > Hi, > > > Am 15.03.2023 um 20:30 schrieb Thilo Borgmann: > > > > > for our recent appearance at the Chemnitzer Linux Tage, I'd like to > > request reimbursements for my travel cost. > > I picked up Carl-Eugen in Berlin and we

[FFmpeg-devel] [PATCH 2/2, v3] libavcodec/amfenc: add PreAnalysis support

2023-05-17 Thread Dmitrii Ovchinnikov
Additional information about the work of preanalysis can be found here: https://github.com/GPUOpen-LibrariesAndSDKs/AMF/wiki/PreProcessing%20and%20PreAnalysis --- libavcodec/amfenc.c | 101 +++-- libavcodec/amfenc.h | 27 +- libavcodec/amfenc_av1.c | 133

[FFmpeg-devel] [PATCH 1/2, v3] amfenc: Update the min version to 1.4.29.0 for AMF SDK.

2023-05-17 Thread Dmitrii Ovchinnikov
--- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index bb7be67676..937be943a4 100755 --- a/configure +++ b/configure @@ -7082,7 +7082,7 @@ fi enabled amf && check_cpp_condition amf "AMF/core/Version.h" \ -"(AMF_VERSION_MAJOR

[FFmpeg-devel] [PATCH] doc/ffmpeg: Extend documentation for sws_flags option

2023-05-17 Thread Tobias Rapp
Clarify that -sws_flags are only applied to simple filtergraphs as a default, not complex filtergraphs. Add a reference to the scaler options. --- doc/ffmpeg.texi | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi index a12700e..c0fa90f

Re: [FFmpeg-devel] [PATCH 1/1] fate/jpg: add RGB mjpeg fate tests

2023-05-17 Thread Thilo Borgmann
Am 16.05.23 um 16:41 schrieb Leo Izen: Adds FATE tests for RGB jpegs to test commit 0b352e350e773673f11ea380f3507923c70e1175. --- tests/fate/image.mak | 11 +++ tests/ref/fate/jpg-rgb-1 | 6 ++ tests/ref/fate/jpg-rgb-2 | 6 ++ tests/ref/fate/jpg-rgb-3 | 6 ++

[FFmpeg-devel] [PATCH 33/36] fftools/ffmpeg_dec: merge check_decode_result() into its callers

2023-05-17 Thread Anton Khirnov
Not only is this easier to read, this also makes the code shorter. --- fftools/ffmpeg_dec.c | 32 +--- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/fftools/ffmpeg_dec.c b/fftools/ffmpeg_dec.c index 58bb7a7344..79e9c04fc1 100644 ---

[FFmpeg-devel] [PATCH 30/36] fftools/ffmpeg_dec: deobfuscate subtitle decoding

2023-05-17 Thread Anton Khirnov
It is currently handled in the same loop as audio and video, but this obscures the actual flow, because only one iteration is ever performed for subtitles. Also, avoid a pointless packet reference. --- fftools/ffmpeg_dec.c | 34 ++ 1 file changed, 18

[FFmpeg-devel] [PATCH 34/36] fftools/ffmpeg_dec: deduplicate code in decode_audio/video()

2023-05-17 Thread Anton Khirnov
--- fftools/ffmpeg_dec.c | 28 +++- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/fftools/ffmpeg_dec.c b/fftools/ffmpeg_dec.c index 79e9c04fc1..4662d0a265 100644 --- a/fftools/ffmpeg_dec.c +++ b/fftools/ffmpeg_dec.c @@ -130,18 +130,13 @@ static void

[FFmpeg-devel] [PATCH 32/36] fftools/ffmpeg: reindent after previous commit

2023-05-17 Thread Anton Khirnov
--- fftools/ffmpeg_dec.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/fftools/ffmpeg_dec.c b/fftools/ffmpeg_dec.c index 73f826c76a..58bb7a7344 100644 --- a/fftools/ffmpeg_dec.c +++ b/fftools/ffmpeg_dec.c @@ -232,17 +232,17 @@ static int

[FFmpeg-devel] [PATCH v2] lavc/h264chroma: RISC-V V add motion compensation for 8x8 chroma blocks

2023-05-17 Thread Arnie Chang
Optimize the put and avg filtering for 8x8 chroma blocks Signed-off-by: Arnie Chang --- libavcodec/h264chroma.c | 2 + libavcodec/h264chroma.h | 1 + libavcodec/riscv/Makefile | 3 + libavcodec/riscv/h264_chroma_init_riscv.c | 39 ++

[FFmpeg-devel] [PATCH 17/36] fftools/ffmpeg_filter: move InputFilter.ist to private data

2023-05-17 Thread Anton Khirnov
It is not accessed outside of ffmpeg_filter. --- fftools/ffmpeg.h| 1 - fftools/ffmpeg_filter.c | 34 +++--- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 9cb9f35bc2..c33e537faa 100644 ---

[FFmpeg-devel] [PATCH 26/36] fftools/ffmpeg: rework handling -max_error_rate

2023-05-17 Thread Anton Khirnov
Replace the decode_error_stat global with a per-input-stream variable. Also, print an error message when the error rate is exceeded. --- fftools/ffmpeg.c | 28 fftools/ffmpeg.h | 1 + fftools/ffmpeg_demux.c | 5 +++-- 3 files changed, 20 insertions(+),

[FFmpeg-devel] [PATCH 29/36] fftools/ffmpeg: move decoding code to ffmpeg_dec

2023-05-17 Thread Anton Khirnov
--- fftools/ffmpeg.c | 534 -- fftools/ffmpeg.h | 12 + fftools/ffmpeg_dec.c | 538 +++ 3 files changed, 550 insertions(+), 534 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index

[FFmpeg-devel] [PATCH 27/36] fftools/ffmpeg: move a block to a more appropriate place

2023-05-17 Thread Anton Khirnov
New placement requires fewer explicit conditions and is easier to understand. The logic should be exactly equivalent, since this is the only place where eof_reached is set for decoding. --- fftools/ffmpeg.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git

[FFmpeg-devel] [PATCH 23/36] fftools/ffmpeg: eliminate InputStream.got_output

2023-05-17 Thread Anton Khirnov
It tracks whether the decoder for this stream ever produced any frames and its only use is for checking whether a filter input ever received a frame - those that did not are prioritized by the scheduler. This is awkward and unnecessarily complicated - checking whether the filtergraph input format

[FFmpeg-devel] [PATCH 22/36] fftools/ffmpeg: drop an obsolete hack

2023-05-17 Thread Anton Khirnov
This special handling for decoder flushing has not been needed since af1761f7b5, as the filtergraph actually is drained after that commit. --- fftools/ffmpeg.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 9d554e2fb0..49313edebc 100644

[FFmpeg-devel] [PATCH 24/36] fftools/ffmpeg: replace an unreachable return with av_assert0(0)

2023-05-17 Thread Anton Khirnov
This cannot be reached, because initialization will fail if decoding is requested for a stream but no decoder can be found. --- fftools/ffmpeg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 62620bacce..1fcabd123a 100644 ---

[FFmpeg-devel] [PATCH 14/36] fftools/ffmpeg: move ifilter_has_all_input_formats() to ffmpeg_filter

2023-05-17 Thread Anton Khirnov
That is a more appropriate place for that function. --- fftools/ffmpeg.c| 12 fftools/ffmpeg_filter.c | 12 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index e368f5a148..9d554e2fb0 100644 ---

[FFmpeg-devel] [PATCH 16/36] fftools/ffmpeg_filter: drop a redundant error message

2023-05-17 Thread Anton Khirnov
In case no decoder is available, dec_open() called from ist_use() will fail with 'Decoding requested, but no decoder found', so this check is redundant. --- fftools/ffmpeg_filter.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index

[FFmpeg-devel] [PATCH 19/36] fftools/ffmpeg_filter: keep track of the real filter input type

2023-05-17 Thread Anton Khirnov
Avoid extracting it from various remote sources. --- fftools/ffmpeg_filter.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 5656fa87df..c699431831 100644 --- a/fftools/ffmpeg_filter.c +++

[FFmpeg-devel] [PATCH 12/36] fftools/ffmpeg_filter: only use fallback parameters when necessary

2023-05-17 Thread Anton Khirnov
With complex filtergraphs it can happen that the filtergraph is unconfigured because some other filter than the one we just got EOF on is missing parameters. Make sure that the fallback parametes for a given input are only used when that input is unconfigured. --- fftools/ffmpeg_filter.c | 24

[FFmpeg-devel] [PATCH 05/36] fftools/ffmpeg_filter: make sure pkt_duration matches duration

2023-05-17 Thread Anton Khirnov
Otherwise the two values might get desynchronized and lavfi can prefer the wrong one. --- fftools/ffmpeg_filter.c | 5 + 1 file changed, 5 insertions(+) diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 95ffa0f087..274eefe11c 100644 --- a/fftools/ffmpeg_filter.c +++

[FFmpeg-devel] [PATCH 15/36] fftools/ffmpeg_filter: make input filter configured parameters private

2023-05-17 Thread Anton Khirnov
They are not used outside of ffmpeg_filter. --- fftools/ffmpeg.h| 9 - fftools/ffmpeg_filter.c | 89 +++-- 2 files changed, 50 insertions(+), 48 deletions(-) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 189454d629..9cb9f35bc2 100644 ---

[FFmpeg-devel] [PATCH 25/36] fftools/ffmpeg: deobfuscate check_decode_result() call

2023-05-17 Thread Anton Khirnov
Passing ist=NULL is currently used to identify stream types that do not decode into AVFrames, i.e. subtitles. That is highly non-obvious - always pass a non-NULL InputStream and just check the type explicitly. --- fftools/ffmpeg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[FFmpeg-devel] [PATCH 18/36] fftools/ffmpeg_filter: move InputFilter.type to private data

2023-05-17 Thread Anton Khirnov
It is not accessed outside of ffmpeg_filter. --- fftools/ffmpeg.h| 1 - fftools/ffmpeg_filter.c | 12 +++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index c33e537faa..04c41a5311 100644 --- a/fftools/ffmpeg.h +++

[FFmpeg-devel] [PATCH 35/36] fftools/ffmpeg_dec: inline decode_audio() into dec_packet()

2023-05-17 Thread Anton Khirnov
The former function is now trivial - it has 3 lines and cannot fail. --- fftools/ffmpeg_dec.c | 29 +++-- 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/fftools/ffmpeg_dec.c b/fftools/ffmpeg_dec.c index 4662d0a265..c8f9ba0f0c 100644 ---

[FFmpeg-devel] [PATCH 31/36] fftools/ffmpeg_dec: restructure audio/video decoding loop

2023-05-17 Thread Anton Khirnov
It currently emulates the long-removed avcodec_decode_audio4/avcodec_decode_video2 APIs, which obfuscates the actual decoding flow. Restructure the decoding calls so that they naturally follow the new avcodec_send_packet()/avcodec_receive_frame() design. This is not only significantly easier to

[FFmpeg-devel] [PATCH 36/36] fftools/ffmpeg_dec: rename decode_video() to video_frame_process()

2023-05-17 Thread Anton Khirnov
This function does not do any decoding anymore. --- fftools/ffmpeg_dec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fftools/ffmpeg_dec.c b/fftools/ffmpeg_dec.c index c8f9ba0f0c..b541d30214 100644 --- a/fftools/ffmpeg_dec.c +++ b/fftools/ffmpeg_dec.c @@ -179,7 +179,7

[FFmpeg-devel] [PATCH 20/36] fftools/ffmpeg_filter: embed displaymatrix into private context

2023-05-17 Thread Anton Khirnov
It has a small fixed size, so it is better to embed it rather than deal with dynamic allocation. --- fftools/ffmpeg_filter.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index c699431831..6f842f6b46 100644

[FFmpeg-devel] [PATCH 07/36] tests/fate/ffmpeg: move a misplaced line

2023-05-17 Thread Anton Khirnov
--- tests/fate/ffmpeg.mak | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/fate/ffmpeg.mak b/tests/fate/ffmpeg.mak index 0f33c2a0ed..892624e523 100644 --- a/tests/fate/ffmpeg.mak +++ b/tests/fate/ffmpeg.mak @@ -190,6 +190,7 @@ fate-copy-shortest1: CMD = framemd5

[FFmpeg-devel] [PATCH 10/36] fftools/ffmpeg: return error codes from ist_*_add()

2023-05-17 Thread Anton Khirnov
Will be useful in future commits. --- fftools/ffmpeg.h | 4 ++-- fftools/ffmpeg_demux.c| 26 +++--- fftools/ffmpeg_filter.c | 15 --- fftools/ffmpeg_mux_init.c | 10 -- 4 files changed, 41 insertions(+), 14 deletions(-) diff --git

[FFmpeg-devel] [PATCH 09/36] fftools/ffmpeg_filter: split finding an unused stream into a function

2023-05-17 Thread Anton Khirnov
Avoids filtering code from digging in demuxer internals. --- fftools/ffmpeg.h| 5 + fftools/ffmpeg_demux.c | 10 ++ fftools/ffmpeg_filter.c | 8 +--- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index

[FFmpeg-devel] [PATCH 11/36] fftools/ffmpeg_demux: disallow using disabled input streams

2023-05-17 Thread Anton Khirnov
This is less ad-hoc than checking explicitly in every place that binds an input stream to a filter or output. --- fftools/ffmpeg_demux.c | 6 ++ fftools/ffmpeg_filter.c | 5 - 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c

[FFmpeg-devel] [PATCH 21/36] fftools/cmdutils: constify the argument of get_rotation()

2023-05-17 Thread Anton Khirnov
--- fftools/cmdutils.c | 2 +- fftools/cmdutils.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index a1de621d1c..9ec00add30 100644 --- a/fftools/cmdutils.c +++ b/fftools/cmdutils.c @@ -994,7 +994,7 @@ void *allocate_array_elem(void

[FFmpeg-devel] [PATCH 28/36] fftools/ffmpeg: split decoding loop out of process_input_packet()

2023-05-17 Thread Anton Khirnov
process_input_packet() contains two non-interacting pieces of nontrivial size and complexity - decoding and streamcopy. Separating them makes the code easier to read. --- fftools/ffmpeg.c | 37 - 1 file changed, 20 insertions(+), 17 deletions(-) diff --git

[FFmpeg-devel] [PATCH 13/36] fftools/ffmpeg_filter: try configuring graphs from input EOF

2023-05-17 Thread Anton Khirnov
When a filtergraph input receives EOF but never saw any input frames, we use the fallback parameters. Currently an attempt to actually configure the filtergraph will happen elsewhere, but there is no reason to postpone this. --- fftools/ffmpeg_filter.c | 8 1 file changed, 8

[FFmpeg-devel] [PATCH 08/36] tests/fate/ffmpeg: add a test for input -r option

2023-05-17 Thread Anton Khirnov
--- tests/fate/ffmpeg.mak | 4 tests/ref/fate/ffmpeg-input-r | 12 2 files changed, 16 insertions(+) create mode 100644 tests/ref/fate/ffmpeg-input-r diff --git a/tests/fate/ffmpeg.mak b/tests/fate/ffmpeg.mak index 892624e523..aca949176a 100644 ---

[FFmpeg-devel] [PATCH 04/36] fftools/ffmpeg_filter: convert input frame timestamps

2023-05-17 Thread Anton Khirnov
Decoder timebase does not always have to match filter timebase. --- fftools/ffmpeg_filter.c | 29 - 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index aea951a2da..95ffa0f087 100644 ---

[FFmpeg-devel] [PATCH 01/36] fftools/ffmpeg: shorten a variable name

2023-05-17 Thread Anton Khirnov
There is only one frame used in decode_video() -- the one output by the decoder. So there is no point in explicitly calling it the _decoded_ frame. --- fftools/ffmpeg.c | 52 1 file changed, 26 insertions(+), 26 deletions(-) diff --git

[FFmpeg-devel] [PATCH 03/36] fftools/ffmpeg: replace stream timebase with decoded frame one

2023-05-17 Thread Anton Khirnov
They are the same for now, but this may change in the future. --- fftools/ffmpeg.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 60f0ff3b12..9e5e56e9e7 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -993,7

[FFmpeg-devel] [PATCH 06/36] fftools/ffmpeg: rework applying input -r

2023-05-17 Thread Anton Khirnov
Do not use a separate counter for CFR timestamps forced with -r used as an input option. Set durations properly and let estimation code do the rest. --- fftools/ffmpeg.c | 10 +++--- fftools/ffmpeg.h | 4 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/fftools/ffmpeg.c

[FFmpeg-devel] [PATCH 02/36] fftools/ffmpeg: drop a useless local variable

2023-05-17 Thread Anton Khirnov
Store decoded frame timestamp directly in AVFrame.pts, there is no advantage to using a separate local variable for it. --- fftools/ffmpeg.c | 18 +- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 084192f270..60f0ff3b12

Re: [FFmpeg-devel] [PATCH v2] avcodec/mediacodec: Add VP8 encoder

2023-05-17 Thread Samuel Raposo Vieira Mira
Thanks. Somehow messed up the patch file sent in the email. -Original Message- From: ffmpeg-devel On Behalf Of "zhilizhao(???)" Sent: keskiviikko 17. toukokuuta 2023 6.39 To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH v2] avcodec/mediacodec: Add VP8

Re: [FFmpeg-devel] [PATCH v6] avformat: add MMTP parser and MMT/TLV demuxer

2023-05-17 Thread SuperFashi
Bumping this, thx. On Wed, May 3, 2023 at 22:02 SuperFashi wrote: > v1 -> v2: Refactor using GetByteContext; Fix compile error. > v2 -> v3: Remove debug statement. > v3 -> v4: Squash commits. > v4 -> v5: Improve portability; Cosmetic changes. > v5 -> v6: remove unnecessary NULL checks. > > This

Re: [FFmpeg-devel] Add LSX optimization in avcodec and swscale.

2023-05-17 Thread Shiyou Yin
> 2023年5月17日 15:03,Hao Chen 写道: > > v1: Add LSX optimization in avcodec and swscale, due to the 2K series CPUs > only support lsx. > v2: Modified the implementation of some functions and added support for the > checkasm --bench feature. > > [PATCH v2 1/7] avcodec/la: add LSX optimization

Re: [FFmpeg-devel] [PATCH v2 1/7] avcodec/la: add LSX optimization for h264 idct.

2023-05-17 Thread Shiyou Yin
> 2023年5月17日 15:03,Hao Chen 写道: > > From: Shiyou Yin > > loongson_asm.S is LoongArch asm optimization helper. > Add functions: > ff_h264_idct_add_8_lsx > ff_h264_idct8_add_8_lsx > ff_h264_idct_dc_add_8_lsx > ff_h264_idct8_dc_add_8_lsx > ff_h264_idct_add16_8_lsx >

[FFmpeg-devel] [PATCH] lavc/h264chroma: RISC-V V add motion compensation for 8x8 chroma blocks

2023-05-17 Thread Arnie Chang
Optimize the put and avg filtering for 8x8 chroma blocks Signed-off-by: Arnie Chang --- libavcodec/h264chroma.c | 2 + libavcodec/h264chroma.h | 1 + libavcodec/riscv/Makefile | 3 + libavcodec/riscv/h264_chroma_init_riscv.c | 39 ++

[FFmpeg-devel] [PATCH v2] avutil/la: Add function performance testing

2023-05-17 Thread Hao Chen
From: yuanhecai This patch supports the use of the "checkasm --bench" testing feature on loongarch platform. Change-Id: I42790388d057c9ade0dfa38a19d9c1fd44ca0bc3 --- libavutil/loongarch/timer.h | 48 + libavutil/timer.h | 2 ++ 2 files changed, 50

[FFmpeg-devel] [PATCH v2 6/7] swscale/la: Add following builtin optimized functions

2023-05-17 Thread Hao Chen
From: Jin Bo yuv420_rgb24_lsx yuv420_bgr24_lsx yuv420_rgba32_lsx yuv420_argb32_lsx yuv420_bgra32_lsx yuv420_abgr32_lsx ./configure --disable-lasx ffmpeg -i ~/media/1_h264_1080p_30fps_3Mbps.mp4 -f rawvideo -pix_fmt rgb24 -y /dev/null -an before: 184fps after: 207fps ---

[FFmpeg-devel] [PATCH v2 4/7] avcodec/la: Add LSX optimization for h264 qpel.

2023-05-17 Thread Hao Chen
From: yuanhecai ./configure --disable-lasx ffmpeg -i 1_h264_1080p_30fps_3Mbps.mp4 -f rawvideo -y /dev/null -an before: 214fps after: 274fps --- libavcodec/loongarch/Makefile |2 + libavcodec/loongarch/h264qpel.S | 1686 +

[FFmpeg-devel] [PATCH v2 3/7] avcodec/la: Add LSX optimization for h264 chroma and intrapred.

2023-05-17 Thread Hao Chen
From: Lu Wang ./configure --disable-lasx ffmpeg -i 1_h264_1080p_30fps_3Mbps.mp4 -f rawvideo -y /dev/null -an before: 199fps after: 214fps --- libavcodec/loongarch/Makefile |4 +- .../loongarch/h264_intrapred_init_loongarch.c | 18 +-

[FFmpeg-devel] [PATCH v2 1/7] avcodec/la: add LSX optimization for h264 idct.

2023-05-17 Thread Hao Chen
From: Shiyou Yin loongson_asm.S is LoongArch asm optimization helper. Add functions: ff_h264_idct_add_8_lsx ff_h264_idct8_add_8_lsx ff_h264_idct_dc_add_8_lsx ff_h264_idct8_dc_add_8_lsx ff_h264_idct_add16_8_lsx ff_h264_idct8_add4_8_lsx ff_h264_idct_add8_8_lsx

[FFmpeg-devel] Add LSX optimization in avcodec and swscale.

2023-05-17 Thread Hao Chen
v1: Add LSX optimization in avcodec and swscale, due to the 2K series CPUs only support lsx. v2: Modified the implementation of some functions and added support for the checkasm --bench feature. [PATCH v2 1/7] avcodec/la: add LSX optimization for h264 idct. [PATCH v2 2/7] avcodec/la: Add LSX

[FFmpeg-devel] Add LSX optimization in avcodec and swscale.

2023-05-17 Thread Hao Chen
v1: Add LSX optimization in avcodec and swscale, due to the 2K series CPUs only support lsx. v2: Modified the implementation of some functions and added support for the checkasm --bench feature. [PATCH v2 1/7] avcodec/la: add LSX optimization for h264 idct. [PATCH v2 2/7] avcodec/la: Add LSX

Re: [FFmpeg-devel] Global variables in FFmpeg command expressions?

2023-05-17 Thread Joan Lluch
Hi Paul, Yes, I agree that a filter that would process both Video and Audio together would be the best approach. But this does not seem to be the general case in FFmpeg. I mean, filters are either for video or for audio. With filters that just apply video transformations without affecting