[FFmpeg-devel] [PATCH 3/3] avcodec/mediacodecenc: workaround the alignment requirement for H.265

2024-05-23 Thread Zhao Zhili
From: Zhao Zhili Signed-off-by: Zhao Zhili --- libavcodec/mediacodecenc.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c index bfff149039..a42270551b 100644 --- a/libavcodec/mediacodecenc.c +++ b/libavcodec

[FFmpeg-devel] [PATCH 1/3] avcodec/h265_metadata: Add options to set width/height after crop

2024-05-23 Thread Zhao Zhili
From: Zhao Zhili It's a common usecase to request a video size after crop. Before this patch, user must know the video size before crop, then set crop_right/crop_bottom accordingly. Since HEVC can have different CTU size, it's not easy to get/deduce the video size before crop. With the new width/

[FFmpeg-devel] [PATCH 2/3] avcodec/mediacodecenc: workaround the alignment requirement only for H.264

2024-05-23 Thread Zhao Zhili
From: Zhao Zhili There is no bsf for other codecs to modify crop info except H.265. For H.265, the assumption that FFALIGN(width, 16)xFFALIGN(height, 16) is the video resolution can be wrong, since the encoder can use CTU larger than 16x16. In that case, use FFALIGN(width, 16) - width as crop_rig

Re: [FFmpeg-devel] [PATCH 1/2] avutil/channel_layout: add a helper function to get the ambisonic order of a layout

2024-05-23 Thread Anton Khirnov
Quoting James Almer (2024-05-15 03:08:28) > Signed-off-by: James Almer > --- > libavutil/channel_layout.c | 17 - > libavutil/channel_layout.h | 10 ++ > 2 files changed, 18 insertions(+), 9 deletions(-) > > diff --git a/libavutil/channel_layout.c b/libavutil/channel_layo

Re: [FFmpeg-devel] [RFC PATCH] avfilter/video: Protect frame_pool from multi-threads access

2024-05-23 Thread Anton Khirnov
Quoting Zhao Zhili (2024-05-11 06:45:12) > > > On May 10, 2024, at 16:57, Zhao Zhili wrote: > > > > From: Zhao Zhili > > > > Fix crash with > > ./ffplay -f lavfi -i movie=foo.mp4,drawtext=text=bar > > This is an RFC because I’m not sure whether it’s a valid use case or not to > call > ff_de

Re: [FFmpeg-devel] [PATCH] avfilter/src_movie: Remove align dimension to fix crash

2024-05-23 Thread Anton Khirnov
Quoting Paul B Mahol (2024-05-11 15:48:08) > Any next filter after (a)movie filter that calls ff_null_get_video_buffer() > will not? work and using > ff_default_get_video_buffer() will allocate new frame. > > Original idea was/is to improve performance by using DR support provided by > decoders.

Re: [FFmpeg-devel] [PATCH] fftools/ffprobe: Avoid overflow when calculating DAR

2024-05-23 Thread Anton Khirnov
Quoting Derek Buitenhuis (2024-05-03 18:36:23) > Both the codecpar's width and height, and the SAR num and den are > ints, which can overflow. Cast to int64_t, which is what av_reduce > takes. > > Without this, occasionally, display_aspect_ratio can be negative in > ffprobe's -show_stream output.

Re: [FFmpeg-devel] [PATCH 7/7] avcodec/tests/bitstream_template: Make it clear that the return is intentionally not checked

2024-05-23 Thread Andreas Rheinhardt
Michael Niedermayer: > Helps: CID1518967 Unchecked return value > Helps: CID1518968 Unchecked return value > > Sponsored-by: Sovereign Tech Fund > Signed-off-by: Michael Niedermayer > --- > libavcodec/tests/bitstream_template.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --

[FFmpeg-devel] [PATCH v2] lavc/vp9: reset segmentation fields when segmentation isn't enabled

2024-05-23 Thread llyyr
Fields under the segmentation switch are never reset on a new frame, and retain the value from the previous frame. This bugs out a bunch of hwaccel drivers when segmentation is disabled but update_map isn't reset because they don't ignore values behind switches. This commit also resets the temporal

[FFmpeg-devel] [PATCH v2] lavc/vp9: reset segmentation fields when segmentation isn't enabled

2024-05-23 Thread llyyr
Fields under the segmentation switch are never reset on a new frame, and retain the value from the previous frame. This bugs out a bunch of hwaccel drivers when segmentation is disabled but update_map isn't reset because they don't ignore values behind switches. This commit also resets the temporal

[FFmpeg-devel] [PATCH] lavc/vp9: reset segmentation fields when segmentation isn't enabled

2024-05-23 Thread llyyr . public
From: llyyr Fields under the segmentation switch are never reset on a new frame, and retain the value from the previous frame. This bugs out a bunch of hwaccel drivers when segmentation is disabled but update_map isn't reset because they don't ignore values behind switches. This commit also reset

[FFmpeg-devel] [PATCH] lavc/vp9: reset segmentation fields when segmentation isn't enabled

2024-05-23 Thread llyyr . public
From: llyyr Fields under the segmentation switch are never reset on a new frame, and retain the value from the previous frame. This bugs out a bunch of hwaccel drivers when segmentation is disabled but update_map isn't reset because they don't ignore values behind switches. This commit also reset

Re: [FFmpeg-devel] [PATCH] lavc/rv34dsp: optimise R-V V idct_dc_add

2024-05-23 Thread Rémi Denis-Courmont
Le 23 mai 2024 06:31:52 GMT+03:00, flow gg a écrit : >Unfortunately I only test to obtain benchmarks and basic correctness. I >always feel the need for a professional to write the tests. Everybody agrees that tests should be written alongside the corresponding DSP C reference functions, but we

[FFmpeg-devel] [PATCH v2] lavc/vp9: reset segmentation fields when segmentation isn't enabled

2024-05-23 Thread llyyr . public
From: llyyr Fields under the segmentation switch are never reset on a new frame, and retain the value from the previous frame. This bugs out a bunch of hwaccel drivers when segmentation is disabled but update_map isn't reset because they don't ignore values behind switches. This commit also reset

Re: [FFmpeg-devel] [PATCH 2/5] avfilter/af_atempo: Simplify resetting

2024-05-23 Thread Andreas Rheinhardt
Pavel Koshevoy: > On Wed, May 22, 2024, 02:59 Andreas Rheinhardt < > andreas.rheinha...@outlook.com> wrote: > >> The earlier code distinguished between a partial reset >> (yae_clear()) and a complete reset (yae_release_buffers() >> which also releases the buffers); this separation existed >> to av

Re: [FFmpeg-devel] [PATCH v2] lavc/vp9: reset segmentation fields when segmentation isn't enabled

2024-05-23 Thread Andreas Rheinhardt
llyyr.pub...@gmail.com: > From: llyyr > > Fields under the segmentation switch are never reset on a new frame, and > retain the value from the previous frame. This bugs out a bunch of > hwaccel drivers when segmentation is disabled but update_map isn't > reset because they don't ignore values beh

Re: [FFmpeg-devel] [PATCH v2] lavc/vp9: reset segmentation fields when segmentation isn't enabled

2024-05-23 Thread llyyr
On 5/23/24 2:13 PM, Andreas Rheinhardt wrote: llyyr.pub...@gmail.com: From: llyyr Fields under the segmentation switch are never reset on a new frame, and retain the value from the previous frame. This bugs out a bunch of hwaccel drivers when segmentation is disabled but update_map isn't reset

[FFmpeg-devel] [PATCH 1/4] lavc/qsvenc: rename the skip_frame private option to qsv_skip_frame

2024-05-23 Thread Anton Khirnov
It conflicts with the AVCodecContext option of the same name. --- libavcodec/qsvenc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/qsvenc.h b/libavcodec/qsvenc.h index e3eb083746..d69dd19049 100644 --- a/libavcodec/qsvenc.h +++ b/libavcodec/qsvenc.h @@ -139,7 +139

[FFmpeg-devel] [PATCH 3/4] fftools/ffmpeg_mux_init: apply encoder options manually

2024-05-23 Thread Anton Khirnov
Do not pass an options dictionary to the avcodec_open2() in enc_open(). This is cleaner and more robust, as previously various bits of code would try to interpret the contents of the options dictionary, with varying degrees of correctness. Now they can just access the encoder AVCodecContext direct

[FFmpeg-devel] [PATCH 4/4] fftools/ffmpeg_mux_init: make encoder_opts local to ost_add()

2024-05-23 Thread Anton Khirnov
It is no longer needed after this function returns. --- fftools/ffmpeg.h | 2 -- fftools/ffmpeg_mux.c | 1 - fftools/ffmpeg_mux_init.c | 71 ++- 3 files changed, 40 insertions(+), 34 deletions(-) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h

[FFmpeg-devel] [PATCH 2/4] fftools/ffmpeg: rewrite checking whether codec AVOptions have been used

2024-05-23 Thread Anton Khirnov
Share the code between encoding and decoding. Instead of checking every stream's options dictionary (which is also used for other purposes), track all used options in a dedicated dictionary. --- fftools/cmdutils.c| 17 fftools/cmdutils.h| 4 ++- fftools/ffmpeg.c

Re: [FFmpeg-devel] [PATCH v2] avcodec/dovi - disable metadata compression by default

2024-05-23 Thread Niklas Haas
On Thu, 23 May 2024 03:45:44 + Cosmin Stejerean via ffmpeg-devel wrote: > From: Cosmin Stejerean > > not all clients support metadata compression, output when > vdr_dm_metadata_changed fails the DV verifier. > --- > libavcodec/dovi_rpu.h| 10 ++ > libavcodec/dovi_rpuenc.c | 8

Re: [FFmpeg-devel] [PATCH v3 1/2] lavu/dovi_meta - add fields for ext_mapping_idc

2024-05-23 Thread Niklas Haas
On Wed, 22 May 2024 15:50:43 + Cosmin Stejerean via ffmpeg-devel wrote: > From: Cosmin Stejerean > > --- > libavutil/dovi_meta.h | 2 ++ > libavutil/version.h | 2 +- > 2 files changed, 3 insertions(+), 1 deletion(-) > > diff --git a/libavutil/dovi_meta.h b/libavutil/dovi_meta.h > index

Re: [FFmpeg-devel] [PATCH 1/2] avutil/channel_layout: add a helper function to get the ambisonic order of a layout

2024-05-23 Thread James Almer
On 5/23/2024 4:11 AM, Anton Khirnov wrote: Quoting James Almer (2024-05-15 03:08:28) Signed-off-by: James Almer --- libavutil/channel_layout.c | 17 - libavutil/channel_layout.h | 10 ++ 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/libavutil/channe

[FFmpeg-devel] [PATCH 1/5] avcodec/vvc_mc: split the SAD dsp prototype into one function per blocksize width

2024-05-23 Thread James Almer
Signed-off-by: James Almer --- libavcodec/vvc/dsp.h | 2 +- libavcodec/vvc/inter.c | 6 -- libavcodec/vvc/inter_template.c | 6 +- libavcodec/x86/vvc/vvc_sad.asm | 32 ++-- libavcodec/x86/vvc/vvcdsp_init.c | 22 +-

[FFmpeg-devel] [PATCH 2/5] x86/vvc_sad: optimize vvc_sad_16

2024-05-23 Thread James Almer
Signed-off-by: James Almer --- libavcodec/x86/vvc/vvc_sad.asm | 27 ++- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/libavcodec/x86/vvc/vvc_sad.asm b/libavcodec/x86/vvc/vvc_sad.asm index a20818530f..829dbce489 100644 --- a/libavcodec/x86/vvc/vvc_sad.asm

[FFmpeg-devel] [PATCH 3/5] x86/vvc_sad: add sse4 versions of all functions

2024-05-23 Thread James Almer
And remove sad_8x8_avx2, as it's not faster than sad_8x8_sse4. sad_8x8_c: 54.8 sad_8x8_sse4: 14.3 sad_16x16_c: 200.8 sad_16x16_sse4: 34.8 sad_16x16_avx2: 29.8 sad_32x32_c: 826.3 sad_32x32_sse4: 113.8 sad_32x32_avx2: 69.3 sad_64x64_c: 3679.8 sad_64x64_sse4: 392.8 sad_64x64_avx2: 257.3 sad_128x128_c

[FFmpeg-devel] [PATCH 4/5] x86/vvc_sad: reduce gpr usage in all loop functions

2024-05-23 Thread James Almer
This way they can be assembled on x86_32 targets. Signed-off-by: James Almer --- libavcodec/x86/vvc/vvc_sad.asm | 22 ++ libavcodec/x86/vvc/vvcdsp_init.c | 16 +--- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/libavcodec/x86/vvc/vvc_sad.asm b

[FFmpeg-devel] [PATCH 5/5] x86/vvc_sad: reindent after the previous changes

2024-05-23 Thread James Almer
Signed-off-by: James Almer --- libavcodec/x86/vvc/vvc_sad.asm | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/libavcodec/x86/vvc/vvc_sad.asm b/libavcodec/x86/vvc/vvc_sad.asm index 9881b1180d..14f7ce230e 100644 --- a/libavcodec/x86/vvc/vvc_sad.asm +++ b/l

Re: [FFmpeg-devel] [PATCH 1/5] avcodec/vvc_mc: split the SAD dsp prototype into one function per blocksize width

2024-05-23 Thread Andreas Rheinhardt
James Almer: > Signed-off-by: James Almer > --- The commit message should explain what the advantage of this is. Particularly, what is the advantage of this over jumping in the function to based upon blocksize vs. selecting an appropriate function in the generic code (even when these functions tu

Re: [FFmpeg-devel] [PATCH v3 2/2] avcodec/dovi - correctly read el_bit_depth_minus8 and ext_mapping_idc

2024-05-23 Thread James Almer
On 5/22/2024 12:50 PM, Cosmin Stejerean via ffmpeg-devel wrote: From: Cosmin Stejerean These two fields are coded together into a single 16 bit integer with upper 8 bits for ext_mapping_idc and lower 8 bits for el_bit_depth_minus8. Furthermore ext_mapping_idc has two components, upper 3 bits a

Re: [FFmpeg-devel] [PATCH v5 1/2][GSoC 2024] libavcodec/x86/vvc: Add AVX2 DMVR SAD functions for VVC

2024-05-23 Thread Nuo Mi
On Thu, May 23, 2024 at 7:38 AM James Almer wrote: > On 5/21/2024 10:01 PM, Ronald S. Bultje wrote: > > Hi, > > > > On Tue, May 21, 2024 at 8:01 PM Stone Chen > wrote: > > > >> Implements AVX2 DMVR (decoder-side motion vector refinement) SAD > >> functions. DMVR SAD is only calculated if w >= 8,

Re: [FFmpeg-devel] [PATCH v5 1/2][GSoC 2024] libavcodec/x86/vvc: Add AVX2 DMVR SAD functions for VVC

2024-05-23 Thread Stone Chen
On Thu, May 23, 2024 at 9:18 AM Nuo Mi wrote: > On Thu, May 23, 2024 at 7:38 AM James Almer wrote: > > > On 5/21/2024 10:01 PM, Ronald S. Bultje wrote: > > > Hi, > > > > > > On Tue, May 21, 2024 at 8:01 PM Stone Chen > > wrote: > > > > > >> Implements AVX2 DMVR (decoder-side motion vector refin

Re: [FFmpeg-devel] [PATCH] avfilter/framesync: fix forward EOF pts

2024-05-23 Thread Nicolas Gaullier
>Envoyé : mardi 21 mai 2024 21:39 > >Note1: when the EOF pts is not accurate enough, the last frame can be dropped >by vf_fps with default rounding. > >Note2: vf_scale use framesync since e82a3997cdd6c0894869b33ba42430ac3, >so this is a very commonplace scenario. > >For example: >./ffprobe -f lavf

Re: [FFmpeg-devel] [PATCH 2/2] avformat/movenc: add support for writing SA3D boxes

2024-05-23 Thread James Almer
On 5/14/2024 10:08 PM, James Almer wrote: Signed-off-by: James Almer --- libavformat/movenc.c | 61 1 file changed, 61 insertions(+) Will apply the set. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg

[FFmpeg-devel] [7.0 PATCH 1/2] avcodec/mediacodecenc: workaround the alignment requirement only for H.264

2024-05-23 Thread Zhao Zhili
From: Zhao Zhili There is no bsf for other codecs to modify crop info except H.265. For H.265, the assumption that FFALIGN(width, 16)xFFALIGN(height, 16) is the video resolution can be wrong, since the encoder can use CTU larger than 16x16. In that case, use FFALIGN(width, 16) - width as crop_rig

[FFmpeg-devel] [7.0 PATCH 2/2] avcodec/mediacodecenc: workaround the alignment requirement for H.265

2024-05-23 Thread Zhao Zhili
From: Zhao Zhili --- The patchset for master branch isn't suitable for release branch, since it implement a new feature in bsf. https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=11882 libavcodec/mediacodecenc.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git

Re: [FFmpeg-devel] [PATCH 3/3] avcodec/mediacodecenc: workaround the alignment requirement for H.265

2024-05-23 Thread Zhao Zhili
> On May 23, 2024, at 15:08, Zhao Zhili wrote: > > From: Zhao Zhili > > Signed-off-by: Zhao Zhili > --- > libavcodec/mediacodecenc.c | 11 --- > 1 file changed, 8 insertions(+), 3 deletions(-) > > diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c > index bfff149039.

Re: [FFmpeg-devel] [PATCH v2] avutil/hwcontext_videotoolbox: Set proper CVBuffer colorspace

2024-05-23 Thread Zhao Zhili
> On May 21, 2024, at 09:56, Gnattu OC via ffmpeg-devel > wrote: > >> >> On May 20, 2024, at 09:12, Marvin Scholz wrote: >> >> Fix #10884 >> --- >> libavutil/hwcontext_videotoolbox.c | 54 +- >> 1 file changed, 38 insertions(+), 16 deletions(-) >> >> diff --git

Re: [FFmpeg-devel] [PATCH v9 01/13] avcodec/vaapi_encode: introduce a base layer for vaapi encode

2024-05-23 Thread Lynne via ffmpeg-devel
On 20/05/2024 16:52, tong1.wu-at-intel@ffmpeg.org wrote: From: Tong Wu Since VAAPI and future D3D12VA implementation may share some common parameters, a base layer encode context is introduced as vaapi context's base. Signed-off-by: Tong Wu --- libavcodec/hw_base_encode.h | 56 +

Re: [FFmpeg-devel] [PATCH 2/4] fftools/ffmpeg: rewrite checking whether codec AVOptions have been used

2024-05-23 Thread Marton Balint
On Thu, 23 May 2024, Anton Khirnov wrote: Share the code between encoding and decoding. Instead of checking every stream's options dictionary (which is also used for other purposes), track all used options in a dedicated dictionary. --- fftools/cmdutils.c| 17 fftools/cmdu

Re: [FFmpeg-devel] [PATCH v2] avutil/hwcontext_videotoolbox: Set proper CVBuffer colorspace

2024-05-23 Thread epirat07
On 23 May 2024, at 18:05, Zhao Zhili wrote: >> On May 21, 2024, at 09:56, Gnattu OC via ffmpeg-devel >> wrote: >> >>> >>> On May 20, 2024, at 09:12, Marvin Scholz wrote: >>> >>> Fix #10884 >>> --- >>> libavutil/hwcontext_videotoolbox.c | 54 +- >>> 1 file changed,

[FFmpeg-devel] [PATCH] lavc/rv32dsp: remove stray load immediate

2024-05-23 Thread Rémi Denis-Courmont
--- libavcodec/riscv/rv34dsp_rvv.S | 1 - 1 file changed, 1 deletion(-) diff --git a/libavcodec/riscv/rv34dsp_rvv.S b/libavcodec/riscv/rv34dsp_rvv.S index f1f6345012..8eda01665d 100644 --- a/libavcodec/riscv/rv34dsp_rvv.S +++ b/libavcodec/riscv/rv34dsp_rvv.S @@ -37,7 +37,6 @@ func ff_rv34_idct_dc

[FFmpeg-devel] [PATCH] lavc/vp8dsp: remove unused macro parameter

2024-05-23 Thread Rémi Denis-Courmont
--- libavcodec/riscv/vp8dsp_rvv.S | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/riscv/vp8dsp_rvv.S b/libavcodec/riscv/vp8dsp_rvv.S index 0ba9fa443d..9c84b1503e 100644 --- a/libavcodec/riscv/vp8dsp_rvv.S +++ b/libavcodec/riscv/vp8dsp_rvv.S @@ -94,7 +94,7 @@

[FFmpeg-devel] [PATCH v3 0/5] avcodec/dovi - disable metadata compression by default

2024-05-23 Thread Cosmin Stejerean via ffmpeg-devel
From: Cosmin Stejerean not all clients support metadata compression, output when vdr_dm_metadata_changed fails the DV verifier. Compared to v2 this makes the dovi field name a parameter of the DOVI_ENCODING_OPTS macro as requested. It also splits up the commits into introducing the macro, guar

[FFmpeg-devel] [PATCH v3 1/5] avcodec/dovi_rpu - field and macro for metadata compression

2024-05-23 Thread Cosmin Stejerean via ffmpeg-devel
From: Cosmin Stejerean Add a field to enable or disable metadata compression since not all clients support this. Introduce DOVI_ENCODING_OPTS macro to faciliate exposing this as an option to encoders. --- libavcodec/dovi_rpu.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/

[FFmpeg-devel] [PATCH v3 2/5] avcodec/dovi_rpuenc - guard metadata compression

2024-05-23 Thread Cosmin Stejerean via ffmpeg-devel
From: Cosmin Stejerean Guard use_prev_vdr_rpu by the new enable_compression field since not all clients support this. Separately output when vdr_dm_metadata_changed == 0 fails the DV verifier so turn that off unconditionally for now. --- libavcodec/dovi_rpuenc.c | 8 ++-- 1 file changed,

[FFmpeg-devel] [PATCH v3 3/5] avcodec/libaomenc - switch to DOVI_ENCODING_OPTS

2024-05-23 Thread Cosmin Stejerean via ffmpeg-devel
From: Cosmin Stejerean --- libavcodec/libaomenc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavcodec/libaomenc.c b/libavcodec/libaomenc.c index dec74ebecd..22429717e8 100644 --- a/libavcodec/libaomenc.c +++ b/libavcodec/libaomenc.c @@ -1487,8 +1487,7 @@ static const

[FFmpeg-devel] [PATCH v3 5/5] avcodec/libx265 - switch to DOVI_ENCODING_OPTS

2024-05-23 Thread Cosmin Stejerean via ffmpeg-devel
From: Cosmin Stejerean --- libavcodec/libx265.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c index ac1dbc4f97..70e447fc0e 100644 --- a/libavcodec/libx265.c +++ b/libavcodec/libx265.c @@ -951,8 +951,7 @@ static const AVOption op

[FFmpeg-devel] [PATCH v3 4/5] avcodec/libsvtav1 - switch to DOVI_ENCODING_OPTS

2024-05-23 Thread Cosmin Stejerean via ffmpeg-devel
From: Cosmin Stejerean --- libavcodec/libsvtav1.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c index 2fef8c8971..4a8cab4eb9 100644 --- a/libavcodec/libsvtav1.c +++ b/libavcodec/libsvtav1.c @@ -731,8 +731,7 @@ static const A

[FFmpeg-devel] [PATCH v5 0/4] Explain what "context" means

2024-05-23 Thread Andrew Sayers
NOTE: this patchset depends on [1], and should not be applied before that. I think it's important to guide readers between parts of FFmpeg, because learning how the pieces of the puzzle fit together is a big part of the newbie experience. So this patchset replaces the "@ref Context for foo" state

[FFmpeg-devel] [PATCH v5 1/4] doc: Explain what "context" means

2024-05-23 Thread Andrew Sayers
Derived from explanations kindly provided by Stefano Sabatini and others: https://ffmpeg.org/pipermail/ffmpeg-devel/2024-April/325903.html --- doc/context.md | 439 + 1 file changed, 439 insertions(+) create mode 100644 doc/context.md diff --git a/

[FFmpeg-devel] [PATCH v5 2/4] lavu: Clarify relationship between AVClass, AVOption and context

2024-05-23 Thread Andrew Sayers
--- libavutil/log.h | 16 +--- libavutil/opt.h | 17 ++--- 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/libavutil/log.h b/libavutil/log.h index ab7ceabe22..d599ab506e 100644 --- a/libavutil/log.h +++ b/libavutil/log.h @@ -59,9 +59,19 @@ typedef enum { st

[FFmpeg-devel] [PATCH v5 3/4] all: Link to "context" from all public contexts with documentation

2024-05-23 Thread Andrew Sayers
The goal of putting these links in "@see" blocks is to provide hooks for future developers to add links to other useful parts of the codebase. --- libavcodec/avcodec.h | 3 +++ libavcodec/bsf.h | 3 +++ libavcodec/d3d11va.h | 3 +++ libavcodec/mediacodec.h

[FFmpeg-devel] [PATCH v5 4/4] all: Rewrite documentation for contexts

2024-05-23 Thread Andrew Sayers
Make their documentation more readable and similar to each other, (hopefully) without changing the meaning. --- libavcodec/aac/aacdec.h | 2 +- libavcodec/aacenc.h | 2 +- libavcodec/ac3enc.h | 2 +- libavcodec/amfenc.h | 2 +- libavcodec/atrac.h

[FFmpeg-devel] [PATCH v5 1/2] lavu/hashtable: create generic robin hood hash table

2024-05-23 Thread Connor Worley
Signed-off-by: Connor Worley --- libavutil/Makefile | 2 + libavutil/hashtable.c | 192 libavutil/hashtable.h | 91 + libavutil/tests/hashtable.c | 108 4 files changed, 393 insertions(+) create mod

[FFmpeg-devel] [PATCH v5 2/2] lavc/dxvenc: migrate DXT1 encoder to lavu hashtable

2024-05-23 Thread Connor Worley
Offers a modest performance gain due to the switch from naive linear probling to robin hood. Signed-off-by: Connor Worley --- libavcodec/dxvenc.c | 119 1 file changed, 32 insertions(+), 87 deletions(-) diff --git a/libavcodec/dxvenc.c b/libavcodec/d

Re: [FFmpeg-devel] [PATCH v3 1/2] lavu/dovi_meta - add fields for ext_mapping_idc

2024-05-23 Thread Cosmin Stejerean via ffmpeg-devel
> On May 23, 2024, at 4:03 AM, Niklas Haas wrote: > > On Wed, 22 May 2024 15:50:43 + Cosmin Stejerean via ffmpeg-devel > wrote: >> From: Cosmin Stejerean >> >> --- >> libavutil/dovi_meta.h | 2 ++ >> libavutil/version.h | 2 +- >> 2 files changed, 3 insertions(+), 1 deletion(-) >> >> d

[FFmpeg-devel] [PATCH] avformat/demux: Remove dead stores

2024-05-23 Thread Michael Niedermayer
Fixes: CID1473512 Unused value Fixes: CID1529228 Unused value Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavformat/demux.c | 5 - 1 file changed, 5 deletions(-) diff --git a/libavformat/demux.c b/libavformat/demux.c index ecefe7e0a74..d0a5a39d052 100644 --- a

Re: [FFmpeg-devel] [PATCH 7/7] avcodec/tests/bitstream_template: Make it clear that the return is intentionally not checked

2024-05-23 Thread Michael Niedermayer
On Thu, May 23, 2024 at 10:22:56AM +0200, Andreas Rheinhardt wrote: > Michael Niedermayer: > > Helps: CID1518967 Unchecked return value > > Helps: CID1518968 Unchecked return value > > > > Sponsored-by: Sovereign Tech Fund > > Signed-off-by: Michael Niedermayer > > --- > > libavcodec/tests/bitst

Re: [FFmpeg-devel] [PATCH v5 0/4] Explain what "context" means

2024-05-23 Thread Michael Niedermayer
On Thu, May 23, 2024 at 09:00:39PM +0100, Andrew Sayers wrote: > NOTE: this patchset depends on [1], and should not be applied before that. > > I think it's important to guide readers between parts of FFmpeg, because > learning how the pieces of the puzzle fit together is a big part of the > newbi

Re: [FFmpeg-devel] [PATCH v1 1/2] lavc/qsvdec: Allow decoders to export crop information

2024-05-23 Thread Xiang, Haihao
On Ma, 2024-05-20 at 10:05 +0800, fei.w.wang-at-intel@ffmpeg.org wrote: > From: Fei Wang > > Signed-off-by: Fei Wang > --- >  libavcodec/qsvdec.c | 6 +- >  1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c > index a51ddace62..12cf6

Re: [FFmpeg-devel] [PATCH 1/2] lavc/qsvdec: update HDR side data on output AVFrame for AV1 decoding

2024-05-23 Thread Xiang, Haihao
On Wo, 2024-05-22 at 12:15 +0800, Xiang, Haihao wrote: > From: Haihao Xiang > > The SDK may provide HDR metadata for HDR streams via mfxExtBuffer > attached on output mfxFrameSurface1 > > Signed-off-by: Haihao Xiang > --- >  libavcodec/qsvdec.c | 48 -

Re: [FFmpeg-devel] [PATCH v2] avutil/hwcontext_videotoolbox: Set proper CVBuffer colorspace

2024-05-23 Thread Zhao Zhili
> On May 24, 2024, at 02:41, epira...@gmail.com wrote: > > > On 23 May 2024, at 18:05, Zhao Zhili wrote: > >>> On May 21, 2024, at 09:56, Gnattu OC via ffmpeg-devel >>> wrote: >>> On May 20, 2024, at 09:12, Marvin Scholz wrote: Fix #10884 --- libavutil/hwcon

Re: [FFmpeg-devel] [PATCH 1/4] lavc/qsvenc: rename the skip_frame private option to qsv_skip_frame

2024-05-23 Thread Xiang, Haihao
On Do, 2024-05-23 at 11:03 +0200, Anton Khirnov wrote: > It conflicts with the AVCodecContext option of the same name. > --- The skip_frame option in AVCodecContext is for decoding only, may we not use this option for encoding ? >  libavcodec/qsvenc.h | 2 +- >  1 file changed, 1 insertion(+), 1

[FFmpeg-devel] [PATCH 1/2] lavc/qsvdec: fix keyframes

2024-05-23 Thread Xiang, Haihao
From: Haihao Xiang MFX_FRAMETYPE_IDR is ORed to the frame type for AVC and HEVC keyframes, and MFX_FRAMETYPE_I is taken as keyframe flag for other codecs when getting the output surface from the SDK, hence we may mark the output frame as keyframe accordingly. Signed-off-by: Haihao Xiang --- li

[FFmpeg-devel] [PATCH 2/2] lavc/qsvenc: respect user's setting for keyframes

2024-05-23 Thread Xiang, Haihao
From: Haihao Xiang For example: ./ffmpeg -hwaccel qsv -i input.mp4 -force_key_frames:v source -c:v hevc_qsv -f null - Signed-off-by: Haihao Xiang --- libavcodec/qsvenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index 3df355ce

Re: [FFmpeg-devel] [PATCH v2 1/5] lavc/vp9dsp: R-V V mc avg

2024-05-23 Thread flow gg
I want to update the VP9 bilin load, just like you did with VP8, but it seems like this patch([PATCH v2 1/5] lavc/vp9dsp: R-V V mc avg) doesn't merge the current updates here but merges the previous version instead, so the subsequent patches will have conflicts. flow gg 于2024年5月22日周三 01:15写道: >

Re: [FFmpeg-devel] [PATCH] avformat/demux: Remove dead stores

2024-05-23 Thread Andreas Rheinhardt
Michael Niedermayer: > Fixes: CID1473512 Unused value > Fixes: CID1529228 Unused value > > Sponsored-by: Sovereign Tech Fund > Signed-off-by: Michael Niedermayer > --- > libavformat/demux.c | 5 - > 1 file changed, 5 deletions(-) > > diff --git a/libavformat/demux.c b/libavformat/demux.c >

Re: [FFmpeg-devel] [PATCH 4/5] avformat/matroskaenc: Check ff_put_wav_header() failure

2024-05-23 Thread Andreas Rheinhardt
Andreas Rheinhardt: > Fixes Coverity issue #1506706. > > Signed-off-by: Andreas Rheinhardt > --- > libavformat/matroskaenc.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c > index 63bae9fe1c..76c542d50b 100644 >

Re: [FFmpeg-devel] [PATCH] avformat/mpegts: Don't use uninitialized value in av_log()

2024-05-23 Thread Andreas Rheinhardt
Andreas Rheinhardt: > It is undefined behaviour in (at least) C11 (see C11 6.3.2.1 (2)). > Fixes Coverity issue #1500314. > > Signed-off-by: Andreas Rheinhardt > --- > libavformat/mpegts.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavformat/mpegts.c b/libavforma

Re: [FFmpeg-devel] [PATCH 1/6] avformat/oggdec: Check ffio_ensure_seekback()

2024-05-23 Thread Andreas Rheinhardt
Andreas Rheinhardt: > Fixes Coverity issue #1492327. > > Signed-off-by: Andreas Rheinhardt > --- > libavformat/oggdec.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c > index 8ea81e5d45..5339fdd32c 100644 > --- a/libavform

Re: [FFmpeg-devel] [PATCH] lavc/rv32dsp: remove stray load immediate

2024-05-23 Thread Andreas Rheinhardt
Rémi Denis-Courmont: > --- > libavcodec/riscv/rv34dsp_rvv.S | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/libavcodec/riscv/rv34dsp_rvv.S b/libavcodec/riscv/rv34dsp_rvv.S > index f1f6345012..8eda01665d 100644 > --- a/libavcodec/riscv/rv34dsp_rvv.S > +++ b/libavcodec/riscv/rv34dsp_rvv.S >

Re: [FFmpeg-devel] [PATCH] avformat/async, cache: Use more unique context names

2024-05-23 Thread Andreas Rheinhardt
Andreas Rheinhardt: > Otherwise Doxygen thinks any text like "Context for foo" > is a link to the async protocol's struct called "Context". > > Reported-by: Andrew Sayers > Signed-off-by: Andreas Rheinhardt > --- > libavformat/async.c | 22 +++--- > libavformat/cache.c | 18