Revision b58e2985 libavcodec/psymodel.h

View differences:

libavcodec/psymodel.h
80 80
typedef struct FFPsyModel {
81 81
    const char *name;
82 82
    int  (*init)   (FFPsyContext *apc);
83

  
84
    /**
85
     * Suggest window sequence for channel.
86
     *
87
     * @param ctx       model context
88
     * @param audio     samples for the current frame
89
     * @param la        lookahead samples (NULL when unavailable)
90
     * @param channel   number of channel element to analyze
91
     * @param prev_type previous window type
92
     *
93
     * @return suggested window information in a structure
94
     */
83 95
    FFPsyWindowInfo (*window)(FFPsyContext *ctx, const int16_t *audio, const int16_t *la, int channel, int prev_type);
96

  
97
    /**
98
     * Perform psychoacoustic analysis and set band info (threshold, energy).
99
     *
100
     * @param ctx     model context
101
     * @param channel audio channel number
102
     * @param coeffs  pointer to the transformed coefficients
103
     * @param wi      window information
104
     */
84 105
    void (*analyze)(FFPsyContext *ctx, int channel, const float *coeffs, const FFPsyWindowInfo *wi);
106

  
85 107
    void (*end)    (FFPsyContext *apc);
86 108
} FFPsyModel;
87 109

  
......
101 123
                        const uint8_t **bands, const int* num_bands);
102 124

  
103 125
/**
104
 * Suggest window sequence for channel.
105
 *
106
 * @param ctx       model context
107
 * @param audio     samples for the current frame
108
 * @param la        lookahead samples (NULL when unavailable)
109
 * @param channel   number of channel element to analyze
110
 * @param prev_type previous window type
111
 *
112
 * @return suggested window information in a structure
113
 */
114
FFPsyWindowInfo ff_psy_suggest_window(FFPsyContext *ctx,
115
                                      const int16_t *audio, const int16_t *la,
116
                                      int channel, int prev_type);
117

  
118

  
119
/**
120
 * Perform psychoacoustic analysis and set band info (threshold, energy).
121
 *
122
 * @param ctx     model context
123
 * @param channel audio channel number
124
 * @param coeffs  pointer to the transformed coefficients
125
 * @param wi      window information
126
 */
127
void ff_psy_set_band_info(FFPsyContext *ctx, int channel, const float *coeffs,
128
                          const FFPsyWindowInfo *wi);
129

  
130
/**
131 126
 * Cleanup model context at the end.
132 127
 *
133 128
 * @param ctx model context

Also available in: Unified diff