Commit d1d76ba8 authored by Angie Chiang's avatar Angie Chiang

Fix compile warning in av1_convolve_ssse3.c

For some historical reason, coefficients of interpolation filters
in filter.c is defined in int16_t but use 8 bits only.
On the other hand, SIMD like to use int8_t to represent those
coefficients for economical reason.
The conversion from int16_t to int8_t will introduce
"possible loss of data" warning.

We use cast to work around this problem.

Change-Id: I42ef0a2a815a8f93c579f7984c9b957c1aed6d6c
parent d39cc72d
......@@ -942,8 +942,8 @@ static void init_simd_horiz_filter(const int16_t *filter_ptr, int taps,
for (i = 0; i < offset + 2; ++i) simd_horiz_filter[shift - 1][1][i] = 0;
for (i = 0; i < taps; ++i) {
simd_horiz_filter[shift - 1][0][i + offset] = filter_row[i];
simd_horiz_filter[shift - 1][1][i + offset + 2] = filter_row[i];
simd_horiz_filter[shift - 1][0][i + offset] = (int8_t)filter_row[i];
simd_horiz_filter[shift - 1][1][i + offset + 2] = (int8_t)filter_row[i];
}
for (i = offset + taps; i < 16; ++i) simd_horiz_filter[shift - 1][0][i] = 0;
......@@ -966,7 +966,7 @@ static void init_simd_vert_filter(const int16_t *filter_ptr, int taps,
for (j = 0; j < 16; ++j) {
int c = i * 2 + (j % 2) - offset;
if (c >= 0 && c < taps)
simd_vert_filter[shift - 1][i][j] = filter_row[c];
simd_vert_filter[shift - 1][i][j] = (int8_t)filter_row[c];
else
simd_vert_filter[shift - 1][i][j] = 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