[FFmpeg-devel] [PATCH] Deprecate avcodec AFD field and replace with side-data

Michael Niedermayer michaelni at gmx.at
Sun Jun 29 13:41:05 CEST 2014


On Sat, Jun 28, 2014 at 01:03:12PM +0100, Kieran Kunhya wrote:
> ---
>  doc/APIchanges       |    4 ++++
>  libavcodec/avcodec.h |    5 ++++-
>  libavcodec/version.h |    5 ++++-
>  libavutil/frame.h    |    4 ++++
>  libavutil/version.h  |    4 ++--
>  5 files changed, 18 insertions(+), 4 deletions(-)
> 
> diff --git a/doc/APIchanges b/doc/APIchanges
> index 4714012..dd46d06 100644
> --- a/doc/APIchanges
> +++ b/doc/APIchanges
> @@ -13,6 +13,10 @@ libavutil:     2013-12-xx
>  
>  API changes, most recent first:
>  
> +2014-06-xx - xxxxxxx - lavc 55.57.0 - avcodec.h
> +2014-06-xx - xxxxxxx - lavu 53.18.0 - frame.h
> +  Deprecate AVCodecContext.dtg_active_format and use side-data instead

These version numbers are incorrect, our versions end in values >= 100


> +
>  2014-06-xx - xxxxxxx - lavu 53.17.0 - imgutils.h
>    Add av_image_check_sar().
>  
> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> index cc74aee..b48217c 100644
> --- a/libavcodec/avcodec.h
> +++ b/libavcodec/avcodec.h
> @@ -1493,6 +1493,7 @@ 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)
> @@ -1500,8 +1501,9 @@ typedef struct AVCodecContext {
>       *
>       * - encoding: unused
>       * - decoding: Set by decoder.
> +     * @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..0ac5cff 100644
> --- a/libavcodec/version.h
> +++ b/libavcodec/version.h
> @@ -30,7 +30,7 @@
>  
>  #define LIBAVCODEC_VERSION_MAJOR 55
>  #define LIBAVCODEC_VERSION_MINOR 55
> -#define LIBAVCODEC_VERSION_MICRO  0
> +#define LIBAVCODEC_VERSION_MICRO  1
>  
>  #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
>                                                 LIBAVCODEC_VERSION_MINOR, \
> @@ -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 */

> diff --git a/libavutil/frame.h b/libavutil/frame.h
> index b2159d3..0d76f1d 100644
> --- a/libavutil/frame.h
> +++ b/libavutil/frame.h
> @@ -82,6 +82,10 @@ enum AVFrameSideDataType {
>       * See libavutil/display.h for a detailed description of the data.
>       */
>      AV_FRAME_DATA_DISPLAYMATRIX,
> +    /** 
> +     * Active Format Description data as specified in ETSI TS 101 154
> +     */
> +    AV_FRAME_DATA_AFD,    

I think the format, if its simple should be described here, or at
least at the very minimum there should be enough description so
that users of the deprecated field know how to extract that field
from the new API, otherwise thats a big step backward in usability
for anyone who wants to access the field
you might also want to add a function which does the extraction, so
that it doesnt need to be reimplemeted in every user application
which wants to use this

also the section of the spec that describes this could be mentioned
(assuming its stable between revissions)


also doesnt apply cleanly and has trailing whitespace:

Applying: Deprecate avcodec AFD field and replace with side-data
.git/rebase-apply/patch:85: trailing whitespace.
    /**
.git/rebase-apply/patch:88: trailing whitespace.
    AV_FRAME_DATA_AFD,
warning: 2 lines add whitespace errors.
Using index info to reconstruct a base tree...
M       doc/APIchanges
M       libavcodec/avcodec.h
M       libavcodec/version.h
M       libavutil/frame.h
M       libavutil/version.h
<stdin>:85: trailing whitespace.
    /**
<stdin>:88: trailing whitespace.
    AV_FRAME_DATA_AFD,
warning: 2 lines applied after fixing whitespace errors.
Falling back to patching base and 3-way merge...
Auto-merging libavutil/version.h
CONFLICT (content): Merge conflict in libavutil/version.h
Auto-merging libavutil/frame.h
Auto-merging libavcodec/version.h
CONFLICT (content): Merge conflict in libavcodec/version.h
Auto-merging libavcodec/avcodec.h
Auto-merging doc/APIchanges
CONFLICT (content): Merge conflict in doc/APIchanges
Failed to merge in the changes.
Patch failed at 0001 Deprecate avcodec AFD field and replace with side-data
The copy of the patch that failed is found in:
   .git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The real ebay dictionary, page 2
"100% positive feedback" - "All either got their money back or didnt complain"
"Best seller ever, very honest" - "Seller refunded buyer after failed scam"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140629/836da768/attachment.asc>


More information about the ffmpeg-devel mailing list