Commit b785b95a authored by James Zern's avatar James Zern

av1_txfm,cosmetics: s/(min|max)Value/\1_value/

Change-Id: I35a6ac83d8a94c803148e7ad9366053599f747a0
parent dc857593
......@@ -16,13 +16,13 @@
#if CONFIG_COEFFICIENT_RANGE_CHECKING
void range_check_func(int32_t stage, const int32_t *input, const int32_t *buf,
int32_t size, int8_t bit) {
const int64_t maxValue = (1LL << (bit - 1)) - 1;
const int64_t minValue = -(1LL << (bit - 1));
const int64_t max_value = (1LL << (bit - 1)) - 1;
const int64_t min_value = -(1LL << (bit - 1));
int in_range = 1;
for (int i = 0; i < size; ++i) {
if (buf[i] < minValue || buf[i] > maxValue) {
if (buf[i] < min_value || buf[i] > max_value) {
in_range = 0;
}
}
......@@ -31,8 +31,8 @@ void range_check_func(int32_t stage, const int32_t *input, const int32_t *buf,
fprintf(stderr, "Error: coeffs contain out-of-range values\n");
fprintf(stderr, "size: %d\n", size);
fprintf(stderr, "stage: %d\n", stage);
fprintf(stderr, "allowed range: [%" PRId64 ";%" PRId64 "]\n", minValue,
maxValue);
fprintf(stderr, "allowed range: [%" PRId64 ";%" PRId64 "]\n", min_value,
max_value);
fprintf(stderr, "coeffs: ");
......@@ -74,9 +74,9 @@ static INLINE void clamp_buf(int32_t *buf, int32_t size, int8_t bit) {
static INLINE int32_t clamp_value(int32_t value, int8_t bit) {
if (bit <= 16) {
const int32_t maxValue = (1 << 15) - 1;
const int32_t minValue = -(1 << 15);
return clamp(value, minValue, maxValue);
const int32_t max_value = (1 << 15) - 1;
const int32_t min_value = -(1 << 15);
return clamp(value, min_value, max_value);
}
return value;
}
......
......@@ -20,11 +20,11 @@
#define NO_INV_TRANSPOSE 1
static INLINE void clamp_buf(int32_t *buf, int32_t size, int8_t bit) {
const int64_t maxValue = (1LL << (bit - 1)) - 1;
const int64_t minValue = -(1LL << (bit - 1));
const int64_t max_value = (1LL << (bit - 1)) - 1;
const int64_t min_value = -(1LL << (bit - 1));
for (int i = 0; i < size; ++i)
buf[i] = (int32_t)clamp64(buf[i], minValue, maxValue);
buf[i] = (int32_t)clamp64(buf[i], min_value, max_value);
}
static INLINE TxfmFunc inv_txfm_type_to_func(TXFM_TYPE txfm_type) {
......
......@@ -95,9 +95,9 @@ static INLINE const int32_t *sinpi_arr(int n) {
static INLINE int32_t range_check_value(int32_t value, int8_t bit) {
#if CONFIG_COEFFICIENT_RANGE_CHECKING
const int64_t maxValue = (1LL << (bit - 1)) - 1;
const int64_t minValue = -(1LL << (bit - 1));
if (value < minValue || value > maxValue) {
const int64_t max_value = (1LL << (bit - 1)) - 1;
const int64_t min_value = -(1LL << (bit - 1));
if (value < min_value || value > max_value) {
fprintf(stderr, "coeff out of bit range, value: %d bit %d\n", value, bit);
assert(0);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment