Refactor: Rename variable abs to abs_coeff
Rename 'abs' to 'abs_coeff' to avoid -Wshadow
warning for abs().
Change-Id: Idd5f4a0604bcfc198d79de2f4c137bb727e2e44c
diff --git a/av1/encoder/x86/av1_highbd_quantize_avx2.c b/av1/encoder/x86/av1_highbd_quantize_avx2.c
index 20d4160..4cb1f2e 100644
--- a/av1/encoder/x86/av1_highbd_quantize_avx2.c
+++ b/av1/encoder/x86/av1_highbd_quantize_avx2.c
@@ -48,8 +48,8 @@
const int16_t *iscan_ptr, int log_scale,
tran_low_t *qcoeff, tran_low_t *dqcoeff,
__m256i *eob) {
- const __m256i abs = _mm256_abs_epi32(*c);
- __m256i q = _mm256_add_epi32(abs, qp[0]);
+ const __m256i abs_coeff = _mm256_abs_epi32(*c);
+ __m256i q = _mm256_add_epi32(abs_coeff, qp[0]);
__m256i q_lo = _mm256_mul_epi32(q, qp[1]);
__m256i q_hi = _mm256_srli_epi64(q, 32);
@@ -59,7 +59,7 @@
q_hi = _mm256_srli_epi64(q_hi, 16 - log_scale);
q_hi = _mm256_slli_epi64(q_hi, 32);
q = _mm256_or_si256(q_lo, q_hi);
- const __m256i abs_s = _mm256_slli_epi32(abs, 1 + log_scale);
+ const __m256i abs_s = _mm256_slli_epi32(abs_coeff, 1 + log_scale);
const __m256i mask = _mm256_cmpgt_epi32(qp[2], abs_s);
q = _mm256_andnot_si256(mask, q);
diff --git a/av1/encoder/x86/av1_quantize_avx2.c b/av1/encoder/x86/av1_quantize_avx2.c
index fb18829..fd7a081 100644
--- a/av1/encoder/x86/av1_quantize_avx2.c
+++ b/av1/encoder/x86/av1_quantize_avx2.c
@@ -106,13 +106,13 @@
static INLINE void quantize(const __m256i *thr, const __m256i *qp, __m256i *c,
const int16_t *iscan_ptr, tran_low_t *qcoeff,
tran_low_t *dqcoeff, __m256i *eob) {
- const __m256i abs = _mm256_abs_epi16(*c);
- __m256i mask = _mm256_cmpgt_epi16(abs, *thr);
- mask = _mm256_or_si256(mask, _mm256_cmpeq_epi16(abs, *thr));
+ const __m256i abs_coeff = _mm256_abs_epi16(*c);
+ __m256i mask = _mm256_cmpgt_epi16(abs_coeff, *thr);
+ mask = _mm256_or_si256(mask, _mm256_cmpeq_epi16(abs_coeff, *thr));
const int nzflag = _mm256_movemask_epi8(mask);
if (nzflag) {
- __m256i q = _mm256_adds_epi16(abs, qp[0]);
+ __m256i q = _mm256_adds_epi16(abs_coeff, qp[0]);
q = _mm256_mulhi_epi16(q, qp[1]);
q = _mm256_sign_epi16(q, *c);
const __m256i dq = _mm256_mullo_epi16(q, qp[2]);
@@ -189,13 +189,13 @@
__m256i *c, const int16_t *iscan_ptr,
tran_low_t *qcoeff, tran_low_t *dqcoeff,
__m256i *eob) {
- const __m256i abs = _mm256_abs_epi16(*c);
- __m256i mask = _mm256_cmpgt_epi16(abs, *thr);
- mask = _mm256_or_si256(mask, _mm256_cmpeq_epi16(abs, *thr));
+ const __m256i abs_coeff = _mm256_abs_epi16(*c);
+ __m256i mask = _mm256_cmpgt_epi16(abs_coeff, *thr);
+ mask = _mm256_or_si256(mask, _mm256_cmpeq_epi16(abs_coeff, *thr));
const int nzflag = _mm256_movemask_epi8(mask);
if (nzflag) {
- __m256i q = _mm256_adds_epi16(abs, qp[0]);
+ __m256i q = _mm256_adds_epi16(abs_coeff, qp[0]);
q = _mm256_mulhi_epu16(q, qp[1]);
__m256i dq = _mm256_mullo_epi16(q, qp[2]);
@@ -276,13 +276,13 @@
__m256i *c, const int16_t *iscan_ptr,
tran_low_t *qcoeff, tran_low_t *dqcoeff,
__m256i *eob) {
- const __m256i abs = _mm256_abs_epi16(*c);
- __m256i mask = _mm256_cmpgt_epi16(abs, *thr);
- mask = _mm256_or_si256(mask, _mm256_cmpeq_epi16(abs, *thr));
+ const __m256i abs_coeff = _mm256_abs_epi16(*c);
+ __m256i mask = _mm256_cmpgt_epi16(abs_coeff, *thr);
+ mask = _mm256_or_si256(mask, _mm256_cmpeq_epi16(abs_coeff, *thr));
const int nzflag = _mm256_movemask_epi8(mask);
if (nzflag) {
- __m256i q = _mm256_adds_epi16(abs, qp[0]);
+ __m256i q = _mm256_adds_epi16(abs_coeff, qp[0]);
__m256i qh = _mm256_mulhi_epi16(q, qp[1]);
__m256i ql = _mm256_mullo_epi16(q, qp[1]);
qh = _mm256_slli_epi16(qh, 2);