Mercurial > libavcodec.hg
comparison vp56.h @ 5089:bff60ecc02f9 libavcodec
Use AV_xx throughout libavcodec
author | ramiro |
---|---|
date | Sat, 02 Jun 2007 01:41:07 +0000 |
parents | 340c876320eb |
children | 2b72f9bc4f06 |
comparison
equal
deleted
inserted
replaced
5088:8e206208db1f | 5089:bff60ecc02f9 |
---|---|
25 #define VP56_H | 25 #define VP56_H |
26 | 26 |
27 #include "vp56data.h" | 27 #include "vp56data.h" |
28 #include "dsputil.h" | 28 #include "dsputil.h" |
29 #include "mpegvideo.h" | 29 #include "mpegvideo.h" |
30 #include "bytestream.h" | |
30 | 31 |
31 | 32 |
32 typedef struct vp56_context vp56_context_t; | 33 typedef struct vp56_context vp56_context_t; |
33 typedef struct vp56_mv vp56_mv_t; | 34 typedef struct vp56_mv vp56_mv_t; |
34 | 35 |
167 const uint8_t *buf, int buf_size) | 168 const uint8_t *buf, int buf_size) |
168 { | 169 { |
169 c->high = 255; | 170 c->high = 255; |
170 c->bits = 8; | 171 c->bits = 8; |
171 c->buffer = buf; | 172 c->buffer = buf; |
172 c->code_word = *c->buffer++ << 8; | 173 c->code_word = bytestream_get_be16(&c->buffer); |
173 c->code_word |= *c->buffer++; | |
174 } | 174 } |
175 | 175 |
176 static inline int vp56_rac_get_prob(vp56_range_coder_t *c, uint8_t prob) | 176 static inline int vp56_rac_get_prob(vp56_range_coder_t *c, uint8_t prob) |
177 { | 177 { |
178 unsigned int low = 1 + (((c->high - 1) * prob) / 256); | 178 unsigned int low = 1 + (((c->high - 1) * prob) / 256); |