[libav-devel] [PATCH 1/2] avcodec: Deprecate AFD fields

Vittorio Giovara vittorio.giovara at gmail.com
Sat Jun 28 07:44:05 CEST 2014


On Fri, Jun 27, 2014 at 7:11 PM, Kieran <kierank at obe.tv> wrote:
> ---
>  libavcodec/avcodec.h |    7 +++++--
>  libavcodec/version.h |    3 +++
>  2 files changed, 8 insertions(+), 2 deletions(-)

This set should be squashed in one patch, so that deprecation/new
addition is atomic.
You should bump micro for avcodec and minor in lavu because you are
touching public headers in both.
For the same reason you could also add one line in doc/APIchanges.

> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> index cc74aee..0f33337 100644
> --- a/libavcodec/avcodec.h
> +++ b/libavcodec/avcodec.h
> @@ -1493,15 +1493,17 @@ typedef struct AVCodecContext {
>       */
>      int me_subpel_quality;
>
> +#if FF_API_AFD
>      /**
>       * DTG active format information (additional aspect ratio
>       * information only used in DVB MPEG-2 transport streams)
>       * 0 if not set.
>       *
>       * - encoding: unused
> -     * - decoding: Set by decoder.
> +     * - decoding: Set by decoder

stray change?

> +     * @deprecated Deprecated in favour of AVSideData
>       */
> -    int dtg_active_format;
> +    attribute_deprecated int dtg_active_format;
>  #define FF_DTG_AFD_SAME         8
>  #define FF_DTG_AFD_4_3          9
>  #define FF_DTG_AFD_16_9         10
> @@ -1509,6 +1511,7 @@ typedef struct AVCodecContext {
>  #define FF_DTG_AFD_4_3_SP_14_9  13
>  #define FF_DTG_AFD_16_9_SP_14_9 14
>  #define FF_DTG_AFD_SP_4_3       15
> +#endif
>
>      /**
>       * maximum motion estimation search range in subpel units
> diff --git a/libavcodec/version.h b/libavcodec/version.h
> index dee6615..42e0c6e 100644
> --- a/libavcodec/version.h
> +++ b/libavcodec/version.h
> @@ -144,5 +144,8 @@
>  #ifndef FF_API_CODEC_NAME
>  #define FF_API_CODEC_NAME        (LIBAVCODEC_VERSION_MAJOR < 57)
>  #endif
> +#ifndef FF_API_AFD
> +#define FF_API_AFD               (LIBAVCODEC_VERSION_MAJOR < 57)
> +#endif
>
>  #endif /* AVCODEC_VERSION_H */

This looks good.
-- 
Vittorio


More information about the libav-devel mailing list