41#define BITSTREAM_READER_LE
69 float *aptr, *bptr, *pptr,
val, pval;
81 pval = -
exp2(
val/2048) *
s->scale_bias;
91 for (
i = 0;
i < 2;
i++) {
110 s->imdct_fn(
s->imdct_ctx,
s->imdct_out, aptr,
sizeof(
float));
112 s->imdct_out, ff_sine_128,
114 FFSWAP(
float *,
s->imdct_out,
s->imdct_prev);
125 s->imdct_out =
s->imdct_buf[0];
126 s->imdct_prev =
s->imdct_buf[1];
129 1, 128, &
scale, 0)) < 0)
136 s->scale_bias = 1.0/(32768*8);
149 int *got_frame_ptr,
AVPacket *avpkt)
151 const uint8_t *buf = avpkt->
data;
152 int buf_size = avpkt->
size;
173 samples_flt = (
float *)
frame->data[0];
175 for (
i=0 ;
i<blocks ;
i++) {
196 .p.name =
"nellymoser",
static double val(void *priv, double ch)
const FFCodec ff_nellymoser_decoder
static av_cold void close(AVCodecParserContext *s)
Libavcodec external API header.
#define i(width, name, range_min, range_max)
Public libavutil channel layout APIs header.
#define FF_CODEC_DECODE_CB(func)
#define CODEC_LONG_NAME(str)
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
int(* init)(AVBSFContext *ctx)
static const uint8_t bits[8]
bitstream reader API header.
static void skip_bits_long(GetBitContext *s, int n)
Skips the specified number of bits.
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
#define AV_CODEC_FLAG_BITEXACT
Use only bitexact stuff (except (I)DCT).
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
#define AV_CODEC_CAP_CHANNEL_CONF
Codec should fill in channel configuration and samplerate instead of container.
#define AV_CODEC_CAP_PARAM_CHANGE
Codec supports changed parameters at any point.
#define AV_CHANNEL_LAYOUT_MONO
void av_channel_layout_uninit(AVChannelLayout *channel_layout)
Free any allocated data in the channel layout and reset the channel count to 0.
#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.
static void scale(int *out, const int *in, const int w, const int h, const int shift)
av_cold void av_lfg_init(AVLFG *c, unsigned int seed)
static unsigned int av_lfg_get(AVLFG *c)
Get the next random unsigned 32-bit number using an ALFG.
static av_cold int decode_init(AVCodecContext *avctx)
static av_cold int decode_end(AVCodecContext *avctx)
av_cold AVFloatDSPContext * avpriv_float_dsp_alloc(int bit_exact)
Allocate a float DSP context.
#define FFSWAP(type, a, b)
Memory handling functions.
#define DECLARE_ALIGNED(n, t, v)
Declare a variable that is aligned in memory.
const uint16_t ff_nelly_init_table[64]
const uint8_t ff_nelly_band_sizes_table[NELLY_BANDS]
void ff_nelly_get_sample_bits(const float *buf, int *bits)
const int16_t ff_nelly_delta_table[32]
const float ff_nelly_dequantization_table[127]
The 3 alphanumeric copyright notices are md5summed they are from the original implementers.
#define NELLY_DETAIL_BITS
#define NELLY_HEADER_BITS
static av_cold int decode_init(AVCodecContext *avctx)
static int decode_tag(AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *avpkt)
static av_cold int decode_end(AVCodecContext *avctx)
static void nelly_decode_block(NellyMoserDecodeContext *s, const unsigned char block[NELLY_BLOCK_LEN], float audio[NELLY_SAMPLES])
void ff_init_ff_sine_windows(int index)
initialize the specified entry of ff_sine_windows
An AVChannelLayout holds information about the channel layout of audio data.
main external API structure.
AVChannelLayout ch_layout
Audio channel layout.
enum AVSampleFormat sample_fmt
audio sample format
int flags
AV_CODEC_FLAG_*.
This structure describes decoded (raw) audio or video data.
Context structure for the Lagged Fibonacci PRNG.
This structure stores compressed data.
float imdct_buf[2][NELLY_BUF_LEN]
av_cold void av_tx_uninit(AVTXContext **ctx)
Frees a context and sets *ctx to NULL, does nothing when *ctx == NULL.
av_cold int av_tx_init(AVTXContext **ctx, av_tx_fn *tx, enum AVTXType type, int inv, int len, const void *scale, uint64_t flags)
Initialize a transform context with the given configuration (i)MDCTs with an odd length are currently...
@ AV_TX_FLOAT_MDCT
Standard MDCT with a sample data type of float, double or int32_t, respectively.
void(* av_tx_fn)(AVTXContext *s, void *out, void *in, ptrdiff_t stride)
Function pointer to a function to perform the transform.