diff options
author | Rostislav Pehlivanov <atomnuker@gmail.com> | 2015-09-06 15:10:28 +0100 |
---|---|---|
committer | Rostislav Pehlivanov <atomnuker@gmail.com> | 2015-09-06 15:30:26 +0100 |
commit | 8848c8440eb5816d5a9c3d38e0e20342867ef2cc (patch) | |
tree | ca7a9b33906717c35825c5c384f78b0221c000bc | |
parent | a71f7de95bf34dcf2df7f7adf9e21bd0ed0e4f61 (diff) | |
download | ffmpeg-8848c8440eb5816d5a9c3d38e0e20342867ef2cc.tar.gz |
aacenc_pred: disable PNS SFBs and disable right predictors with IS
Since PNS generates coefficients it doesn't make sense to send
the predicted ones as well. Also the specifications explicitly
state to disable right channel IS predictors.
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
-rw-r--r-- | libavcodec/aacenc_pred.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/aacenc_pred.c b/libavcodec/aacenc_pred.c index eb8e7f7d27..c0e5e6e3b6 100644 --- a/libavcodec/aacenc_pred.c +++ b/libavcodec/aacenc_pred.c @@ -262,7 +262,9 @@ void ff_aac_search_for_pred(AACEncContext *s, SingleChannelElement *sce) const int num_coeffs = sce->ics.swb_offset[sfb + 1] - start_coef; const FFPsyBand *band = &s->psy.ch[s->cur_channel].psy_bands[sfb]; - if (start_coef + num_coeffs > MAX_PREDICTORS) + if (start_coef + num_coeffs > MAX_PREDICTORS || + (s->cur_channel && sce->band_type[sfb] >= INTENSITY_BT2) || + sce->band_type[sfb] == NOISE_BT) continue; /* Normal coefficients */ |