40 #define BITSTREAM_READER_LE
67 float *aptr, *bptr, *pptr,
val, pval;
79 pval = -
exp2(
val/2048) *
s->scale_bias;
89 for (
i = 0;
i < 2;
i++) {
108 s->imdct_ctx.imdct_half(&
s->imdct_ctx,
s->imdct_out, aptr);
110 s->imdct_out, ff_sine_128,
112 FFSWAP(
float *,
s->imdct_out,
s->imdct_prev);
120 s->imdct_out =
s->imdct_buf[0];
121 s->imdct_prev =
s->imdct_buf[1];
129 s->scale_bias = 1.0/(32768*8);
142 int *got_frame_ptr,
AVPacket *avpkt)
146 int buf_size = avpkt->
size;
169 for (
i=0 ;
i<blocks ;
i++) {
190 .
name =
"nellymoser",
static enum AVSampleFormat sample_fmts[]
static double val(void *priv, double ch)
Libavcodec external API header.
static av_cold int init(AVCodecContext *avctx)
audio channel layout utility functions
#define FFSWAP(type, a, b)
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
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_CH_LAYOUT_MONO
#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 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.
#define DECLARE_ALIGNED(n, t, v)
Declare a variable that is aligned in memory.
AVSampleFormat
Audio sample formats.
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.
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
av_cold AVFloatDSPContext * avpriv_float_dsp_alloc(int bit_exact)
Allocate a float DSP context.
common internal API header
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
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 implementors.
#define NELLY_DETAIL_BITS
#define NELLY_HEADER_BITS
static int decode_tag(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
static av_cold int decode_init(AVCodecContext *avctx)
static av_cold int decode_end(AVCodecContext *avctx)
AVCodec ff_nellymoser_decoder
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
main external API structure.
enum AVSampleFormat sample_fmt
audio sample format
int flags
AV_CODEC_FLAG_*.
int channels
number of audio channels
uint64_t channel_layout
Audio channel layout.
const char * name
Name of the codec implementation.
This structure describes decoded (raw) audio or video data.
int nb_samples
number of audio samples (per channel) described by this frame
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
Context structure for the Lagged Fibonacci PRNG.
This structure stores compressed data.
float imdct_buf[2][NELLY_BUF_LEN]