00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef AVCODEC_AACENC_H
00023 #define AVCODEC_AACENC_H
00024
00025 #include "avcodec.h"
00026 #include "put_bits.h"
00027 #include "dsputil.h"
00028
00029 #include "aac.h"
00030
00031 #include "psymodel.h"
00032
00033 struct AACEncContext;
00034
00035 typedef struct AACCoefficientsEncoder {
00036 void (*search_for_quantizers)(AVCodecContext *avctx, struct AACEncContext *s,
00037 SingleChannelElement *sce, const float lambda);
00038 void (*encode_window_bands_info)(struct AACEncContext *s, SingleChannelElement *sce,
00039 int win, int group_len, const float lambda);
00040 void (*quantize_and_encode_band)(struct AACEncContext *s, PutBitContext *pb, const float *in, int size,
00041 int scale_idx, int cb, const float lambda);
00042 void (*search_for_ms)(struct AACEncContext *s, ChannelElement *cpe, const float lambda);
00043 } AACCoefficientsEncoder;
00044
00045 extern AACCoefficientsEncoder ff_aac_coders[];
00046
00050 typedef struct AACEncContext {
00051 PutBitContext pb;
00052 FFTContext mdct1024;
00053 FFTContext mdct128;
00054 DSPContext dsp;
00055 DECLARE_ALIGNED(16, FFTSample, output)[2048];
00056 int16_t* samples;
00057
00058 int samplerate_index;
00059
00060 ChannelElement *cpe;
00061 FFPsyContext psy;
00062 struct FFPsyPreprocessContext* psypp;
00063 AACCoefficientsEncoder *coder;
00064 int cur_channel;
00065 int last_frame;
00066 float lambda;
00067 DECLARE_ALIGNED(16, int, qcoefs)[96];
00068 DECLARE_ALIGNED(16, float, scoefs)[1024];
00069 } AACEncContext;
00070
00071 #endif