Commit 0274b64d authored by James Zern's avatar James Zern

av1_inv_txfm1d: make clamp_buf static

until av1_idct*_new are optimized this function sits high on the decode
perf

Change-Id: Ic55c9a92b9926fc09eaee211a45fde00333b7c15
parent 648bf581
......@@ -76,12 +76,12 @@ void range_check_func(int32_t stage, const int32_t *input, const int32_t *buf,
#define apply_range(stage, input, buf, size, bit) \
clamp_buf((int32_t *)buf, size, bit)
void clamp_buf(int32_t *buf, int32_t size, int8_t bit) {
static INLINE void clamp_buf(int32_t *buf, int32_t size, int8_t bit) {
if (bit <= 16) {
const int32_t maxValue = (1 << 15) - 1;
const int32_t minValue = -(1 << 15);
const int32_t max_value = (1 << 15) - 1;
const int32_t min_value = -(1 << 15);
for (int i = 0; i < size; ++i) buf[i] = clamp(buf[i], minValue, maxValue);
for (int i = 0; i < size; ++i) buf[i] = clamp(buf[i], min_value, max_value);
}
}
#endif
......
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