Logo Search packages:      
Sourcecode: blender version File versions

mpegaudio.c File Reference

Detailed Description

The simplest mpeg audio layer 2 encoder.

Definition in file mpegaudio.c.

#include "avcodec.h"
#include "bitstream.h"
#include "mpegaudio.h"
#include "mpegaudiotab.h"

Go to the source code of this file.


struct  MpegAudioContext


#define FIX(a)   ((int)((a) * (1 << FRAC_BITS)))
#define MUL(a, b)   (((int64_t)(a) * (int64_t)(b)) >> FRAC_BITS)
#define P   15
#define SAMPLES_BUF_SIZE   4096
#define SB_ALLOCATED   1
#define SB_NOMORE   2
#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 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 encode_frame (MpegAudioContext *s, unsigned char bit_alloc[MPA_MAX_CHANNELS][SBLIMIT], int padding)
static void filter (MpegAudioContext *s, int ch, short *samples, int incr)
static void idct32 (int *out, int *tab)
static int MPA_encode_close (AVCodecContext *avctx)
static int MPA_encode_frame (AVCodecContext *avctx, unsigned char *frame, int buf_size, void *data)
static int MPA_encode_init (AVCodecContext *avctx)
static void psycho_acoustic_model (MpegAudioContext *s, short smr[SBLIMIT])

Generated by  Doxygen 1.6.0   Back to index