diff options
author | Alex Converse <alex.converse@gmail.com> | 2010-05-25 18:32:59 +0000 |
---|---|---|
committer | Alex Converse <alex.converse@gmail.com> | 2010-05-25 18:32:59 +0000 |
commit | af2ee6fc4921a81133c0915985e05781505c2ff8 (patch) | |
tree | 121d291648ca8a546bd3bba0db681168a800cf31 /libavcodec/aaccoder.c | |
parent | acc9f51fe11b3b1771836395f0f9a74788ccab97 (diff) | |
download | ffmpeg-af2ee6fc4921a81133c0915985e05781505c2ff8.tar.gz |
Remove useless costly inf checks from the trellis scalefactor search.
Originally committed as revision 23319 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/aaccoder.c')
-rw-r--r-- | libavcodec/aaccoder.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/libavcodec/aaccoder.c b/libavcodec/aaccoder.c index 951e297d09..1cdadb17de 100644 --- a/libavcodec/aaccoder.c +++ b/libavcodec/aaccoder.c @@ -579,8 +579,6 @@ static void search_for_quantizers_anmr(AVCodecContext *avctx, AACEncContext *s, 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 @@ static void search_for_quantizers_anmr(AVCodecContext *avctx, AACEncContext *s, } } 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; |