|
|
|
@ -29,9 +29,7 @@ |
|
|
|
|
|
|
|
|
|
#include "avcodec.h" |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* decoder context |
|
|
|
|
*/ |
|
|
|
|
/** decoder context */ |
|
|
|
|
typedef struct EightSvxContext { |
|
|
|
|
int16_t fib_acc; |
|
|
|
|
int16_t *table; |
|
|
|
@ -42,9 +40,7 @@ const static int16_t fibonacci[16] = { -34<<8, -21<<8, -13<<8, -8<<8, -5<<8, |
|
|
|
|
const static int16_t exponential[16] = { -128<<8, -64<<8, -32<<8, -16<<8, -8<<8, -4<<8, -2<<8, -1<<8, |
|
|
|
|
0, 1<<8, 2<<8, 4<<8, 8<<8, 16<<8, 32<<8, 64<<8 }; |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* decode a frame |
|
|
|
|
*/ |
|
|
|
|
/** decode a frame */ |
|
|
|
|
static int eightsvx_decode_frame(AVCodecContext *avctx, void *data, int *data_size, |
|
|
|
|
const uint8_t *buf, int buf_size) |
|
|
|
|
{ |
|
|
|
@ -75,9 +71,7 @@ static int eightsvx_decode_frame(AVCodecContext *avctx, void *data, int *data_si |
|
|
|
|
return consumed; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* initialize 8svx decoder |
|
|
|
|
*/ |
|
|
|
|
/** initialize 8svx decoder */ |
|
|
|
|
static av_cold int eightsvx_decode_init(AVCodecContext *avctx) |
|
|
|
|
{ |
|
|
|
|
EightSvxContext *esc = avctx->priv_data; |
|
|
|
|