FFmpeg
|
#include "libavutil/common.h"
#include "libavutil/float_dsp.h"
#include "libavutil/mathematics.h"
#include "libavutil/thread.h"
#include "audio_frame_queue.h"
#include "avcodec.h"
#include "codec_internal.h"
#include "encode.h"
#include "fft.h"
#include "nellymoser.h"
#include "sinewin.h"
#include "put_bits.h"
Go to the source code of this file.
Data Structures | |
struct | NellyMoserEncodeContext |
Macros | |
#define | BITSTREAM_WRITER_LE |
#define | POW_TABLE_SIZE (1<<11) |
#define | POW_TABLE_OFFSET 3 |
#define | OPT_SIZE ((1<<15) + 3000) |
#define | find_best(val, table, LUT, LUT_add, LUT_size) |
Functions | |
static void | apply_mdct (NellyMoserEncodeContext *s) |
static av_cold int | encode_end (AVCodecContext *avctx) |
static av_cold void | nellymoser_init_static (void) |
static av_cold int | encode_init (AVCodecContext *avctx) |
static void | get_exponent_greedy (NellyMoserEncodeContext *s, float *cand, int *idx_table) |
static float | distance (float x, float y, int band) |
static void | get_exponent_dynamic (NellyMoserEncodeContext *s, float *cand, int *idx_table) |
static void | encode_block (NellyMoserEncodeContext *s, unsigned char *output, int output_size) |
Encode NELLY_SAMPLES samples. More... | |
static int | encode_frame (AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr) |
Variables | |
static float | pow_table [POW_TABLE_SIZE] |
pow(2, -i / 2048.0 - 3.0); More... | |
static const uint8_t | sf_lut [96] |
static const uint8_t | sf_delta_lut [78] |
static const uint8_t | quant_lut [230] |
static const float | quant_lut_mul [7] = { 0.0, 0.0, 2.0, 2.0, 5.0, 12.0, 36.6 } |
static const float | quant_lut_add [7] = { 0.0, 0.0, 2.0, 7.0, 21.0, 56.0, 157.0 } |
static const uint8_t | quant_lut_offset [8] = { 0, 0, 1, 4, 11, 32, 81, 230 } |
const FFCodec | ff_nellymoser_encoder |
Nellymoser encoder by Bartlomiej Wolowiec
Generic codec information: libavcodec/nellymoserdec.c
Some information also from: http://samples.mplayerhq.hu/A-codecs/Nelly_Moser/ASAO/ASAO.zip (Copyright Joseph Artsimovich and UAB "DKD")
for more information about nellymoser format, visit: http://wiki.multimedia.cx/index.php?title=Nellymoser
Definition in file nellymoserenc.c.
#define BITSTREAM_WRITER_LE |
Definition at line 51 of file nellymoserenc.c.
#define POW_TABLE_SIZE (1<<11) |
Definition at line 54 of file nellymoserenc.c.
#define POW_TABLE_OFFSET 3 |
Definition at line 55 of file nellymoserenc.c.
#define OPT_SIZE ((1<<15) + 3000) |
Definition at line 56 of file nellymoserenc.c.
|
static |
Definition at line 121 of file nellymoserenc.c.
Referenced by encode_block().
|
static |
Definition at line 136 of file nellymoserenc.c.
|
static |
Definition at line 150 of file nellymoserenc.c.
Referenced by encode_init().
|
static |
Definition at line 168 of file nellymoserenc.c.
|
static |
Definition at line 210 of file nellymoserenc.c.
Referenced by encode_block().
Definition at line 228 of file nellymoserenc.c.
Referenced by add_index_entry(), av_add_index_entry(), compute_distance_ssd_c(), decode_entropy_coded_image(), ff_add_index_entry(), ff_er_frame_end(), ff_opus_rc_dec_laplace(), ff_opus_rc_enc_laplace(), filter_channel(), get_exponent_dynamic(), guess_dc(), mov_build_index(), mov_preroll_write_stbl_atoms(), mov_read_trun(), put_vector(), and render_charset().
|
static |
Definition at line 235 of file nellymoserenc.c.
Referenced by encode_block().
|
static |
Encode NELLY_SAMPLES samples.
It assumes, that samples contains 3 * NELLY_BUF_LEN values
s | encoder context |
output | output buffer |
output_size | size of output buffer |
Definition at line 304 of file nellymoserenc.c.
Referenced by encode_frame().
|
static |
Definition at line 378 of file nellymoserenc.c.
|
static |
pow(2, -i / 2048.0 - 3.0);
Definition at line 71 of file nellymoserenc.c.
Referenced by encode_block(), and nellymoser_init_static().
|
static |
Definition at line 73 of file nellymoserenc.c.
Referenced by get_exponent_greedy().
|
static |
Definition at line 82 of file nellymoserenc.c.
Referenced by get_exponent_greedy().
|
static |
Definition at line 90 of file nellymoserenc.c.
Referenced by encode_block().
|
static |
Definition at line 117 of file nellymoserenc.c.
Referenced by encode_block().
|
static |
Definition at line 118 of file nellymoserenc.c.
Referenced by encode_block().
|
static |
Definition at line 119 of file nellymoserenc.c.
Referenced by encode_block().
const FFCodec ff_nellymoser_encoder |
Definition at line 416 of file nellymoserenc.c.