summaryrefslogtreecommitdiffstats
path: root/libavcore/imgutils.h
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2010-12-04 12:56:16 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2010-12-04 12:56:16 +0000
commit4da12e3b13d362e0218956a78dd2b8f7a1260265 (patch)
tree685818343659dd00f74d638d375497651e01bf03 /libavcore/imgutils.h
parentbf799f686fcee666e6bbb20ceffd838f341ec9b2 (diff)
downloadffmpeg-streaming-4da12e3b13d362e0218956a78dd2b8f7a1260265.zip
ffmpeg-streaming-4da12e3b13d362e0218956a78dd2b8f7a1260265.tar.gz
Implement av_image_alloc() and use it in
avfilter_default_get_video_buffer(). Originally committed as revision 25878 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcore/imgutils.h')
-rw-r--r--libavcore/imgutils.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/libavcore/imgutils.h b/libavcore/imgutils.h
index 8458fc6..6c39d53 100644
--- a/libavcore/imgutils.h
+++ b/libavcore/imgutils.h
@@ -78,6 +78,19 @@ int av_image_fill_pointers(uint8_t *data[4], enum PixelFormat pix_fmt, int heigh
uint8_t *ptr, const int linesizes[4]);
/**
+ * Allocate an image with size w and h and pixel format pix_fmt, and
+ * fill pointers and linesizes accordingly.
+ * The allocated image buffer has to be freed by using
+ * av_freep(&pointers[0]).
+ *
+ * @param align the value to use for buffer size alignment
+ * @return the size in bytes required for the image buffer, a negative
+ * error code in case of failure
+ */
+int av_image_alloc(uint8_t *pointers[4], int linesizes[4],
+ int w, int h, enum PixelFormat pix_fmt, int align);
+
+/**
* Copy image plane from src to dst.
* That is, copy "height" number of lines of "bytewidth" bytes each.
* The first byte of each successive line is separated by *_linesize
OpenPOWER on IntegriCloud