diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-03-15 01:21:16 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-03-15 01:27:10 +0100 |
commit | 67235dfa1d2b4bab2c8015e5b8e43ea63a681892 (patch) | |
tree | 6de0622de5bbdf40c5770899bcfb989b31bcd2a4 /libavcodec/bytestream.h | |
parent | 9e2ee46206a5a4db91ee4d26737b515797e6b08e (diff) | |
parent | e0febda22d0e0fab094a9c886b0e0f0f662df1ef (diff) | |
download | ffmpeg-67235dfa1d2b4bab2c8015e5b8e43ea63a681892.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
h264: stricter reference limit enforcement.
h264: increase reference poc list from 16 to 32.
xa_adpcm: limit filter to prevent xa_adpcm_table[] array bounds overruns.
snow: check reference frame indices.
snow: reject unsupported chroma shifts.
Add ffvhuff encoding and decoding regression test
anm: convert to bytestream2 API
bytestream: add more unchecked variants for bytestream2 API
jvdec: unbreak video decoding
jv demux: set video stream duration
fate: add pam image regression test
Conflicts:
libavcodec/adpcm.c
libavcodec/anm.c
libavcodec/h264.c
libavcodec/mpegvideo.h
libavcodec/snowdec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/bytestream.h')
-rw-r--r-- | libavcodec/bytestream.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/libavcodec/bytestream.h b/libavcodec/bytestream.h index cba2dbb22d..2d9ca47508 100644 --- a/libavcodec/bytestream.h +++ b/libavcodec/bytestream.h @@ -170,6 +170,12 @@ static av_always_inline void bytestream2_skip(GetByteContext *g, g->buffer += FFMIN(g->buffer_end - g->buffer, size); } +static av_always_inline void bytestream2_skipu(GetByteContext *g, + unsigned int size) +{ + g->buffer += size; +} + static av_always_inline void bytestream2_skip_p(PutByteContext *p, unsigned int size) { @@ -257,6 +263,15 @@ static av_always_inline unsigned int bytestream2_get_buffer(GetByteContext *g, return size2; } +static av_always_inline unsigned int bytestream2_get_bufferu(GetByteContext *g, + uint8_t *dst, + unsigned int size) +{ + memcpy(dst, g->buffer, size); + g->buffer += size; + return size; +} + static av_always_inline unsigned int bytestream2_put_buffer(PutByteContext *p, const uint8_t *src, unsigned int size) @@ -272,6 +287,15 @@ static av_always_inline unsigned int bytestream2_put_buffer(PutByteContext *p, return size2; } +static av_always_inline unsigned int bytestream2_put_bufferu(PutByteContext *p, + const uint8_t *src, + unsigned int size) +{ + memcpy(p->buffer, src, size); + p->buffer += size; + return size; +} + static av_always_inline void bytestream2_set_buffer(PutByteContext *p, const uint8_t c, unsigned int size) @@ -286,6 +310,14 @@ static av_always_inline void bytestream2_set_buffer(PutByteContext *p, p->buffer += size2; } +static av_always_inline void bytestream2_set_bufferu(PutByteContext *p, + const uint8_t c, + unsigned int size) +{ + memset(p->buffer, c, size); + p->buffer += size; +} + static av_always_inline unsigned int bytestream2_get_eof(PutByteContext *p) { return p->eof; |