summaryrefslogtreecommitdiff
path: root/libavcodec/avcodec.h
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2010-02-27 21:13:22 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2010-02-27 21:13:22 +0000
commiteb285cfe8ef59d5242b54a69f64b9b33b4d7780d (patch)
treefb70d5a0268cd94da60512bf91209bf7c15933d6 /libavcodec/avcodec.h
parent1d5362031166613f3230bfa4f3ba15f73879579e (diff)
Fix avcodec_align_dimensions to return values suitably aligned for FLV decoding
with SSE and add a avcodec_align_dimensions2 taht returns the stride alignment requirements independently from doing the width/height padding. Originally committed as revision 22095 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/avcodec.h')
-rw-r--r--libavcodec/avcodec.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 74fcf3bac4..31569d3406 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -1367,7 +1367,7 @@ typedef struct AVCodecContext {
/**
* Called at the beginning of each frame to get a buffer for it.
* If pic.reference is set then the frame will be read later by libavcodec.
- * avcodec_align_dimensions() should be used to find the required width and
+ * avcodec_align_dimensions2() should be used to find the required width and
* height, as they normally need to be rounded up to the next multiple of 16.
* if CODEC_CAP_DR1 is not set then get_buffer() must call
* avcodec_default_get_buffer() instead of providing buffers allocated by
@@ -3226,7 +3226,19 @@ AVFrame *avcodec_alloc_frame(void);
int avcodec_default_get_buffer(AVCodecContext *s, AVFrame *pic);
void avcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic);
int avcodec_default_reget_buffer(AVCodecContext *s, AVFrame *pic);
+/**
+ * Modifies width and height values so that they will result in a memory
+ * buffer that is acceptable for the codec if you do not use any horizontal
+ * padding.
+ */
void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height);
+/**
+ * Modifies width and height values so that they will result in a memory
+ * buffer that is acceptable for the codec if you also ensure that all
+ * line sizes are a multiple of the respective linesize_align[i].
+ */
+void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
+ int linesize_align[4]);
/**
* Checks if the given dimension of a picture is valid, meaning that all