[FFmpeg-cvslog] avcodec: add av_codec_get_max_lowres()

Michael Niedermayer git at videolan.org
Thu Oct 3 16:41:59 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Oct  3 12:27:07 2013 +0200| [e57dba0d52df7869a803f4b7e472d57aab1a1426] | committer: Michael Niedermayer

avcodec: add av_codec_get_max_lowres()

Reviewed-by: Stefano Sabatini <stefasab at gmail.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e57dba0d52df7869a803f4b7e472d57aab1a1426
---

 doc/APIchanges       |    3 +++
 libavcodec/avcodec.h |    4 +++-
 libavcodec/utils.c   |    5 +++++
 libavcodec/version.h |    4 ++--
 4 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/doc/APIchanges b/doc/APIchanges
index 743b5b0..dc43313 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -15,6 +15,9 @@ libavutil:     2012-10-22
 
 API changes, most recent first:
 
+2013-10-03 - xxxxxxx - lavc 55.34.100 - avcodec.h
+  Add av_codec_get_max_lowres()
+
 2013-10-02 - xxxxxxx - lavf 55.19.100 - avformat.h
   Add audio/video/subtitle AVCodec fields to AVFormatContext to force specific
   decoders
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 2cf30dd..2917a2f 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -2933,7 +2933,7 @@ typedef struct AVCodec {
     const enum AVSampleFormat *sample_fmts; ///< array of supported sample formats, or NULL if unknown, array is terminated by -1
     const uint64_t *channel_layouts;         ///< array of support channel layouts, or NULL if unknown. array is terminated by 0
 #if FF_API_LOWRES
-    uint8_t max_lowres;                     ///< maximum value for lowres supported by the decoder
+    uint8_t max_lowres;                     ///< maximum value for lowres supported by the decoder, no direct access, use av_codec_get_max_lowres()
 #endif
     const AVClass *priv_class;              ///< AVClass for the private context
     const AVProfile *profiles;              ///< array of recognized profiles, or NULL if unknown, array is terminated by {FF_PROFILE_UNKNOWN}
@@ -3001,6 +3001,8 @@ typedef struct AVCodec {
     void (*flush)(AVCodecContext *);
 } AVCodec;
 
+int av_codec_get_max_lowres(const AVCodec *codec);
+
 /**
  * AVHWAccel.
  */
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index f7b08ea..20de48e 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1045,6 +1045,11 @@ MAKE_ACCESSORS(AVCodecContext, codec, AVRational, pkt_timebase)
 MAKE_ACCESSORS(AVCodecContext, codec, const AVCodecDescriptor *, codec_descriptor)
 MAKE_ACCESSORS(AVCodecContext, codec, int, lowres)
 
+int av_codec_get_max_lowres(const AVCodec *codec)
+{
+    return codec->max_lowres;
+}
+
 static void avcodec_get_subtitle_defaults(AVSubtitle *sub)
 {
     memset(sub, 0, sizeof(*sub));
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 1d23ef3..7f9682e 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -29,8 +29,8 @@
 #include "libavutil/avutil.h"
 
 #define LIBAVCODEC_VERSION_MAJOR 55
-#define LIBAVCODEC_VERSION_MINOR  33
-#define LIBAVCODEC_VERSION_MICRO 101
+#define LIBAVCODEC_VERSION_MINOR  34
+#define LIBAVCODEC_VERSION_MICRO 100
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
                                                LIBAVCODEC_VERSION_MINOR, \



More information about the ffmpeg-cvslog mailing list