diff options
author | Ramiro Polla <ramiro.polla@gmail.com> | 2007-06-02 01:41:07 +0000 |
---|---|---|
committer | Ramiro Polla <ramiro.polla@gmail.com> | 2007-06-02 01:41:07 +0000 |
commit | 2c124cb65c24cc7d0538260726045d68442eef25 (patch) | |
tree | 3752a8d02aa478d977264e8ce0438f49c92a4aca /libavcodec/ulti.c | |
parent | 29b29011e5631c4e867baf42258a00886d142841 (diff) | |
download | ffmpeg-2c124cb65c24cc7d0538260726045d68442eef25.tar.gz |
Use AV_xx throughout libavcodec
Originally committed as revision 9169 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/ulti.c')
-rw-r--r-- | libavcodec/ulti.c | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/libavcodec/ulti.c b/libavcodec/ulti.c index 5c6ba00114..c2439c4d16 100644 --- a/libavcodec/ulti.c +++ b/libavcodec/ulti.c @@ -31,6 +31,7 @@ #include <unistd.h> #include "avcodec.h" +#include "bytestream.h" #include "ulti_cb.h" @@ -305,9 +306,7 @@ static int ulti_decode_frame(AVCodecContext *avctx, case 2: if (modifier) { // unpack four luma samples - tmp = (*buf++) << 16; - tmp += (*buf++) << 8; - tmp += *buf++; + tmp = bytestream_get_be24(&buf); Y[0] = (tmp >> 18) & 0x3F; Y[1] = (tmp >> 12) & 0x3F; @@ -315,8 +314,7 @@ static int ulti_decode_frame(AVCodecContext *avctx, Y[3] = tmp & 0x3F; angle = 16; } else { // retrieve luma samples from codebook - tmp = (*buf++) << 8; - tmp += (*buf++); + tmp = bytestream_get_be16(&buf); angle = (tmp >> 12) & 0xF; tmp &= 0xFFF; @@ -332,33 +330,25 @@ static int ulti_decode_frame(AVCodecContext *avctx, if (modifier) { // all 16 luma samples uint8_t Luma[16]; - tmp = (*buf++) << 16; - tmp += (*buf++) << 8; - tmp += *buf++; + tmp = bytestream_get_be24(&buf); Luma[0] = (tmp >> 18) & 0x3F; Luma[1] = (tmp >> 12) & 0x3F; Luma[2] = (tmp >> 6) & 0x3F; Luma[3] = tmp & 0x3F; - tmp = (*buf++) << 16; - tmp += (*buf++) << 8; - tmp += *buf++; + tmp = bytestream_get_be24(&buf); Luma[4] = (tmp >> 18) & 0x3F; Luma[5] = (tmp >> 12) & 0x3F; Luma[6] = (tmp >> 6) & 0x3F; Luma[7] = tmp & 0x3F; - tmp = (*buf++) << 16; - tmp += (*buf++) << 8; - tmp += *buf++; + tmp = bytestream_get_be24(&buf); Luma[8] = (tmp >> 18) & 0x3F; Luma[9] = (tmp >> 12) & 0x3F; Luma[10] = (tmp >> 6) & 0x3F; Luma[11] = tmp & 0x3F; - tmp = (*buf++) << 16; - tmp += (*buf++) << 8; - tmp += *buf++; + tmp = bytestream_get_be24(&buf); Luma[12] = (tmp >> 18) & 0x3F; Luma[13] = (tmp >> 12) & 0x3F; Luma[14] = (tmp >> 6) & 0x3F; |