|
FFmpeg
|
The simplest mpeg audio layer 2 encoder. More...
#include "config.h"#include "config_components.h"#include "libavutil/avassert.h"#include "libavutil/channel_layout.h"#include "avcodec.h"#include "codec_internal.h"#include "encode.h"#include "put_bits.h"#include "mpegaudio.h"#include "mpegaudiodsp.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) |
| #define | SAMPLES_BUF_SIZE 4096 |
| #define | IS_FIXED(s) |
| #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, const short *samples, int incr) |
| static void | compute_scale_factors (MpegAudioContext *s, 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 unsigned | compute_bit_allocation (MpegAudioContext *s, short smr1[MPA_MAX_CHANNELS][SBLIMIT], unsigned char bit_alloc[MPA_MAX_CHANNELS][SBLIMIT], int *padding) |
| static av_always_inline void | encode_subbands (MpegAudioContext *const s, PutBitContext *const p, const uint8_t bit_alloc[MPA_MAX_CHANNELS][SBLIMIT], int is_fixed) |
| Quantization & write sub band samples. | |
| static void | encode_frame (MpegAudioContext *s, uint8_t *buf, unsigned buf_size, unsigned char bit_alloc[MPA_MAX_CHANNELS][SBLIMIT], int padding) |
| static int | mpa_encode_frame (AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr) |
Variables | |
| static const FFCodecDefault | mp2_defaults [] |
The simplest mpeg audio layer 2 encoder.
Definition in file mpegaudioenc.c.
Definition at line 38 of file mpegaudioenc.c.
Definition at line 39 of file mpegaudioenc.c.
| #define SAMPLES_BUF_SIZE 4096 |
Definition at line 50 of file mpegaudioenc.c.
Referenced by filter().
| #define IS_FIXED | ( | s | ) |
Definition at line 82 of file mpegaudioenc.c.
Referenced by encode_frame(), and mpa_encode_init().
| #define P 15 |
Referenced by color_graticule(), color_graticule16(), compute_band_corr(), compute_frame_features(), direct_search(), encode_q_branch(), encode_subbands(), epzs_motion_search2(), epzs_motion_search_internal(), estimate_motion_b(), ff_epzs_motion_search(), ff_estimate_p_frame_motion(), ff_linear_int_to_srgb_u8(), ff_me_init(), ff_pre_estimate_p_frame_motion(), ff_videotoolbox_hvcc_extradata_create(), filter_channel(), filter_channel(), filter_color(), filter_color2(), filter_frame(), filter_mono(), frame_header(), generate_slice(), get_cap(), green_graticule(), green_graticule16(), h263_mv4_search(), interlaced_search(), invert_graticule(), invert_graticule16(), ipvideo_decode_block_opcode_0x7(), ipvideo_decode_block_opcode_0x7_16(), ipvideo_decode_block_opcode_0x8(), ipvideo_decode_block_opcode_0x8_16(), ipvideo_decode_block_opcode_0x9(), ipvideo_decode_block_opcode_0x9_16(), ipvideo_decode_block_opcode_0xA(), ipvideo_decode_block_opcode_0xA_16(), ipvideo_decode_block_opcode_0xD(), ipvideo_decode_block_opcode_0xD_16(), lup_decompose(), lup_invert(), mpa_encode_init(), none_graticule(), pitch_filter(), rnnoise_channel(), twofish_decrypt(), twofish_encrypt(), and update_hue_peaks().
| #define WSHIFT (WFRAC_BITS + 15 - FRAC_BITS) |
Definition at line 322 of file mpegaudioenc.c.
Referenced by filter().
| #define SB_NOTALLOCATED 0 |
Definition at line 503 of file mpegaudioenc.c.
Referenced by compute_bit_allocation().
| #define SB_ALLOCATED 1 |
Definition at line 504 of file mpegaudioenc.c.
Referenced by compute_bit_allocation().
| #define SB_NOMORE 2 |
Definition at line 505 of file mpegaudioenc.c.
Referenced by compute_bit_allocation().
|
static |
Definition at line 84 of file mpegaudioenc.c.
|
static |
Definition at line 203 of file mpegaudioenc.c.
Referenced by filter().
|
static |
Definition at line 324 of file mpegaudioenc.c.
|
static |
Definition at line 377 of file mpegaudioenc.c.
Referenced by mpa_encode_frame().
|
static |
Definition at line 493 of file mpegaudioenc.c.
Referenced by mpa_encode_frame().
|
static |
Definition at line 510 of file mpegaudioenc.c.
Referenced by mpa_encode_frame().
|
static |
Quantization & write sub band samples.
Definition at line 604 of file mpegaudioenc.c.
Referenced by encode_frame().
|
static |
Definition at line 671 of file mpegaudioenc.c.
Referenced by mpa_encode_frame().
|
static |
Definition at line 755 of file mpegaudioenc.c.
|
static |
Definition at line 790 of file mpegaudioenc.c.