[FFmpeg-cvslog] Merge commit 'bb45d11282d93af0e8d4c8fd6bc6405f7439a940'

James Almer git at videolan.org
Mon Oct 23 22:27:31 EEST 2017


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Mon Oct 23 16:19:38 2017 -0300| [b79a7da36faa6bb5914b04800b548e99eb3b81ca] | committer: James Almer

Merge commit 'bb45d11282d93af0e8d4c8fd6bc6405f7439a940'

* commit 'bb45d11282d93af0e8d4c8fd6bc6405f7439a940':
  lavc: Drop deprecated codec flags

Merged-by: James Almer <jamrial at gmail.com>

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

 libavcodec/avcodec.h       | 177 ---------------------------------------------
 libavcodec/libxvid.c       |   5 --
 libavcodec/mpegvideo_enc.c |  14 ----
 libavcodec/options_table.h |  12 ---
 libavcodec/version.h       |  15 ----
 5 files changed, 223 deletions(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 6ce315c2eb..1f76833f0e 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -774,18 +774,6 @@ typedef struct AVCodecDescriptor {
  */
 #define AV_INPUT_BUFFER_MIN_SIZE 16384
 
-#if FF_API_WITHOUT_PREFIX
-/**
- * @deprecated use AV_INPUT_BUFFER_PADDING_SIZE instead
- */
-#define FF_INPUT_BUFFER_PADDING_SIZE 32
-
-/**
- * @deprecated use AV_INPUT_BUFFER_MIN_SIZE instead
- */
-#define FF_MIN_BUFFER_SIZE 16384
-#endif /* FF_API_WITHOUT_PREFIX */
-
 /**
  * @ingroup lavc_encoding
  * motion estimation type.
@@ -1075,171 +1063,6 @@ typedef struct RcOverride{
  */
 #define AV_CODEC_CAP_LOSSLESS         0x80000000
 
-
-#if FF_API_WITHOUT_PREFIX
-/**
- * Allow decoders to produce frames with data planes that are not aligned
- * to CPU requirements (e.g. due to cropping).
- */
-#define CODEC_FLAG_UNALIGNED AV_CODEC_FLAG_UNALIGNED
-#define CODEC_FLAG_QSCALE AV_CODEC_FLAG_QSCALE
-#define CODEC_FLAG_4MV    AV_CODEC_FLAG_4MV
-#define CODEC_FLAG_OUTPUT_CORRUPT AV_CODEC_FLAG_OUTPUT_CORRUPT
-#define CODEC_FLAG_QPEL   AV_CODEC_FLAG_QPEL
-#if FF_API_GMC
-/**
- * @deprecated use the "gmc" private option of the libxvid encoder
- */
-#define CODEC_FLAG_GMC    0x0020  ///< Use GMC.
-#endif
-#if FF_API_MV0
-/**
- * @deprecated use the flag "mv0" in the "mpv_flags" private option of the
- * mpegvideo encoders
- */
-#define CODEC_FLAG_MV0    0x0040
-#endif
-#if FF_API_INPUT_PRESERVED
-/**
- * @deprecated passing reference-counted frames to the encoders replaces this
- * flag
- */
-#define CODEC_FLAG_INPUT_PRESERVED 0x0100
-#endif
-#define CODEC_FLAG_PASS1           AV_CODEC_FLAG_PASS1
-#define CODEC_FLAG_PASS2           AV_CODEC_FLAG_PASS2
-#define CODEC_FLAG_GRAY            AV_CODEC_FLAG_GRAY
-#define CODEC_FLAG_PSNR            AV_CODEC_FLAG_PSNR
-#define CODEC_FLAG_TRUNCATED       AV_CODEC_FLAG_TRUNCATED
-
-#if FF_API_NORMALIZE_AQP
-/**
- * @deprecated use the flag "naq" in the "mpv_flags" private option of the
- * mpegvideo encoders
- */
-#define CODEC_FLAG_NORMALIZE_AQP  0x00020000
-#endif
-#define CODEC_FLAG_INTERLACED_DCT AV_CODEC_FLAG_INTERLACED_DCT
-#define CODEC_FLAG_LOW_DELAY      AV_CODEC_FLAG_LOW_DELAY
-#define CODEC_FLAG_GLOBAL_HEADER  AV_CODEC_FLAG_GLOBAL_HEADER
-#define CODEC_FLAG_BITEXACT       AV_CODEC_FLAG_BITEXACT
-#define CODEC_FLAG_AC_PRED        AV_CODEC_FLAG_AC_PRED
-#define CODEC_FLAG_LOOP_FILTER    AV_CODEC_FLAG_LOOP_FILTER
-#define CODEC_FLAG_INTERLACED_ME  AV_CODEC_FLAG_INTERLACED_ME
-#define CODEC_FLAG_CLOSED_GOP     AV_CODEC_FLAG_CLOSED_GOP
-#define CODEC_FLAG2_FAST          AV_CODEC_FLAG2_FAST
-#define CODEC_FLAG2_NO_OUTPUT     AV_CODEC_FLAG2_NO_OUTPUT
-#define CODEC_FLAG2_LOCAL_HEADER  AV_CODEC_FLAG2_LOCAL_HEADER
-#define CODEC_FLAG2_DROP_FRAME_TIMECODE AV_CODEC_FLAG2_DROP_FRAME_TIMECODE
-#define CODEC_FLAG2_IGNORE_CROP   AV_CODEC_FLAG2_IGNORE_CROP
-
-#define CODEC_FLAG2_CHUNKS        AV_CODEC_FLAG2_CHUNKS
-#define CODEC_FLAG2_SHOW_ALL      AV_CODEC_FLAG2_SHOW_ALL
-#define CODEC_FLAG2_EXPORT_MVS    AV_CODEC_FLAG2_EXPORT_MVS
-#define CODEC_FLAG2_SKIP_MANUAL   AV_CODEC_FLAG2_SKIP_MANUAL
-
-/* Unsupported options :
- *              Syntax Arithmetic coding (SAC)
- *              Reference Picture Selection
- *              Independent Segment Decoding */
-/* /Fx */
-/* codec capabilities */
-
-#define CODEC_CAP_DRAW_HORIZ_BAND AV_CODEC_CAP_DRAW_HORIZ_BAND ///< Decoder can use draw_horiz_band callback.
-/**
- * Codec uses get_buffer() for allocating buffers and supports custom allocators.
- * If not set, it might not use get_buffer() at all or use operations that
- * assume the buffer was allocated by avcodec_default_get_buffer.
- */
-#define CODEC_CAP_DR1             AV_CODEC_CAP_DR1
-#define CODEC_CAP_TRUNCATED       AV_CODEC_CAP_TRUNCATED
-/**
- * Encoder or decoder requires flushing with NULL input at the end in order to
- * give the complete and correct output.
- *
- * NOTE: If this flag is not set, the codec is guaranteed to never be fed with
- *       with NULL data. The user can still send NULL data to the public encode
- *       or decode function, but libavcodec will not pass it along to the codec
- *       unless this flag is set.
- *
- * Decoders:
- * The decoder has a non-zero delay and needs to be fed with avpkt->data=NULL,
- * avpkt->size=0 at the end to get the delayed data until the decoder no longer
- * returns frames.
- *
- * Encoders:
- * The encoder needs to be fed with NULL data at the end of encoding until the
- * encoder no longer returns data.
- *
- * NOTE: For encoders implementing the AVCodec.encode2() function, setting this
- *       flag also means that the encoder must set the pts and duration for
- *       each output packet. If this flag is not set, the pts and duration will
- *       be determined by libavcodec from the input frame.
- */
-#define CODEC_CAP_DELAY           AV_CODEC_CAP_DELAY
-/**
- * Codec can be fed a final frame with a smaller size.
- * This can be used to prevent truncation of the last audio samples.
- */
-#define CODEC_CAP_SMALL_LAST_FRAME AV_CODEC_CAP_SMALL_LAST_FRAME
-
-/**
- * Codec can output multiple frames per AVPacket
- * Normally demuxers return one frame at a time, demuxers which do not do
- * are connected to a parser to split what they return into proper frames.
- * This flag is reserved to the very rare category of codecs which have a
- * bitstream that cannot be split into frames without timeconsuming
- * operations like full decoding. Demuxers carrying such bitstreams thus
- * may return multiple frames in a packet. This has many disadvantages like
- * prohibiting stream copy in many cases thus it should only be considered
- * as a last resort.
- */
-#define CODEC_CAP_SUBFRAMES        AV_CODEC_CAP_SUBFRAMES
-/**
- * Codec is experimental and is thus avoided in favor of non experimental
- * encoders
- */
-#define CODEC_CAP_EXPERIMENTAL     AV_CODEC_CAP_EXPERIMENTAL
-/**
- * Codec should fill in channel configuration and samplerate instead of container
- */
-#define CODEC_CAP_CHANNEL_CONF     AV_CODEC_CAP_CHANNEL_CONF
-/**
- * Codec supports frame-level multithreading.
- */
-#define CODEC_CAP_FRAME_THREADS    AV_CODEC_CAP_FRAME_THREADS
-/**
- * Codec supports slice-based (or partition-based) multithreading.
- */
-#define CODEC_CAP_SLICE_THREADS    AV_CODEC_CAP_SLICE_THREADS
-/**
- * Codec supports changed parameters at any point.
- */
-#define CODEC_CAP_PARAM_CHANGE     AV_CODEC_CAP_PARAM_CHANGE
-/**
- * Codec supports avctx->thread_count == 0 (auto).
- */
-#define CODEC_CAP_AUTO_THREADS     AV_CODEC_CAP_AUTO_THREADS
-/**
- * Audio encoder supports receiving a different number of samples in each call.
- */
-#define CODEC_CAP_VARIABLE_FRAME_SIZE AV_CODEC_CAP_VARIABLE_FRAME_SIZE
-/**
- * Codec is intra only.
- */
-#define CODEC_CAP_INTRA_ONLY       AV_CODEC_CAP_INTRA_ONLY
-/**
- * Codec is lossless.
- */
-#define CODEC_CAP_LOSSLESS         AV_CODEC_CAP_LOSSLESS
-
-/**
- * HWAccel is experimental and is thus avoided in favor of non experimental
- * codecs
- */
-#define HWACCEL_CODEC_CAP_EXPERIMENTAL     0x0200
-#endif /* FF_API_WITHOUT_PREFIX */
-
 /**
  * Pan Scan area.
  * This specifies the area which should be displayed.
diff --git a/libavcodec/libxvid.c b/libavcodec/libxvid.c
index 6dd5d8d7a2..d76264d517 100644
--- a/libavcodec/libxvid.c
+++ b/libavcodec/libxvid.c
@@ -462,11 +462,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
     }
 
     /* Bring in VOL flags from ffmpeg command-line */
-#if FF_API_GMC
-    if (avctx->flags & CODEC_FLAG_GMC)
-        x->gmc = 1;
-#endif
-
     x->vol_flags = 0;
     if (x->gmc) {
         x->vol_flags |= XVID_VOL_GMC;
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 68e1996687..682a202c43 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -1069,20 +1069,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
             return ret;
     }
 
-#if FF_API_NORMALIZE_AQP
-    FF_DISABLE_DEPRECATION_WARNINGS
-    if (avctx->flags & CODEC_FLAG_NORMALIZE_AQP)
-        s->mpv_flags |= FF_MPV_FLAG_NAQ;
-    FF_ENABLE_DEPRECATION_WARNINGS;
-#endif
-
-#if FF_API_MV0
-    FF_DISABLE_DEPRECATION_WARNINGS
-    if (avctx->flags & CODEC_FLAG_MV0)
-        s->mpv_flags |= FF_MPV_FLAG_MV0;
-    FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
 #if FF_API_MPV_OPT
     FF_DISABLE_DEPRECATION_WARNINGS
     if (avctx->rc_qsquish != 0.0)
diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h
index ca2132cb3e..c020d41930 100644
--- a/libavcodec/options_table.h
+++ b/libavcodec/options_table.h
@@ -54,23 +54,11 @@ static const AVOption avcodec_options[] = {
 {"qpel", "use 1/4-pel motion compensation", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_QPEL }, INT_MIN, INT_MAX, V|E, "flags"},
 {"loop", "use loop filter", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_LOOP_FILTER }, INT_MIN, INT_MAX, V|E, "flags"},
 {"qscale", "use fixed qscale", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_QSCALE }, INT_MIN, INT_MAX, 0, "flags"},
-#if FF_API_GMC
-{"gmc", "use gmc", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_GMC }, INT_MIN, INT_MAX, V|E, "flags"},
-#endif
-#if FF_API_MV0
-{"mv0", "always try a mb with mv=<0,0>", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_MV0 }, INT_MIN, INT_MAX, V|E, "flags"},
-#endif
-#if FF_API_INPUT_PRESERVED
-{"input_preserved", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_INPUT_PRESERVED }, INT_MIN, INT_MAX, 0, "flags"},
-#endif
 {"pass1", "use internal 2-pass ratecontrol in first  pass mode", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_PASS1 }, INT_MIN, INT_MAX, 0, "flags"},
 {"pass2", "use internal 2-pass ratecontrol in second pass mode", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_PASS2 }, INT_MIN, INT_MAX, 0, "flags"},
 {"gray", "only decode/encode grayscale", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_GRAY }, INT_MIN, INT_MAX, V|E|D, "flags"},
 {"psnr", "error[?] variables will be set during encoding", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_PSNR }, INT_MIN, INT_MAX, V|E, "flags"},
 {"truncated", "Input bitstream might be randomly truncated", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_TRUNCATED }, INT_MIN, INT_MAX, V|D, "flags"},
-#if FF_API_NORMALIZE_AQP
-{"naq", "normalize adaptive quantization", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_NORMALIZE_AQP }, INT_MIN, INT_MAX, V|E, "flags"},
-#endif
 {"ildct", "use interlaced DCT", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_INTERLACED_DCT }, INT_MIN, INT_MAX, V|E, "flags"},
 {"low_delay", "force low delay", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_LOW_DELAY }, INT_MIN, INT_MAX, V|D|E, "flags"},
 {"global_header", "place global headers in extradata instead of every keyframe", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_GLOBAL_HEADER }, INT_MIN, INT_MAX, V|A|E, "flags"},
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 2835b5fd42..e0be3d5021 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -57,18 +57,6 @@
 #ifndef FF_API_DEBUG_MV
 #define FF_API_DEBUG_MV          (LIBAVCODEC_VERSION_MAJOR < 58)
 #endif
-#ifndef FF_API_INPUT_PRESERVED
-#define FF_API_INPUT_PRESERVED   (LIBAVCODEC_VERSION_MAJOR < 58)
-#endif
-#ifndef FF_API_NORMALIZE_AQP
-#define FF_API_NORMALIZE_AQP     (LIBAVCODEC_VERSION_MAJOR < 58)
-#endif
-#ifndef FF_API_GMC
-#define FF_API_GMC               (LIBAVCODEC_VERSION_MAJOR < 58)
-#endif
-#ifndef FF_API_MV0
-#define FF_API_MV0               (LIBAVCODEC_VERSION_MAJOR < 58)
-#endif
 #ifndef FF_API_CODEC_NAME
 #define FF_API_CODEC_NAME        (LIBAVCODEC_VERSION_MAJOR < 58)
 #endif
@@ -106,9 +94,6 @@
 #ifndef FF_API_MOTION_EST
 #define FF_API_MOTION_EST        (LIBAVCODEC_VERSION_MAJOR < 58)
 #endif
-#ifndef FF_API_WITHOUT_PREFIX
-#define FF_API_WITHOUT_PREFIX    (LIBAVCODEC_VERSION_MAJOR < 58)
-#endif
 #ifndef FF_API_SIDEDATA_ONLY_PKT
 #define FF_API_SIDEDATA_ONLY_PKT (LIBAVCODEC_VERSION_MAJOR < 59)
 #endif


======================================================================

diff --cc libavcodec/avcodec.h
index 6ce315c2eb,f7c879604e..1f76833f0e
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@@ -1056,190 -901,7 +1044,25 @@@ typedef struct RcOverride
   * Audio encoder supports receiving a different number of samples in each call.
   */
  #define AV_CODEC_CAP_VARIABLE_FRAME_SIZE (1 << 16)
 +/**
 + * Decoder is not a preferred choice for probing.
 + * This indicates that the decoder is not a good choice for probing.
 + * It could for example be an expensive to spin up hardware decoder,
 + * or it could simply not provide a lot of useful information about
 + * the stream.
 + * A decoder marked with this flag should only be used as last resort
 + * choice for probing.
 + */
 +#define AV_CODEC_CAP_AVOID_PROBING       (1 << 17)
 +/**
 + * Codec is intra only.
 + */
 +#define AV_CODEC_CAP_INTRA_ONLY       0x40000000
 +/**
 + * Codec is lossless.
 + */
 +#define AV_CODEC_CAP_LOSSLESS         0x80000000
  
- 
- #if FF_API_WITHOUT_PREFIX
- /**
-  * Allow decoders to produce frames with data planes that are not aligned
-  * to CPU requirements (e.g. due to cropping).
-  */
- #define CODEC_FLAG_UNALIGNED AV_CODEC_FLAG_UNALIGNED
- #define CODEC_FLAG_QSCALE AV_CODEC_FLAG_QSCALE
- #define CODEC_FLAG_4MV    AV_CODEC_FLAG_4MV
- #define CODEC_FLAG_OUTPUT_CORRUPT AV_CODEC_FLAG_OUTPUT_CORRUPT
- #define CODEC_FLAG_QPEL   AV_CODEC_FLAG_QPEL
- #if FF_API_GMC
- /**
-  * @deprecated use the "gmc" private option of the libxvid encoder
-  */
- #define CODEC_FLAG_GMC    0x0020  ///< Use GMC.
- #endif
- #if FF_API_MV0
- /**
-  * @deprecated use the flag "mv0" in the "mpv_flags" private option of the
-  * mpegvideo encoders
-  */
- #define CODEC_FLAG_MV0    0x0040
- #endif
- #if FF_API_INPUT_PRESERVED
- /**
-  * @deprecated passing reference-counted frames to the encoders replaces this
-  * flag
-  */
- #define CODEC_FLAG_INPUT_PRESERVED 0x0100
- #endif
- #define CODEC_FLAG_PASS1           AV_CODEC_FLAG_PASS1
- #define CODEC_FLAG_PASS2           AV_CODEC_FLAG_PASS2
- #define CODEC_FLAG_GRAY            AV_CODEC_FLAG_GRAY
- #define CODEC_FLAG_PSNR            AV_CODEC_FLAG_PSNR
- #define CODEC_FLAG_TRUNCATED       AV_CODEC_FLAG_TRUNCATED
- 
- #if FF_API_NORMALIZE_AQP
- /**
-  * @deprecated use the flag "naq" in the "mpv_flags" private option of the
-  * mpegvideo encoders
-  */
- #define CODEC_FLAG_NORMALIZE_AQP  0x00020000
- #endif
- #define CODEC_FLAG_INTERLACED_DCT AV_CODEC_FLAG_INTERLACED_DCT
- #define CODEC_FLAG_LOW_DELAY      AV_CODEC_FLAG_LOW_DELAY
- #define CODEC_FLAG_GLOBAL_HEADER  AV_CODEC_FLAG_GLOBAL_HEADER
- #define CODEC_FLAG_BITEXACT       AV_CODEC_FLAG_BITEXACT
- #define CODEC_FLAG_AC_PRED        AV_CODEC_FLAG_AC_PRED
- #define CODEC_FLAG_LOOP_FILTER    AV_CODEC_FLAG_LOOP_FILTER
- #define CODEC_FLAG_INTERLACED_ME  AV_CODEC_FLAG_INTERLACED_ME
- #define CODEC_FLAG_CLOSED_GOP     AV_CODEC_FLAG_CLOSED_GOP
- #define CODEC_FLAG2_FAST          AV_CODEC_FLAG2_FAST
- #define CODEC_FLAG2_NO_OUTPUT     AV_CODEC_FLAG2_NO_OUTPUT
- #define CODEC_FLAG2_LOCAL_HEADER  AV_CODEC_FLAG2_LOCAL_HEADER
- #define CODEC_FLAG2_DROP_FRAME_TIMECODE AV_CODEC_FLAG2_DROP_FRAME_TIMECODE
- #define CODEC_FLAG2_IGNORE_CROP   AV_CODEC_FLAG2_IGNORE_CROP
- 
- #define CODEC_FLAG2_CHUNKS        AV_CODEC_FLAG2_CHUNKS
- #define CODEC_FLAG2_SHOW_ALL      AV_CODEC_FLAG2_SHOW_ALL
- #define CODEC_FLAG2_EXPORT_MVS    AV_CODEC_FLAG2_EXPORT_MVS
- #define CODEC_FLAG2_SKIP_MANUAL   AV_CODEC_FLAG2_SKIP_MANUAL
- 
- /* Unsupported options :
-  *              Syntax Arithmetic coding (SAC)
-  *              Reference Picture Selection
-  *              Independent Segment Decoding */
- /* /Fx */
- /* codec capabilities */
- 
- #define CODEC_CAP_DRAW_HORIZ_BAND AV_CODEC_CAP_DRAW_HORIZ_BAND ///< Decoder can use draw_horiz_band callback.
- /**
-  * Codec uses get_buffer() for allocating buffers and supports custom allocators.
-  * If not set, it might not use get_buffer() at all or use operations that
-  * assume the buffer was allocated by avcodec_default_get_buffer.
-  */
- #define CODEC_CAP_DR1             AV_CODEC_CAP_DR1
- #define CODEC_CAP_TRUNCATED       AV_CODEC_CAP_TRUNCATED
- /**
-  * Encoder or decoder requires flushing with NULL input at the end in order to
-  * give the complete and correct output.
-  *
-  * NOTE: If this flag is not set, the codec is guaranteed to never be fed with
-  *       with NULL data. The user can still send NULL data to the public encode
-  *       or decode function, but libavcodec will not pass it along to the codec
-  *       unless this flag is set.
-  *
-  * Decoders:
-  * The decoder has a non-zero delay and needs to be fed with avpkt->data=NULL,
-  * avpkt->size=0 at the end to get the delayed data until the decoder no longer
-  * returns frames.
-  *
-  * Encoders:
-  * The encoder needs to be fed with NULL data at the end of encoding until the
-  * encoder no longer returns data.
-  *
-  * NOTE: For encoders implementing the AVCodec.encode2() function, setting this
-  *       flag also means that the encoder must set the pts and duration for
-  *       each output packet. If this flag is not set, the pts and duration will
-  *       be determined by libavcodec from the input frame.
-  */
- #define CODEC_CAP_DELAY           AV_CODEC_CAP_DELAY
- /**
-  * Codec can be fed a final frame with a smaller size.
-  * This can be used to prevent truncation of the last audio samples.
-  */
- #define CODEC_CAP_SMALL_LAST_FRAME AV_CODEC_CAP_SMALL_LAST_FRAME
- 
- /**
-  * Codec can output multiple frames per AVPacket
-  * Normally demuxers return one frame at a time, demuxers which do not do
-  * are connected to a parser to split what they return into proper frames.
-  * This flag is reserved to the very rare category of codecs which have a
-  * bitstream that cannot be split into frames without timeconsuming
-  * operations like full decoding. Demuxers carrying such bitstreams thus
-  * may return multiple frames in a packet. This has many disadvantages like
-  * prohibiting stream copy in many cases thus it should only be considered
-  * as a last resort.
-  */
- #define CODEC_CAP_SUBFRAMES        AV_CODEC_CAP_SUBFRAMES
- /**
-  * Codec is experimental and is thus avoided in favor of non experimental
-  * encoders
-  */
- #define CODEC_CAP_EXPERIMENTAL     AV_CODEC_CAP_EXPERIMENTAL
- /**
-  * Codec should fill in channel configuration and samplerate instead of container
-  */
- #define CODEC_CAP_CHANNEL_CONF     AV_CODEC_CAP_CHANNEL_CONF
- /**
-  * Codec supports frame-level multithreading.
-  */
- #define CODEC_CAP_FRAME_THREADS    AV_CODEC_CAP_FRAME_THREADS
- /**
-  * Codec supports slice-based (or partition-based) multithreading.
-  */
- #define CODEC_CAP_SLICE_THREADS    AV_CODEC_CAP_SLICE_THREADS
- /**
-  * Codec supports changed parameters at any point.
-  */
- #define CODEC_CAP_PARAM_CHANGE     AV_CODEC_CAP_PARAM_CHANGE
- /**
-  * Codec supports avctx->thread_count == 0 (auto).
-  */
- #define CODEC_CAP_AUTO_THREADS     AV_CODEC_CAP_AUTO_THREADS
- /**
-  * Audio encoder supports receiving a different number of samples in each call.
-  */
- #define CODEC_CAP_VARIABLE_FRAME_SIZE AV_CODEC_CAP_VARIABLE_FRAME_SIZE
- /**
-  * Codec is intra only.
-  */
- #define CODEC_CAP_INTRA_ONLY       AV_CODEC_CAP_INTRA_ONLY
- /**
-  * Codec is lossless.
-  */
- #define CODEC_CAP_LOSSLESS         AV_CODEC_CAP_LOSSLESS
- 
- /**
-  * HWAccel is experimental and is thus avoided in favor of non experimental
-  * codecs
-  */
- #define HWACCEL_CODEC_CAP_EXPERIMENTAL     0x0200
- #endif /* FF_API_WITHOUT_PREFIX */
- 
  /**
   * Pan Scan area.
   * This specifies the area which should be displayed.
diff --cc libavcodec/libxvid.c
index 6dd5d8d7a2,dce62a0dba..d76264d517
--- a/libavcodec/libxvid.c
+++ b/libavcodec/libxvid.c
@@@ -461,12 -475,6 +461,7 @@@ FF_ENABLE_DEPRECATION_WARNING
          break;
      }
  
 +    /* Bring in VOL flags from ffmpeg command-line */
- #if FF_API_GMC
-     if (avctx->flags & CODEC_FLAG_GMC)
-         x->gmc = 1;
- #endif
- 
      x->vol_flags = 0;
      if (x->gmc) {
          x->vol_flags |= XVID_VOL_GMC;
diff --cc libavcodec/mpegvideo_enc.c
index 68e1996687,a0c479ff4e..682a202c43
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@@ -1053,36 -874,6 +1053,22 @@@ FF_ENABLE_DEPRECATION_WARNING
      if (ff_rate_control_init(s) < 0)
          return -1;
  
 +#if FF_API_RC_STRATEGY
 +    av_assert0(MPV_RC_STRATEGY_XVID == FF_RC_STRATEGY_XVID);
 +#endif
 +
 +    if ((s->avctx->flags & AV_CODEC_FLAG_PASS2) && s->rc_strategy == MPV_RC_STRATEGY_XVID) {
 +#if CONFIG_LIBXVID
 +        ret = ff_xvid_rate_control_init(s);
 +#else
 +        ret = AVERROR(ENOSYS);
 +        av_log(s->avctx, AV_LOG_ERROR,
 +               "Xvid ratecontrol requires libavcodec compiled with Xvid support.\n");
 +#endif
 +        if (ret < 0)
 +            return ret;
 +    }
 +
- #if FF_API_NORMALIZE_AQP
-     FF_DISABLE_DEPRECATION_WARNINGS
-     if (avctx->flags & CODEC_FLAG_NORMALIZE_AQP)
-         s->mpv_flags |= FF_MPV_FLAG_NAQ;
-     FF_ENABLE_DEPRECATION_WARNINGS;
- #endif
- 
- #if FF_API_MV0
-     FF_DISABLE_DEPRECATION_WARNINGS
-     if (avctx->flags & CODEC_FLAG_MV0)
-         s->mpv_flags |= FF_MPV_FLAG_MV0;
-     FF_ENABLE_DEPRECATION_WARNINGS
- #endif
- 
  #if FF_API_MPV_OPT
      FF_DISABLE_DEPRECATION_WARNINGS
      if (avctx->rc_qsquish != 0.0)
diff --cc libavcodec/options_table.h
index ca2132cb3e,1d15422a11..c020d41930
--- a/libavcodec/options_table.h
+++ b/libavcodec/options_table.h
@@@ -67,10 -54,7 +58,7 @@@ static const AVOption avcodec_options[
  {"pass2", "use internal 2-pass ratecontrol in second pass mode", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_PASS2 }, INT_MIN, INT_MAX, 0, "flags"},
  {"gray", "only decode/encode grayscale", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_GRAY }, INT_MIN, INT_MAX, V|E|D, "flags"},
  {"psnr", "error[?] variables will be set during encoding", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_PSNR }, INT_MIN, INT_MAX, V|E, "flags"},
 -{"truncated", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_TRUNCATED }, INT_MIN, INT_MAX, 0, "flags"},
 +{"truncated", "Input bitstream might be randomly truncated", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_TRUNCATED }, INT_MIN, INT_MAX, V|D, "flags"},
- #if FF_API_NORMALIZE_AQP
- {"naq", "normalize adaptive quantization", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_NORMALIZE_AQP }, INT_MIN, INT_MAX, V|E, "flags"},
- #endif
  {"ildct", "use interlaced DCT", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_INTERLACED_DCT }, INT_MIN, INT_MAX, V|E, "flags"},
  {"low_delay", "force low delay", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_LOW_DELAY }, INT_MIN, INT_MAX, V|D|E, "flags"},
  {"global_header", "place global headers in extradata instead of every keyframe", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_GLOBAL_HEADER }, INT_MIN, INT_MAX, V|A|E, "flags"},
diff --cc libavcodec/version.h
index 2835b5fd42,04f701430e..e0be3d5021
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@@ -45,30 -45,8 +45,18 @@@
   * FF_API_* defines may be placed below to indicate public API that will be
   * dropped at a future version bump. The defines themselves are not part of
   * the public API and may change, break or disappear at any time.
 + *
 + * @note, when bumping the major version it is recommended to manually
 + * disable each FF_API_* in its own commit instead of disabling them all
 + * at once through the bump. This improves the git bisect-ability of the change.
   */
  
 +#ifndef FF_API_LOWRES
 +#define FF_API_LOWRES            (LIBAVCODEC_VERSION_MAJOR < 59)
 +#endif
 +#ifndef FF_API_DEBUG_MV
 +#define FF_API_DEBUG_MV          (LIBAVCODEC_VERSION_MAJOR < 58)
 +#endif
- #ifndef FF_API_INPUT_PRESERVED
- #define FF_API_INPUT_PRESERVED   (LIBAVCODEC_VERSION_MAJOR < 58)
- #endif
- #ifndef FF_API_NORMALIZE_AQP
- #define FF_API_NORMALIZE_AQP     (LIBAVCODEC_VERSION_MAJOR < 58)
- #endif
- #ifndef FF_API_GMC
- #define FF_API_GMC               (LIBAVCODEC_VERSION_MAJOR < 58)
- #endif
- #ifndef FF_API_MV0
- #define FF_API_MV0               (LIBAVCODEC_VERSION_MAJOR < 58)
- #endif
  #ifndef FF_API_CODEC_NAME
  #define FF_API_CODEC_NAME        (LIBAVCODEC_VERSION_MAJOR < 58)
  #endif



More information about the ffmpeg-cvslog mailing list