summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2008-08-14 16:07:17 +0000
committerKostya Shishkov <kostya.shishkov@gmail.com>2008-08-14 16:07:17 +0000
commit07be55dc8b47159f7e84bc201ad9702eae17ec4f (patch)
treec26c2a31588864c2633a411add660018fd6eec30
parent29a717aef24af559321f74c7457e8bd72c2df8cf (diff)
Remove not OKed parts from AAC encoder
Originally committed as revision 14762 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/aacenc.c56
1 files changed, 0 insertions, 56 deletions
diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
index d97d3d1d7e..858a7b69a4 100644
--- a/libavcodec/aacenc.c
+++ b/libavcodec/aacenc.c
@@ -119,34 +119,6 @@ static const uint8_t *swb_size_128[] = {
swb_size_128_16, swb_size_128_16, swb_size_128_8
};
-#define CB_UNSIGNED 0x01 ///< coefficients are coded as absolute values
-#define CB_PAIRS 0x02 ///< coefficients are grouped into pairs before coding (quads by default)
-#define CB_ESCAPE 0x04 ///< codebook allows escapes
-
-/** spectral coefficients codebook information */
-static const struct {
- int16_t maxval; ///< maximum possible value
- int8_t cb_num; ///< codebook number
- uint8_t flags; ///< codebook features
-} aac_cb_info[] = {
- { 0, -1, CB_UNSIGNED }, // zero codebook
- { 1, 0, 0 },
- { 1, 1, 0 },
- { 2, 2, CB_UNSIGNED },
- { 2, 3, CB_UNSIGNED },
- { 4, 4, CB_PAIRS },
- { 4, 5, CB_PAIRS },
- { 7, 6, CB_PAIRS | CB_UNSIGNED },
- { 7, 7, CB_PAIRS | CB_UNSIGNED },
- { 12, 8, CB_PAIRS | CB_UNSIGNED },
- { 12, 9, CB_PAIRS | CB_UNSIGNED },
- { 8191, 10, CB_PAIRS | CB_UNSIGNED | CB_ESCAPE },
- { -1, -1, 0 }, // reserved
- { -1, -1, 0 }, // perceptual noise substitution
- { -1, -1, 0 }, // intensity out-of-phase
- { -1, -1, 0 }, // intensity in-phase
-};
-
/** default channel configurations */
static const uint8_t aac_chan_configs[6][5] = {
{1, ID_SCE}, // 1 channel - single channel element
@@ -158,29 +130,6 @@ static const uint8_t aac_chan_configs[6][5] = {
};
/**
- * AAC encoder context
- */
-typedef struct {
- PutBitContext pb;
- MDCTContext mdct1024; ///< long (1024 samples) frame transform context
- MDCTContext mdct128; ///< short (128 samples) frame transform context
- DSPContext dsp;
- DECLARE_ALIGNED_16(FFTSample, output[2048]); ///< temporary buffer for MDCT input coefficients
- DECLARE_ALIGNED_16(FFTSample, tmp[1024]); ///< temporary buffer used by MDCT
- int16_t* samples; ///< saved preprocessed input
-
- int samplerate_index; ///< MPEG-4 samplerate index
- const uint8_t *swb_sizes1024; ///< scalefactor band sizes for long frame
- int swb_num1024; ///< number of scalefactor bands for long frame
- const uint8_t *swb_sizes128; ///< scalefactor band sizes for short frame
- int swb_num128; ///< number of scalefactor bands for short frame
-
- ChannelElement *cpe; ///< channel elements
- AACPsyContext psy; ///< psychoacoustic model context
- int last_frame;
-} AACEncContext;
-
-/**
* Make AAC audio config object.
* @see 1.6.2.1 "Syntax - AudioSpecificConfig"
*/
@@ -227,11 +176,6 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
dsputil_init(&s->dsp, avctx);
ff_mdct_init(&s->mdct1024, 11, 0);
ff_mdct_init(&s->mdct128, 8, 0);
- // window init
- ff_kbd_window_init(ff_aac_kbd_long_1024, 4.0, 1024);
- ff_kbd_window_init(ff_aac_kbd_short_128, 6.0, 128);
- ff_sine_window_init(ff_aac_sine_long_1024, 1024);
- ff_sine_window_init(ff_aac_sine_short_128, 128);
s->samples = av_malloc(2 * 1024 * avctx->channels * sizeof(s->samples[0]));
s->cpe = av_mallocz(sizeof(ChannelElement) * aac_chan_configs[avctx->channels-1][0]);