From: Andrew Sayers <ffmpeg-devel@pileofstuff.org>
To: ffmpeg-devel@ffmpeg.org
Cc: Andrew Sayers <ffmpeg-devel@pileofstuff.org>
Subject: [FFmpeg-devel] [PATCH 2/2] all: harmonise "{Decoding, Encoding, Audio, Video}:" comments
Date: Thu, 29 Feb 2024 16:23:07 +0000
Message-ID: <20240229162424.850294-3-ffmpeg-devel@pileofstuff.org> (raw)
In-Reply-To: <20240229162424.850294-1-ffmpeg-devel@pileofstuff.org>
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.
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).
+ *
* @note The ASF header does NOT contain a correct start_time the ASF
* demuxer must NOT set this.
*/
int64_t start_time;
/**
- * Decoding: duration of the stream, in stream time base.
- * If a source file does not specify a duration, but does specify
- * a bitrate, this value will be estimated from bitrate and file size.
+ * *Decoding:*
+ *
+ * Duration of the stream, in stream time base.
+ *
+ * If a source file does not specify a duration, but does specify
+ * a bitrate, this value will be estimated from bitrate and file size.
*
* - decoding: set by libavformat
* - encoding: may be set by the caller before avformat_write_header() to
--
2.43.0
_______________________________________________
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".
next prev parent reply other threads:[~2024-02-29 16:24 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 ` Andrew Sayers [this message]
2024-03-09 16:14 ` [FFmpeg-devel] [PATCH 2/2] all: harmonise "{Decoding, Encoding, Audio, Video}:" comments Stefano Sabatini
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=20240229162424.850294-3-ffmpeg-devel@pileofstuff.org \
--to=ffmpeg-devel@pileofstuff.org \
--cc=ffmpeg-devel@ffmpeg.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