summaryrefslogtreecommitdiff
path: root/libavcodec/roqvideo.c
diff options
context:
space:
mode:
authorRamiro Polla <ramiro.polla@gmail.com>2007-05-23 14:55:13 +0000
committerRamiro Polla <ramiro.polla@gmail.com>2007-05-23 14:55:13 +0000
commit67a5daf07f8759480a1253638fcb548318fd8dd9 (patch)
treedb6cff749e2f68d21de1787e93a42ff0cd05d75e /libavcodec/roqvideo.c
parentcb1a74cf8cc5569ddb354e309850afb39d6e622a (diff)
Remove duplicate bytestream functions
Originally committed as revision 9108 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/roqvideo.c')
-rw-r--r--libavcodec/roqvideo.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/libavcodec/roqvideo.c b/libavcodec/roqvideo.c
index c7db30301c..784ebb0a48 100644
--- a/libavcodec/roqvideo.c
+++ b/libavcodec/roqvideo.c
@@ -32,6 +32,7 @@
#include <unistd.h>
#include "avcodec.h"
+#include "bytestream.h"
#include "dsputil.h"
typedef struct {
@@ -77,10 +78,6 @@ typedef struct RoqContext {
#define RoQ_ID_CCC 0x03
#define get_byte(in_buffer) *(in_buffer++)
-#define get_word(in_buffer) ((unsigned short)(in_buffer += 2, \
- (in_buffer[-1] << 8 | in_buffer[-2])))
-#define get_long(in_buffer) ((unsigned long)(in_buffer += 4, \
- (in_buffer[-1] << 24 | in_buffer[-2] << 16 | in_buffer[-3] << 8 | in_buffer[-4])))
static void apply_vector_2x2(RoqContext *ri, int x, int y, roq_cell *cell)
@@ -293,9 +290,9 @@ static void roqvideo_decode_frame(RoqContext *ri)
unsigned char *buf_end = ri->buf + ri->size;
while (buf < buf_end) {
- chunk_id = get_word(buf);
- chunk_size = get_long(buf);
- chunk_arg = get_word(buf);
+ chunk_id = bytestream_get_le16(&buf);
+ chunk_size = bytestream_get_le32(&buf);
+ chunk_arg = bytestream_get_le16(&buf);
if(chunk_id == RoQ_QUAD_VQ)
break;