summaryrefslogtreecommitdiff
path: root/libavutil/frame.c
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2015-09-05 17:35:31 +0200
committerHendrik Leppkes <h.leppkes@gmail.com>2015-09-05 17:35:31 +0200
commita9915268327b097bba84a07f68968d8c07f4b549 (patch)
treea5d584c6d925f4feee4984d0dd0a906f3b6d17ed /libavutil/frame.c
parentb9fd813351733b867fb73219e33b1f4845b40dde (diff)
downloadffmpeg-a9915268327b097bba84a07f68968d8c07f4b549.tar.gz
lavu/frame: put frame QP elements under a new version guard
These fields are still used, removal postponed until a replacement functionality is available.
Diffstat (limited to 'libavutil/frame.c')
-rw-r--r--libavutil/frame.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libavutil/frame.c b/libavutil/frame.c
index f403fd75dd..7b4177bc95 100644
--- a/libavutil/frame.c
+++ b/libavutil/frame.c
@@ -46,29 +46,35 @@ MAKE_ACCESSORS(AVFrame, frame, enum AVColorRange, color_range)
AVDictionary **avpriv_frame_get_metadatap(AVFrame *frame) {return &frame->metadata;};
+#if FF_API_FRAME_QP
int av_frame_set_qp_table(AVFrame *f, AVBufferRef *buf, int stride, int qp_type)
{
av_buffer_unref(&f->qp_table_buf);
f->qp_table_buf = buf;
+FF_DISABLE_DEPRECATION_WARNINGS
f->qscale_table = buf->data;
f->qstride = stride;
f->qscale_type = qp_type;
+FF_ENABLE_DEPRECATION_WARNINGS
return 0;
}
int8_t *av_frame_get_qp_table(AVFrame *f, int *stride, int *type)
{
+FF_DISABLE_DEPRECATION_WARNINGS
*stride = f->qstride;
*type = f->qscale_type;
+FF_ENABLE_DEPRECATION_WARNINGS
if (!f->qp_table_buf)
return NULL;
return f->qp_table_buf->data;
}
+#endif
const char *av_get_colorspace_name(enum AVColorSpace val)
{
@@ -342,6 +348,8 @@ static int frame_copy_props(AVFrame *dst, const AVFrame *src, int force_copy)
av_dict_copy(&sd_dst->metadata, sd_src->metadata, 0);
}
+#if FF_API_FRAME_QP
+FF_DISABLE_DEPRECATION_WARNINGS
dst->qscale_table = NULL;
dst->qstride = 0;
dst->qscale_type = 0;
@@ -353,6 +361,8 @@ static int frame_copy_props(AVFrame *dst, const AVFrame *src, int force_copy)
dst->qscale_type = src->qscale_type;
}
}
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
return 0;
}
@@ -471,7 +481,9 @@ void av_frame_unref(AVFrame *frame)
av_buffer_unref(&frame->extended_buf[i]);
av_freep(&frame->extended_buf);
av_dict_free(&frame->metadata);
+#if FF_API_FRAME_QP
av_buffer_unref(&frame->qp_table_buf);
+#endif
get_frame_defaults(frame);
}