# HG changeset patch # User alexc # Date 1274812379 0 # Node ID 3fee94a43e64f79bf0c8a148f03bf232026887da # Parent 91b9bd17e79cc43cc455ce220e06de2ac1fd778e Remove useless costly inf checks from the trellis scalefactor search. diff -r 91b9bd17e79c -r 3fee94a43e64 aaccoder.c --- a/aaccoder.c Tue May 25 18:31:55 2010 +0000 +++ b/aaccoder.c Tue May 25 18:32:59 2010 +0000 @@ -579,8 +579,6 @@ for (i = 0; i < q1 - q0; i++) { float cost; - if (isinf(paths[idx - 1][i].cost)) - continue; cost = paths[idx - 1][i].cost + dist + ff_aac_scalefactor_bits[q - i + SCALE_DIFF_ZERO]; if (cost < paths[idx][q].cost) { @@ -591,21 +589,8 @@ } } else { for (q = 0; q < q1 - q0; q++) { - if (!isinf(paths[idx - 1][q].cost)) { paths[idx][q].cost = paths[idx - 1][q].cost + 1; paths[idx][q].prev = q; - continue; - } - for (i = 0; i < q1 - q0; i++) { - float cost; - if (isinf(paths[idx - 1][i].cost)) - continue; - cost = paths[idx - 1][i].cost + ff_aac_scalefactor_bits[q - i + SCALE_DIFF_ZERO]; - if (cost < paths[idx][q].cost) { - paths[idx][q].cost = cost; - paths[idx][q].prev = i; - } - } } } sce->zeroes[w*16+g] = !nz;