|
|
|
@ -1429,12 +1429,14 @@ void vpx_highbd_idct4_c(const tran_low_t *input, tran_low_t *output, int bd) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// stage 1
|
|
|
|
|
temp1 = (input[0] + input[2]) * cospi_16_64;
|
|
|
|
|
temp2 = (input[0] - input[2]) * cospi_16_64;
|
|
|
|
|
temp1 = (input[0] + input[2]) * (tran_high_t)cospi_16_64;
|
|
|
|
|
temp2 = (input[0] - input[2]) * (tran_high_t)cospi_16_64;
|
|
|
|
|
step[0] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step[1] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
temp1 = input[1] * cospi_24_64 - input[3] * cospi_8_64;
|
|
|
|
|
temp2 = input[1] * cospi_8_64 + input[3] * cospi_24_64;
|
|
|
|
|
temp1 =
|
|
|
|
|
input[1] * (tran_high_t)cospi_24_64 - input[3] * (tran_high_t)cospi_8_64;
|
|
|
|
|
temp2 =
|
|
|
|
|
input[1] * (tran_high_t)cospi_8_64 + input[3] * (tran_high_t)cospi_24_64;
|
|
|
|
|
step[2] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step[3] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
|
|
|
|
@ -1474,10 +1476,11 @@ void vpx_highbd_idct4x4_1_add_c(const tran_low_t *input, uint16_t *dest,
|
|
|
|
|
int stride, int bd) {
|
|
|
|
|
int i;
|
|
|
|
|
tran_high_t a1;
|
|
|
|
|
tran_low_t out =
|
|
|
|
|
HIGHBD_WRAPLOW(dct_const_round_shift(input[0] * cospi_16_64), bd);
|
|
|
|
|
tran_low_t out = HIGHBD_WRAPLOW(
|
|
|
|
|
dct_const_round_shift(input[0] * (tran_high_t)cospi_16_64), bd);
|
|
|
|
|
|
|
|
|
|
out = HIGHBD_WRAPLOW(dct_const_round_shift(out * cospi_16_64), bd);
|
|
|
|
|
out =
|
|
|
|
|
HIGHBD_WRAPLOW(dct_const_round_shift(out * (tran_high_t)cospi_16_64), bd);
|
|
|
|
|
a1 = ROUND_POWER_OF_TWO(out, 4);
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < 4; i++) {
|
|
|
|
@ -1515,14 +1518,14 @@ void vpx_highbd_iadst8_c(const tran_low_t *input, tran_low_t *output, int bd) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// stage 1
|
|
|
|
|
s0 = cospi_2_64 * x0 + cospi_30_64 * x1;
|
|
|
|
|
s1 = cospi_30_64 * x0 - cospi_2_64 * x1;
|
|
|
|
|
s2 = cospi_10_64 * x2 + cospi_22_64 * x3;
|
|
|
|
|
s3 = cospi_22_64 * x2 - cospi_10_64 * x3;
|
|
|
|
|
s4 = cospi_18_64 * x4 + cospi_14_64 * x5;
|
|
|
|
|
s5 = cospi_14_64 * x4 - cospi_18_64 * x5;
|
|
|
|
|
s6 = cospi_26_64 * x6 + cospi_6_64 * x7;
|
|
|
|
|
s7 = cospi_6_64 * x6 - cospi_26_64 * x7;
|
|
|
|
|
s0 = (tran_high_t)cospi_2_64 * x0 + (tran_high_t)cospi_30_64 * x1;
|
|
|
|
|
s1 = (tran_high_t)cospi_30_64 * x0 - (tran_high_t)cospi_2_64 * x1;
|
|
|
|
|
s2 = (tran_high_t)cospi_10_64 * x2 + (tran_high_t)cospi_22_64 * x3;
|
|
|
|
|
s3 = (tran_high_t)cospi_22_64 * x2 - (tran_high_t)cospi_10_64 * x3;
|
|
|
|
|
s4 = (tran_high_t)cospi_18_64 * x4 + (tran_high_t)cospi_14_64 * x5;
|
|
|
|
|
s5 = (tran_high_t)cospi_14_64 * x4 - (tran_high_t)cospi_18_64 * x5;
|
|
|
|
|
s6 = (tran_high_t)cospi_26_64 * x6 + (tran_high_t)cospi_6_64 * x7;
|
|
|
|
|
s7 = (tran_high_t)cospi_6_64 * x6 - (tran_high_t)cospi_26_64 * x7;
|
|
|
|
|
|
|
|
|
|
x0 = HIGHBD_WRAPLOW(dct_const_round_shift(s0 + s4), bd);
|
|
|
|
|
x1 = HIGHBD_WRAPLOW(dct_const_round_shift(s1 + s5), bd);
|
|
|
|
@ -1538,10 +1541,10 @@ void vpx_highbd_iadst8_c(const tran_low_t *input, tran_low_t *output, int bd) {
|
|
|
|
|
s1 = x1;
|
|
|
|
|
s2 = x2;
|
|
|
|
|
s3 = x3;
|
|
|
|
|
s4 = cospi_8_64 * x4 + cospi_24_64 * x5;
|
|
|
|
|
s5 = cospi_24_64 * x4 - cospi_8_64 * x5;
|
|
|
|
|
s6 = -cospi_24_64 * x6 + cospi_8_64 * x7;
|
|
|
|
|
s7 = cospi_8_64 * x6 + cospi_24_64 * x7;
|
|
|
|
|
s4 = (tran_high_t)cospi_8_64 * x4 + (tran_high_t)cospi_24_64 * x5;
|
|
|
|
|
s5 = (tran_high_t)cospi_24_64 * x4 - (tran_high_t)cospi_8_64 * x5;
|
|
|
|
|
s6 = (tran_high_t)(-cospi_24_64) * x6 + (tran_high_t)cospi_8_64 * x7;
|
|
|
|
|
s7 = (tran_high_t)cospi_8_64 * x6 + (tran_high_t)cospi_24_64 * x7;
|
|
|
|
|
|
|
|
|
|
x0 = HIGHBD_WRAPLOW(s0 + s2, bd);
|
|
|
|
|
x1 = HIGHBD_WRAPLOW(s1 + s3, bd);
|
|
|
|
@ -1553,10 +1556,10 @@ void vpx_highbd_iadst8_c(const tran_low_t *input, tran_low_t *output, int bd) {
|
|
|
|
|
x7 = HIGHBD_WRAPLOW(dct_const_round_shift(s5 - s7), bd);
|
|
|
|
|
|
|
|
|
|
// stage 3
|
|
|
|
|
s2 = cospi_16_64 * (x2 + x3);
|
|
|
|
|
s3 = cospi_16_64 * (x2 - x3);
|
|
|
|
|
s6 = cospi_16_64 * (x6 + x7);
|
|
|
|
|
s7 = cospi_16_64 * (x6 - x7);
|
|
|
|
|
s2 = (tran_high_t)cospi_16_64 * (x2 + x3);
|
|
|
|
|
s3 = (tran_high_t)cospi_16_64 * (x2 - x3);
|
|
|
|
|
s6 = (tran_high_t)cospi_16_64 * (x6 + x7);
|
|
|
|
|
s7 = (tran_high_t)cospi_16_64 * (x6 - x7);
|
|
|
|
|
|
|
|
|
|
x2 = HIGHBD_WRAPLOW(dct_const_round_shift(s2), bd);
|
|
|
|
|
x3 = HIGHBD_WRAPLOW(dct_const_round_shift(s3), bd);
|
|
|
|
@ -1590,12 +1593,16 @@ void vpx_highbd_idct8_c(const tran_low_t *input, tran_low_t *output, int bd) {
|
|
|
|
|
step1[2] = input[4];
|
|
|
|
|
step1[1] = input[2];
|
|
|
|
|
step1[3] = input[6];
|
|
|
|
|
temp1 = input[1] * cospi_28_64 - input[7] * cospi_4_64;
|
|
|
|
|
temp2 = input[1] * cospi_4_64 + input[7] * cospi_28_64;
|
|
|
|
|
temp1 =
|
|
|
|
|
input[1] * (tran_high_t)cospi_28_64 - input[7] * (tran_high_t)cospi_4_64;
|
|
|
|
|
temp2 =
|
|
|
|
|
input[1] * (tran_high_t)cospi_4_64 + input[7] * (tran_high_t)cospi_28_64;
|
|
|
|
|
step1[4] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step1[7] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
temp1 = input[5] * cospi_12_64 - input[3] * cospi_20_64;
|
|
|
|
|
temp2 = input[5] * cospi_20_64 + input[3] * cospi_12_64;
|
|
|
|
|
temp1 =
|
|
|
|
|
input[5] * (tran_high_t)cospi_12_64 - input[3] * (tran_high_t)cospi_20_64;
|
|
|
|
|
temp2 =
|
|
|
|
|
input[5] * (tran_high_t)cospi_20_64 + input[3] * (tran_high_t)cospi_12_64;
|
|
|
|
|
step1[5] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step1[6] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
|
|
|
|
@ -1610,8 +1617,8 @@ void vpx_highbd_idct8_c(const tran_low_t *input, tran_low_t *output, int bd) {
|
|
|
|
|
|
|
|
|
|
// stage 3 - odd half
|
|
|
|
|
step1[4] = step2[4];
|
|
|
|
|
temp1 = (step2[6] - step2[5]) * cospi_16_64;
|
|
|
|
|
temp2 = (step2[5] + step2[6]) * cospi_16_64;
|
|
|
|
|
temp1 = (step2[6] - step2[5]) * (tran_high_t)cospi_16_64;
|
|
|
|
|
temp2 = (step2[5] + step2[6]) * (tran_high_t)cospi_16_64;
|
|
|
|
|
step1[5] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step1[6] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
step1[7] = step2[7];
|
|
|
|
@ -1682,10 +1689,11 @@ void vpx_highbd_idct8x8_1_add_c(const tran_low_t *input, uint16_t *dest,
|
|
|
|
|
int stride, int bd) {
|
|
|
|
|
int i, j;
|
|
|
|
|
tran_high_t a1;
|
|
|
|
|
tran_low_t out =
|
|
|
|
|
HIGHBD_WRAPLOW(dct_const_round_shift(input[0] * cospi_16_64), bd);
|
|
|
|
|
tran_low_t out = HIGHBD_WRAPLOW(
|
|
|
|
|
dct_const_round_shift(input[0] * (tran_high_t)cospi_16_64), bd);
|
|
|
|
|
|
|
|
|
|
out = HIGHBD_WRAPLOW(dct_const_round_shift(out * cospi_16_64), bd);
|
|
|
|
|
out =
|
|
|
|
|
HIGHBD_WRAPLOW(dct_const_round_shift(out * (tran_high_t)cospi_16_64), bd);
|
|
|
|
|
a1 = ROUND_POWER_OF_TWO(out, 5);
|
|
|
|
|
for (j = 0; j < 8; ++j) {
|
|
|
|
|
for (i = 0; i < 8; ++i) dest[i] = highbd_clip_pixel_add(dest[i], a1, bd);
|
|
|
|
@ -1729,22 +1737,22 @@ void vpx_highbd_iadst16_c(const tran_low_t *input, tran_low_t *output, int bd) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// stage 1
|
|
|
|
|
s0 = x0 * cospi_1_64 + x1 * cospi_31_64;
|
|
|
|
|
s1 = x0 * cospi_31_64 - x1 * cospi_1_64;
|
|
|
|
|
s2 = x2 * cospi_5_64 + x3 * cospi_27_64;
|
|
|
|
|
s3 = x2 * cospi_27_64 - x3 * cospi_5_64;
|
|
|
|
|
s4 = x4 * cospi_9_64 + x5 * cospi_23_64;
|
|
|
|
|
s5 = x4 * cospi_23_64 - x5 * cospi_9_64;
|
|
|
|
|
s6 = x6 * cospi_13_64 + x7 * cospi_19_64;
|
|
|
|
|
s7 = x6 * cospi_19_64 - x7 * cospi_13_64;
|
|
|
|
|
s8 = x8 * cospi_17_64 + x9 * cospi_15_64;
|
|
|
|
|
s9 = x8 * cospi_15_64 - x9 * cospi_17_64;
|
|
|
|
|
s10 = x10 * cospi_21_64 + x11 * cospi_11_64;
|
|
|
|
|
s11 = x10 * cospi_11_64 - x11 * cospi_21_64;
|
|
|
|
|
s12 = x12 * cospi_25_64 + x13 * cospi_7_64;
|
|
|
|
|
s13 = x12 * cospi_7_64 - x13 * cospi_25_64;
|
|
|
|
|
s14 = x14 * cospi_29_64 + x15 * cospi_3_64;
|
|
|
|
|
s15 = x14 * cospi_3_64 - x15 * cospi_29_64;
|
|
|
|
|
s0 = x0 * (tran_high_t)cospi_1_64 + x1 * (tran_high_t)cospi_31_64;
|
|
|
|
|
s1 = x0 * (tran_high_t)cospi_31_64 - x1 * (tran_high_t)cospi_1_64;
|
|
|
|
|
s2 = x2 * (tran_high_t)cospi_5_64 + x3 * (tran_high_t)cospi_27_64;
|
|
|
|
|
s3 = x2 * (tran_high_t)cospi_27_64 - x3 * (tran_high_t)cospi_5_64;
|
|
|
|
|
s4 = x4 * (tran_high_t)cospi_9_64 + x5 * (tran_high_t)cospi_23_64;
|
|
|
|
|
s5 = x4 * (tran_high_t)cospi_23_64 - x5 * (tran_high_t)cospi_9_64;
|
|
|
|
|
s6 = x6 * (tran_high_t)cospi_13_64 + x7 * (tran_high_t)cospi_19_64;
|
|
|
|
|
s7 = x6 * (tran_high_t)cospi_19_64 - x7 * (tran_high_t)cospi_13_64;
|
|
|
|
|
s8 = x8 * (tran_high_t)cospi_17_64 + x9 * (tran_high_t)cospi_15_64;
|
|
|
|
|
s9 = x8 * (tran_high_t)cospi_15_64 - x9 * (tran_high_t)cospi_17_64;
|
|
|
|
|
s10 = x10 * (tran_high_t)cospi_21_64 + x11 * (tran_high_t)cospi_11_64;
|
|
|
|
|
s11 = x10 * (tran_high_t)cospi_11_64 - x11 * (tran_high_t)cospi_21_64;
|
|
|
|
|
s12 = x12 * (tran_high_t)cospi_25_64 + x13 * (tran_high_t)cospi_7_64;
|
|
|
|
|
s13 = x12 * (tran_high_t)cospi_7_64 - x13 * (tran_high_t)cospi_25_64;
|
|
|
|
|
s14 = x14 * (tran_high_t)cospi_29_64 + x15 * (tran_high_t)cospi_3_64;
|
|
|
|
|
s15 = x14 * (tran_high_t)cospi_3_64 - x15 * (tran_high_t)cospi_29_64;
|
|
|
|
|
|
|
|
|
|
x0 = HIGHBD_WRAPLOW(dct_const_round_shift(s0 + s8), bd);
|
|
|
|
|
x1 = HIGHBD_WRAPLOW(dct_const_round_shift(s1 + s9), bd);
|
|
|
|
@ -1772,14 +1780,14 @@ void vpx_highbd_iadst16_c(const tran_low_t *input, tran_low_t *output, int bd) {
|
|
|
|
|
s5 = x5;
|
|
|
|
|
s6 = x6;
|
|
|
|
|
s7 = x7;
|
|
|
|
|
s8 = x8 * cospi_4_64 + x9 * cospi_28_64;
|
|
|
|
|
s9 = x8 * cospi_28_64 - x9 * cospi_4_64;
|
|
|
|
|
s10 = x10 * cospi_20_64 + x11 * cospi_12_64;
|
|
|
|
|
s11 = x10 * cospi_12_64 - x11 * cospi_20_64;
|
|
|
|
|
s12 = -x12 * cospi_28_64 + x13 * cospi_4_64;
|
|
|
|
|
s13 = x12 * cospi_4_64 + x13 * cospi_28_64;
|
|
|
|
|
s14 = -x14 * cospi_12_64 + x15 * cospi_20_64;
|
|
|
|
|
s15 = x14 * cospi_20_64 + x15 * cospi_12_64;
|
|
|
|
|
s8 = x8 * (tran_high_t)cospi_4_64 + x9 * (tran_high_t)cospi_28_64;
|
|
|
|
|
s9 = x8 * (tran_high_t)cospi_28_64 - x9 * (tran_high_t)cospi_4_64;
|
|
|
|
|
s10 = x10 * (tran_high_t)cospi_20_64 + x11 * (tran_high_t)cospi_12_64;
|
|
|
|
|
s11 = x10 * (tran_high_t)cospi_12_64 - x11 * (tran_high_t)cospi_20_64;
|
|
|
|
|
s12 = -x12 * (tran_high_t)cospi_28_64 + x13 * (tran_high_t)cospi_4_64;
|
|
|
|
|
s13 = x12 * (tran_high_t)cospi_4_64 + x13 * (tran_high_t)cospi_28_64;
|
|
|
|
|
s14 = -x14 * (tran_high_t)cospi_12_64 + x15 * (tran_high_t)cospi_20_64;
|
|
|
|
|
s15 = x14 * (tran_high_t)cospi_20_64 + x15 * (tran_high_t)cospi_12_64;
|
|
|
|
|
|
|
|
|
|
x0 = HIGHBD_WRAPLOW(s0 + s4, bd);
|
|
|
|
|
x1 = HIGHBD_WRAPLOW(s1 + s5, bd);
|
|
|
|
@ -1803,18 +1811,18 @@ void vpx_highbd_iadst16_c(const tran_low_t *input, tran_low_t *output, int bd) {
|
|
|
|
|
s1 = x1;
|
|
|
|
|
s2 = x2;
|
|
|
|
|
s3 = x3;
|
|
|
|
|
s4 = x4 * cospi_8_64 + x5 * cospi_24_64;
|
|
|
|
|
s5 = x4 * cospi_24_64 - x5 * cospi_8_64;
|
|
|
|
|
s6 = -x6 * cospi_24_64 + x7 * cospi_8_64;
|
|
|
|
|
s7 = x6 * cospi_8_64 + x7 * cospi_24_64;
|
|
|
|
|
s4 = x4 * (tran_high_t)cospi_8_64 + x5 * (tran_high_t)cospi_24_64;
|
|
|
|
|
s5 = x4 * (tran_high_t)cospi_24_64 - x5 * (tran_high_t)cospi_8_64;
|
|
|
|
|
s6 = -x6 * (tran_high_t)cospi_24_64 + x7 * (tran_high_t)cospi_8_64;
|
|
|
|
|
s7 = x6 * (tran_high_t)cospi_8_64 + x7 * (tran_high_t)cospi_24_64;
|
|
|
|
|
s8 = x8;
|
|
|
|
|
s9 = x9;
|
|
|
|
|
s10 = x10;
|
|
|
|
|
s11 = x11;
|
|
|
|
|
s12 = x12 * cospi_8_64 + x13 * cospi_24_64;
|
|
|
|
|
s13 = x12 * cospi_24_64 - x13 * cospi_8_64;
|
|
|
|
|
s14 = -x14 * cospi_24_64 + x15 * cospi_8_64;
|
|
|
|
|
s15 = x14 * cospi_8_64 + x15 * cospi_24_64;
|
|
|
|
|
s12 = x12 * (tran_high_t)cospi_8_64 + x13 * (tran_high_t)cospi_24_64;
|
|
|
|
|
s13 = x12 * (tran_high_t)cospi_24_64 - x13 * (tran_high_t)cospi_8_64;
|
|
|
|
|
s14 = -x14 * (tran_high_t)cospi_24_64 + x15 * (tran_high_t)cospi_8_64;
|
|
|
|
|
s15 = x14 * (tran_high_t)cospi_8_64 + x15 * (tran_high_t)cospi_24_64;
|
|
|
|
|
|
|
|
|
|
x0 = HIGHBD_WRAPLOW(s0 + s2, bd);
|
|
|
|
|
x1 = HIGHBD_WRAPLOW(s1 + s3, bd);
|
|
|
|
@ -1834,14 +1842,14 @@ void vpx_highbd_iadst16_c(const tran_low_t *input, tran_low_t *output, int bd) {
|
|
|
|
|
x15 = HIGHBD_WRAPLOW(dct_const_round_shift(s13 - s15), bd);
|
|
|
|
|
|
|
|
|
|
// stage 4
|
|
|
|
|
s2 = (-cospi_16_64) * (x2 + x3);
|
|
|
|
|
s3 = cospi_16_64 * (x2 - x3);
|
|
|
|
|
s6 = cospi_16_64 * (x6 + x7);
|
|
|
|
|
s7 = cospi_16_64 * (-x6 + x7);
|
|
|
|
|
s10 = cospi_16_64 * (x10 + x11);
|
|
|
|
|
s11 = cospi_16_64 * (-x10 + x11);
|
|
|
|
|
s14 = (-cospi_16_64) * (x14 + x15);
|
|
|
|
|
s15 = cospi_16_64 * (x14 - x15);
|
|
|
|
|
s2 = (tran_high_t)(-cospi_16_64) * (x2 + x3);
|
|
|
|
|
s3 = (tran_high_t)cospi_16_64 * (x2 - x3);
|
|
|
|
|
s6 = (tran_high_t)cospi_16_64 * (x6 + x7);
|
|
|
|
|
s7 = (tran_high_t)cospi_16_64 * (-x6 + x7);
|
|
|
|
|
s10 = (tran_high_t)cospi_16_64 * (x10 + x11);
|
|
|
|
|
s11 = (tran_high_t)cospi_16_64 * (-x10 + x11);
|
|
|
|
|
s14 = (tran_high_t)(-cospi_16_64) * (x14 + x15);
|
|
|
|
|
s15 = (tran_high_t)cospi_16_64 * (x14 - x15);
|
|
|
|
|
|
|
|
|
|
x2 = HIGHBD_WRAPLOW(dct_const_round_shift(s2), bd);
|
|
|
|
|
x3 = HIGHBD_WRAPLOW(dct_const_round_shift(s3), bd);
|
|
|
|
@ -1911,23 +1919,31 @@ void vpx_highbd_idct16_c(const tran_low_t *input, tran_low_t *output, int bd) {
|
|
|
|
|
step2[6] = step1[6];
|
|
|
|
|
step2[7] = step1[7];
|
|
|
|
|
|
|
|
|
|
temp1 = step1[8] * cospi_30_64 - step1[15] * cospi_2_64;
|
|
|
|
|
temp2 = step1[8] * cospi_2_64 + step1[15] * cospi_30_64;
|
|
|
|
|
temp1 =
|
|
|
|
|
step1[8] * (tran_high_t)cospi_30_64 - step1[15] * (tran_high_t)cospi_2_64;
|
|
|
|
|
temp2 =
|
|
|
|
|
step1[8] * (tran_high_t)cospi_2_64 + step1[15] * (tran_high_t)cospi_30_64;
|
|
|
|
|
step2[8] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step2[15] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
|
|
|
|
|
temp1 = step1[9] * cospi_14_64 - step1[14] * cospi_18_64;
|
|
|
|
|
temp2 = step1[9] * cospi_18_64 + step1[14] * cospi_14_64;
|
|
|
|
|
temp1 = step1[9] * (tran_high_t)cospi_14_64 -
|
|
|
|
|
step1[14] * (tran_high_t)cospi_18_64;
|
|
|
|
|
temp2 = step1[9] * (tran_high_t)cospi_18_64 +
|
|
|
|
|
step1[14] * (tran_high_t)cospi_14_64;
|
|
|
|
|
step2[9] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step2[14] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
|
|
|
|
|
temp1 = step1[10] * cospi_22_64 - step1[13] * cospi_10_64;
|
|
|
|
|
temp2 = step1[10] * cospi_10_64 + step1[13] * cospi_22_64;
|
|
|
|
|
temp1 = step1[10] * (tran_high_t)cospi_22_64 -
|
|
|
|
|
step1[13] * (tran_high_t)cospi_10_64;
|
|
|
|
|
temp2 = step1[10] * (tran_high_t)cospi_10_64 +
|
|
|
|
|
step1[13] * (tran_high_t)cospi_22_64;
|
|
|
|
|
step2[10] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step2[13] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
|
|
|
|
|
temp1 = step1[11] * cospi_6_64 - step1[12] * cospi_26_64;
|
|
|
|
|
temp2 = step1[11] * cospi_26_64 + step1[12] * cospi_6_64;
|
|
|
|
|
temp1 = step1[11] * (tran_high_t)cospi_6_64 -
|
|
|
|
|
step1[12] * (tran_high_t)cospi_26_64;
|
|
|
|
|
temp2 = step1[11] * (tran_high_t)cospi_26_64 +
|
|
|
|
|
step1[12] * (tran_high_t)cospi_6_64;
|
|
|
|
|
step2[11] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step2[12] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
|
|
|
|
@ -1937,12 +1953,16 @@ void vpx_highbd_idct16_c(const tran_low_t *input, tran_low_t *output, int bd) {
|
|
|
|
|
step1[2] = step2[2];
|
|
|
|
|
step1[3] = step2[3];
|
|
|
|
|
|
|
|
|
|
temp1 = step2[4] * cospi_28_64 - step2[7] * cospi_4_64;
|
|
|
|
|
temp2 = step2[4] * cospi_4_64 + step2[7] * cospi_28_64;
|
|
|
|
|
temp1 =
|
|
|
|
|
step2[4] * (tran_high_t)cospi_28_64 - step2[7] * (tran_high_t)cospi_4_64;
|
|
|
|
|
temp2 =
|
|
|
|
|
step2[4] * (tran_high_t)cospi_4_64 + step2[7] * (tran_high_t)cospi_28_64;
|
|
|
|
|
step1[4] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step1[7] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
temp1 = step2[5] * cospi_12_64 - step2[6] * cospi_20_64;
|
|
|
|
|
temp2 = step2[5] * cospi_20_64 + step2[6] * cospi_12_64;
|
|
|
|
|
temp1 =
|
|
|
|
|
step2[5] * (tran_high_t)cospi_12_64 - step2[6] * (tran_high_t)cospi_20_64;
|
|
|
|
|
temp2 =
|
|
|
|
|
step2[5] * (tran_high_t)cospi_20_64 + step2[6] * (tran_high_t)cospi_12_64;
|
|
|
|
|
step1[5] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step1[6] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
|
|
|
|
@ -1956,12 +1976,14 @@ void vpx_highbd_idct16_c(const tran_low_t *input, tran_low_t *output, int bd) {
|
|
|
|
|
step1[15] = HIGHBD_WRAPLOW(step2[14] + step2[15], bd);
|
|
|
|
|
|
|
|
|
|
// stage 4
|
|
|
|
|
temp1 = (step1[0] + step1[1]) * cospi_16_64;
|
|
|
|
|
temp2 = (step1[0] - step1[1]) * cospi_16_64;
|
|
|
|
|
temp1 = (step1[0] + step1[1]) * (tran_high_t)cospi_16_64;
|
|
|
|
|
temp2 = (step1[0] - step1[1]) * (tran_high_t)cospi_16_64;
|
|
|
|
|
step2[0] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step2[1] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
temp1 = step1[2] * cospi_24_64 - step1[3] * cospi_8_64;
|
|
|
|
|
temp2 = step1[2] * cospi_8_64 + step1[3] * cospi_24_64;
|
|
|
|
|
temp1 =
|
|
|
|
|
step1[2] * (tran_high_t)cospi_24_64 - step1[3] * (tran_high_t)cospi_8_64;
|
|
|
|
|
temp2 =
|
|
|
|
|
step1[2] * (tran_high_t)cospi_8_64 + step1[3] * (tran_high_t)cospi_24_64;
|
|
|
|
|
step2[2] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step2[3] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
step2[4] = HIGHBD_WRAPLOW(step1[4] + step1[5], bd);
|
|
|
|
@ -1971,12 +1993,16 @@ void vpx_highbd_idct16_c(const tran_low_t *input, tran_low_t *output, int bd) {
|
|
|
|
|
|
|
|
|
|
step2[8] = step1[8];
|
|
|
|
|
step2[15] = step1[15];
|
|
|
|
|
temp1 = -step1[9] * cospi_8_64 + step1[14] * cospi_24_64;
|
|
|
|
|
temp2 = step1[9] * cospi_24_64 + step1[14] * cospi_8_64;
|
|
|
|
|
temp1 = -step1[9] * (tran_high_t)cospi_8_64 +
|
|
|
|
|
step1[14] * (tran_high_t)cospi_24_64;
|
|
|
|
|
temp2 =
|
|
|
|
|
step1[9] * (tran_high_t)cospi_24_64 + step1[14] * (tran_high_t)cospi_8_64;
|
|
|
|
|
step2[9] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step2[14] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
temp1 = -step1[10] * cospi_24_64 - step1[13] * cospi_8_64;
|
|
|
|
|
temp2 = -step1[10] * cospi_8_64 + step1[13] * cospi_24_64;
|
|
|
|
|
temp1 = -step1[10] * (tran_high_t)cospi_24_64 -
|
|
|
|
|
step1[13] * (tran_high_t)cospi_8_64;
|
|
|
|
|
temp2 = -step1[10] * (tran_high_t)cospi_8_64 +
|
|
|
|
|
step1[13] * (tran_high_t)cospi_24_64;
|
|
|
|
|
step2[10] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step2[13] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
step2[11] = step1[11];
|
|
|
|
@ -1988,8 +2014,8 @@ void vpx_highbd_idct16_c(const tran_low_t *input, tran_low_t *output, int bd) {
|
|
|
|
|
step1[2] = HIGHBD_WRAPLOW(step2[1] - step2[2], bd);
|
|
|
|
|
step1[3] = HIGHBD_WRAPLOW(step2[0] - step2[3], bd);
|
|
|
|
|
step1[4] = step2[4];
|
|
|
|
|
temp1 = (step2[6] - step2[5]) * cospi_16_64;
|
|
|
|
|
temp2 = (step2[5] + step2[6]) * cospi_16_64;
|
|
|
|
|
temp1 = (step2[6] - step2[5]) * (tran_high_t)cospi_16_64;
|
|
|
|
|
temp2 = (step2[5] + step2[6]) * (tran_high_t)cospi_16_64;
|
|
|
|
|
step1[5] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step1[6] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
step1[7] = step2[7];
|
|
|
|
@ -2014,12 +2040,12 @@ void vpx_highbd_idct16_c(const tran_low_t *input, tran_low_t *output, int bd) {
|
|
|
|
|
step2[7] = HIGHBD_WRAPLOW(step1[0] - step1[7], bd);
|
|
|
|
|
step2[8] = step1[8];
|
|
|
|
|
step2[9] = step1[9];
|
|
|
|
|
temp1 = (-step1[10] + step1[13]) * cospi_16_64;
|
|
|
|
|
temp2 = (step1[10] + step1[13]) * cospi_16_64;
|
|
|
|
|
temp1 = (-step1[10] + step1[13]) * (tran_high_t)cospi_16_64;
|
|
|
|
|
temp2 = (step1[10] + step1[13]) * (tran_high_t)cospi_16_64;
|
|
|
|
|
step2[10] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step2[13] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
temp1 = (-step1[11] + step1[12]) * cospi_16_64;
|
|
|
|
|
temp2 = (step1[11] + step1[12]) * cospi_16_64;
|
|
|
|
|
temp1 = (-step1[11] + step1[12]) * (tran_high_t)cospi_16_64;
|
|
|
|
|
temp2 = (step1[11] + step1[12]) * (tran_high_t)cospi_16_64;
|
|
|
|
|
step2[11] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step2[12] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
step2[14] = step1[14];
|
|
|
|
@ -2127,10 +2153,11 @@ void vpx_highbd_idct16x16_1_add_c(const tran_low_t *input, uint16_t *dest,
|
|
|
|
|
int stride, int bd) {
|
|
|
|
|
int i, j;
|
|
|
|
|
tran_high_t a1;
|
|
|
|
|
tran_low_t out =
|
|
|
|
|
HIGHBD_WRAPLOW(dct_const_round_shift(input[0] * cospi_16_64), bd);
|
|
|
|
|
tran_low_t out = HIGHBD_WRAPLOW(
|
|
|
|
|
dct_const_round_shift(input[0] * (tran_high_t)cospi_16_64), bd);
|
|
|
|
|
|
|
|
|
|
out = HIGHBD_WRAPLOW(dct_const_round_shift(out * cospi_16_64), bd);
|
|
|
|
|
out =
|
|
|
|
|
HIGHBD_WRAPLOW(dct_const_round_shift(out * (tran_high_t)cospi_16_64), bd);
|
|
|
|
|
a1 = ROUND_POWER_OF_TWO(out, 6);
|
|
|
|
|
for (j = 0; j < 16; ++j) {
|
|
|
|
|
for (i = 0; i < 16; ++i) dest[i] = highbd_clip_pixel_add(dest[i], a1, bd);
|
|
|
|
@ -2170,43 +2197,59 @@ static void highbd_idct32_c(const tran_low_t *input, tran_low_t *output,
|
|
|
|
|
step1[14] = input[14];
|
|
|
|
|
step1[15] = input[30];
|
|
|
|
|
|
|
|
|
|
temp1 = input[1] * cospi_31_64 - input[31] * cospi_1_64;
|
|
|
|
|
temp2 = input[1] * cospi_1_64 + input[31] * cospi_31_64;
|
|
|
|
|
temp1 =
|
|
|
|
|
input[1] * (tran_high_t)cospi_31_64 - input[31] * (tran_high_t)cospi_1_64;
|
|
|
|
|
temp2 =
|
|
|
|
|
input[1] * (tran_high_t)cospi_1_64 + input[31] * (tran_high_t)cospi_31_64;
|
|
|
|
|
step1[16] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step1[31] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
|
|
|
|
|
temp1 = input[17] * cospi_15_64 - input[15] * cospi_17_64;
|
|
|
|
|
temp2 = input[17] * cospi_17_64 + input[15] * cospi_15_64;
|
|
|
|
|
temp1 = input[17] * (tran_high_t)cospi_15_64 -
|
|
|
|
|
input[15] * (tran_high_t)cospi_17_64;
|
|
|
|
|
temp2 = input[17] * (tran_high_t)cospi_17_64 +
|
|
|
|
|
input[15] * (tran_high_t)cospi_15_64;
|
|
|
|
|
step1[17] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step1[30] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
|
|
|
|
|
temp1 = input[9] * cospi_23_64 - input[23] * cospi_9_64;
|
|
|
|
|
temp2 = input[9] * cospi_9_64 + input[23] * cospi_23_64;
|
|
|
|
|
temp1 =
|
|
|
|
|
input[9] * (tran_high_t)cospi_23_64 - input[23] * (tran_high_t)cospi_9_64;
|
|
|
|
|
temp2 =
|
|
|
|
|
input[9] * (tran_high_t)cospi_9_64 + input[23] * (tran_high_t)cospi_23_64;
|
|
|
|
|
step1[18] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step1[29] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
|
|
|
|
|
temp1 = input[25] * cospi_7_64 - input[7] * cospi_25_64;
|
|
|
|
|
temp2 = input[25] * cospi_25_64 + input[7] * cospi_7_64;
|
|
|
|
|
temp1 =
|
|
|
|
|
input[25] * (tran_high_t)cospi_7_64 - input[7] * (tran_high_t)cospi_25_64;
|
|
|
|
|
temp2 =
|
|
|
|
|
input[25] * (tran_high_t)cospi_25_64 + input[7] * (tran_high_t)cospi_7_64;
|
|
|
|
|
step1[19] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step1[28] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
|
|
|
|
|
temp1 = input[5] * cospi_27_64 - input[27] * cospi_5_64;
|
|
|
|
|
temp2 = input[5] * cospi_5_64 + input[27] * cospi_27_64;
|
|
|
|
|
temp1 =
|
|
|
|
|
input[5] * (tran_high_t)cospi_27_64 - input[27] * (tran_high_t)cospi_5_64;
|
|
|
|
|
temp2 =
|
|
|
|
|
input[5] * (tran_high_t)cospi_5_64 + input[27] * (tran_high_t)cospi_27_64;
|
|
|
|
|
step1[20] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step1[27] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
|
|
|
|
|
temp1 = input[21] * cospi_11_64 - input[11] * cospi_21_64;
|
|
|
|
|
temp2 = input[21] * cospi_21_64 + input[11] * cospi_11_64;
|
|
|
|
|
temp1 = input[21] * (tran_high_t)cospi_11_64 -
|
|
|
|
|
input[11] * (tran_high_t)cospi_21_64;
|
|
|
|
|
temp2 = input[21] * (tran_high_t)cospi_21_64 +
|
|
|
|
|
input[11] * (tran_high_t)cospi_11_64;
|
|
|
|
|
step1[21] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step1[26] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
|
|
|
|
|
temp1 = input[13] * cospi_19_64 - input[19] * cospi_13_64;
|
|
|
|
|
temp2 = input[13] * cospi_13_64 + input[19] * cospi_19_64;
|
|
|
|
|
temp1 = input[13] * (tran_high_t)cospi_19_64 -
|
|
|
|
|
input[19] * (tran_high_t)cospi_13_64;
|
|
|
|
|
temp2 = input[13] * (tran_high_t)cospi_13_64 +
|
|
|
|
|
input[19] * (tran_high_t)cospi_19_64;
|
|
|
|
|
step1[22] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step1[25] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
|
|
|
|
|
temp1 = input[29] * cospi_3_64 - input[3] * cospi_29_64;
|
|
|
|
|
temp2 = input[29] * cospi_29_64 + input[3] * cospi_3_64;
|
|
|
|
|
temp1 =
|
|
|
|
|
input[29] * (tran_high_t)cospi_3_64 - input[3] * (tran_high_t)cospi_29_64;
|
|
|
|
|
temp2 =
|
|
|
|
|
input[29] * (tran_high_t)cospi_29_64 + input[3] * (tran_high_t)cospi_3_64;
|
|
|
|
|
step1[23] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step1[24] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
|
|
|
|
@ -2220,23 +2263,31 @@ static void highbd_idct32_c(const tran_low_t *input, tran_low_t *output,
|
|
|
|
|
step2[6] = step1[6];
|
|
|
|
|
step2[7] = step1[7];
|
|
|
|
|
|
|
|
|
|
temp1 = step1[8] * cospi_30_64 - step1[15] * cospi_2_64;
|
|
|
|
|
temp2 = step1[8] * cospi_2_64 + step1[15] * cospi_30_64;
|
|
|
|
|
temp1 =
|
|
|
|
|
step1[8] * (tran_high_t)cospi_30_64 - step1[15] * (tran_high_t)cospi_2_64;
|
|
|
|
|
temp2 =
|
|
|
|
|
step1[8] * (tran_high_t)cospi_2_64 + step1[15] * (tran_high_t)cospi_30_64;
|
|
|
|
|
step2[8] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step2[15] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
|
|
|
|
|
temp1 = step1[9] * cospi_14_64 - step1[14] * cospi_18_64;
|
|
|
|
|
temp2 = step1[9] * cospi_18_64 + step1[14] * cospi_14_64;
|
|
|
|
|
temp1 = step1[9] * (tran_high_t)cospi_14_64 -
|
|
|
|
|
step1[14] * (tran_high_t)cospi_18_64;
|
|
|
|
|
temp2 = step1[9] * (tran_high_t)cospi_18_64 +
|
|
|
|
|
step1[14] * (tran_high_t)cospi_14_64;
|
|
|
|
|
step2[9] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step2[14] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
|
|
|
|
|
temp1 = step1[10] * cospi_22_64 - step1[13] * cospi_10_64;
|
|
|
|
|
temp2 = step1[10] * cospi_10_64 + step1[13] * cospi_22_64;
|
|
|
|
|
temp1 = step1[10] * (tran_high_t)cospi_22_64 -
|
|
|
|
|
step1[13] * (tran_high_t)cospi_10_64;
|
|
|
|
|
temp2 = step1[10] * (tran_high_t)cospi_10_64 +
|
|
|
|
|
step1[13] * (tran_high_t)cospi_22_64;
|
|
|
|
|
step2[10] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step2[13] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
|
|
|
|
|
temp1 = step1[11] * cospi_6_64 - step1[12] * cospi_26_64;
|
|
|
|
|
temp2 = step1[11] * cospi_26_64 + step1[12] * cospi_6_64;
|
|
|
|
|
temp1 = step1[11] * (tran_high_t)cospi_6_64 -
|
|
|
|
|
step1[12] * (tran_high_t)cospi_26_64;
|
|
|
|
|
temp2 = step1[11] * (tran_high_t)cospi_26_64 +
|
|
|
|
|
step1[12] * (tran_high_t)cospi_6_64;
|
|
|
|
|
step2[11] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step2[12] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
|
|
|
|
@ -2263,12 +2314,16 @@ static void highbd_idct32_c(const tran_low_t *input, tran_low_t *output,
|
|
|
|
|
step1[2] = step2[2];
|
|
|
|
|
step1[3] = step2[3];
|
|
|
|
|
|
|
|
|
|
temp1 = step2[4] * cospi_28_64 - step2[7] * cospi_4_64;
|
|
|
|
|
temp2 = step2[4] * cospi_4_64 + step2[7] * cospi_28_64;
|
|
|
|
|
temp1 =
|
|
|
|
|
step2[4] * (tran_high_t)cospi_28_64 - step2[7] * (tran_high_t)cospi_4_64;
|
|
|
|
|
temp2 =
|
|
|
|
|
step2[4] * (tran_high_t)cospi_4_64 + step2[7] * (tran_high_t)cospi_28_64;
|
|
|
|
|
step1[4] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step1[7] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
temp1 = step2[5] * cospi_12_64 - step2[6] * cospi_20_64;
|
|
|
|
|
temp2 = step2[5] * cospi_20_64 + step2[6] * cospi_12_64;
|
|
|
|
|
temp1 =
|
|
|
|
|
step2[5] * (tran_high_t)cospi_12_64 - step2[6] * (tran_high_t)cospi_20_64;
|
|
|
|
|
temp2 =
|
|
|
|
|
step2[5] * (tran_high_t)cospi_20_64 + step2[6] * (tran_high_t)cospi_12_64;
|
|
|
|
|
step1[5] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step1[6] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
|
|
|
|
@ -2283,22 +2338,30 @@ static void highbd_idct32_c(const tran_low_t *input, tran_low_t *output,
|
|
|
|
|
|
|
|
|
|
step1[16] = step2[16];
|
|
|
|
|
step1[31] = step2[31];
|
|
|
|
|
temp1 = -step2[17] * cospi_4_64 + step2[30] * cospi_28_64;
|
|
|
|
|
temp2 = step2[17] * cospi_28_64 + step2[30] * cospi_4_64;
|
|
|
|
|
temp1 = -step2[17] * (tran_high_t)cospi_4_64 +
|
|
|
|
|
step2[30] * (tran_high_t)cospi_28_64;
|
|
|
|
|
temp2 = step2[17] * (tran_high_t)cospi_28_64 +
|
|
|
|
|
step2[30] * (tran_high_t)cospi_4_64;
|
|
|
|
|
step1[17] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step1[30] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
temp1 = -step2[18] * cospi_28_64 - step2[29] * cospi_4_64;
|
|
|
|
|
temp2 = -step2[18] * cospi_4_64 + step2[29] * cospi_28_64;
|
|
|
|
|
temp1 = -step2[18] * (tran_high_t)cospi_28_64 -
|
|
|
|
|
step2[29] * (tran_high_t)cospi_4_64;
|
|
|
|
|
temp2 = -step2[18] * (tran_high_t)cospi_4_64 +
|
|
|
|
|
step2[29] * (tran_high_t)cospi_28_64;
|
|
|
|
|
step1[18] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step1[29] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
step1[19] = step2[19];
|
|
|
|
|
step1[20] = step2[20];
|
|
|
|
|
temp1 = -step2[21] * cospi_20_64 + step2[26] * cospi_12_64;
|
|
|
|
|
temp2 = step2[21] * cospi_12_64 + step2[26] * cospi_20_64;
|
|
|
|
|
temp1 = -step2[21] * (tran_high_t)cospi_20_64 +
|
|
|
|
|
step2[26] * (tran_high_t)cospi_12_64;
|
|
|
|
|
temp2 = step2[21] * (tran_high_t)cospi_12_64 +
|
|
|
|
|
step2[26] * (tran_high_t)cospi_20_64;
|
|
|
|
|
step1[21] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step1[26] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
temp1 = -step2[22] * cospi_12_64 - step2[25] * cospi_20_64;
|
|
|
|
|
temp2 = -step2[22] * cospi_20_64 + step2[25] * cospi_12_64;
|
|
|
|
|
temp1 = -step2[22] * (tran_high_t)cospi_12_64 -
|
|
|
|
|
step2[25] * (tran_high_t)cospi_20_64;
|
|
|
|
|
temp2 = -step2[22] * (tran_high_t)cospi_20_64 +
|
|
|
|
|
step2[25] * (tran_high_t)cospi_12_64;
|
|
|
|
|
step1[22] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step1[25] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
step1[23] = step2[23];
|
|
|
|
@ -2307,12 +2370,14 @@ static void highbd_idct32_c(const tran_low_t *input, tran_low_t *output,
|
|
|
|
|
step1[28] = step2[28];
|
|
|
|
|
|
|
|
|
|
// stage 4
|
|
|
|
|
temp1 = (step1[0] + step1[1]) * cospi_16_64;
|
|
|
|
|
temp2 = (step1[0] - step1[1]) * cospi_16_64;
|
|
|
|
|
temp1 = (step1[0] + step1[1]) * (tran_high_t)cospi_16_64;
|
|
|
|
|
temp2 = (step1[0] - step1[1]) * (tran_high_t)cospi_16_64;
|
|
|
|
|
step2[0] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step2[1] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
temp1 = step1[2] * cospi_24_64 - step1[3] * cospi_8_64;
|
|
|
|
|
temp2 = step1[2] * cospi_8_64 + step1[3] * cospi_24_64;
|
|
|
|
|
temp1 =
|
|
|
|
|
step1[2] * (tran_high_t)cospi_24_64 - step1[3] * (tran_high_t)cospi_8_64;
|
|
|
|
|
temp2 =
|
|
|
|
|
step1[2] * (tran_high_t)cospi_8_64 + step1[3] * (tran_high_t)cospi_24_64;
|
|
|
|
|
step2[2] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step2[3] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
step2[4] = HIGHBD_WRAPLOW(step1[4] + step1[5], bd);
|
|
|
|
@ -2322,12 +2387,16 @@ static void highbd_idct32_c(const tran_low_t *input, tran_low_t *output,
|
|
|
|
|
|
|
|
|
|
step2[8] = step1[8];
|
|
|
|
|
step2[15] = step1[15];
|
|
|
|
|
temp1 = -step1[9] * cospi_8_64 + step1[14] * cospi_24_64;
|
|
|
|
|
temp2 = step1[9] * cospi_24_64 + step1[14] * cospi_8_64;
|
|
|
|
|
temp1 = -step1[9] * (tran_high_t)cospi_8_64 +
|
|
|
|
|
step1[14] * (tran_high_t)cospi_24_64;
|
|
|
|
|
temp2 =
|
|
|
|
|
step1[9] * (tran_high_t)cospi_24_64 + step1[14] * (tran_high_t)cospi_8_64;
|
|
|
|
|
step2[9] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step2[14] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
temp1 = -step1[10] * cospi_24_64 - step1[13] * cospi_8_64;
|
|
|
|
|
temp2 = -step1[10] * cospi_8_64 + step1[13] * cospi_24_64;
|
|
|
|
|
temp1 = -step1[10] * (tran_high_t)cospi_24_64 -
|
|
|
|
|
step1[13] * (tran_high_t)cospi_8_64;
|
|
|
|
|
temp2 = -step1[10] * (tran_high_t)cospi_8_64 +
|
|
|
|
|
step1[13] * (tran_high_t)cospi_24_64;
|
|
|
|
|
step2[10] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step2[13] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
step2[11] = step1[11];
|
|
|
|
@ -2357,8 +2426,8 @@ static void highbd_idct32_c(const tran_low_t *input, tran_low_t *output,
|
|
|
|
|
step1[2] = HIGHBD_WRAPLOW(step2[1] - step2[2], bd);
|
|
|
|
|
step1[3] = HIGHBD_WRAPLOW(step2[0] - step2[3], bd);
|
|
|
|
|
step1[4] = step2[4];
|
|
|
|
|
temp1 = (step2[6] - step2[5]) * cospi_16_64;
|
|
|
|
|
temp2 = (step2[5] + step2[6]) * cospi_16_64;
|
|
|
|
|
temp1 = (step2[6] - step2[5]) * (tran_high_t)cospi_16_64;
|
|
|
|
|
temp2 = (step2[5] + step2[6]) * (tran_high_t)cospi_16_64;
|
|
|
|
|
step1[5] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step1[6] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
step1[7] = step2[7];
|
|
|
|
@ -2374,20 +2443,28 @@ static void highbd_idct32_c(const tran_low_t *input, tran_low_t *output,
|
|
|
|
|
|
|
|
|
|
step1[16] = step2[16];
|
|
|
|
|
step1[17] = step2[17];
|
|
|
|
|
temp1 = -step2[18] * cospi_8_64 + step2[29] * cospi_24_64;
|
|
|
|
|
temp2 = step2[18] * cospi_24_64 + step2[29] * cospi_8_64;
|
|
|
|
|
temp1 = -step2[18] * (tran_high_t)cospi_8_64 +
|
|
|
|
|
step2[29] * (tran_high_t)cospi_24_64;
|
|
|
|
|
temp2 = step2[18] * (tran_high_t)cospi_24_64 +
|
|
|
|
|
step2[29] * (tran_high_t)cospi_8_64;
|
|
|
|
|
step1[18] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step1[29] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
temp1 = -step2[19] * cospi_8_64 + step2[28] * cospi_24_64;
|
|
|
|
|
temp2 = step2[19] * cospi_24_64 + step2[28] * cospi_8_64;
|
|
|
|
|
temp1 = -step2[19] * (tran_high_t)cospi_8_64 +
|
|
|
|
|
step2[28] * (tran_high_t)cospi_24_64;
|
|
|
|
|
temp2 = step2[19] * (tran_high_t)cospi_24_64 +
|
|
|
|
|
step2[28] * (tran_high_t)cospi_8_64;
|
|
|
|
|
step1[19] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step1[28] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
temp1 = -step2[20] * cospi_24_64 - step2[27] * cospi_8_64;
|
|
|
|
|
temp2 = -step2[20] * cospi_8_64 + step2[27] * cospi_24_64;
|
|
|
|
|
temp1 = -step2[20] * (tran_high_t)cospi_24_64 -
|
|
|
|
|
step2[27] * (tran_high_t)cospi_8_64;
|
|
|
|
|
temp2 = -step2[20] * (tran_high_t)cospi_8_64 +
|
|
|
|
|
step2[27] * (tran_high_t)cospi_24_64;
|
|
|
|
|
step1[20] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step1[27] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
temp1 = -step2[21] * cospi_24_64 - step2[26] * cospi_8_64;
|
|
|
|
|
temp2 = -step2[21] * cospi_8_64 + step2[26] * cospi_24_64;
|
|
|
|
|
temp1 = -step2[21] * (tran_high_t)cospi_24_64 -
|
|
|
|
|
step2[26] * (tran_high_t)cospi_8_64;
|
|
|
|
|
temp2 = -step2[21] * (tran_high_t)cospi_8_64 +
|
|
|
|
|
step2[26] * (tran_high_t)cospi_24_64;
|
|
|
|
|
step1[21] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step1[26] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
step1[22] = step2[22];
|
|
|
|
@ -2408,12 +2485,12 @@ static void highbd_idct32_c(const tran_low_t *input, tran_low_t *output,
|
|
|
|
|
step2[7] = HIGHBD_WRAPLOW(step1[0] - step1[7], bd);
|
|
|
|
|
step2[8] = step1[8];
|
|
|
|
|
step2[9] = step1[9];
|
|
|
|
|
temp1 = (-step1[10] + step1[13]) * cospi_16_64;
|
|
|
|
|
temp2 = (step1[10] + step1[13]) * cospi_16_64;
|
|
|
|
|
temp1 = (-step1[10] + step1[13]) * (tran_high_t)cospi_16_64;
|
|
|
|
|
temp2 = (step1[10] + step1[13]) * (tran_high_t)cospi_16_64;
|
|
|
|
|
step2[10] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step2[13] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
temp1 = (-step1[11] + step1[12]) * cospi_16_64;
|
|
|
|
|
temp2 = (step1[11] + step1[12]) * cospi_16_64;
|
|
|
|
|
temp1 = (-step1[11] + step1[12]) * (tran_high_t)cospi_16_64;
|
|
|
|
|
temp2 = (step1[11] + step1[12]) * (tran_high_t)cospi_16_64;
|
|
|
|
|
step2[11] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step2[12] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
step2[14] = step1[14];
|
|
|
|
@ -2459,20 +2536,20 @@ static void highbd_idct32_c(const tran_low_t *input, tran_low_t *output,
|
|
|
|
|
step1[17] = step2[17];
|
|
|
|
|
step1[18] = step2[18];
|
|
|
|
|
step1[19] = step2[19];
|
|
|
|
|
temp1 = (-step2[20] + step2[27]) * cospi_16_64;
|
|
|
|
|
temp2 = (step2[20] + step2[27]) * cospi_16_64;
|
|
|
|
|
temp1 = (-step2[20] + step2[27]) * (tran_high_t)cospi_16_64;
|
|
|
|
|
temp2 = (step2[20] + step2[27]) * (tran_high_t)cospi_16_64;
|
|
|
|
|
step1[20] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step1[27] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
temp1 = (-step2[21] + step2[26]) * cospi_16_64;
|
|
|
|
|
temp2 = (step2[21] + step2[26]) * cospi_16_64;
|
|
|
|
|
temp1 = (-step2[21] + step2[26]) * (tran_high_t)cospi_16_64;
|
|
|
|
|
temp2 = (step2[21] + step2[26]) * (tran_high_t)cospi_16_64;
|
|
|
|
|
step1[21] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step1[26] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
temp1 = (-step2[22] + step2[25]) * cospi_16_64;
|
|
|
|
|
temp2 = (step2[22] + step2[25]) * cospi_16_64;
|
|
|
|
|
temp1 = (-step2[22] + step2[25]) * (tran_high_t)cospi_16_64;
|
|
|
|
|
temp2 = (step2[22] + step2[25]) * (tran_high_t)cospi_16_64;
|
|
|
|
|
step1[22] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step1[25] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
temp1 = (-step2[23] + step2[24]) * cospi_16_64;
|
|
|
|
|
temp2 = (step2[23] + step2[24]) * cospi_16_64;
|
|
|
|
|
temp1 = (-step2[23] + step2[24]) * (tran_high_t)cospi_16_64;
|
|
|
|
|
temp2 = (step2[23] + step2[24]) * (tran_high_t)cospi_16_64;
|
|
|
|
|
step1[23] = HIGHBD_WRAPLOW(dct_const_round_shift(temp1), bd);
|
|
|
|
|
step1[24] = HIGHBD_WRAPLOW(dct_const_round_shift(temp2), bd);
|
|
|
|
|
step1[28] = step2[28];
|
|
|
|
@ -2604,10 +2681,11 @@ void vpx_highbd_idct32x32_1_add_c(const tran_low_t *input, uint16_t *dest,
|
|
|
|
|
int stride, int bd) {
|
|
|
|
|
int i, j;
|
|
|
|
|
int a1;
|
|
|
|
|
tran_low_t out =
|
|
|
|
|
HIGHBD_WRAPLOW(dct_const_round_shift(input[0] * cospi_16_64), bd);
|
|
|
|
|
tran_low_t out = HIGHBD_WRAPLOW(
|
|
|
|
|
dct_const_round_shift(input[0] * (tran_high_t)cospi_16_64), bd);
|
|
|
|
|
|
|
|
|
|
out = HIGHBD_WRAPLOW(dct_const_round_shift(out * cospi_16_64), bd);
|
|
|
|
|
out =
|
|
|
|
|
HIGHBD_WRAPLOW(dct_const_round_shift(out * (tran_high_t)cospi_16_64), bd);
|
|
|
|
|
a1 = ROUND_POWER_OF_TWO(out, 6);
|
|
|
|
|
|
|
|
|
|
for (j = 0; j < 32; ++j) {
|
|
|
|
|