diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2003-05-12 23:03:00 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2003-05-12 23:03:00 +0000 |
commit | f138f88364f88cdc1ecd99f55b38c73cd5c7919e (patch) | |
tree | b4d12e5fe0da8ad933e87b5b96f8fb6d528290ab /libavcodec | |
parent | 2def278a459b9b67f3626857cc7449de1a4c2990 (diff) | |
download | ffmpeg-streaming-f138f88364f88cdc1ecd99f55b38c73cd5c7919e.zip ffmpeg-streaming-f138f88364f88cdc1ecd99f55b38c73cd5c7919e.tar.gz |
100l (document buffer padding requirements)
Originally committed as revision 1866 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/common.c | 6 | ||||
-rw-r--r-- | libavcodec/utils.c | 12 |
2 files changed, 15 insertions, 3 deletions
diff --git a/libavcodec/common.c b/libavcodec/common.c index 22031a2..8c50fbc 100644 --- a/libavcodec/common.c +++ b/libavcodec/common.c @@ -123,6 +123,12 @@ void put_string(PutBitContext * pbc, char *s) #endif //CONFIG_ENCODERS +/** + * init GetBitContext. + * @param buffer bitstream buffer, must be FF_INPUT_BUFFER_PADDING_SIZE bytes larger then the actual read bits + * because some optimized bitstream readers read 32 or 64 bit at once and could read over the end + * @param bit_size the size of the buffer in bits + */ void init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size) { diff --git a/libavcodec/utils.c b/libavcodec/utils.c index a422cf2..01d945b 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -343,9 +343,15 @@ int avcodec_encode_video(AVCodecContext *avctx, uint8_t *buf, int buf_size, return ret; } -/* decode a frame. return -1 if error, otherwise return the number of - bytes used. If no frame could be decompressed, *got_picture_ptr is - zero. Otherwise, it is non zero */ +/** + * decode a frame. + * @param buf bitstream buffer, must be FF_INPUT_BUFFER_PADDING_SIZE larger then the actual read bytes + * because some optimized bitstream readers read 32 or 64 bit at once and could read over the end + * @param buf_size the size of the buffer in bytes + * @param got_picture_ptr zero if no frame could be decompressed, Otherwise, it is non zero + * @return -1 if error, otherwise return the number of + * bytes used. + */ int avcodec_decode_video(AVCodecContext *avctx, AVFrame *picture, int *got_picture_ptr, uint8_t *buf, int buf_size) |