diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-05-09 04:27:07 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-05-09 04:50:56 +0200 |
commit | 6841c8c5791e857a3327411f23c13b0d28f69f1f (patch) | |
tree | 37f670ac509799ee0f4a067e2f632cc28a587082 /libavcodec/psymodel.h | |
parent | 25308afbb2f7d6d9cb1e36476bc5aa0b3831c703 (diff) | |
parent | 847aaec682f2bbfaac55ee623364dd4527e0f341 (diff) | |
download | ffmpeg-6841c8c5791e857a3327411f23c13b0d28f69f1f.tar.gz |
Merge remote branch 'qatar/master'
* qatar/master:
log: Fix an oob array read.
cosmetics: trim trailing whitespace in postproc
Ban strncpy() it's too easy to misuse.
psymodel: Remove wrapper functions.
aacenc: Replace loop counters in aac_encode_frame() with more descriptive 'ch' and 'w'.
regtest: remove redundant flags in jpg test
regtest: use run_ffmpeg in do_image_formats
regtest: simplify encoding functions
ffmpeg.c: check for interlaced flag in the correct place.
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/psymodel.h')
-rw-r--r-- | libavcodec/psymodel.h | 49 |
1 files changed, 22 insertions, 27 deletions
diff --git a/libavcodec/psymodel.h b/libavcodec/psymodel.h index a89b64c308..c65614a151 100644 --- a/libavcodec/psymodel.h +++ b/libavcodec/psymodel.h @@ -80,8 +80,30 @@ typedef struct FFPsyContext { typedef struct FFPsyModel { const char *name; int (*init) (FFPsyContext *apc); + + /** + * Suggest window sequence for channel. + * + * @param ctx model context + * @param audio samples for the current frame + * @param la lookahead samples (NULL when unavailable) + * @param channel number of channel element to analyze + * @param prev_type previous window type + * + * @return suggested window information in a structure + */ FFPsyWindowInfo (*window)(FFPsyContext *ctx, const int16_t *audio, const int16_t *la, int channel, int prev_type); + + /** + * Perform psychoacoustic analysis and set band info (threshold, energy). + * + * @param ctx model context + * @param channel audio channel number + * @param coeffs pointer to the transformed coefficients + * @param wi window information + */ void (*analyze)(FFPsyContext *ctx, int channel, const float *coeffs, const FFPsyWindowInfo *wi); + void (*end) (FFPsyContext *apc); } FFPsyModel; @@ -101,33 +123,6 @@ av_cold int ff_psy_init(FFPsyContext *ctx, AVCodecContext *avctx, const uint8_t **bands, const int* num_bands); /** - * Suggest window sequence for channel. - * - * @param ctx model context - * @param audio samples for the current frame - * @param la lookahead samples (NULL when unavailable) - * @param channel number of channel element to analyze - * @param prev_type previous window type - * - * @return suggested window information in a structure - */ -FFPsyWindowInfo ff_psy_suggest_window(FFPsyContext *ctx, - const int16_t *audio, const int16_t *la, - int channel, int prev_type); - - -/** - * Perform psychoacoustic analysis and set band info (threshold, energy). - * - * @param ctx model context - * @param channel audio channel number - * @param coeffs pointer to the transformed coefficients - * @param wi window information - */ -void ff_psy_set_band_info(FFPsyContext *ctx, int channel, const float *coeffs, - const FFPsyWindowInfo *wi); - -/** * Cleanup model context at the end. * * @param ctx model context |