[FFmpeg-soc] [soc]: r2960 - aacenc/aacpsy.h

kostya subversion at mplayerhq.hu
Thu Jul 31 19:00:50 CEST 2008


Author: kostya
Date: Thu Jul 31 19:00:50 2008
New Revision: 2960

Log:
Document psychoacoustic model interface functions

Modified:
   aacenc/aacpsy.h

Modified: aacenc/aacpsy.h
==============================================================================
--- aacenc/aacpsy.h	(original)
+++ aacenc/aacpsy.h	Thu Jul 31 19:00:50 2008
@@ -61,12 +61,54 @@ typedef struct AACPsyModel {
     void  (*end)    (AACPsyContext *apc);
 }AACPsyModel;
 
+/**
+ * Initialize psychoacoustic model.
+ *
+ * @param ctx           model context
+ * @param avctx         codec context
+ * @param model         model implementation that will be used
+ * @param elements      number of channel elements (single channel or channel pair) to handle by  model
+ * @param flags         model flags, may be ignored by model if unsupported
+ * @param bands1024     scalefactor band lengths for long (1024 samples) frame
+ * @param num_bands1024 number of scalefactor bands for long frame
+ * @param bands128      scalefactor band lengths for short (128 samples) frame
+ * @param num_bands128  number of scalefactor bands for short frame
+ *
+ * @return zero if successful, a negative value if not
+ */
 int ff_aac_psy_init(AACPsyContext *ctx, AVCodecContext *avctx,
                     enum AACPsyModelType model, int elements, int flags,
                     const uint8_t *bands1024, int num_bands1024,
                     const uint8_t *bands128,  int num_bands128);
+
+/**
+ * Set window sequence and related parameters for channel element.
+ *
+ * @param ctx   model context
+ * @param audio samples for the current frame
+ * @param la    lookahead samples (NULL when unavailable)
+ * @param tag   number of channel element to analyze
+ * @param type  channel element type (e.g. ID_SCE or ID_CPE)
+ * @param cpe   pointer to the current channel element
+ */
 void ff_aac_psy_suggest_window(AACPsyContext *ctx, int16_t *audio, int16_t *la, int tag, int type, ChannelElement *cpe);
+
+/**
+ * Perform psychoacoustic analysis and output coefficients in integer form
+ * along with scalefactors, M/S flags, etc.
+ *
+ * @param ctx   model context
+ * @param tag   number of channel element to analyze
+ * @param type  channel element type (e.g. ID_SCE or ID_CPE)
+ * @param cpe   pointer to the current channel element
+ */
 void ff_aac_psy_analyze(AACPsyContext *ctx, int tag, int type, ChannelElement *cpe);
+
+/**
+ * Cleanup model context at the end.
+ *
+ * @param ctx model context
+ */
 void ff_aac_psy_end(AACPsyContext *ctx);
 #endif /* FFMPEG_AACPSY_H */
 



More information about the FFmpeg-soc mailing list