From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
To: ffmpeg-devel@ffmpeg.org
Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Subject: [FFmpeg-devel] [PATCH 1/5] avcodec/avcodec: Move AV_ER_* and FF_COMPLIANCE_* to defs.h
Date: Wed, 21 Sep 2022 03:30:19 +0200
Message-ID: <GV1P250MB0737CC466D153BBD200DF91D8F4F9@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM> (raw)
They are also frequently used in libavformat.
This change does not cause any breakage as avcodec.h
includes defs.h.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
doc/APIchanges | 3 +++
libavcodec/avcodec.h | 25 +++----------------------
libavcodec/defs.h | 22 ++++++++++++++++++++++
libavcodec/version.h | 2 +-
4 files changed, 29 insertions(+), 23 deletions(-)
diff --git a/doc/APIchanges b/doc/APIchanges
index 729f56be7b..cb7592bb64 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -14,6 +14,9 @@ libavutil: 2021-04-27
API changes, most recent first:
+2022-09-21 - xxxxxxxxxx - lavc 59.45.100 - avcodec.h defs.h
+ Move the AV_EF_* and FF_COMPLIANCE_* defines from avcodec.h to defs.h.
+
2022-09-03 - xxxxxxxxxx - lavu 57.36.100 - pixfmt.h
Add AV_PIX_FMT_P012, AV_PIX_FMT_Y212, AV_PIX_FMT_XV30, AV_PIX_FMT_XV36
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 7db5d1b1c5..0769577338 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -1305,13 +1305,9 @@ typedef struct AVCodecContext {
* unofficial and experimental (that is, they always try to decode things
* when they can) unless they are explicitly asked to behave stupidly
* (=strictly conform to the specs)
+ * This may only be set to one of the FF_COMPLIANCE_* values in defs.h.
*/
int strict_std_compliance;
-#define FF_COMPLIANCE_VERY_STRICT 2 ///< Strictly conform to an older more strict version of the spec or reference software.
-#define FF_COMPLIANCE_STRICT 1 ///< Strictly conform to all the things in the spec no matter what consequences.
-#define FF_COMPLIANCE_NORMAL 0
-#define FF_COMPLIANCE_UNOFFICIAL -1 ///< Allow unofficial extensions
-#define FF_COMPLIANCE_EXPERIMENTAL -2 ///< Allow nonstandardized experimental things.
/**
* error concealment flags
@@ -1347,28 +1343,13 @@ typedef struct AVCodecContext {
/**
* Error recognition; may misdetect some more or less valid parts as errors.
+ * This is a bitfield of the AV_EF_* values defined in defs.h.
+ *
* - encoding: Set by user.
* - decoding: Set by user.
*/
int err_recognition;
-/**
- * Verify checksums embedded in the bitstream (could be of either encoded or
- * decoded data, depending on the codec) and print an error message on mismatch.
- * If AV_EF_EXPLODE is also set, a mismatching checksum will result in the
- * decoder returning an error.
- */
-#define AV_EF_CRCCHECK (1<<0)
-#define AV_EF_BITSTREAM (1<<1) ///< detect bitstream specification deviations
-#define AV_EF_BUFFER (1<<2) ///< detect improper bitstream length
-#define AV_EF_EXPLODE (1<<3) ///< abort decoding on minor error detection
-
-#define AV_EF_IGNORE_ERR (1<<15) ///< ignore errors and continue
-#define AV_EF_CAREFUL (1<<16) ///< consider things that violate the spec, are fast to calculate and have not been seen in the wild as errors
-#define AV_EF_COMPLIANT (1<<17) ///< consider all spec non compliances as errors
-#define AV_EF_AGGRESSIVE (1<<18) ///< consider things that a sane encoder should not do as an error
-
-
/**
* opaque 64-bit number (generally a PTS) that will be reordered and
* output in AVFrame.reordered_opaque
diff --git a/libavcodec/defs.h b/libavcodec/defs.h
index 420a042b8f..fbe3254db2 100644
--- a/libavcodec/defs.h
+++ b/libavcodec/defs.h
@@ -39,6 +39,28 @@
*/
#define AV_INPUT_BUFFER_PADDING_SIZE 64
+/**
+ * Verify checksums embedded in the bitstream (could be of either encoded or
+ * decoded data, depending on the format) and print an error message on mismatch.
+ * If AV_EF_EXPLODE is also set, a mismatching checksum will result in the
+ * decoder/demuxer returning an error.
+ */
+#define AV_EF_CRCCHECK (1<<0)
+#define AV_EF_BITSTREAM (1<<1) ///< detect bitstream specification deviations
+#define AV_EF_BUFFER (1<<2) ///< detect improper bitstream length
+#define AV_EF_EXPLODE (1<<3) ///< abort decoding on minor error detection
+
+#define AV_EF_IGNORE_ERR (1<<15) ///< ignore errors and continue
+#define AV_EF_CAREFUL (1<<16) ///< consider things that violate the spec, are fast to calculate and have not been seen in the wild as errors
+#define AV_EF_COMPLIANT (1<<17) ///< consider all spec non compliances as errors
+#define AV_EF_AGGRESSIVE (1<<18) ///< consider things that a sane encoder/muxer should not do as an error
+
+#define FF_COMPLIANCE_VERY_STRICT 2 ///< Strictly conform to an older more strict version of the spec or reference software.
+#define FF_COMPLIANCE_STRICT 1 ///< Strictly conform to all the things in the spec no matter what consequences.
+#define FF_COMPLIANCE_NORMAL 0
+#define FF_COMPLIANCE_UNOFFICIAL -1 ///< Allow unofficial extensions
+#define FF_COMPLIANCE_EXPERIMENTAL -2 ///< Allow nonstandardized experimental things.
+
/**
* @ingroup lavc_decoding
*/
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 2cad78e640..a3441795e0 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -29,7 +29,7 @@
#include "version_major.h"
-#define LIBAVCODEC_VERSION_MINOR 44
+#define LIBAVCODEC_VERSION_MINOR 45
#define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
--
2.34.1
_______________________________________________
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 reply other threads:[~2022-09-21 1:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-21 1:30 Andreas Rheinhardt [this message]
2022-09-21 1:34 ` [FFmpeg-devel] [PATCH 2/5] avutil/pixdesc: Add av_chroma_location_(enum_to_pos|pos_to_enum) Andreas Rheinhardt
2022-09-25 0:09 ` Andreas Rheinhardt
2022-09-21 1:35 ` [FFmpeg-devel] [PATCH 3/5] avformat/matroska*: Use av_chroma_location_(pos_to_enum|enum_to_pos) Andreas Rheinhardt
2022-09-21 1:35 ` [FFmpeg-devel] [PATCH 4/5] avcodec/avcodec: Deprecate lavc chroma pos API functions Andreas Rheinhardt
2022-09-21 1:35 ` [FFmpeg-devel] [PATCH 5/5] avformat/internal: Don't include avcodec.h Andreas Rheinhardt
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=GV1P250MB0737CC466D153BBD200DF91D8F4F9@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM \
--to=andreas.rheinhardt@outlook.com \
--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