• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

libavcodec/aacenc.h

Go to the documentation of this file.
00001 /*
00002  * AAC encoder
00003  * Copyright (C) 2008 Konstantin Shishkov
00004  *
00005  * This file is part of FFmpeg.
00006  *
00007  * FFmpeg is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Lesser General Public
00009  * License as published by the Free Software Foundation; either
00010  * version 2.1 of the License, or (at your option) any later version.
00011  *
00012  * FFmpeg is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  * Lesser General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Lesser General Public
00018  * License along with FFmpeg; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
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 #define AAC_CODER_NB 4
00034 
00035 typedef struct AACEncOptions {
00036     int stereo_mode;
00037     int aac_coder;
00038 } AACEncOptions;
00039 
00040 struct AACEncContext;
00041 
00042 typedef struct AACCoefficientsEncoder {
00043     void (*search_for_quantizers)(AVCodecContext *avctx, struct AACEncContext *s,
00044                                   SingleChannelElement *sce, const float lambda);
00045     void (*encode_window_bands_info)(struct AACEncContext *s, SingleChannelElement *sce,
00046                                      int win, int group_len, const float lambda);
00047     void (*quantize_and_encode_band)(struct AACEncContext *s, PutBitContext *pb, const float *in, int size,
00048                                      int scale_idx, int cb, const float lambda);
00049     void (*search_for_ms)(struct AACEncContext *s, ChannelElement *cpe, const float lambda);
00050 } AACCoefficientsEncoder;
00051 
00052 extern AACCoefficientsEncoder ff_aac_coders[];
00053 
00057 typedef struct AACEncContext {
00058     AVClass *av_class;
00059     AACEncOptions options;                       
00060     PutBitContext pb;
00061     FFTContext mdct1024;                         
00062     FFTContext mdct128;                          
00063     DSPContext  dsp;
00064     float *planar_samples[6];                    
00065 
00066     int samplerate_index;                        
00067     int channels;                                
00068     const uint8_t *chan_map;                     
00069 
00070     ChannelElement *cpe;                         
00071     FFPsyContext psy;
00072     struct FFPsyPreprocessContext* psypp;
00073     AACCoefficientsEncoder *coder;
00074     int cur_channel;
00075     int last_frame;
00076     float lambda;
00077     DECLARE_ALIGNED(16, int,   qcoefs)[96];      
00078     DECLARE_ALIGNED(32, float, scoefs)[1024];    
00079 
00080     struct {
00081         float *samples;
00082     } buffer;
00083 } AACEncContext;
00084 
00085 extern float ff_aac_pow34sf_tab[428];
00086 
00087 #endif /* AVCODEC_AACENC_H */
Generated on Fri Feb 1 2013 14:34:28 for FFmpeg by doxygen 1.7.1