Commit 8848c844 authored by Rostislav Pehlivanov's avatar Rostislav Pehlivanov

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: 's avatarRostislav Pehlivanov <atomnuker@gmail.com>
parent a71f7de9
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment