ref: 646edbc1b21773f1b5be0928da00b9b363fa9054
parent: cedd24ec619849994eebc23d02f3141c6a4acefb
author: Adrian Grange <[email protected]>
date: Tue Jul 23 08:54:04 EDT 2013
Rolled-up several for loops into one Several consecutive for loops executed over the same index range, so I rolled them into one. Change-Id: I5cfcc8c38c738478965768409cca9d09adf224e1
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -2411,29 +2411,19 @@
int count16x16_16x16p = 0, count16x16_lp = 0;
int count32x32 = 0;
- for (i = 0; i < TX_SIZE_CONTEXTS; i++)
+ for (i = 0; i < TX_SIZE_CONTEXTS; ++i) {
count4x4 += cm->fc.tx_counts.p32x32[i][TX_4X4];
- for (i = 0; i < TX_SIZE_CONTEXTS; i++)
count4x4 += cm->fc.tx_counts.p16x16[i][TX_4X4];
- for (i = 0; i < TX_SIZE_CONTEXTS; i++)
count4x4 += cm->fc.tx_counts.p8x8[i][TX_4X4];
- for (i = 0; i < TX_SIZE_CONTEXTS; i++)
count8x8_lp += cm->fc.tx_counts.p32x32[i][TX_8X8];
- for (i = 0; i < TX_SIZE_CONTEXTS; i++)
count8x8_lp += cm->fc.tx_counts.p16x16[i][TX_8X8];
-
- for (i = 0; i < TX_SIZE_CONTEXTS; i++)
count8x8_8x8p += cm->fc.tx_counts.p8x8[i][TX_8X8];
- for (i = 0; i < TX_SIZE_CONTEXTS; i++)
count16x16_16x16p += cm->fc.tx_counts.p16x16[i][TX_16X16];
-
- for (i = 0; i < TX_SIZE_CONTEXTS; i++)
count16x16_lp += cm->fc.tx_counts.p32x32[i][TX_16X16];
-
- for (i = 0; i < TX_SIZE_CONTEXTS; i++)
count32x32 += cm->fc.tx_counts.p32x32[i][TX_32X32];
+ }
if (count4x4 == 0 && count16x16_lp == 0 && count16x16_16x16p == 0
&& count32x32 == 0) {