VPX: removed filter == 128 checks from mips convolve code
The check is handled by the predictor table. Change-Id: I2fe52bfbbfccb2edd13ba250986e3a4b4b589459
This commit is contained in:
Родитель
aeea00cc4f
Коммит
89dcc13939
|
@ -348,13 +348,9 @@ void vpx_convolve8_avg_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride,
|
|||
const int16_t *filter_y, int y_step_q4,
|
||||
int w, int h) {
|
||||
assert(y_step_q4 == 16);
|
||||
if (((const int32_t *)filter_y)[1] == 0x800000) {
|
||||
vpx_convolve_avg(src, src_stride,
|
||||
dst, dst_stride,
|
||||
filter_x, x_step_q4,
|
||||
filter_y, y_step_q4,
|
||||
w, h);
|
||||
} else if (((const int32_t *)filter_y)[0] == 0) {
|
||||
assert(((const int32_t *)filter_y)[1] != 0x800000);
|
||||
|
||||
if (((const int32_t *)filter_y)[0] == 0) {
|
||||
vpx_convolve2_avg_vert_dspr2(src, src_stride,
|
||||
dst, dst_stride,
|
||||
filter_x, x_step_q4,
|
||||
|
|
|
@ -958,13 +958,9 @@ void vpx_convolve8_avg_horiz_dspr2(const uint8_t *src, ptrdiff_t src_stride,
|
|||
const int16_t *filter_y, int y_step_q4,
|
||||
int w, int h) {
|
||||
assert(x_step_q4 == 16);
|
||||
if (((const int32_t *)filter_x)[1] == 0x800000) {
|
||||
vpx_convolve_avg(src, src_stride,
|
||||
dst, dst_stride,
|
||||
filter_x, x_step_q4,
|
||||
filter_y, y_step_q4,
|
||||
w, h);
|
||||
} else if (((const int32_t *)filter_x)[0] == 0) {
|
||||
assert(((const int32_t *)filter_x)[1] != 0x800000);
|
||||
|
||||
if (((const int32_t *)filter_x)[0] == 0) {
|
||||
vpx_convolve2_avg_horiz_dspr2(src, src_stride,
|
||||
dst, dst_stride,
|
||||
filter_x, x_step_q4,
|
||||
|
|
|
@ -938,6 +938,9 @@ void vpx_convolve8_dspr2(const uint8_t *src, ptrdiff_t src_stride,
|
|||
|
||||
assert(x_step_q4 == 16);
|
||||
assert(y_step_q4 == 16);
|
||||
assert(((const int32_t *)filter_x)[1] != 0x800000);
|
||||
assert(((const int32_t *)filter_y)[1] != 0x800000);
|
||||
|
||||
|
||||
/* bit positon for extract from acc */
|
||||
__asm__ __volatile__ (
|
||||
|
@ -949,14 +952,6 @@ void vpx_convolve8_dspr2(const uint8_t *src, ptrdiff_t src_stride,
|
|||
if (intermediate_height < h)
|
||||
intermediate_height = h;
|
||||
|
||||
if ((((const int32_t *)filter_x)[1] == 0x800000)
|
||||
&& (((const int32_t *)filter_y)[1] == 0x800000))
|
||||
return vpx_convolve_copy(src, src_stride,
|
||||
dst, dst_stride,
|
||||
filter_x, x_step_q4,
|
||||
filter_y, y_step_q4,
|
||||
w, h);
|
||||
|
||||
/* copy the src to dst */
|
||||
if (filter_x[3] == 0x80) {
|
||||
copy_horiz_transposed(src - src_stride * 3, src_stride,
|
||||
|
|
|
@ -842,13 +842,9 @@ void vpx_convolve8_horiz_dspr2(const uint8_t *src, ptrdiff_t src_stride,
|
|||
const int16_t *filter_y, int y_step_q4,
|
||||
int w, int h) {
|
||||
assert(x_step_q4 == 16);
|
||||
if (((const int32_t *)filter_x)[1] == 0x800000) {
|
||||
vpx_convolve_copy(src, src_stride,
|
||||
dst, dst_stride,
|
||||
filter_x, x_step_q4,
|
||||
filter_y, y_step_q4,
|
||||
w, h);
|
||||
} else if (((const int32_t *)filter_x)[0] == 0) {
|
||||
assert(((const int32_t *)filter_x)[1] != 0x800000);
|
||||
|
||||
if (((const int32_t *)filter_x)[0] == 0) {
|
||||
vpx_convolve2_horiz_dspr2(src, src_stride,
|
||||
dst, dst_stride,
|
||||
filter_x, x_step_q4,
|
||||
|
|
|
@ -334,13 +334,9 @@ void vpx_convolve8_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride,
|
|||
const int16_t *filter_y, int y_step_q4,
|
||||
int w, int h) {
|
||||
assert(y_step_q4 == 16);
|
||||
if (((const int32_t *)filter_y)[1] == 0x800000) {
|
||||
vpx_convolve_copy(src, src_stride,
|
||||
dst, dst_stride,
|
||||
filter_x, x_step_q4,
|
||||
filter_y, y_step_q4,
|
||||
w, h);
|
||||
} else if (((const int32_t *)filter_y)[0] == 0) {
|
||||
assert(((const int32_t *)filter_y)[1] != 0x800000);
|
||||
|
||||
if (((const int32_t *)filter_y)[0] == 0) {
|
||||
vpx_convolve2_vert_dspr2(src, src_stride,
|
||||
dst, dst_stride,
|
||||
filter_x, x_step_q4,
|
||||
|
|
|
@ -667,13 +667,7 @@ void vpx_convolve8_avg_horiz_msa(const uint8_t *src, ptrdiff_t src_stride,
|
|||
int8_t cnt, filt_hor[8];
|
||||
|
||||
assert(x_step_q4 == 16);
|
||||
|
||||
if (((const int32_t *)filter_x)[1] == 0x800000) {
|
||||
vpx_convolve_avg(src, src_stride, dst, dst_stride,
|
||||
filter_x, x_step_q4, filter_y, y_step_q4,
|
||||
w, h);
|
||||
return;
|
||||
}
|
||||
assert(((const int32_t *)filter_x)[1] != 0x800000);
|
||||
|
||||
for (cnt = 0; cnt < 8; ++cnt) {
|
||||
filt_hor[cnt] = filter_x[cnt];
|
||||
|
|
|
@ -577,14 +577,8 @@ void vpx_convolve8_avg_msa(const uint8_t *src, ptrdiff_t src_stride,
|
|||
|
||||
assert(x_step_q4 == 16);
|
||||
assert(y_step_q4 == 16);
|
||||
|
||||
if (((const int32_t *)filter_x)[1] == 0x800000 &&
|
||||
((const int32_t *)filter_y)[1] == 0x800000) {
|
||||
vpx_convolve_avg(src, src_stride, dst, dst_stride,
|
||||
filter_x, x_step_q4, filter_y, y_step_q4,
|
||||
w, h);
|
||||
return;
|
||||
}
|
||||
assert(((const int32_t *)filter_x)[1] != 0x800000);
|
||||
assert(((const int32_t *)filter_y)[1] != 0x800000);
|
||||
|
||||
for (cnt = 0; cnt < 8; ++cnt) {
|
||||
filt_hor[cnt] = filter_x[cnt];
|
||||
|
|
|
@ -641,13 +641,7 @@ void vpx_convolve8_avg_vert_msa(const uint8_t *src, ptrdiff_t src_stride,
|
|||
int8_t cnt, filt_ver[8];
|
||||
|
||||
assert(y_step_q4 == 16);
|
||||
|
||||
if (((const int32_t *)filter_y)[1] == 0x800000) {
|
||||
vpx_convolve_avg(src, src_stride, dst, dst_stride,
|
||||
filter_x, x_step_q4, filter_y, y_step_q4,
|
||||
w, h);
|
||||
return;
|
||||
}
|
||||
assert(((const int32_t *)filter_y)[1] != 0x800000);
|
||||
|
||||
for (cnt = 0; cnt < 8; ++cnt) {
|
||||
filt_ver[cnt] = filter_y[cnt];
|
||||
|
|
|
@ -627,13 +627,7 @@ void vpx_convolve8_horiz_msa(const uint8_t *src, ptrdiff_t src_stride,
|
|||
int8_t cnt, filt_hor[8];
|
||||
|
||||
assert(x_step_q4 == 16);
|
||||
|
||||
if (((const int32_t *)filter_x)[1] == 0x800000) {
|
||||
vpx_convolve_copy(src, src_stride, dst, dst_stride,
|
||||
filter_x, x_step_q4, filter_y, y_step_q4,
|
||||
w, h);
|
||||
return;
|
||||
}
|
||||
assert(((const int32_t *)filter_x)[1] != 0x800000);
|
||||
|
||||
for (cnt = 0; cnt < 8; ++cnt) {
|
||||
filt_hor[cnt] = filter_x[cnt];
|
||||
|
|
|
@ -551,14 +551,8 @@ void vpx_convolve8_msa(const uint8_t *src, ptrdiff_t src_stride,
|
|||
|
||||
assert(x_step_q4 == 16);
|
||||
assert(y_step_q4 == 16);
|
||||
|
||||
if (((const int32_t *)filter_x)[1] == 0x800000 &&
|
||||
((const int32_t *)filter_y)[1] == 0x800000) {
|
||||
vpx_convolve_copy(src, src_stride, dst, dst_stride,
|
||||
filter_x, x_step_q4, filter_y, y_step_q4,
|
||||
w, h);
|
||||
return;
|
||||
}
|
||||
assert(((const int32_t *)filter_x)[1] != 0x800000);
|
||||
assert(((const int32_t *)filter_y)[1] != 0x800000);
|
||||
|
||||
for (cnt = 0; cnt < 8; ++cnt) {
|
||||
filt_hor[cnt] = filter_x[cnt];
|
||||
|
|
|
@ -634,13 +634,7 @@ void vpx_convolve8_vert_msa(const uint8_t *src, ptrdiff_t src_stride,
|
|||
int8_t cnt, filt_ver[8];
|
||||
|
||||
assert(y_step_q4 == 16);
|
||||
|
||||
if (((const int32_t *)filter_y)[1] == 0x800000) {
|
||||
vpx_convolve_copy(src, src_stride, dst, dst_stride,
|
||||
filter_x, x_step_q4, filter_y, y_step_q4,
|
||||
w, h);
|
||||
return;
|
||||
}
|
||||
assert(((const int32_t *)filter_y)[1] != 0x800000);
|
||||
|
||||
for (cnt = 8; cnt--;) {
|
||||
filt_ver[cnt] = filter_y[cnt];
|
||||
|
|
Загрузка…
Ссылка в новой задаче