summaryrefslogtreecommitdiff
path: root/libavcodec/aacenc_is.h
diff options
context:
space:
mode:
authorRostislav Pehlivanov <atomnuker@gmail.com>2015-09-05 08:32:09 +0100
committerRostislav Pehlivanov <atomnuker@gmail.com>2015-09-05 08:32:09 +0100
commit4565611b04d53b7333fa5ed81e5dc0074482c20c (patch)
treec407cfc3f504fae4cb08ba47a54deb54a5647312 /libavcodec/aacenc_is.h
parenta87ada53c39c983ad20c86983c3bedfd56e7e8eb (diff)
aacenc_is: add a flag to use pure coefficients instead
This commit adds a flag to use the pure coefficients instead of the processed ones (sce->coeffs). This is needed because IS will apply the changes to the coefficients immediately before the adjust_common_prediction function and it doesn't make sense to measure stereo channel coefficient difference when one of the channels coefficients are all zero. Therefore add a flag to use pure coefficients in that case. TNS is the only thing touching the coefficients before IS so common window prediction will not take that into account but the effect of the TNS filter per coefficient can be small (a few percent) so to some approximation it's fine to just ignore that. Also fixed a small error which doesn't alter the results that much. pow(sqrt(number), 3.0/4.0) == pow(number, 3.0/8.0) != pow(number, 3.0/4.0). Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Diffstat (limited to 'libavcodec/aacenc_is.h')
-rw-r--r--libavcodec/aacenc_is.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/aacenc_is.h b/libavcodec/aacenc_is.h
index e35f0aa695..31bbacac58 100644
--- a/libavcodec/aacenc_is.h
+++ b/libavcodec/aacenc_is.h
@@ -43,7 +43,8 @@ struct AACISError {
struct AACISError ff_aac_is_encoding_err(AACEncContext *s, ChannelElement *cpe,
int start, int w, int g, float ener0,
- float ener1, float ener01, int phase);
+ float ener1, float ener01,
+ int use_pcoeffs, int phase);
void ff_aac_search_for_is(AACEncContext *s, AVCodecContext *avctx, ChannelElement *cpe);
#endif /* AVCODEC_AACENC_IS_H */