Commit 4ff88cb5 authored by michaelni's avatar michaelni

100l (document buffer padding requirements)


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@1866 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 40e653a1
...@@ -123,6 +123,12 @@ void put_string(PutBitContext * pbc, char *s) ...@@ -123,6 +123,12 @@ void put_string(PutBitContext * pbc, char *s)
#endif //CONFIG_ENCODERS #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, void init_get_bits(GetBitContext *s,
const uint8_t *buffer, int bit_size) const uint8_t *buffer, int bit_size)
{ {
......
...@@ -343,9 +343,15 @@ int avcodec_encode_video(AVCodecContext *avctx, uint8_t *buf, int buf_size, ...@@ -343,9 +343,15 @@ int avcodec_encode_video(AVCodecContext *avctx, uint8_t *buf, int buf_size,
return ret; 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 * decode a frame.
zero. Otherwise, it is non zero */ * @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 avcodec_decode_video(AVCodecContext *avctx, AVFrame *picture,
int *got_picture_ptr, int *got_picture_ptr,
uint8_t *buf, int buf_size) uint8_t *buf, int buf_size)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment