[FFmpeg-devel] [PATCH v4] avfilter: fix data type for {Tile, Untile}Context's image size

2024-07-23 Thread Andrew Sayers
These are accessed as AV_OPT_TYPE_IMAGE_SIZE AVOptions, so must be implemented as (signed) int's --- libavfilter/vf_tile.c | 2 +- libavfilter/vf_untile.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_tile.c b/libavfilter/vf_tile.c index b45e739bb6..95ac3a

Re: [FFmpeg-devel] [PATCH v2] avfilter: fix data type for {Tile, Untile}Context's image size

2024-07-19 Thread Andrew Sayers
On Fri, Jul 19, 2024 at 05:31:53PM +0200, Paul B Mahol wrote: > Internal/private filter structures/API changes does not need be mentioned > in that file, isn't that fact obvious even for average Joe? The documentation[1] says "FFmpeg guarantees backward API and ABI compatibility for each library",

[FFmpeg-devel] [PATCH v2] avfilter: fix data type for {Tile, Untile}Context's image size

2024-07-19 Thread Andrew Sayers
These are accessed as AV_OPT_TYPE_IMAGE_SIZE AVOptions, so must be implemented as (signed) int's --- doc/APIchanges | 6 ++ libavfilter/version_major.h | 1 + libavfilter/vf_tile.c | 4 libavfilter/vf_untile.c | 4 4 files changed, 15 insertions(+) diff --git

Re: [FFmpeg-devel] [PATCH v2] lavu/opt: Mention that AV_OPT_TYPE_IMAGE_SIZE can be unsigned

2024-07-19 Thread Andrew Sayers
Ping ___ 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 v3 3/3] tests/fate/source-check: Check for AVERROR codes without error strings

2024-07-18 Thread Andrew Sayers
--- tests/fate/source-check.sh | 8 tests/ref/fate/source | 1 + 2 files changed, 9 insertions(+) diff --git a/tests/fate/source-check.sh b/tests/fate/source-check.sh index 4d7e175784..71f01cbdec 100755 --- a/tests/fate/source-check.sh +++ b/tests/fate/source-check.sh @@ -45,4 +45,1

[FFmpeg-devel] [PATCH v3 2/3] avutil/error: Provide better feedback about unknown error codes

2024-07-18 Thread Andrew Sayers
AVERROR messages should always be less than zero, and are often FourCCs. For error codes that aren't explicitly handled by error.c (e.g. undocumented system error codes, or internal error codes that leaked to the public API), print the FourCC code so the user has a little more information to work

[FFmpeg-devel] [PATCH v3 1/3] avutil/utils: Allow "!" in FourCCs

2024-07-18 Thread Andrew Sayers
For example, AVERROR_BUG is "BUG!" --- libavutil/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/utils.c b/libavutil/utils.c index 94d247bbee..a94589e873 100644 --- a/libavutil/utils.c +++ b/libavutil/utils.c @@ -81,7 +81,7 @@ char *av_fourcc_make_string(char

[FFmpeg-devel] [PATCH v3 0/3] Protect against undocumented error codes

2024-07-18 Thread Andrew Sayers
I hadn't noticed av_fourcc2str() before - so long as it's patched to handle "!", it would be a clear improvement over the earlier patches. The example in the "!" patch is "BUG!", which is handled in error.c, but shows that "!" is considered a valid FourCC character. I think I understand the fate

Re: [FFmpeg-devel] [OSS-Fuzz] Have you considered enabling memory sanitizer?

2024-07-16 Thread Andrew Sayers
On Tue, Jul 16, 2024 at 02:25:04PM +0200, Michael Niedermayer wrote: > On Mon, Jul 15, 2024 at 02:36:15PM +0200, Vittorio Giovara wrote: > > Disagree - this is not the right way to attract new contributors. > > no ? > did you do a study ? > > try this: > A. "please we need more maintainers" (we t

[FFmpeg-devel] [RFC PATCH v2] avutil/error: Provide better feedback about unknown error codes

2024-07-16 Thread Andrew Sayers
AVERROR messages should always be less than zero, and are usually based on three or four ASCII characters. For error codes that aren't explicitly handled by error.c (e.g. FFERROR_REDO), print the ASCII code so the user has a little more information. If a non-negative number somehow gets passed to

[FFmpeg-devel] [RFC PATCH v2 0/1] avutil/error: Provide better feedback about unknown error codes

2024-07-16 Thread Andrew Sayers
I'm having trouble managing this conversation. On one hand, you've brought up several important details that would need to be included in a new patch. On the other hand, I'm pretty sure we're talking past each other on the big problems, and need to start over. So let's fork the discussion. # Fir

Re: [FFmpeg-devel] [PATCH] avutil/error: Provide better feedback about unknown error codes

2024-07-15 Thread Andrew Sayers
On Mon, Jul 15, 2024 at 05:45:24PM +0200, Marton Balint wrote: > > > On Mon, 15 Jul 2024, Andrew Sayers wrote: > > > AVERROR messages should always be less than zero, > > and are usually based on three or four ASCII characters. > > > > For error codes that

[FFmpeg-devel] [PATCH] avutil/error: Provide better feedback about unknown error codes

2024-07-15 Thread Andrew Sayers
AVERROR messages should always be less than zero, and are usually based on three or four ASCII characters. For error codes that aren't explicitly handled by error.c (e.g. FFERROR_REDO), print the ASCII code so the user has a little more information. If a non-negative number somehow gets passed to

Re: [FFmpeg-devel] [PATCH v2] lavu/opt: Mention that AV_OPT_TYPE_IMAGE_SIZE can be unsigned

2024-07-10 Thread Andrew Sayers
On Wed, Jul 10, 2024 at 04:01:44PM +0200, Paul B Mahol wrote: > tile and untile are wrong How so? ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-de

[FFmpeg-devel] [PATCH v2] lavu/opt: Mention that AV_OPT_TYPE_IMAGE_SIZE can be unsigned

2024-07-08 Thread Andrew Sayers
TileContext in libavfilter/vf_tile.c and UntileContext in libavfilter/vf_untile.c point to unsigned ints - confirm this is OK. --- Thanks Marcus - have updated my e-mail script to remind myself in future. libavutil/opt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavut

[FFmpeg-devel] [PATCH] Mention that AV_OPT_TYPE_IMAGE_SIZE can be unsigned

2024-07-08 Thread Andrew Sayers
TileContext in libavfilter/vf_tile.c and UntileContext in libavfilter/vf_untile.c point to unsigned ints - confirm this is OK. --- libavutil/opt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/opt.h b/libavutil/opt.h index 07e27a9208..9339b1a6ac 100644 --- a/libavut

Re: [FFmpeg-devel] [RFC]] swscale modernization proposal

2024-07-08 Thread Andrew Sayers
On Mon, Jul 08, 2024 at 07:58:44AM -0400, Ronald S. Bultje wrote: > On Sat, Jul 6, 2024 at 1:29 PM Hendrik Leppkes wrote: > > On Sat, Jul 6, 2024 at 6:42 PM Michael Niedermayer [...] > > > > The entire point of presets is to have them provide a predefined set > > > > of parameters, easy for users

Re: [FFmpeg-devel] [PATCH v4 0/3] s/RUNTIME/POST_INIT_SETTABLE/

2024-07-06 Thread Andrew Sayers
On Sat, Jul 06, 2024 at 06:49:51PM +0200, Michael Niedermayer wrote: > On Sat, Jul 06, 2024 at 12:40:07PM +0200, Paul B Mahol wrote: > [...] > > > its much more text to type too. > > shorter options: > > AV_OPT_FLAG_ALTERABLE_PARAM > > AV_OPT_FLAG_MUTABLE_PARAM > > (just in case consensus ends

Re: [FFmpeg-devel] [RFC]] swscale modernization proposal

2024-07-06 Thread Andrew Sayers
On Fri, Jul 05, 2024 at 11:34:06PM +0200, Michael Niedermayer wrote: > On Fri, Jul 05, 2024 at 08:31:17PM +0200, Niklas Haas wrote: [...] > > > Attached is my revised working draft of . > > I dont agree to the renaming of swscale, that is heading toward Would you mind talking a bit more about th

Re: [FFmpeg-devel] [PATCH v4 0/3] s/RUNTIME/POST_INIT_SETTABLE/

2024-07-06 Thread Andrew Sayers
On Sat, Jul 06, 2024 at 11:37:19AM +0200, Stefano Sabatini wrote: > On date Tuesday 2024-07-02 10:08:37 +0100, Andrew Sayers wrote: [...] > While I agree with Anton that we should avoid duplication, for the > usual arguments that a reference should avoid duplication of content >

Re: [FFmpeg-devel] [PATCH v2 1/8] swscale: document SWS_FULL_CHR_H_* flags

2024-07-04 Thread Andrew Sayers
On Thu, Jul 04, 2024 at 07:59:10PM +0200, Niklas Haas wrote: > On Thu, 04 Jul 2024 19:56:56 +0200 Niklas Haas wrote: > > On Thu, 04 Jul 2024 16:24:24 +0100 Andrew Sayers > > wrote: > > > On Thu, Jul 04, 2024 at 04:30:57PM +0200, Niklas Haas wrote: &

Re: [FFmpeg-devel] [PATCH v2 1/8] swscale: document SWS_FULL_CHR_H_* flags

2024-07-04 Thread Andrew Sayers
On Thu, Jul 04, 2024 at 04:30:57PM +0200, Niklas Haas wrote: > From: Niklas Haas > > Based on my best understanding of what they do, given the source code. > --- > libswscale/swscale.h | 28 ++-- > 1 file changed, 26 insertions(+), 2 deletions(-) > > diff --git a/libswsc

Re: [FFmpeg-devel] [PATCH v4 2/3] lavu/opt: Mention AV_OPT_FLAG_POST_INIT_SETTABLE_PARAM in more places

2024-07-02 Thread Andrew Sayers
On Tue, Jul 02, 2024 at 12:16:24PM +0200, Anton Khirnov wrote: > Quoting Andrew Sayers (2024-07-02 12:13:16) > > On Tue, Jul 02, 2024 at 11:52:29AM +0200, Anton Khirnov wrote: > > > Quoting Andrew Sayers (2024-07-02 11:08:39) > > > > An inattentive user might not see

Re: [FFmpeg-devel] [PATCH v4 2/3] lavu/opt: Mention AV_OPT_FLAG_POST_INIT_SETTABLE_PARAM in more places

2024-07-02 Thread Andrew Sayers
On Tue, Jul 02, 2024 at 11:52:29AM +0200, Anton Khirnov wrote: > Quoting Andrew Sayers (2024-07-02 11:08:39) > > An inattentive user might not see the explanation at the top of this file. > > Paste the explanation to all the places they might see it. > > Duplication is

Re: [FFmpeg-devel] Development process for explaining contexts (was Re: [PATCH v6 1/4] doc: Explain what "context" means)

2024-07-02 Thread Andrew Sayers
On Tue, Jul 02, 2024 at 12:16:21AM +0200, Stefano Sabatini wrote: > On date Sunday 2024-06-16 19:02:51 +0100, Andrew Sayers wrote: [...] > > Andrew, sorry again for the slow reply. Thinking about the whole > discussion, I reckon I probably gave some bad advice, and I totally > unde

[FFmpeg-devel] [PATCH v4 3/3] all: s/AV_OPT_FLAG_RUNTIME_PARAM/AV_OPT_FLAG_POST_INIT_SETTABLE_PARAM/g

2024-07-02 Thread Andrew Sayers
Use the new name for the macro throughout the codebase. Patch generated with the following command: sed -i -e 's/AV_OPT_FLAG_RUNTIME_PARAM/AV_OPT_FLAG_POST_INIT_SETTABLE_PARAM/g' \ $( git grep -l AV_OPT_FLAG_RUNTIME_PARAM | grep -v '^libavutil/opt.h' | grep -v '^doc/APIchanges$' ) --- libav

[FFmpeg-devel] [PATCH v4 2/3] lavu/opt: Mention AV_OPT_FLAG_POST_INIT_SETTABLE_PARAM in more places

2024-07-02 Thread Andrew Sayers
An inattentive user might not see the explanation at the top of this file. Paste the explanation to all the places they might see it. --- libavutil/opt.h | 21 + 1 file changed, 21 insertions(+) diff --git a/libavutil/opt.h b/libavutil/opt.h index b78c3406fa..289ae9f410 100644

[FFmpeg-devel] [PATCH v4 1/3] lavu/opt: Rename AV_OPT_FLAG_RUNTIME_PARAM to ...POST_INIT_SETTABLE_PARAM

2024-07-02 Thread Andrew Sayers
The old name could be misread as the opposite of "AV_OPT_FLAG_READONLY" - some things can be set at runtime, others are read-only. Clarify that this refers to options that can be set after the struct is initialized. --- doc/APIchanges | 4 libavutil/opt.h | 15 ++- liba

[FFmpeg-devel] [PATCH v4 0/3] s/RUNTIME/POST_INIT_SETTABLE/

2024-07-02 Thread Andrew Sayers
Some notes about this version: As previously mentioned, I think this is better with all three patches, but can live without #2. I think I've followed the deprecation instructions, but editing APIchanges seems to imply needing a minor version bump? This patch includes said bump. Zhao Zhili arg

Re: [FFmpeg-devel] [RFC]] swscale modernization proposal

2024-06-23 Thread Andrew Sayers
On Sun, Jun 23, 2024 at 02:57:31PM -0300, James Almer wrote: > On 6/22/2024 7:19 PM, Vittorio Giovara wrote: > > Needless to say I support the plan of renaming the library so that it can > > be inline with the other libraries names, and the use of a separate header > > since downstream applications

Re: [FFmpeg-devel] [RFC]] swscale modernization proposal

2024-06-22 Thread Andrew Sayers
On Sat, Jun 22, 2024 at 03:13:34PM +0200, Niklas Haas wrote: [...] > > ## Comments / feedback? > > Does the above approach seem reasonable? How do people feel about introducing > a new API vs. trying to hammer the existing API into the shape I want it to > be? > > I've attached an example of wh

Re: [FFmpeg-devel] [PATCH] avfilter/af_afade: fix opt_type for nb_samples/ns

2024-06-22 Thread Andrew Sayers
On Sat, Jun 22, 2024 at 03:20:52PM +0200, Andreas Rheinhardt wrote: > Andrew Sayers: > > The actual value is an int64_t, and is accessed elsewhere as > > AV_OPT_TYPE_INT64. > > > > Accessing it as INT will likely cause bugs on some 32-bit architectures. > > Whet

[FFmpeg-devel] [PATCH] avfilter/af_afade: fix opt_type for nb_samples/ns

2024-06-22 Thread Andrew Sayers
The actual value is an int64_t, and is accessed elsewhere as AV_OPT_TYPE_INT64. Accessing it as INT will likely cause bugs on some 32-bit architectures. --- libavfilter/af_afade.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/af_afade.c b/libavfilter/af_afade

Re: [FFmpeg-devel] [RFC] 5 year plan & Inovation

2024-06-17 Thread Andrew Sayers
On Mon, Jun 17, 2024 at 09:29:57PM +0200, Vittorio Giovara wrote: > On Mon, Jun 17, 2024 at 9:01 PM Nicolas George wrote: > > > Michael Niedermayer (12024-06-17): > > > also if you look at google trends, even today more people search for > > ffserver > > > than txproto. In fact at every point in

[FFmpeg-devel] Development process for explaining contexts (was Re: [PATCH v6 1/4] doc: Explain what "context" means)

2024-06-16 Thread Andrew Sayers
Meta note #1: I've replied in this thread but changed the subject line. That's because it needs to stay focussed on solving this thread's problem, but may be of more general interest. Meta note #2: Stefano, I appreciate your feedback, but would rather wait for [1] to get sorted out, then formulate

[FFmpeg-devel] [PATCH v3 3/3] all: s/AV_OPT_FLAG_RUNTIME_PARAM/AV_OPT_FLAG_POST_INIT_SETTABLE_PARAM/g

2024-06-16 Thread Andrew Sayers
Use the new name for the macro throughout the codebase. Patch generated with the following command: sed -i -e 's/AV_OPT_FLAG_RUNTIME_PARAM/AV_OPT_FLAG_POST_INIT_SETTABLE_PARAM/g' \ $( git grep -l AV_OPT_FLAG_RUNTIME_PARAM | grep -v '^libavutil/opt.h' | grep -v '^doc/APIchanges$' ) --- libav

[FFmpeg-devel] [PATCH v3 2/3] lavu/opt: Mention AV_OPT_FLAG_POST_INIT_SETTABLE_PARAM in more places

2024-06-16 Thread Andrew Sayers
An inattentive user might not see the explanation at the top of this file. Paste the explanation to all the places they might see it. --- libavutil/opt.h | 21 + 1 file changed, 21 insertions(+) diff --git a/libavutil/opt.h b/libavutil/opt.h index e050d126ed..06cbe3c336 100644

[FFmpeg-devel] [PATCH v3 1/3] lavu/opt: Rename AV_OPT_FLAG_RUNTIME_PARAM to ...POST_INIT_SETTABLE_PARAM

2024-06-16 Thread Andrew Sayers
The old name could be misread as the opposite of "AV_OPT_FLAG_READONLY" - some things can be set at runtime, others are read-only. Clarify that this refers to options that can be set after the struct is initialized. --- libavutil/opt.h | 10 +- 1 file changed, 9 insertions(+), 1 deletion(

[FFmpeg-devel] [PATCH v3 0/3] s/RUNTIME/POST_INIT_SETTABLE/

2024-06-16 Thread Andrew Sayers
AV_OPT_FLAG_POST_INIT_SETTABLE_PARAM is fine by me, here's a patch. I've added a "@deprecated" comment for the old name, but would this need to be queued up for 8.0? Technically this is a backwards-incompatible change to the existing API, even though it doesn't change the ABI or generate warnings

Re: [FFmpeg-devel] [PATCH] web/download: Refer to trac downstreams page

2024-06-13 Thread Andrew Sayers
On Thu, Jun 13, 2024 at 09:39:34PM +0200, Michael Niedermayer wrote: > From: Andrew Sayers > > Signed-off-by: Michael Niedermayer > --- > src/download | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/src/download b/src/download > in

Re: [FFmpeg-devel] [PATCH] web: move 6.0 to olddownload

2024-06-13 Thread Andrew Sayers
On Thu, Jun 13, 2024 at 12:10:21PM +0200, Michael Niedermayer wrote: > I see no users on https://trac.ffmpeg.org/wiki/Downstreams I don't have a strong opinion about the move itself, but can that page be linked from the Old Releases section? Something like: Older versions are available at t

Re: [FFmpeg-devel] lavfi: add perlin noise generator

2024-06-13 Thread Andrew Sayers
Some documentation nitpicks. Nothing jumped out about the code, but I don't know the algorithm well enough to spot anything deep. > From 9932cfc19500acbd0685eb2cc8fd88e9af3f5dbd Mon Sep 17 00:00:00 2001 > From: Stefano Sabatini > Date: Mon, 27 May 2024 11:19:08 +0200 > Subject: [PATCH] lavfi: ad

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

2024-06-13 Thread Andrew Sayers
On Wed, Jun 12, 2024 at 10:52:00PM +0200, Stefano Sabatini wrote: > On date Tuesday 2024-06-04 15:47:21 +0100, Andrew Sayers wrote: [...] > My impression is that this is growing out of scope for a > reference. The doxy is a reference, therefore it should be clean and > terse, and we

[FFmpeg-devel] [PATCH v2] lavu/opt: Discuss AV_OPT_FLAG_RUNTIME_PARAM more explicitly

2024-06-06 Thread Andrew Sayers
After a struct is initialized, only options with the AV_OPT_FLAG_RUNTIME_PARAM flag can be modified. Make that clearer, for the sake of readers who would otherwise assume all options can be modified at any time. --- libavutil/opt.h | 26 +- 1 file changed, 25 insertions(+)

Re: [FFmpeg-devel] [PATCH] lavu/opt: Mention that AVOptions is not reentrant

2024-06-06 Thread Andrew Sayers
On Thu, Jun 06, 2024 at 05:21:00PM +0200, Andreas Rheinhardt wrote: > Andrew Sayers: > > On Thu, Jun 06, 2024 at 04:24:11PM +0200, Michael Niedermayer wrote: > >> On Thu, Jun 06, 2024 at 09:29:24AM +0100, Andrew Sayers wrote: > >>> On Thu, Jun 06, 2024 at 01:17:4

Re: [FFmpeg-devel] [PATCH] lavu/opt: Mention that AVOptions is not reentrant

2024-06-06 Thread Andrew Sayers
On Thu, Jun 06, 2024 at 04:24:11PM +0200, Michael Niedermayer wrote: > On Thu, Jun 06, 2024 at 09:29:24AM +0100, Andrew Sayers wrote: > > On Thu, Jun 06, 2024 at 01:17:48AM +0200, Michael Niedermayer wrote: > > [...] > > > AVOption simply provides light weight acc

Re: [FFmpeg-devel] [PATCH] lavu/opt: Mention that AVOptions is not reentrant

2024-06-06 Thread Andrew Sayers
On Thu, Jun 06, 2024 at 01:17:48AM +0200, Michael Niedermayer wrote: [...] > AVOption simply provides light weight access to the struct fields. > Calling AVOption non re-entrant in modifying a field you arent even allowed > to modify from 2 threads is confusing I think you're saying there's alread

Re: [FFmpeg-devel] [PATCH] lavu/opt: Mention that AVOptions is not reentrant

2024-06-05 Thread Andrew Sayers
On Wed, Jun 05, 2024 at 09:46:16AM -0400, Ronald S. Bultje wrote: > Hi, > > On Wed, Jun 5, 2024 at 9:44 AM Andrew Sayers > wrote: > > > On Wed, Jun 05, 2024 at 03:34:50PM +0200, Paul B Mahol wrote: > > > On Wed, Jun 5, 2024 at 3:18 PM Andrew Sayers <

Re: [FFmpeg-devel] [PATCH] lavu/opt: Mention that AVOptions is not reentrant

2024-06-05 Thread Andrew Sayers
On Wed, Jun 05, 2024 at 03:34:50PM +0200, Paul B Mahol wrote: > On Wed, Jun 5, 2024 at 3:18 PM Andrew Sayers > wrote: > > > An external API developer might think they can use AVOptions to modify > > values > > during playback (e.g. putting a playback quality slider ne

[FFmpeg-devel] [PATCH] lavu/opt: Mention that AVOptions is not reentrant

2024-06-05 Thread Andrew Sayers
An external API developer might think they can use AVOptions to modify values during playback (e.g. putting a playback quality slider next to the volume slider). Make it clear that behaviour is not recommended. Include the warning in the group description and the text for every function that sets

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

2024-06-05 Thread Andrew Sayers
Note: I somehow managed to send this message directly to Anton before - sorry Anton for the message spam, please reply to this one if you want the list to see it! On Wed, Jun 05, 2024 at 10:12:47AM +0200, Anton Khirnov wrote: > Quoting Andrew Sayers (2024-06-04 16:47:23) > > The goal o

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

2024-06-05 Thread Andrew Sayers
On Wed, Jun 05, 2024 at 12:34:48PM +0200, Stefano Sabatini wrote: > On date Tuesday 2024-06-04 15:47:22 +0100, Andrew Sayers wrote: > > + * Structs that only use logging facilities are often referred to as > > + * "AVClass context structures", while those t

Re: [FFmpeg-devel] [RFC] STF 2025

2024-06-04 Thread Andrew Sayers
On Fri, May 17, 2024 at 03:49:58PM +0200, Michael Niedermayer wrote: > Hi all > > Before this is forgotten again, better start some dicsussion too early than > too late Unless there's a better place to put these, I plan to reply to this message whenever I notice someone bring up something that s

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

2024-06-04 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 v6 3/4] all: Link to "context" from all public contexts with documentation

2024-06-04 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 v6 2/4] lavu: Clarify relationship between AVClass, AVOption and context

2024-06-04 Thread Andrew Sayers
--- libavutil/log.h | 16 +--- libavutil/opt.h | 26 +- 2 files changed, 34 insertions(+), 8 deletions(-) diff --git a/libavutil/log.h b/libavutil/log.h index ab7ceabe22..88b35897c6 100644 --- a/libavutil/log.h +++ b/libavutil/log.h @@ -59,9 +59,19 @@ typedef e

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

2024-06-04 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 | 430 + 1 file changed, 430 insertions(+) create mode 100644 doc/context.md diff --git a/

[FFmpeg-devel] [PATCH v6 0/4] doc: Explain what "context" means

2024-06-04 Thread Andrew Sayers
I'm making a list of little documentation patches to submit as a set once this patchset is done. I've put Sw{r,s}Context on the list, and will think about their relationship to other opaque AVOptions-enabled structs as part of that. I don't see anything in that discussion that affects this patchse

Re: [FFmpeg-devel] FFmpeg 7.0 blocking issues

2024-06-04 Thread Andrew Sayers
On Mon, Jun 03, 2024 at 11:32:37PM +0200, Michael Niedermayer wrote: > On Sun, Jun 02, 2024 at 03:49:42PM +0200, Sebastian Ramacher wrote: [...] > > Just as a FYI: ffmpeg 7.0 breaks close to 70 reverse dependencies in > > Debian. The list is available at [1]. So if you want ffmpeg X to be in > > De

Re: [FFmpeg-devel] [PATCH v5 0/6] avformat/network: improve ff_neterrno()

2024-05-31 Thread Andrew Sayers
On Thu, May 16, 2024 at 12:59:05PM +0100, Andrew Sayers wrote: > On Thu, May 16, 2024 at 01:42:23PM +0300, Rémi Denis-Courmont wrote: > > Err, please. Keep this to the Windows back-end. Nothing good is going to > > happen with a function that does nothing (on other platf

Re: [FFmpeg-devel] git problems

2024-05-30 Thread Andrew Sayers
On Thu, May 30, 2024 at 01:30:09AM +0200, Michael Niedermayer wrote: > Hi all > > It seems the security update (https://ubuntu.com/security/notices/USN-6793-1) > broke public git > > We use gitolite that runs under its own user and serve git through apache > which runs under a different user. > A

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

2024-05-29 Thread Andrew Sayers
On Wed, May 29, 2024 at 01:06:30PM +0200, Paul B Mahol wrote: > On Wed, May 29, 2024 at 12:50 PM Andrew Sayers > wrote: > [...] > > *Are AVOptions just command-line options?* > > > > I have trouble with statements like "AVOptions is a framework for options"

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

2024-05-29 Thread Andrew Sayers
Posting this separately, as these are practical "how does FFmpeg work" issues vaguely inspired by recent discussions. *How do namespaces work in FFmpeg?* We've talked a bit about function namespaces recently. One reason I've suggested they're a weak signal is because they aren't really addresse

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

2024-05-29 Thread Andrew Sayers
On Tue, May 28, 2024 at 07:24:55PM +0200, Stefano Sabatini wrote: > > I think we start with different assumptions: you assume that most of > the readers are familiar with OOP jargon, and that they will leverage > the OOP jargon to understand the FFmpeg API. I think this is Not exactly. I'm sayin

Re: [FFmpeg-devel] [PATCH] avcodec/mediacodec: Add support of dynamic bitrate

2024-05-28 Thread Andrew Sayers
On Mon, May 27, 2024 at 01:49:47PM +0100, Dmitrii Okunev wrote: > MediaCodec supports parameter "video-bitrate" to change the bitrate > on fly. This commit add possibility to use it. > > It adds option -bitrate_ctrl_socket to the encoder which makes > the encoder to create an UNIX socket and liste

Re: [FFmpeg-devel] [PATCH v3 2/3] avfilter/af_volumedetect.c: Add 32bit float audio support

2024-05-28 Thread Andrew Sayers
On Mon, May 20, 2024 at 11:16:05PM +0300, Yigithan Yigit wrote: > --- > libavfilter/af_volumedetect.c | 159 -- > 1 file changed, 133 insertions(+), 26 deletions(-) > > diff --git a/libavfilter/af_volumedetect.c b/libavfilter/af_volumedetect.c > index 327801a7f9..d

Re: [FFmpeg-devel] [RFC 00/13] flvdec/flvenc: add support for enhanced rtmp codecs and multitrack/multichannel

2024-05-28 Thread Andrew Sayers
On Tue, May 21, 2024 at 11:02:09AM +0200, Timo Rothenpieler wrote: > This is based on the preliminary spec for enhanced rtmp v2: > https://veovera.org/docs/enhanced/enhanced-rtmp-v2 > > The spec is not final, and can still undergo breaking changes, hence this set > is purely for comments and revi

Re: [FFmpeg-devel] [PATCH v10 12/13] avcodec: add D3D12VA hardware HEVC encoder

2024-05-28 Thread Andrew Sayers
On Wed, May 22, 2024 at 09:26:25AM +0800, tong1.wu-at-intel@ffmpeg.org wrote: > +static int d3d12va_create_encoder_heap(AVCodecContext* avctx) Nitpick: s/\* / \*/ I'm trying to write typo-detection bot. This is the only problem it noticed in this patchset, but more nits incoming elsewhere.

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

2024-05-26 Thread Andrew Sayers
It feels like we've got through most of the mid-level "how FFmpeg works" stuff, and now we're left with language choices (e.g "options" vs. "introspection") and philosophical discussions (e.g. the relationship between contexts and OOP). It's probably best to philosophise first, then come back to la

Re: [FFmpeg-devel] [RFC] STF 2025

2024-05-24 Thread Andrew Sayers
On Fri, May 17, 2024 at 03:49:58PM +0200, Michael Niedermayer wrote: > Hi all > > Before this is forgotten again, better start some dicsussion too early than > too late This comment is inspired by the other subthread, but not directly in reply to it. I'm replying to this post rather than get in

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

2024-05-24 Thread Andrew Sayers
On Fri, May 24, 2024 at 03:50:52AM +0200, Michael Niedermayer wrote: > On Thu, May 23, 2024 at 09:00:39PM +0100, Andrew Sayers wrote: > > Imagine you wanted to write a system that nudged people to try new codecs. > > It might say e.g. "you seem to be using H.264, would y

[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 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 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 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 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

Re: [FFmpeg-devel] [PATCH v4 4/4] lavf: Add documentation for private "Context" classes

2024-05-22 Thread Andrew Sayers
On Wed, May 22, 2024 at 05:24:36PM +0200, Andreas Rheinhardt wrote: > These structures should be renamed instead of adding these comments > (which are pointless for internal developers). I just sent a patch for that. > Thanks for pointing out the issue. Oh, great! So the next version of this patc

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

2024-05-22 Thread Andrew Sayers
nswers to specific questions. > > On date Wednesday 2024-05-15 16:54:19 +0100, Andrew Sayers wrote: > > Derived from detailed explanations kindly provided by Stefano Sabatini: > > https://ffmpeg.org/pipermail/ffmpeg-devel/2024-April/325903.ht

Re: [FFmpeg-devel] [PATCH v4 4/4] lavf: Add documentation for private "Context" classes

2024-05-22 Thread Andrew Sayers
On Wed, May 22, 2024 at 12:08:29PM +0200, Stefano Sabatini wrote: > On date Wednesday 2024-05-15 16:54:22 +0100, Andrew Sayers wrote: > > Doxygen thinks any text like "Context for foo" is a link to a struct called > > "Context". > > Add a description and

Re: [FFmpeg-devel] [PATCH v3 1/3] doc: Explain what "context" means

2024-05-22 Thread Andrew Sayers
On Wed, May 22, 2024 at 12:37:37PM +0200, Stefano Sabatini wrote: > On date Sunday 2024-05-05 22:04:36 +0100, Andrew Sayers wrote: > > I'm still travelling, so the following thoughts might be a bit > > half-formed. But I wanted to get some feedback before sitting down &g

Re: [FFmpeg-devel] [PATCH v9 11/13] avutil/hwcontext_d3d12va: add Flags for resource creation

2024-05-21 Thread Andrew Sayers
(Only reviewing documentation, not code) On Mon, May 20, 2024 at 10:52:20PM +0800, tong1.wu-at-intel@ffmpeg.org wrote: > From: Tong Wu > > Flags field is added to support diffferent resource creation. > > Signed-off-by: Tong Wu > --- > doc/APIchanges| 3 +++ > libavutil/h

Re: [FFmpeg-devel] [RFC] STF 2025

2024-05-19 Thread Andrew Sayers
On Sun, May 19, 2024 at 01:29:43PM +0200, Thilo Borgmann via ffmpeg-devel wrote: > > [...] > > > * Fund administrative / maintainance work (one example is the mailman > > > upgrade that is needed > > > with the next OS upgrade on one of our servers (this is not as trivial > > > as one might >

Re: [FFmpeg-devel] [PATCH] doc/developer: add examples to clarify code style

2024-05-18 Thread Andrew Sayers
I would have found this very helpful! On Sat, May 18, 2024 at 07:00:50PM +0200, Marvin Scholz wrote: > Given the frequency that new developers, myself included, get the > code style wrong, it is useful to add some examples to clarify how > things should be done. > --- > doc/developer.texi | 57 ++

Re: [FFmpeg-devel] [RFC] STF 2025

2024-05-17 Thread Andrew Sayers
On Fri, May 17, 2024 at 03:49:58PM +0200, Michael Niedermayer wrote: > Hi all > > Before this is forgotten again, better start some dicsussion too early than > too late > > I propose that if we have the oppertunity again next year to receive a grant > from STF. That we use it to fund: > > * Pau

Re: [FFmpeg-devel] [PATCH 1/6] lavf/tls_mbedtls: handle more error codes for human-readable message

2024-05-17 Thread Andrew Sayers
On Fri, May 17, 2024 at 10:34:26AM +0200, Sfan5 wrote: > Signed-off-by: sfan5 > --- > libavformat/tls_mbedtls.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/libavformat/tls_mbedtls.c b/libavformat/tls_mbedtls.c > index 1a182e735e..fd6ba0b1f5 100644 > --- a/libavformat/tls_mbedt

Re: [FFmpeg-devel] [RFC] Value analysis with Frama-C's Eva plugin (and an UB fix)

2024-05-16 Thread Andrew Sayers
On Thu, May 16, 2024 at 02:31:31PM +0200, Tomas Härdin wrote: > tor 2024-05-16 klockan 13:12 +0100 skrev Andrew Sayers: > > On Wed, May 15, 2024 at 09:39:43PM +0200, Tomas Härdin wrote: > > > Hi > > > > > > So as I said in the coverity thread it would be good

[FFmpeg-devel] [PATCH] avutil/opt: Say more often that AV_OPT_SEARCH_CHILDREN searches children first

2024-05-16 Thread Andrew Sayers
This behaviour is already mentioned in the documentation for AV_OPT_SEARCH_CHILDREN itself, but that's quite easy to miss. Knowing that child options *override* parent ones is useful for users, so it's worth mentioning in all the places they would look. av_opt_find() had a note that av_opt_find2(

[FFmpeg-devel] [PATCH] all: s/Open/Allocate and initialize/ in comments

2024-05-16 Thread Andrew Sayers
Comments for a few prominent functions claim to "open" something, when they actually "allocate and initialize" that thing. Using a different word misleads users into thinking it's doing a different thing, making the interface more time-consuming to learn. Replace "open" with the more standard "al

Re: [FFmpeg-devel] [RFC] Value analysis with Frama-C's Eva plugin (and an UB fix)

2024-05-16 Thread Andrew Sayers
On Wed, May 15, 2024 at 09:39:43PM +0200, Tomas Härdin wrote: > Hi > > So as I said in the coverity thread it would be good if we could get at > least part of the codebase covered using formal tools. To this effect I > sat down for an hour just now and gave libavutil/common.h a go with > Frama-C's

[FFmpeg-devel] [PATCH v5 6/6] avformat/avformat: Document return codes for av_format_(de)init

2024-05-16 Thread Andrew Sayers
--- libavformat/avformat.h | 4 1 file changed, 4 insertions(+) diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 8afdcd9fd0..f624fb1e2e 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -1944,12 +1944,16 @@ const char *avformat_license(void); * This func

[FFmpeg-devel] [PATCH v5 5/6] avformat/network: Return 0/AVERROR from ff_network_init()

2024-05-16 Thread Andrew Sayers
--- libavformat/avio.c| 7 +-- libavformat/network.c | 7 +++ libavformat/rtsp.c| 14 -- libavformat/rtspdec.c | 5 +++-- libavformat/sapdec.c | 5 +++-- libavformat/sapenc.c | 5 +++-- 6 files changed, 25 insertions(+), 18 deletions(-) diff --git a/libavformat/

[FFmpeg-devel] [PATCH v5 4/6] avformat/network: add ff_neterror2() for compatibility with Windows

2024-05-16 Thread Andrew Sayers
This is not currently used anywhere, but included to avoid potential future surprises. --- libavformat/network.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/libavformat/network.h b/libavformat/network.h index 1ac067f09f..7c8f81a050 100644 --- a/libavformat/network.h +++ b/libavformat

[FFmpeg-devel] [PATCH v5 3/6] avformat/network: add ff_neterror2() for cases that don't use WSAGetLastError

2024-05-16 Thread Andrew Sayers
For example, WSAStartup()'s documentation says: "A call to the WSAGetLastError function is not needed and should not be used" --- libavformat/network.c | 5 - libavformat/network.h | 6 ++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/libavformat/network.c b/libavfor

[FFmpeg-devel] [PATCH v5 2/6] Rename "ff_neterrno()" to "ff_neterror()"

2024-05-16 Thread Andrew Sayers
This function does not check errno on Windows, so the old name was misleading. Actual command: sed -i -e 's/ff_neterrno/ff_neterror/g' $( git grep -l ff_neterrno ) --- libavformat/network.c | 24 libavformat/network.h | 4 ++-- libavformat/rtpproto.c | 8

[FFmpeg-devel] [PATCH v5 0/6] avformat/network: improve ff_neterrno()

2024-05-16 Thread Andrew Sayers
On Thu, May 16, 2024 at 01:42:23PM +0300, Rémi Denis-Courmont wrote: > Err, please. Keep this to the Windows back-end. Nothing good is going to > happen with a function that does nothing (on other platforms) and has a > nondescript numbered name. I have no strong opinion either way, and it feels

[FFmpeg-devel] [PATCH v5 1/6] Add documentation for ff_neterrno()

2024-05-16 Thread Andrew Sayers
--- libavformat/network.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/libavformat/network.h b/libavformat/network.h index ca214087fc..728c20c9bb 100644 --- a/libavformat/network.h +++ b/libavformat/network.h @@ -57,6 +57,11 @@ #define getsockopt(a, b, c, d, e) getsockopt(a, b,

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

2024-05-16 Thread Andrew Sayers
On Wed, May 15, 2024 at 06:46:19PM +0200, Lynne via ffmpeg-devel wrote: > On 15/05/2024 17:54, Andrew Sayers wrote: > > Some headings needed to be rewritten to accomodate the text, > > (hopefully) without changing the meaning. > > --- > > libavcodec/a

[FFmpeg-devel] [PATCH v4 5/5] avformat/avformat: Document return codes for av_format_(de)init

2024-05-16 Thread Andrew Sayers
--- libavformat/avformat.h | 4 1 file changed, 4 insertions(+) diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 8afdcd9fd0..f624fb1e2e 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -1944,12 +1944,16 @@ const char *avformat_license(void); * This func

[FFmpeg-devel] [PATCH v4 4/5] avformat/network: Return 0/AVERROR from ff_network_init()

2024-05-16 Thread Andrew Sayers
--- libavformat/avio.c| 7 +-- libavformat/network.c | 7 +++ libavformat/rtsp.c| 14 -- libavformat/rtspdec.c | 5 +++-- libavformat/sapdec.c | 5 +++-- libavformat/sapenc.c | 5 +++-- 6 files changed, 25 insertions(+), 18 deletions(-) diff --git a/libavformat/

[FFmpeg-devel] [PATCH v4 3/5] avformat/network: add ff_neterror2() for cases where we already have an error

2024-05-16 Thread Andrew Sayers
For example, WSAStartup()'s documentation says: "A call to the WSAGetLastError function is not needed and should not be used" --- libavformat/network.c | 5 - libavformat/network.h | 12 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/libavformat/network.c b/

  1   2   >