summaryrefslogtreecommitdiff
path: root/libavcodec/sipr.h
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-11-03 22:10:15 -0400
committerJustin Ruggles <justin.ruggles@gmail.com>2011-11-09 14:59:52 -0500
commit979c8de549b7a627e6ce26026e39a01672dbd0b1 (patch)
treea048655f6153386d37364a90da0d5fe84974c2bf /libavcodec/sipr.h
parent3468ff106008da160b8cbb2d69d396a751fe8a08 (diff)
sipr: use a function pointer to select the decode_frame function
Diffstat (limited to 'libavcodec/sipr.h')
-rw-r--r--libavcodec/sipr.h24
1 files changed, 14 insertions, 10 deletions
diff --git a/libavcodec/sipr.h b/libavcodec/sipr.h
index 5b2198ea87..951532167f 100644
--- a/libavcodec/sipr.h
+++ b/libavcodec/sipr.h
@@ -53,8 +53,18 @@ typedef enum {
MODE_COUNT
} SiprMode;
-typedef struct {
+typedef struct SiprParameters {
+ int ma_pred_switch; ///< switched moving average predictor
+ int vq_indexes[5];
+ int pitch_delay[5]; ///< pitch delay
+ int gp_index[5]; ///< adaptive-codebook gain indexes
+ int16_t fc_indexes[5][10]; ///< fixed-codebook indexes
+ int gc_index[5]; ///< fixed-codebook gain indexes
+} SiprParameters;
+
+typedef struct SiprContext {
AVCodecContext *avctx;
+ AVFrame frame;
SiprMode mode;
@@ -85,16 +95,10 @@ typedef struct {
float mem_preemph[LP_FILTER_ORDER_16k];
float synth[LP_FILTER_ORDER_16k];
double lsp_history_16k[16];
-} SiprContext;
-typedef struct {
- int ma_pred_switch; ///< switched moving average predictor
- int vq_indexes[5];
- int pitch_delay[5]; ///< pitch delay
- int gp_index[5]; ///< adaptive-codebook gain indexes
- int16_t fc_indexes[5][10]; ///< fixed-codebook indexes
- int gc_index[5]; ///< fixed-codebook gain indexes
-} SiprParameters;
+ void (*decode_frame)(struct SiprContext *ctx, SiprParameters *params,
+ float *out_data);
+} SiprContext;
extern const float ff_pow_0_5[16];