• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • Examples
  • 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 Libav.
00006  *
00007  * Libav 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  * Libav 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 Libav; 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 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 /* AVCODEC_AACENC_H */
Generated on Thu Jan 24 2013 17:08:49 for Libav by doxygen 1.7.1