OSDN Git Service

psymodel: extend API to include PE and bit allocation.
authorNathan Caldwell <saintdev@gmail.com>
Tue, 5 Apr 2011 07:05:22 +0000 (01:05 -0600)
committerJanne Grunau <janne-libav@jannau.net>
Tue, 5 Apr 2011 20:21:04 +0000 (22:21 +0200)
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
libavcodec/psymodel.h

index 296d1ab..91eb9ae 100644 (file)
@@ -26,6 +26,8 @@
 
 /** maximum possible number of bands */
 #define PSY_MAX_BANDS 128
+/** maximum number of channels */
+#define PSY_MAX_CHANS 20
 
 /**
  * single band psychoacoustic information
@@ -62,6 +64,13 @@ typedef struct FFPsyContext {
     int     *num_bands;               ///< number of scalefactor bands for possible frame sizes
     int num_lens;                     ///< number of scalefactor band sets
 
+    float pe[PSY_MAX_CHANS];          ///< total PE for each channel in the frame
+
+    struct {
+        int size;                     ///< size of the bitresevoir in bits
+        int bits;                     ///< number of bits used in the bitresevoir
+    } bitres;
+
     void* model_priv_data;            ///< psychoacoustic model implementation private data
 } FFPsyContext;