mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
Merge commit '472f9ed312ec784f7c72876b77163f4741880d05'
* commit '472f9ed312ec784f7c72876b77163f4741880d05': Remove obsolete FF_API_AVFRAME_COLORSPACE cruft. Conflicts: libavcodec/utils.c libavutil/frame.h libavutil/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
287602f9d8
@ -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:
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user