comparison aaccoder.c @ 12261:940736055764 libavcodec

aacenc: Prevent premature termination of the two loop search.
author alexc
date Sat, 24 Jul 2010 04:23:26 +0000
parents 86d6c00756cc
children c7c07caedd2f
comparison
equal deleted inserted replaced
12260:65619c2230e7 12261:940736055764
793 for (i = 0; i < 128; i++) 793 for (i = 0; i < 128; i++)
794 if (sce->sf_idx[i] > 60 - qstep) 794 if (sce->sf_idx[i] > 60 - qstep)
795 sce->sf_idx[i] -= qstep; 795 sce->sf_idx[i] -= qstep;
796 } 796 }
797 qstep >>= 1; 797 qstep >>= 1;
798 if (!qstep && tbits > destbits*1.02) 798 if (!qstep && tbits > destbits*1.02 && sce->sf_idx[0] < 217)
799 qstep = 1; 799 qstep = 1;
800 if (sce->sf_idx[0] >= 217)
801 break;
802 } while (qstep); 800 } while (qstep);
803 801
804 fflag = 0; 802 fflag = 0;
805 minscaler = av_clip(minscaler, 60, 255 - SCALE_MAX_DIFF); 803 minscaler = av_clip(minscaler, 60, 255 - SCALE_MAX_DIFF);
806 for (w = 0; w < sce->ics.num_windows; w += sce->ics.group_len[w]) { 804 for (w = 0; w < sce->ics.num_windows; w += sce->ics.group_len[w]) {