57 static const int8_t
fibonacci[16] = { -34, -21, -13, -8, -5, -3, -2, -1, 0, 1, 2, 3, 5, 8, 13, 21 };
58 static const int8_t
exponential[16] = { -128, -64, -32, -16, -8, -4, -2, -1, 0, 1, 2, 4, 8, 16, 32, 64 };
60 #define MAX_FRAME_SIZE 2048
76 val = av_clip_uint8(val + table[d & 0xF]);
78 val = av_clip_uint8(val + table[d >> 4]);
96 if (!esc->
data[0] && avpkt) {
97 int chan_size = avpkt->
size / avctx->
channels - hdr_size;
109 esc->
fib_acc[1] = avpkt->
data[2+chan_size+1] + 128;
121 memcpy(esc->
data[0], &avpkt->
data[hdr_size], chan_size);
123 memcpy(esc->
data[1], &avpkt->
data[2*hdr_size+chan_size], chan_size);
142 for (ch = 0; ch < avctx->
channels; ch++) {
187 #if CONFIG_EIGHTSVX_FIB_DECODER
188 AVCodec ff_eightsvx_fib_decoder = {
202 #if CONFIG_EIGHTSVX_EXP_DECODER
203 AVCodec ff_eightsvx_exp_decoder = {
const struct AVCodec * codec
const char const char void * val
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
static const int8_t fibonacci[16]
This structure describes decoded (raw) audio or video data.
ptrdiff_t const GLvoid * data
#define AV_LOG_WARNING
Something somehow does not look correct.
static av_cold int init(AVCodecContext *avctx)
enum AVSampleFormat sample_fmt
audio sample format
static int eightsvx_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
decode a frame
#define CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
static av_cold int eightsvx_decode_close(AVCodecContext *avctx)
static const int8_t exponential[16]
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static const struct endianess table[]
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static void delta_decode(uint8_t *dst, const uint8_t *src, int src_size, uint8_t *state, const int8_t *table)
Delta decode the compressed values in src, and put the resulting decoded samples in dst...
simple assert() macros that are a bit more flexible than ISO C assert().
const char * name
Name of the codec implementation.
Libavcodec external API header.
AVSampleFormat
Audio sample formats.
main external API structure.
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
static int decode(AVCodecContext *avctx, void *data, int *got_sub, AVPacket *avpkt)
common internal api header.
common internal and external API header
static av_cold int eightsvx_decode_init(AVCodecContext *avctx)
int channels
number of audio channels
static enum AVSampleFormat sample_fmts[]
int frame_number
Frame counter, set by libavcodec.
This structure stores compressed data.
int nb_samples
number of audio samples (per channel) described by this frame