mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-13 06:24:27 +02:00
remove some -Wshadow warnings
these are quite noisy, but it's not a big deal to remove them. Change-Id: I5deb08f10263feb77e2cc8a70be44ad4f725febd
This commit is contained in:
@ -278,14 +278,14 @@ static void TransformSSE2(const int16_t* in, uint8_t* dst, int do_two) {
|
||||
|
||||
#define GET_NOTHEV(p1, p0, q0, q1, hev_thresh, not_hev) { \
|
||||
const __m128i zero = _mm_setzero_si128(); \
|
||||
const __m128i t1 = MM_ABS(p1, p0); \
|
||||
const __m128i t2 = MM_ABS(q1, q0); \
|
||||
const __m128i t_1 = MM_ABS(p1, p0); \
|
||||
const __m128i t_2 = MM_ABS(q1, q0); \
|
||||
\
|
||||
const __m128i h = _mm_set1_epi8(hev_thresh); \
|
||||
const __m128i t3 = _mm_subs_epu8(t1, h); /* abs(p1 - p0) - hev_tresh */ \
|
||||
const __m128i t4 = _mm_subs_epu8(t2, h); /* abs(q1 - q0) - hev_tresh */ \
|
||||
const __m128i t_3 = _mm_subs_epu8(t_1, h); /* abs(p1 - p0) - hev_tresh */ \
|
||||
const __m128i t_4 = _mm_subs_epu8(t_2, h); /* abs(q1 - q0) - hev_tresh */ \
|
||||
\
|
||||
not_hev = _mm_or_si128(t3, t4); \
|
||||
not_hev = _mm_or_si128(t_3, t_4); \
|
||||
not_hev = _mm_cmpeq_epi8(not_hev, zero); /* not_hev <= t1 && not_hev <= t2 */\
|
||||
}
|
||||
|
||||
@ -314,13 +314,13 @@ static void TransformSSE2(const int16_t* in, uint8_t* dst, int do_two) {
|
||||
|
||||
// Updates values of 2 pixels at MB edge during complex filtering.
|
||||
// Update operations:
|
||||
// q = q - a and p = p + a; where a = [(a_hi >> 7), (a_lo >> 7)]
|
||||
// q = q - delta and p = p + delta; where delta = [(a_hi >> 7), (a_lo >> 7)]
|
||||
#define UPDATE_2PIXELS(pi, qi, a_lo, a_hi) { \
|
||||
const __m128i a_lo7 = _mm_srai_epi16(a_lo, 7); \
|
||||
const __m128i a_hi7 = _mm_srai_epi16(a_hi, 7); \
|
||||
const __m128i a = _mm_packs_epi16(a_lo7, a_hi7); \
|
||||
pi = _mm_adds_epi8(pi, a); \
|
||||
qi = _mm_subs_epi8(qi, a); \
|
||||
const __m128i delta = _mm_packs_epi16(a_lo7, a_hi7); \
|
||||
pi = _mm_adds_epi8(pi, delta); \
|
||||
qi = _mm_subs_epi8(qi, delta); \
|
||||
}
|
||||
|
||||
static void NeedsFilter(const __m128i* p1, const __m128i* p0, const __m128i* q0,
|
||||
|
@ -51,12 +51,12 @@ extern "C" {
|
||||
|
||||
// pack and store two alterning pixel rows
|
||||
#define PACK_AND_STORE(a, b, da, db, out) do { \
|
||||
const __m128i ta = _mm_avg_epu8(a, da); /* (9a + 3b + 3c + d + 8) / 16 */ \
|
||||
const __m128i tb = _mm_avg_epu8(b, db); /* (3a + 9b + c + 3d + 8) / 16 */ \
|
||||
const __m128i t1 = _mm_unpacklo_epi8(ta, tb); \
|
||||
const __m128i t2 = _mm_unpackhi_epi8(ta, tb); \
|
||||
_mm_store_si128(((__m128i*)(out)) + 0, t1); \
|
||||
_mm_store_si128(((__m128i*)(out)) + 1, t2); \
|
||||
const __m128i t_a = _mm_avg_epu8(a, da); /* (9a + 3b + 3c + d + 8) / 16 */ \
|
||||
const __m128i t_b = _mm_avg_epu8(b, db); /* (3a + 9b + c + 3d + 8) / 16 */ \
|
||||
const __m128i t_1 = _mm_unpacklo_epi8(t_a, t_b); \
|
||||
const __m128i t_2 = _mm_unpackhi_epi8(t_a, t_b); \
|
||||
_mm_store_si128(((__m128i*)(out)) + 0, t_1); \
|
||||
_mm_store_si128(((__m128i*)(out)) + 1, t_2); \
|
||||
} while (0)
|
||||
|
||||
// Loads 17 pixels each from rows r1 and r2 and generates 32 pixels.
|
||||
@ -128,7 +128,7 @@ static void FUNC_NAME(const uint8_t* top_y, const uint8_t* bottom_y, \
|
||||
const uint8_t* top_u, const uint8_t* top_v, \
|
||||
const uint8_t* cur_u, const uint8_t* cur_v, \
|
||||
uint8_t* top_dst, uint8_t* bottom_dst, int len) { \
|
||||
int b; \
|
||||
int block; \
|
||||
/* 16 byte aligned array to cache reconstructed u and v */ \
|
||||
uint8_t uv_buf[4 * 32 + 15]; \
|
||||
uint8_t* const r_uv = (uint8_t*)((uintptr_t)(uv_buf + 15) & ~15); \
|
||||
@ -154,11 +154,11 @@ static void FUNC_NAME(const uint8_t* top_y, const uint8_t* bottom_y, \
|
||||
FUNC(bottom_y[0], u0, v0, bottom_dst); \
|
||||
} \
|
||||
\
|
||||
for (b = 0; b < num_blocks; ++b) { \
|
||||
for (block = 0; block < num_blocks; ++block) { \
|
||||
UPSAMPLE_32PIXELS(top_u, cur_u, r_uv + 0 * 32); \
|
||||
UPSAMPLE_32PIXELS(top_v, cur_v, r_uv + 1 * 32); \
|
||||
CONVERT2RGB(FUNC, XSTEP, top_y, bottom_y, r_uv, top_dst, bottom_dst, \
|
||||
32 * b + 1, 32) \
|
||||
32 * block + 1, 32) \
|
||||
top_u += 16; \
|
||||
cur_u += 16; \
|
||||
top_v += 16; \
|
||||
|
Reference in New Issue
Block a user