Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Stefano Sabatini <stefasab@gmail.com>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Cc: Andrew Sayers <ffmpeg-devel@pileofstuff.org>
Subject: Re: [FFmpeg-devel] [PATCH 2/2] all: harmonise "{Decoding, Encoding, Audio, Video}:" comments
Date: Sat, 9 Mar 2024 17:14:22 +0100
Message-ID: <ZeyK3kw6w2a8ZB5F@mariano> (raw)
In-Reply-To: <20240229162424.850294-3-ffmpeg-devel@pileofstuff.org>

On date Thursday 2024-02-29 16:23:07 +0000, Andrew Sayers wrote:

> There seems to be a convention for documenting meanings:
> 
>     /**
>      * Encoding: (meaning in encoding context)
>      * Decoding: (meaning in decoding context)
>      */
> 
> At a glance, these are confusingly similar to ownership comments.
> They are also rendered by doxygen as long, hard-to-read paragraphs.

I still don't understand what you mean by "ownership" and "meaning"
and their difference.

To me they look like the same thing, i.e. they define the semantics
depending on the operation context (encoding/decoding). In addition to
this, there might be a difference releated to the media content. To
distinguish the two, I'd say "operational" and "media" context.

> Reformat these comments to be more visually distinct and readable.
> ---
>  libavcodec/avcodec.h   | 19 +++++++++++++------
>  libavformat/avformat.h | 22 +++++++++++++++-------
>  2 files changed, 28 insertions(+), 13 deletions(-)
> 
> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> index 43859251cc..e2193f1d00 100644
> --- a/libavcodec/avcodec.h
> +++ b/libavcodec/avcodec.h
> @@ -586,16 +586,23 @@ typedef struct AVCodecContext {
>      /**
>       * Codec delay.
>       *
> -     * Encoding: Number of frames delay there will be from the encoder input to
> -     *           the decoder output. (we assume the decoder matches the spec)
> -     * Decoding: Number of frames delay in addition to what a standard decoder
> -     *           as specified in the spec would produce.
> +     * *Encoding:*
> +     *
> +     *   Number of frames delay there will be from the encoder input to
> +     *   the decoder output. (we assume the decoder matches the spec).
> +     *
> +     * *Decoding:*
> +     *
> +     *   Number of frames delay in addition to what a standard decoder
> +     *   as specified in the spec would produce.
> +     *
> +     * *Video:*
>       *
> -     * Video:
>       *   Number of frames the decoded output will be delayed relative to the
>       *   encoded input.
>       *
> -     * Audio:
> +     * *Audio:*
> +     *
>       *   For encoding, this field is unused (see initial_padding).
>       *
>       *   For decoding, this is the number of samples the decoder needs to
> diff --git a/libavformat/avformat.h b/libavformat/avformat.h
> index 35b7f78ec7..be97947bd1 100644
> --- a/libavformat/avformat.h
> +++ b/libavformat/avformat.h
> @@ -882,19 +882,27 @@ typedef struct AVStream {
>      AVRational time_base;
>  
>      /**
> -     * Decoding: pts of the first frame of the stream in presentation order, in stream time base.
> -     * Only set this if you are absolutely 100% sure that the value you set
> -     * it to really is the pts of the first frame.
> -     * This may be undefined (AV_NOPTS_VALUE).
> +     * *Decoding:*
> +     *
> +     *   pts of the first frame of the stream in presentation order, in stream time base.
> +     *
> +     *   Only set this if you are absolutely 100% sure that the value you set
> +     *   it to really is the pts of the first frame.
> +     *
> +     *   This may be undefined (AV_NOPTS_VALUE).
> +     *

This conventions seems at odd with the prevoius patch, where you was
preferring the - decoding/- encoding style.

[...]
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

      reply	other threads:[~2024-03-09 16:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-29 16:23 [FFmpeg-devel] [PATCH 0/2] Harmonise comments about ownership/meaning Andrew Sayers
2024-02-29 16:23 ` [FFmpeg-devel] [PATCH 1/2] avformat: harmonise "- {decoding, encoding, demuxing, muxing}: " comments Andrew Sayers
2024-03-09 16:06   ` Stefano Sabatini
2024-03-09 20:17     ` Andrew Sayers
2024-02-29 16:23 ` [FFmpeg-devel] [PATCH 2/2] all: harmonise "{Decoding, Encoding, Audio, Video}:" comments Andrew Sayers
2024-03-09 16:14   ` Stefano Sabatini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZeyK3kw6w2a8ZB5F@mariano \
    --to=stefasab@gmail.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    --cc=ffmpeg-devel@pileofstuff.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git