#include "avcodec.h"
#include "bitstream.h"
#include "mpegaudio.h"
#include "mpegaudiodata.h"
#include "mpegaudiotab.h"
Go to the source code of this file.
Data Structures | |
struct | MpegAudioContext |
Defines | |
#define | CONFIG_MPEGAUDIO_HP 0 |
#define | MUL(a, b) (((int64_t)(a) * (int64_t)(b)) >> FRAC_BITS) |
#define | SAMPLES_BUF_SIZE 4096 |
#define | P 15 |
#define | WSHIFT (WFRAC_BITS + 15 - FRAC_BITS) |
#define | SB_NOTALLOCATED 0 |
#define | SB_ALLOCATED 1 |
#define | SB_NOMORE 2 |
Functions | |
static av_cold int | MPA_encode_init (AVCodecContext *avctx) |
static void | idct32 (int *out, int *tab) |
static void | filter (MpegAudioContext *s, int ch, 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 | |
AVCodec | mp2_encoder |
#define CONFIG_MPEGAUDIO_HP 0 |
Definition at line 31 of file mpegaudioenc.c.
#define MUL | ( | a, | |||
b | ) | (((int64_t)(a) * (int64_t)(b)) >> FRAC_BITS) |
#define P 15 |
Referenced by direct_search(), encode_frame(), encode_q_branch(), ff_estimate_motion_b(), ff_estimate_p_frame_motion(), ff_pre_estimate_p_frame_motion(), h263_mv4_search(), interlaced_search(), ipvideo_decode_block_opcode_0x8(), ipvideo_decode_block_opcode_0x9(), ipvideo_decode_block_opcode_0xA(), ipvideo_decode_block_opcode_0xD(), and MPA_encode_init().
#define SAMPLES_BUF_SIZE 4096 |
#define SB_ALLOCATED 1 |
#define SB_NOMORE 2 |
#define SB_NOTALLOCATED 0 |
#define WSHIFT (WFRAC_BITS + 15 - FRAC_BITS) |
static void compute_bit_allocation | ( | MpegAudioContext * | s, | |
short | smr1[MPA_MAX_CHANNELS][SBLIMIT], | |||
unsigned char | bit_alloc[MPA_MAX_CHANNELS][SBLIMIT], | |||
int * | padding | |||
) | [static] |
Definition at line 508 of file mpegaudioenc.c.
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] |
static void encode_frame | ( | MpegAudioContext * | s, | |
unsigned char | bit_alloc[MPA_MAX_CHANNELS][SBLIMIT], | |||
int | padding | |||
) | [static] |
Definition at line 613 of file mpegaudioenc.c.
static void filter | ( | MpegAudioContext * | s, | |
int | ch, | |||
short * | samples, | |||
int | incr | |||
) | [static] |
Definition at line 315 of file mpegaudioenc.c.
Referenced by av_resample(), avfilter_graph_parse(), filter_name(), h_resample_fast(), h_resample_fast4_mmx(), h_resample_slow(), initFilter(), MPA_encode_frame(), mpegts_open_pes_filter(), mpegts_open_section_filter(), pick_formats(), query_formats(), truespeech_apply_twopoint_filter(), tta_decode_frame(), vc1_decode_p_mb(), and xa_decode().
static void idct32 | ( | int * | out, | |
int * | tab | |||
) | [static] |
static av_cold int MPA_encode_close | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 787 of file mpegaudioenc.c.
static int MPA_encode_frame | ( | AVCodecContext * | avctx, | |
unsigned char * | frame, | |||
int | buf_size, | |||
void * | data | |||
) | [static] |
Definition at line 757 of file mpegaudioenc.c.
static av_cold int MPA_encode_init | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 67 of file mpegaudioenc.c.
static void psycho_acoustic_model | ( | MpegAudioContext * | s, | |
short | smr[SBLIMIT] | |||
) | [static] |
Initial value:
{ "mp2", CODEC_TYPE_AUDIO, CODEC_ID_MP2, sizeof(MpegAudioContext), MPA_encode_init, MPA_encode_frame, MPA_encode_close, NULL, .sample_fmts = (enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE}, .long_name = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"), }
Definition at line 793 of file mpegaudioenc.c.