* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef VP56_H
-#define VP56_H
+#ifndef FFMPEG_VP56_H
+#define FFMPEG_VP56_H
#include "vp56data.h"
#include "dsputil.h"
-#include "mpegvideo.h"
+#include "bitstream.h"
#include "bytestream.h"
typedef void (*vp56_default_models_init_t)(vp56_context_t *s);
typedef void (*vp56_parse_vector_models_t)(vp56_context_t *s);
typedef void (*vp56_parse_coeff_models_t)(vp56_context_t *s);
-typedef int (*vp56_parse_header_t)(vp56_context_t *s, uint8_t *buf,
+typedef int (*vp56_parse_header_t)(vp56_context_t *s, const uint8_t *buf,
int buf_size, int *golden_frame);
typedef struct {
int high;
int bits;
- uint8_t *buffer;
+ const uint8_t *buffer;
unsigned long code_word;
} vp56_range_coder_t;
vp56_model_t *modelp;
vp56_model_t models[2];
+
+ /* huffman decoding */
+ int use_huffman;
+ GetBitContext gb;
+ VLC dccv_vlc[2];
+ VLC runv_vlc[2];
+ VLC ract_vlc[2][3][6];
+ unsigned int nb_null[2][2]; /* number of consecutive NULL DC/AC */
};
int vp56_free(AVCodecContext *avctx);
void vp56_init_dequant(vp56_context_t *s, int quantizer);
int vp56_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
- uint8_t *buf, int buf_size);
+ const uint8_t *buf, int buf_size);
/**
*/
static inline void vp56_init_range_decoder(vp56_range_coder_t *c,
- uint8_t *buf, int buf_size)
+ const uint8_t *buf, int buf_size)
{
c->high = 255;
c->bits = 8;
return -tree->val;
}
-#endif /* VP56_H */
+#endif /* FFMPEG_VP56_H */