#define ALT_BITSTREAM_READER_LE
#include "avcodec.h"
#include "bitstream.h"
+#include "unary.h"
/**
* @file wavpack.c
if(ctx->zeroes)
return 0;
}else{
- t = get_unary(gb, 0, 33);
+ t = get_unary_0_33(gb);
if(t >= 2) t = get_bits(gb, t - 1) | (1 << (t-1));
ctx->zeroes = t;
if(ctx->zeroes){
t = 0;
ctx->zero = 0;
}else{
- t = get_unary(gb, 0, 33);
+ t = get_unary_0_33(gb);
if(get_bits_count(gb) >= ctx->data_size){
*last = 1;
return 0;
}
if(t == 16) {
- t2 = get_unary(gb, 0, 33);
+ t2 = get_unary_0_33(gb);
if(t2 < 2) t += t2;
else t += get_bits(gb, t2 - 1) | (1 << (t2 - 1));
}
return 0;
}
-static int wavpack_decode_close(AVCodecContext *avctx)
-{
-// WavpackContext *s = avctx->priv_data;
-
- return 0;
-}
-
static int wavpack_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
uint8_t *buf, int buf_size)
sizeof(WavpackContext),
wavpack_decode_init,
NULL,
- wavpack_decode_close,
+ NULL,
wavpack_decode_frame,
};