The simplest mpeg audio layer 2 encoder. More...
#include "avcodec.h"
#include "internal.h"
#include "put_bits.h"
#include "mpegaudio.h"
#include "mpegaudiodata.h"
#include "mpegaudiotab.h"
Go to the source code of this file.
Data Structures | |
struct | MpegAudioContext |
Macros | |
#define | FRAC_BITS 15 /* fractional bits for sb_samples and dct */ |
#define | WFRAC_BITS 14 /* fractional bits for window */ |
#define | MUL(a, b) (((int64_t)(a) * (int64_t)(b)) >> FRAC_BITS) |
#define | SAMPLES_BUF_SIZE 4096 |
#define | USE_FLOATS |
#define | WSHIFT (WFRAC_BITS + 15 - FRAC_BITS) |
#define | SB_NOTALLOCATED 0 |
#define | SB_ALLOCATED 1 |
#define | SB_NOMORE 2 |
Typedefs | |
typedef struct MpegAudioContext | MpegAudioContext |
Functions | |
static av_cold int | MPA_encode_init (AVCodecContext *avctx) |
static void | idct32 (int *out, int *tab) |
static void | filter (MpegAudioContext *s, int ch, const short *samples, int incr) |
static void | compute_scale_factors (unsigned char scale_code[SBLIMIT], unsigned char scale_factors[SBLIMIT][3], int sb_samples[3][12][SBLIMIT], int sblimit) |
static void | psycho_acoustic_model (MpegAudioContext *s, short smr[SBLIMIT]) |
static void | compute_bit_allocation (MpegAudioContext *s, short smr1[MPA_MAX_CHANNELS][SBLIMIT], unsigned char bit_alloc[MPA_MAX_CHANNELS][SBLIMIT], int *padding) |
static void | encode_frame (MpegAudioContext *s, unsigned char bit_alloc[MPA_MAX_CHANNELS][SBLIMIT], int padding) |
static int | MPA_encode_frame (AVCodecContext *avctx, unsigned char *frame, int buf_size, void *data) |
static av_cold int | MPA_encode_close (AVCodecContext *avctx) |
Variables | |
static const AVCodecDefault | mp2_defaults [] |
AVCodec | ff_mp2_encoder |
The simplest mpeg audio layer 2 encoder.
Definition in file mpegaudioenc.c.
Definition at line 31 of file mpegaudioenc.c.
Definition at line 38 of file mpegaudioenc.c.
Referenced by idct32().
#define SAMPLES_BUF_SIZE 4096 |
Definition at line 40 of file mpegaudioenc.c.
Referenced by filter().
#define SB_ALLOCATED 1 |
Definition at line 490 of file mpegaudioenc.c.
Referenced by compute_bit_allocation().
#define SB_NOMORE 2 |
Definition at line 491 of file mpegaudioenc.c.
Referenced by compute_bit_allocation().
#define SB_NOTALLOCATED 0 |
Definition at line 489 of file mpegaudioenc.c.
Referenced by compute_bit_allocation().
#define USE_FLOATS |
Definition at line 62 of file mpegaudioenc.c.
Definition at line 32 of file mpegaudioenc.c.
Referenced by MPA_encode_init().
#define WSHIFT (WFRAC_BITS + 15 - FRAC_BITS) |
Definition at line 309 of file mpegaudioenc.c.
Referenced by filter().
typedef struct MpegAudioContext MpegAudioContext |
|
static |
Definition at line 496 of file mpegaudioenc.c.
Referenced by MPA_encode_frame().
|
static |
Definition at line 364 of file mpegaudioenc.c.
Referenced by MPA_encode_frame().
|
static |
Definition at line 592 of file mpegaudioenc.c.
|
static |
Definition at line 311 of file mpegaudioenc.c.
Referenced by apply_ir_filter(), av_resample(), avfilter_graph_add_filter(), avfilter_graph_parse(), avfilter_open(), avfilter_register(), filter_name(), initFilter(), main(), make_filters_from_proto(), MPA_encode_frame(), mpegts_open_pes_filter(), mpegts_open_section_filter(), pick_formats(), predictor_update_filter(), query_formats(), read_filter_params(), show_filters(), sws_getDefaultFilter(), truespeech_apply_twopoint_filter(), tta_decode_frame(), and xa_decode().
|
static |
Definition at line 190 of file mpegaudioenc.c.
Referenced by filter().
|
static |
Definition at line 757 of file mpegaudioenc.c.
|
static |
Definition at line 728 of file mpegaudioenc.c.
|
static |
Definition at line 67 of file mpegaudioenc.c.
|
static |
Definition at line 479 of file mpegaudioenc.c.
Referenced by MPA_encode_frame().
AVCodec ff_mp2_encoder |
Definition at line 768 of file mpegaudioenc.c.
|
static |
Definition at line 763 of file mpegaudioenc.c.