1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00
Commit Graph

10 Commits

Author SHA1 Message Date
Hendrik Leppkes
68cb0dc8a3 Merge commit 'f7edcac040f73635fc1127489c9bb29ca8b43532'
* commit 'f7edcac040f73635fc1127489c9bb29ca8b43532':
  avpicture: Suppress warning from deprecated code

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-12-08 10:03:08 +01:00
Luca Barbato
f7edcac040 avpicture: Suppress warning from deprecated code 2015-12-05 13:12:27 +01:00
Hendrik Leppkes
0bcb17d44e Merge commit 'dca23ffbc7568c9af5c5fbaa86e6a0761ecae50c'
* commit 'dca23ffbc7568c9af5c5fbaa86e6a0761ecae50c':
  lavc: Deprecate AVPicture structure and related functions

Deprecation flag on AVPicture struct replaced by a comment, as it causes
excess deprecation warnings for every include of avcodec.h

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-27 12:40:04 +01:00
Vittorio Giovara
dca23ffbc7 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>
2015-10-22 13:32:15 +02:00
Stefano Sabatini
e2ad0b66fa imgutils: create misc functions for dealing with buffers
Move the lavc/imgconvert functions and rename them as follows:
  avpicture_get_size -> av_image_get_buffer_size()
  avpicture_fill     -> av_image_fill_arrays()
  avpicture_layout   -> av_image_copy_to_buffer()

The new functions have an align parameter, which allows to define the
linesize alignment assumed in the buffer (which is set or read).

The names of the functions are consistent with the lavu/samples API
(av_samples_get_buffer_size(), av_samples_fill_arrays()).

A redundant check has been dropped from av_image_fill_arrays().

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-01-14 17:17:24 +01:00
Michael Niedermayer
f703c8cc09 avcodec/avpicture: use av_freep(), do not leave stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-08 16:09:31 +02:00
Anton Khirnov
e6c4ac7b5f pixdesc: rename PIX_FMT_* flags to AV_PIX_FMT_FLAG_* 2013-05-15 07:46:51 +02:00
Martin Storsjö
2c96392277 avpicture: Don't assume a valid pix fmt in avpicture_get_size
When called from the v4l2 input device, pix_fmt can be
AV_PIX_FMT_NONE (for jpeg formats). Before 50ba57e0, this wasn't
an issue for avpicture_get_size, but after that commit, this
lead to crashes.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-07 14:28:47 +02:00
Michael Niedermayer
494945cb66 Merge commit 'd1d9efaae6c7e8466b06c30ca21c6b569dd2e480'
* commit 'd1d9efaae6c7e8466b06c30ca21c6b569dd2e480':
  avcodec: split avpicture from imgconvert
  pixdesc: add PIX_FMT_ALPHA flag

Conflicts:
	libavcodec/imgconvert.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-21 15:37:01 +01:00
Luca Barbato
d1d9efaae6 avcodec: split avpicture from imgconvert
All the non deprecated functions are in avpicture.c now.
2012-11-20 12:45:58 +01:00