]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/vp56.h
Cosmetics
[ffmpeg] / libavcodec / vp56.h
index 50e20155044b3f3c56ddd15c4e95bfe1140d81e5..8c85e01995d9db6e1b09d4b6a54b1fbfdbd37d19 100644 (file)
@@ -18,7 +18,7 @@
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #ifndef VP56_H
@@ -27,6 +27,7 @@
 #include "vp56data.h"
 #include "dsputil.h"
 #include "mpegvideo.h"
+#include "bytestream.h"
 
 
 typedef struct vp56_context vp56_context_t;
@@ -48,7 +49,7 @@ typedef int (*vp56_parse_header_t)(vp56_context_t *s, uint8_t *buf,
 typedef struct {
     int high;
     int bits;
-    const uint8_t *buffer;
+    uint8_t *buffer;
     unsigned long code_word;
 } vp56_range_coder_t;
 
@@ -73,6 +74,7 @@ struct vp56_context {
     DSPContext dsp;
     ScanTable scantable;
     AVFrame frames[3];
+    AVFrame *framep[4];
     uint8_t *edge_emu_buffer_alloc;
     uint8_t *edge_emu_buffer;
     vp56_range_coder_t c;
@@ -163,13 +165,12 @@ int vp56_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
  */
 
 static inline void vp56_init_range_decoder(vp56_range_coder_t *c,
-                                           const uint8_t *buf, int buf_size)
+                                           uint8_t *buf, int buf_size)
 {
     c->high = 255;
     c->bits = 8;
     c->buffer = buf;
-    c->code_word = *c->buffer++ << 8;
-    c->code_word |= *c->buffer++;
+    c->code_word = bytestream_get_be16(&c->buffer);
 }
 
 static inline int vp56_rac_get_prob(vp56_range_coder_t *c, uint8_t prob)