Fix compiler warning of out-of-bound array access Change-Id: I00f147cd372cedc5038708b0f23f6fae68918528
diff --git a/av1/encoder/pvq_encoder.c b/av1/encoder/pvq_encoder.c index 611f0b6..6143fe8 100644 --- a/av1/encoder/pvq_encoder.c +++ b/av1/encoder/pvq_encoder.c
@@ -912,7 +912,8 @@ int j; int tmp; tmp = 1; - for (j = i + 1; j < nb_bands; j += 3) { + // ToDo(yaowu): figure out better stop condition without gcc warning. + for (j = i + 1; j < nb_bands && j < PVQ_MAX_PARTITIONS; j += 3) { if (theta[j] != skip_theta_value || qg[j]) tmp = 0; } skip_dir |= tmp << i;