40#include "config_components.h"
61static const int8_t
fibonacci[16] = { -34, -21, -13, -8, -5, -3, -2, -1, 0, 1, 2, 3, 5, 8, 13, 21 };
62static const int8_t
exponential[16] = { -128, -64, -32, -16, -8, -4, -2, -1, 0, 1, 2, 4, 8, 16, 32, 64 };
64#define MAX_FRAME_SIZE 2048
100 if (!esc->
data[0] && avpkt) {
113 esc->
fib_acc[1] = avpkt->
data[2+chan_size+1] + 128;
125 memcpy(esc->
data[0], &avpkt->
data[hdr_size], chan_size);
127 memcpy(esc->
data[1], &avpkt->
data[2*hdr_size+chan_size], chan_size);
142 frame->nb_samples = buf_size * 2;
190#if CONFIG_EIGHTSVX_FIB_DECODER
192 .p.name =
"8svx_fib",
203#if CONFIG_EIGHTSVX_EXP_DECODER
205 .p.name =
"8svx_exp",
static av_cold int eightsvx_decode_init(AVCodecContext *avctx)
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.
static const int8_t exponential[16]
static av_cold int eightsvx_decode_close(AVCodecContext *avctx)
static int eightsvx_decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *avpkt)
decode a frame
static const int8_t fibonacci[16]
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
static double val(void *priv, double ch)
const FFCodec ff_eightsvx_exp_decoder
const FFCodec ff_eightsvx_fib_decoder
simple assert() macros that are a bit more flexible than ISO C assert().
#define av_assert1(cond)
assert() equivalent, that does not lie in speed critical code.
Libavcodec external API header.
#define FF_CODEC_DECODE_CB(func)
#define CODEC_LONG_NAME(str)
common internal and external API header
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
int(* init)(AVBSFContext *ctx)
static struct @346255127015250356166251341105367306144006377143 state
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define AV_LOG_WARNING
Something somehow does not look correct.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
@ AV_SAMPLE_FMT_U8P
unsigned 8 bits, planar
Memory handling functions.
static const uint16_t table[]
int nb_channels
Number of channels in this layout.
main external API structure.
AVChannelLayout ch_layout
Audio channel layout.
enum AVSampleFormat sample_fmt
audio sample format
int64_t frame_num
Frame counter, set by libavcodec.
const struct AVCodec * codec
This structure describes decoded (raw) audio or video data.
This structure stores compressed data.