Go to the documentation of this file.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 typedef struct AACEncOptions {
00034 int stereo_mode;
00035 } AACEncOptions;
00036
00037 struct AACEncContext;
00038
00039 typedef struct AACCoefficientsEncoder {
00040 void (*search_for_quantizers)(AVCodecContext *avctx, struct AACEncContext *s,
00041 SingleChannelElement *sce, const float lambda);
00042 void (*encode_window_bands_info)(struct AACEncContext *s, SingleChannelElement *sce,
00043 int win, int group_len, const float lambda);
00044 void (*quantize_and_encode_band)(struct AACEncContext *s, PutBitContext *pb, const float *in, int size,
00045 int scale_idx, int cb, const float lambda);
00046 void (*search_for_ms)(struct AACEncContext *s, ChannelElement *cpe, const float lambda);
00047 } AACCoefficientsEncoder;
00048
00049 extern AACCoefficientsEncoder ff_aac_coders[];
00050
00054 typedef struct AACEncContext {
00055 AVClass *av_class;
00056 AACEncOptions options;
00057 PutBitContext pb;
00058 FFTContext mdct1024;
00059 FFTContext mdct128;
00060 DSPContext dsp;
00061 int16_t *samples;
00062
00063 int samplerate_index;
00064 const uint8_t *chan_map;
00065
00066 ChannelElement *cpe;
00067 FFPsyContext psy;
00068 struct FFPsyPreprocessContext* psypp;
00069 AACCoefficientsEncoder *coder;
00070 int cur_channel;
00071 int last_frame;
00072 float lambda;
00073 DECLARE_ALIGNED(16, int, qcoefs)[96];
00074 DECLARE_ALIGNED(32, float, scoefs)[1024];
00075 } AACEncContext;
00076
00077 #endif