diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 6071380c40..0bc0b3888f 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -780,7 +780,6 @@ int ff_init_buffer_info(AVCodecContext *avctx, AVFrame *frame) } frame->reordered_opaque = avctx->reordered_opaque; -#if FF_API_AVFRAME_COLORSPACE if (frame->color_primaries == AVCOL_PRI_UNSPECIFIED) frame->color_primaries = avctx->color_primaries; if (frame->color_trc == AVCOL_TRC_UNSPECIFIED) @@ -791,7 +790,6 @@ int ff_init_buffer_info(AVCodecContext *avctx, AVFrame *frame) av_frame_set_color_range(frame, avctx->color_range); if (frame->chroma_location == AVCHROMA_LOC_UNSPECIFIED) frame->chroma_location = avctx->chroma_sample_location; -#endif switch (avctx->codec->type) { case AVMEDIA_TYPE_VIDEO: diff --git a/libavutil/frame.c b/libavutil/frame.c index 2c62922db9..67a7d3e9e4 100644 --- a/libavutil/frame.c +++ b/libavutil/frame.c @@ -104,13 +104,11 @@ static void get_frame_defaults(AVFrame *frame) frame->sample_aspect_ratio = (AVRational){ 0, 1 }; frame->format = -1; /* unknown */ frame->extended_data = frame->data; -#if FF_API_AVFRAME_COLORSPACE frame->color_primaries = AVCOL_PRI_UNSPECIFIED; frame->color_trc = AVCOL_TRC_UNSPECIFIED; frame->colorspace = AVCOL_SPC_UNSPECIFIED; frame->color_range = AVCOL_RANGE_UNSPECIFIED; frame->chroma_location = AVCHROMA_LOC_UNSPECIFIED; -#endif } static void free_side_data(AVFrameSideData **ptr_sd) @@ -482,13 +480,11 @@ int av_frame_copy_props(AVFrame *dst, const AVFrame *src) dst->display_picture_number = src->display_picture_number; dst->flags = src->flags; dst->decode_error_flags = src->decode_error_flags; -#if FF_API_AVFRAME_COLORSPACE dst->color_primaries = src->color_primaries; dst->color_trc = src->color_trc; dst->colorspace = src->colorspace; dst->color_range = src->color_range; dst->chroma_location = src->chroma_location; -#endif av_dict_copy(&dst->metadata, src->metadata, 0); diff --git a/libavutil/frame.h b/libavutil/frame.h index 6ff372749a..dbbdd29d1b 100644 --- a/libavutil/frame.h +++ b/libavutil/frame.h @@ -446,7 +446,6 @@ typedef struct AVFrame { */ int flags; -#if FF_API_AVFRAME_COLORSPACE /** * MPEG vs JPEG YUV range. * It must be accessed using av_frame_get_color_range() and @@ -470,7 +469,6 @@ typedef struct AVFrame { enum AVColorSpace colorspace; enum AVChromaLocation chroma_location; -#endif /** * frame timestamp estimated using various heuristics, in stream time base diff --git a/libavutil/version.h b/libavutil/version.h index a086af0520..b84e25d7bf 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -137,9 +137,6 @@ #ifndef FF_API_OPT_TYPE_METADATA #define FF_API_OPT_TYPE_METADATA (LIBAVUTIL_VERSION_MAJOR < 55) #endif -#ifndef FF_API_AVFRAME_COLORSPACE -#define FF_API_AVFRAME_COLORSPACE (LIBAVUTIL_VERSION_MAJOR >= 52) -#endif #ifndef FF_CONST_AVUTIL53