libavcodec/aacenc.c File Reference

AAC encoder. More...

#include "avcodec.h"
#include "bitstream.h"
#include "dsputil.h"
#include "mpeg4audio.h"
#include "aacpsy.h"
#include "aac.h"
#include "aactab.h"

Go to the source code of this file.

Data Structures

struct  BandCodingPath
 structure used in optimal codebook search More...
struct  AACEncContext
 AAC encoder context. More...

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 put_ics_info (AACEncContext *s, IndividualChannelStream *info)
 Encode ics_info element.
static int calculate_band_sign_bits (AACEncContext *s, SingleChannelElement *sce, int group_len, int start, int size)
 Calculate the number of bits needed to code all coefficient signs in current band.
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 void put_bitstream_info (AVCodecContext *avctx, AACEncContext *s, const char *name)
 Write some auxiliary information about the created AAC file.
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 *const 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 *const swb_size_128 []
static const uint8_t run_value_bits_long [64]
 bits needed to code codebook run value for long windows
static const uint8_t run_value_bits_short [16]
 bits needed to code codebook run value for short windows
static const uint8_t *const run_value_bits [2]
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 342 of file aacenc.c.

static av_cold int aac_encode_init ( AVCodecContext avctx  )  [static]

Definition at line 196 of file aacenc.c.

static int calculate_band_sign_bits ( AACEncContext s,
SingleChannelElement sce,
int  group_len,
int  start,
int  size 
) [static]

Calculate the number of bits needed to code all coefficient signs in current band.

Definition at line 263 of file aacenc.c.

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

Encode pulse data.

Definition at line 281 of file aacenc.c.

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

Encode spectral coefficients processed by psychoacoustic model.

Definition at line 299 of file aacenc.c.

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 180 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 325 of file aacenc.c.

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 243 of file aacenc.c.


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 140 of file aacenc.c.

Referenced by aac_encode_init().

Initial value:

 {
    "aac",
    CODEC_TYPE_AUDIO,
    CODEC_ID_AAC,
    sizeof(AACEncContext),
    aac_encode_init,
    aac_encode_frame,
    aac_encode_end,
    .capabilities = CODEC_CAP_SMALL_LAST_FRAME | CODEC_CAP_DELAY,
    .sample_fmts = (enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
    .long_name = NULL_IF_CONFIG_SMALL("Advanced Audio Coding"),
}

Definition at line 354 of file aacenc.c.

const uint8_t* const run_value_bits[2] [static]

Initial value:

Definition at line 135 of file aacenc.c.

const uint8_t run_value_bits_long[64] [static]

Initial value:

 {
     5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,
     5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5, 10,
    10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
    10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 15
}
bits needed to code codebook run value for long windows

Definition at line 123 of file aacenc.c.

const uint8_t run_value_bits_short[16] [static]

Initial value:

 {
    3, 3, 3, 3, 3, 3, 3, 6, 6, 6, 6, 6, 6, 6, 6, 9
}
bits needed to code codebook run value for short windows

Definition at line 131 of file aacenc.c.

const uint8_t* const 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 86 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 74 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 68 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 62 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 55 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 49 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 80 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 43 of file aacenc.c.

const uint8_t* const 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 113 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 105 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 101 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 97 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 109 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 93 of file aacenc.c.


Generated on Fri Oct 26 02:35:42 2012 for FFmpeg by  doxygen 1.5.8