libavcodec/aacenc.c File Reference

AAC encoder. More...

#include "avcodec.h"
#include "put_bits.h"
#include "dsputil.h"
#include "mpeg4audio.h"
#include "aac.h"
#include "aactab.h"
#include "aacenc.h"
#include "psymodel.h"

Go to the source code of this file.

Functions

static void put_audio_specific_config (AVCodecContext *avctx)
 Make AAC audio config object.
static av_cold int aac_encode_init (AVCodecContext *avctx)
static void apply_window_and_mdct (AVCodecContext *avctx, AACEncContext *s, SingleChannelElement *sce, short *audio, int channel)
static void put_ics_info (AACEncContext *s, IndividualChannelStream *info)
 Encode ics_info element.
static void encode_ms_info (PutBitContext *pb, ChannelElement *cpe)
 Encode MS data.
static void adjust_frame_information (AACEncContext *apc, ChannelElement *cpe, int chans)
 Produce integer coefficients from scalefactors provided by the model.
static void encode_band_info (AACEncContext *s, SingleChannelElement *sce)
 Encode scalefactor band coding type.
static void encode_scale_factors (AVCodecContext *avctx, AACEncContext *s, SingleChannelElement *sce)
 Encode scalefactors.
static void encode_pulses (AACEncContext *s, Pulse *pulse)
 Encode pulse data.
static void encode_spectral_coeffs (AACEncContext *s, SingleChannelElement *sce)
 Encode spectral coefficients processed by psychoacoustic model.
static int encode_individual_channel (AVCodecContext *avctx, AACEncContext *s, SingleChannelElement *sce, int common_window)
 Encode one channel of audio data.
static void put_bitstream_info (AVCodecContext *avctx, AACEncContext *s, const char *name)
 Write some auxiliary information about the created AAC file.
static int aac_encode_frame (AVCodecContext *avctx, uint8_t *frame, int buf_size, void *data)
static av_cold int aac_encode_end (AVCodecContext *avctx)

Variables

static const uint8_t swb_size_1024_96 []
static const uint8_t swb_size_1024_64 []
static const uint8_t swb_size_1024_48 []
static const uint8_t swb_size_1024_32 []
static const uint8_t swb_size_1024_24 []
static const uint8_t swb_size_1024_16 []
static const uint8_t swb_size_1024_8 []
static const uint8_t * swb_size_1024 []
static const uint8_t swb_size_128_96 []
static const uint8_t swb_size_128_48 []
static const uint8_t swb_size_128_24 []
static const uint8_t swb_size_128_16 []
static const uint8_t swb_size_128_8 []
static const uint8_t * swb_size_128 []
static const uint8_t aac_chan_configs [6][5]
 default channel configurations
AVCodec aac_encoder


Detailed Description

AAC encoder.

Definition in file aacenc.c.


Function Documentation

static av_cold int aac_encode_end ( AVCodecContext avctx  )  [static]

Definition at line 620 of file aacenc.c.

static int aac_encode_frame ( AVCodecContext avctx,
uint8_t *  frame,
int  buf_size,
void *  data 
) [static]

Definition at line 480 of file aacenc.c.

static av_cold int aac_encode_init ( AVCodecContext avctx  )  [static]

Definition at line 153 of file aacenc.c.

static void adjust_frame_information ( AACEncContext apc,
ChannelElement cpe,
int  chans 
) [static]

Produce integer coefficients from scalefactors provided by the model.

Definition at line 303 of file aacenc.c.

Referenced by aac_encode_frame().

static void apply_window_and_mdct ( AVCodecContext avctx,
AACEncContext s,
SingleChannelElement sce,
short *  audio,
int  channel 
) [static]

Definition at line 217 of file aacenc.c.

Referenced by aac_encode_frame(), encode_superframe(), and vorbis_encode_frame().

static void encode_band_info ( AACEncContext s,
SingleChannelElement sce 
) [static]

Encode scalefactor band coding type.

Definition at line 366 of file aacenc.c.

Referenced by encode_individual_channel().

static int encode_individual_channel ( AVCodecContext avctx,
AACEncContext s,
SingleChannelElement sce,
int  common_window 
) [static]

Encode one channel of audio data.

Definition at line 443 of file aacenc.c.

Referenced by aac_encode_frame().

static void encode_ms_info ( PutBitContext pb,
ChannelElement cpe 
) [static]

Encode MS data.

See also:
4.6.8.1 "Joint Coding - M/S Stereo"

Definition at line 289 of file aacenc.c.

Referenced by aac_encode_frame().

static void encode_pulses ( AACEncContext s,
Pulse pulse 
) [static]

Encode pulse data.

Definition at line 399 of file aacenc.c.

Referenced by encode_individual_channel().

static void encode_scale_factors ( AVCodecContext avctx,
AACEncContext s,
SingleChannelElement sce 
) [static]

Encode scalefactors.

Definition at line 377 of file aacenc.c.

Referenced by encode_individual_channel().

static void encode_spectral_coeffs ( AACEncContext s,
SingleChannelElement sce 
) [static]

Encode spectral coefficients processed by psychoacoustic model.

Definition at line 418 of file aacenc.c.

Referenced by encode_individual_channel().

static void put_audio_specific_config ( AVCodecContext avctx  )  [static]

Make AAC audio config object.

See also:
1.6.2.1 "Syntax - AudioSpecificConfig"

Definition at line 137 of file aacenc.c.

Referenced by aac_encode_init().

static void put_bitstream_info ( AVCodecContext avctx,
AACEncContext s,
const char *  name 
) [static]

Write some auxiliary information about the created AAC file.

Definition at line 462 of file aacenc.c.

Referenced by aac_encode_frame().

static void put_ics_info ( AACEncContext s,
IndividualChannelStream info 
) [static]

Encode ics_info element.

See also:
Table 4.6 (syntax of ics_info)

Definition at line 268 of file aacenc.c.

Referenced by aac_encode_frame(), and encode_individual_channel().


Variable Documentation

const uint8_t aac_chan_configs[6][5] [static]

Initial value:

 {
 {1, TYPE_SCE},                               
 {1, TYPE_CPE},                               
 {2, TYPE_SCE, TYPE_CPE},                     
 {3, TYPE_SCE, TYPE_CPE, TYPE_SCE},           
 {3, TYPE_SCE, TYPE_CPE, TYPE_CPE},           
 {4, TYPE_SCE, TYPE_CPE, TYPE_CPE, TYPE_LFE}, 
}
default channel configurations

Definition at line 124 of file aacenc.c.

Referenced by aac_encode_frame(), and aac_encode_init().

Initial value:

Definition at line 633 of file aacenc.c.

const uint8_t* swb_size_1024[] [static]

Initial value:

 {
    swb_size_1024_96, swb_size_1024_96, swb_size_1024_64,
    swb_size_1024_48, swb_size_1024_48, swb_size_1024_32,
    swb_size_1024_24, swb_size_1024_24, swb_size_1024_16,
    swb_size_1024_16, swb_size_1024_16, swb_size_1024_8
}

Definition at line 87 of file aacenc.c.

Referenced by aac_encode_init().

const uint8_t swb_size_1024_16[] [static]

Initial value:

 {
    8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
    12, 12, 12, 12, 12, 12, 12, 12, 12, 16, 16, 16, 16, 20, 20, 20, 24, 24, 28, 28,
    32, 36, 40, 40, 44, 48, 52, 56, 60, 64, 64, 64
}

Definition at line 75 of file aacenc.c.

const uint8_t swb_size_1024_24[] [static]

Initial value:

 {
    4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
    12, 12, 12, 12, 16, 16, 16, 20, 20, 24, 24, 28, 28,
    32, 36, 36, 40, 44, 48, 52, 52, 64, 64, 64, 64, 64
}

Definition at line 69 of file aacenc.c.

const uint8_t swb_size_1024_32[] [static]

Initial value:

 {
    4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8,
    12, 12, 12, 12, 16, 16, 20, 20, 24, 24, 28, 28,
    32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32
}

Definition at line 63 of file aacenc.c.

const uint8_t swb_size_1024_48[] [static]

Initial value:

 {
    4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8,
    12, 12, 12, 12, 16, 16, 20, 20, 24, 24, 28, 28,
    32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
    96
}

Definition at line 56 of file aacenc.c.

const uint8_t swb_size_1024_64[] [static]

Initial value:

 {
    4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8,
    12, 12, 12, 16, 16, 16, 20, 24, 24, 28, 36,
    40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40
}

Definition at line 50 of file aacenc.c.

const uint8_t swb_size_1024_8[] [static]

Initial value:

 {
    12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
    16, 16, 16, 16, 16, 16, 16, 20, 20, 20, 20, 24, 24, 24, 28, 28,
    32, 36, 36, 40, 44, 48, 52, 56, 60, 64, 80
}

Definition at line 81 of file aacenc.c.

const uint8_t swb_size_1024_96[] [static]

Initial value:

 {
    4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8,
    12, 12, 12, 12, 12, 16, 16, 24, 28, 36, 44,
    64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64
}

Definition at line 44 of file aacenc.c.

const uint8_t* swb_size_128[] [static]

Initial value:

 {
    
    swb_size_128_96, swb_size_128_96, swb_size_128_96,
    swb_size_128_48, swb_size_128_48, swb_size_128_48,
    swb_size_128_24, swb_size_128_24, swb_size_128_16,
    swb_size_128_16, swb_size_128_16, swb_size_128_8
}

Definition at line 114 of file aacenc.c.

Referenced by aac_encode_init().

const uint8_t swb_size_128_16[] [static]

Initial value:

 {
    4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 12, 12, 16, 20, 20
}

Definition at line 106 of file aacenc.c.

const uint8_t swb_size_128_24[] [static]

Initial value:

 {
    4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 12, 12, 16, 16, 20
}

Definition at line 102 of file aacenc.c.

const uint8_t swb_size_128_48[] [static]

Initial value:

 {
    4, 4, 4, 4, 4, 8, 8, 8, 12, 12, 12, 16, 16, 16
}

Definition at line 98 of file aacenc.c.

const uint8_t swb_size_128_8[] [static]

Initial value:

 {
    4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 12, 16, 20, 20
}

Definition at line 110 of file aacenc.c.

const uint8_t swb_size_128_96[] [static]

Initial value:

 {
    4, 4, 4, 4, 4, 4, 8, 8, 8, 16, 28, 36
}

Definition at line 94 of file aacenc.c.


Generated on Fri Oct 26 02:36:50 2012 for FFmpeg by  doxygen 1.5.8