diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2015-10-14 11:33:28 +0200 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2015-10-22 13:32:15 +0200 |
commit | dca23ffbc7568c9af5c5fbaa86e6a0761ecae50c (patch) | |
tree | af7dc53eee966b592c4d01c17675b51e4d293dc2 /libavcodec/avpicture.c | |
parent | 3ee2c60cc296eee3f63d7b5fee9b4332eeeac9fa (diff) | |
download | ffmpeg-dca23ffbc7568c9af5c5fbaa86e6a0761ecae50c.tar.gz |
lavc: Deprecate AVPicture structure and related functions
This structure served as a bridge between data pointers and frames,
but it suffers from several limitations:
- it is not refcounted and data must be copied to every time
- it cannot be expanded without ABI break due to being used on the stack
- its functions are just wrappers to imgutils which add a layer of
unneeded indirection, and maintenance burden
- it allows hacks like embedding uncompressed data in packets
- its use is often confusing to our users
AVFrame provides a much better API, and, if a full blown frame is not
needed, it is just as simple and more straightfoward to use data and
linesize arrays directly.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Diffstat (limited to 'libavcodec/avpicture.c')
-rw-r--r-- | libavcodec/avpicture.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/avpicture.c b/libavcodec/avpicture.c index 6bde0f8445..eaa5c2614e 100644 --- a/libavcodec/avpicture.c +++ b/libavcodec/avpicture.c @@ -31,6 +31,7 @@ #include "libavutil/imgutils.h" #include "libavutil/colorspace.h" +#if FF_API_AVPICTURE int avpicture_fill(AVPicture *picture, uint8_t *ptr, enum AVPixelFormat pix_fmt, int width, int height) { @@ -76,4 +77,4 @@ void av_picture_copy(AVPicture *dst, const AVPicture *src, av_image_copy(dst->data, dst->linesize, src->data, src->linesize, pix_fmt, width, height); } - +#endif /* FF_API_AVPICTURE */ |