v_t2_hi = vmlal_n_s16(v_t2_hi, vget_high_s16(v_x3), (int16_t)cospi_8_64);
v_t3_lo = vmlsl_n_s16(v_t3_lo, vget_low_s16(v_x2), (int16_t)cospi_8_64);
v_t3_hi = vmlsl_n_s16(v_t3_hi, vget_high_s16(v_x2), (int16_t)cospi_8_64);
- v_t0_lo = vmulq_n_s32(v_t0_lo, (int32_t)cospi_16_64);
- v_t0_hi = vmulq_n_s32(v_t0_hi, (int32_t)cospi_16_64);
- v_t1_lo = vmulq_n_s32(v_t1_lo, (int32_t)cospi_16_64);
- v_t1_hi = vmulq_n_s32(v_t1_hi, (int32_t)cospi_16_64);
+ v_t0_lo = vmulq_n_s32(v_t0_lo, cospi_16_64);
+ v_t0_hi = vmulq_n_s32(v_t0_hi, cospi_16_64);
+ v_t1_lo = vmulq_n_s32(v_t1_lo, cospi_16_64);
+ v_t1_hi = vmulq_n_s32(v_t1_hi, cospi_16_64);
{
const int16x4_t a = vrshrn_n_s32(v_t0_lo, DCT_CONST_BITS);
const int16x4_t b = vrshrn_n_s32(v_t0_hi, DCT_CONST_BITS);
__m128i step1[16], step2[16];
// stage 2
- highbd_butterfly_sse2(io[1], io[15], (int)cospi_30_64, (int)cospi_2_64,
- &step2[8], &step2[15]);
- highbd_butterfly_sse2(io[9], io[7], (int)cospi_14_64, (int)cospi_18_64,
- &step2[9], &step2[14]);
- highbd_butterfly_sse2(io[5], io[11], (int)cospi_22_64, (int)cospi_10_64,
- &step2[10], &step2[13]);
- highbd_butterfly_sse2(io[13], io[3], (int)cospi_6_64, (int)cospi_26_64,
- &step2[11], &step2[12]);
+ highbd_butterfly_sse2(io[1], io[15], cospi_30_64, cospi_2_64, &step2[8],
+ &step2[15]);
+ highbd_butterfly_sse2(io[9], io[7], cospi_14_64, cospi_18_64, &step2[9],
+ &step2[14]);
+ highbd_butterfly_sse2(io[5], io[11], cospi_22_64, cospi_10_64, &step2[10],
+ &step2[13]);
+ highbd_butterfly_sse2(io[13], io[3], cospi_6_64, cospi_26_64, &step2[11],
+ &step2[12]);
// stage 3
- highbd_butterfly_sse2(io[2], io[14], (int)cospi_28_64, (int)cospi_4_64,
- &step1[4], &step1[7]);
- highbd_butterfly_sse2(io[10], io[6], (int)cospi_12_64, (int)cospi_20_64,
- &step1[5], &step1[6]);
+ highbd_butterfly_sse2(io[2], io[14], cospi_28_64, cospi_4_64, &step1[4],
+ &step1[7]);
+ highbd_butterfly_sse2(io[10], io[6], cospi_12_64, cospi_20_64, &step1[5],
+ &step1[6]);
step1[8] = _mm_add_epi32(step2[8], step2[9]);
step1[9] = _mm_sub_epi32(step2[8], step2[9]);
step1[10] = _mm_sub_epi32(step2[10], step2[11]); // step1[10] = -step1[10]
// stage 4
highbd_butterfly_cospi16_sse2(io[0], io[8], &step2[0], &step2[1]);
- highbd_butterfly_sse2(io[4], io[12], (int)cospi_24_64, (int)cospi_8_64,
- &step2[2], &step2[3]);
- highbd_butterfly_sse2(step1[14], step1[9], (int)cospi_24_64, (int)cospi_8_64,
- &step2[9], &step2[14]);
- highbd_butterfly_sse2(step1[10], step1[13], (int)cospi_8_64, (int)cospi_24_64,
+ highbd_butterfly_sse2(io[4], io[12], cospi_24_64, cospi_8_64, &step2[2],
+ &step2[3]);
+ highbd_butterfly_sse2(step1[14], step1[9], cospi_24_64, cospi_8_64, &step2[9],
+ &step2[14]);
+ highbd_butterfly_sse2(step1[10], step1[13], cospi_8_64, cospi_24_64,
&step2[13], &step2[10]);
step2[5] = _mm_sub_epi32(step1[4], step1[5]);
step1[4] = _mm_add_epi32(step1[4], step1[5]);
__m128i temp1[2], sign[2];
// stage 2
- highbd_partial_butterfly_sse2(io[1], (int)cospi_30_64, (int)cospi_2_64,
- &step2[8], &step2[15]);
- highbd_partial_butterfly_neg_sse2(io[7], (int)cospi_14_64, (int)cospi_18_64,
- &step2[9], &step2[14]);
- highbd_partial_butterfly_sse2(io[5], (int)cospi_22_64, (int)cospi_10_64,
- &step2[10], &step2[13]);
- highbd_partial_butterfly_neg_sse2(io[3], (int)cospi_6_64, (int)cospi_26_64,
- &step2[11], &step2[12]);
+ highbd_partial_butterfly_sse2(io[1], cospi_30_64, cospi_2_64, &step2[8],
+ &step2[15]);
+ highbd_partial_butterfly_neg_sse2(io[7], cospi_14_64, cospi_18_64, &step2[9],
+ &step2[14]);
+ highbd_partial_butterfly_sse2(io[5], cospi_22_64, cospi_10_64, &step2[10],
+ &step2[13]);
+ highbd_partial_butterfly_neg_sse2(io[3], cospi_6_64, cospi_26_64, &step2[11],
+ &step2[12]);
// stage 3
- highbd_partial_butterfly_sse2(io[2], (int)cospi_28_64, (int)cospi_4_64,
- &step1[4], &step1[7]);
- highbd_partial_butterfly_neg_sse2(io[6], (int)cospi_12_64, (int)cospi_20_64,
- &step1[5], &step1[6]);
+ highbd_partial_butterfly_sse2(io[2], cospi_28_64, cospi_4_64, &step1[4],
+ &step1[7]);
+ highbd_partial_butterfly_neg_sse2(io[6], cospi_12_64, cospi_20_64, &step1[5],
+ &step1[6]);
step1[8] = _mm_add_epi32(step2[8], step2[9]);
step1[9] = _mm_sub_epi32(step2[8], step2[9]);
step1[10] = _mm_sub_epi32(step2[10], step2[11]); // step1[10] = -step1[10]
// stage 4
abs_extend_64bit_sse2(io[0], temp1, sign);
- step2[0] = multiplication_round_shift_sse2(temp1, sign, (int)cospi_16_64);
+ step2[0] = multiplication_round_shift_sse2(temp1, sign, cospi_16_64);
step2[1] = step2[0];
- highbd_partial_butterfly_sse2(io[4], (int)cospi_24_64, (int)cospi_8_64,
- &step2[2], &step2[3]);
- highbd_butterfly_sse2(step1[14], step1[9], (int)cospi_24_64, (int)cospi_8_64,
- &step2[9], &step2[14]);
- highbd_butterfly_sse2(step1[10], step1[13], (int)cospi_8_64, (int)cospi_24_64,
+ highbd_partial_butterfly_sse2(io[4], cospi_24_64, cospi_8_64, &step2[2],
+ &step2[3]);
+ highbd_butterfly_sse2(step1[14], step1[9], cospi_24_64, cospi_8_64, &step2[9],
+ &step2[14]);
+ highbd_butterfly_sse2(step1[10], step1[13], cospi_8_64, cospi_24_64,
&step2[13], &step2[10]);
step2[5] = _mm_sub_epi32(step1[4], step1[5]);
step1[4] = _mm_add_epi32(step1[4], step1[5]);
__m128i temp[2], sign[2];
// stage 2
- highbd_partial_butterfly_sse2(io[1], (int)cospi_30_64, (int)cospi_2_64,
- &step2[8], &step2[15]);
- highbd_partial_butterfly_neg_sse2(io[3], (int)cospi_6_64, (int)cospi_26_64,
- &step2[11], &step2[12]);
+ highbd_partial_butterfly_sse2(io[1], cospi_30_64, cospi_2_64, &step2[8],
+ &step2[15]);
+ highbd_partial_butterfly_neg_sse2(io[3], cospi_6_64, cospi_26_64, &step2[11],
+ &step2[12]);
// stage 3
- highbd_partial_butterfly_sse2(io[2], (int)cospi_28_64, (int)cospi_4_64,
- &step1[4], &step1[7]);
+ highbd_partial_butterfly_sse2(io[2], cospi_28_64, cospi_4_64, &step1[4],
+ &step1[7]);
step1[8] = step2[8];
step1[9] = step2[8];
step1[10] =
// stage 4
abs_extend_64bit_sse2(io[0], temp, sign);
- step2[0] = multiplication_round_shift_sse2(temp, sign, (int)cospi_16_64);
+ step2[0] = multiplication_round_shift_sse2(temp, sign, cospi_16_64);
step2[1] = step2[0];
step2[2] = _mm_setzero_si128();
step2[3] = _mm_setzero_si128();
- highbd_butterfly_sse2(step1[14], step1[9], (int)cospi_24_64, (int)cospi_8_64,
- &step2[9], &step2[14]);
- highbd_butterfly_sse2(step1[10], step1[13], (int)cospi_8_64, (int)cospi_24_64,
+ highbd_butterfly_sse2(step1[14], step1[9], cospi_24_64, cospi_8_64, &step2[9],
+ &step2[14]);
+ highbd_butterfly_sse2(step1[10], step1[13], cospi_8_64, cospi_24_64,
&step2[13], &step2[10]);
step2[5] = step1[4];
step2[6] = step1[7];
__m128i step1[16], step2[16];
// stage 2
- highbd_butterfly_sse4_1(io[1], io[15], (int)cospi_30_64, (int)cospi_2_64,
- &step2[8], &step2[15]);
- highbd_butterfly_sse4_1(io[9], io[7], (int)cospi_14_64, (int)cospi_18_64,
- &step2[9], &step2[14]);
- highbd_butterfly_sse4_1(io[5], io[11], (int)cospi_22_64, (int)cospi_10_64,
- &step2[10], &step2[13]);
- highbd_butterfly_sse4_1(io[13], io[3], (int)cospi_6_64, (int)cospi_26_64,
- &step2[11], &step2[12]);
+ highbd_butterfly_sse4_1(io[1], io[15], cospi_30_64, cospi_2_64, &step2[8],
+ &step2[15]);
+ highbd_butterfly_sse4_1(io[9], io[7], cospi_14_64, cospi_18_64, &step2[9],
+ &step2[14]);
+ highbd_butterfly_sse4_1(io[5], io[11], cospi_22_64, cospi_10_64, &step2[10],
+ &step2[13]);
+ highbd_butterfly_sse4_1(io[13], io[3], cospi_6_64, cospi_26_64, &step2[11],
+ &step2[12]);
// stage 3
- highbd_butterfly_sse4_1(io[2], io[14], (int)cospi_28_64, (int)cospi_4_64,
- &step1[4], &step1[7]);
- highbd_butterfly_sse4_1(io[10], io[6], (int)cospi_12_64, (int)cospi_20_64,
- &step1[5], &step1[6]);
+ highbd_butterfly_sse4_1(io[2], io[14], cospi_28_64, cospi_4_64, &step1[4],
+ &step1[7]);
+ highbd_butterfly_sse4_1(io[10], io[6], cospi_12_64, cospi_20_64, &step1[5],
+ &step1[6]);
step1[8] = _mm_add_epi32(step2[8], step2[9]);
step1[9] = _mm_sub_epi32(step2[8], step2[9]);
step1[10] = _mm_sub_epi32(step2[11], step2[10]);
// stage 4
highbd_butterfly_cospi16_sse4_1(io[0], io[8], &step2[0], &step2[1]);
- highbd_butterfly_sse4_1(io[4], io[12], (int)cospi_24_64, (int)cospi_8_64,
- &step2[2], &step2[3]);
- highbd_butterfly_sse4_1(step1[14], step1[9], (int)cospi_24_64,
- (int)cospi_8_64, &step2[9], &step2[14]);
- highbd_butterfly_sse4_1(step1[10], step1[13], -(int)cospi_8_64,
- -(int)cospi_24_64, &step2[13], &step2[10]);
+ highbd_butterfly_sse4_1(io[4], io[12], cospi_24_64, cospi_8_64, &step2[2],
+ &step2[3]);
+ highbd_butterfly_sse4_1(step1[14], step1[9], cospi_24_64, cospi_8_64,
+ &step2[9], &step2[14]);
+ highbd_butterfly_sse4_1(step1[10], step1[13], -cospi_8_64, -cospi_24_64,
+ &step2[13], &step2[10]);
step2[5] = _mm_sub_epi32(step1[4], step1[5]);
step1[4] = _mm_add_epi32(step1[4], step1[5]);
step2[6] = _mm_sub_epi32(step1[7], step1[6]);
__m128i temp1[2];
// stage 2
- highbd_partial_butterfly_sse4_1(io[1], (int)cospi_30_64, (int)cospi_2_64,
- &step2[8], &step2[15]);
- highbd_partial_butterfly_sse4_1(io[7], -(int)cospi_18_64, (int)cospi_14_64,
- &step2[9], &step2[14]);
- highbd_partial_butterfly_sse4_1(io[5], (int)cospi_22_64, (int)cospi_10_64,
- &step2[10], &step2[13]);
- highbd_partial_butterfly_sse4_1(io[3], -(int)cospi_26_64, (int)cospi_6_64,
- &step2[11], &step2[12]);
+ highbd_partial_butterfly_sse4_1(io[1], cospi_30_64, cospi_2_64, &step2[8],
+ &step2[15]);
+ highbd_partial_butterfly_sse4_1(io[7], -cospi_18_64, cospi_14_64, &step2[9],
+ &step2[14]);
+ highbd_partial_butterfly_sse4_1(io[5], cospi_22_64, cospi_10_64, &step2[10],
+ &step2[13]);
+ highbd_partial_butterfly_sse4_1(io[3], -cospi_26_64, cospi_6_64, &step2[11],
+ &step2[12]);
// stage 3
- highbd_partial_butterfly_sse4_1(io[2], (int)cospi_28_64, (int)cospi_4_64,
- &step1[4], &step1[7]);
- highbd_partial_butterfly_sse4_1(io[6], -(int)cospi_20_64, (int)cospi_12_64,
- &step1[5], &step1[6]);
+ highbd_partial_butterfly_sse4_1(io[2], cospi_28_64, cospi_4_64, &step1[4],
+ &step1[7]);
+ highbd_partial_butterfly_sse4_1(io[6], -cospi_20_64, cospi_12_64, &step1[5],
+ &step1[6]);
step1[8] = _mm_add_epi32(step2[8], step2[9]);
step1[9] = _mm_sub_epi32(step2[8], step2[9]);
step1[10] = _mm_sub_epi32(step2[11], step2[10]);
// stage 4
extend_64bit(io[0], temp1);
- step2[0] = multiplication_round_shift_sse4_1(temp1, (int)cospi_16_64);
+ step2[0] = multiplication_round_shift_sse4_1(temp1, cospi_16_64);
step2[1] = step2[0];
- highbd_partial_butterfly_sse4_1(io[4], (int)cospi_24_64, (int)cospi_8_64,
- &step2[2], &step2[3]);
- highbd_butterfly_sse4_1(step1[14], step1[9], (int)cospi_24_64,
- (int)cospi_8_64, &step2[9], &step2[14]);
- highbd_butterfly_sse4_1(step1[10], step1[13], -(int)cospi_8_64,
- -(int)cospi_24_64, &step2[13], &step2[10]);
+ highbd_partial_butterfly_sse4_1(io[4], cospi_24_64, cospi_8_64, &step2[2],
+ &step2[3]);
+ highbd_butterfly_sse4_1(step1[14], step1[9], cospi_24_64, cospi_8_64,
+ &step2[9], &step2[14]);
+ highbd_butterfly_sse4_1(step1[10], step1[13], -cospi_8_64, -cospi_24_64,
+ &step2[13], &step2[10]);
step2[5] = _mm_sub_epi32(step1[4], step1[5]);
step1[4] = _mm_add_epi32(step1[4], step1[5]);
step2[6] = _mm_sub_epi32(step1[7], step1[6]);
__m128i temp[2];
// stage 2
- highbd_partial_butterfly_sse4_1(io[1], (int)cospi_30_64, (int)cospi_2_64,
- &step2[8], &step2[15]);
- highbd_partial_butterfly_sse4_1(io[3], -(int)cospi_26_64, (int)cospi_6_64,
- &step2[11], &step2[12]);
+ highbd_partial_butterfly_sse4_1(io[1], cospi_30_64, cospi_2_64, &step2[8],
+ &step2[15]);
+ highbd_partial_butterfly_sse4_1(io[3], -cospi_26_64, cospi_6_64, &step2[11],
+ &step2[12]);
// stage 3
- highbd_partial_butterfly_sse4_1(io[2], (int)cospi_28_64, (int)cospi_4_64,
- &step1[4], &step1[7]);
+ highbd_partial_butterfly_sse4_1(io[2], cospi_28_64, cospi_4_64, &step1[4],
+ &step1[7]);
step1[8] = step2[8];
step1[9] = step2[8];
step1[10] = step2[11];
// stage 4
extend_64bit(io[0], temp);
- step2[0] = multiplication_round_shift_sse4_1(temp, (int)cospi_16_64);
+ step2[0] = multiplication_round_shift_sse4_1(temp, cospi_16_64);
step2[1] = step2[0];
step2[2] = _mm_setzero_si128();
step2[3] = _mm_setzero_si128();
- highbd_butterfly_sse4_1(step1[14], step1[9], (int)cospi_24_64,
- (int)cospi_8_64, &step2[9], &step2[14]);
- highbd_butterfly_sse4_1(step1[10], step1[13], -(int)cospi_8_64,
- -(int)cospi_24_64, &step2[13], &step2[10]);
+ highbd_butterfly_sse4_1(step1[14], step1[9], cospi_24_64, cospi_8_64,
+ &step2[9], &step2[14]);
+ highbd_butterfly_sse4_1(step1[10], step1[13], -cospi_8_64, -cospi_24_64,
+ &step2[13], &step2[10]);
step2[5] = step1[4];
step2[6] = step1[7];
step2[8] = step1[8];
// stage 4
step2[8] = step1[8];
step2[15] = step1[15];
- highbd_butterfly_sse2(step1[14], step1[9], (int)cospi_24_64, (int)cospi_8_64,
- &step2[9], &step2[14]);
- highbd_butterfly_sse2(step1[10], step1[13], (int)cospi_8_64, (int)cospi_24_64,
+ highbd_butterfly_sse2(step1[14], step1[9], cospi_24_64, cospi_8_64, &step2[9],
+ &step2[14]);
+ highbd_butterfly_sse2(step1[10], step1[13], cospi_8_64, cospi_24_64,
&step2[13], &step2[10]);
step2[11] = step1[11];
step2[12] = step1[12];
// stage 6
out[8] = step1[8];
out[9] = step1[9];
- highbd_butterfly_sse2(step1[13], step1[10], (int)cospi_16_64,
- (int)cospi_16_64, &out[10], &out[13]);
- highbd_butterfly_sse2(step1[12], step1[11], (int)cospi_16_64,
- (int)cospi_16_64, &out[11], &out[12]);
+ highbd_butterfly_sse2(step1[13], step1[10], cospi_16_64, cospi_16_64,
+ &out[10], &out[13]);
+ highbd_butterfly_sse2(step1[12], step1[11], cospi_16_64, cospi_16_64,
+ &out[11], &out[12]);
out[14] = step1[14];
out[15] = step1[15];
}
// stage 5
step1[16] = step2[16];
step1[17] = step2[17];
- highbd_butterfly_sse2(step2[29], step2[18], (int)cospi_24_64, (int)cospi_8_64,
+ highbd_butterfly_sse2(step2[29], step2[18], cospi_24_64, cospi_8_64,
&step1[18], &step1[29]);
- highbd_butterfly_sse2(step2[28], step2[19], (int)cospi_24_64, (int)cospi_8_64,
+ highbd_butterfly_sse2(step2[28], step2[19], cospi_24_64, cospi_8_64,
&step1[19], &step1[28]);
- highbd_butterfly_sse2(step2[20], step2[27], (int)cospi_8_64, (int)cospi_24_64,
+ highbd_butterfly_sse2(step2[20], step2[27], cospi_8_64, cospi_24_64,
&step1[27], &step1[20]);
- highbd_butterfly_sse2(step2[21], step2[26], (int)cospi_8_64, (int)cospi_24_64,
+ highbd_butterfly_sse2(step2[21], step2[26], cospi_8_64, cospi_24_64,
&step1[26], &step1[21]);
step1[22] = step2[22];
step1[23] = step2[23];
out[17] = step2[17];
out[18] = step2[18];
out[19] = step2[19];
- highbd_butterfly_sse2(step2[27], step2[20], (int)cospi_16_64,
- (int)cospi_16_64, &out[20], &out[27]);
- highbd_butterfly_sse2(step2[26], step2[21], (int)cospi_16_64,
- (int)cospi_16_64, &out[21], &out[26]);
- highbd_butterfly_sse2(step2[25], step2[22], (int)cospi_16_64,
- (int)cospi_16_64, &out[22], &out[25]);
- highbd_butterfly_sse2(step2[24], step2[23], (int)cospi_16_64,
- (int)cospi_16_64, &out[23], &out[24]);
+ highbd_butterfly_sse2(step2[27], step2[20], cospi_16_64, cospi_16_64,
+ &out[20], &out[27]);
+ highbd_butterfly_sse2(step2[26], step2[21], cospi_16_64, cospi_16_64,
+ &out[21], &out[26]);
+ highbd_butterfly_sse2(step2[25], step2[22], cospi_16_64, cospi_16_64,
+ &out[22], &out[25]);
+ highbd_butterfly_sse2(step2[24], step2[23], cospi_16_64, cospi_16_64,
+ &out[23], &out[24]);
out[28] = step2[28];
out[29] = step2[29];
out[30] = step2[30];
__m128i step1[8], step2[8];
// stage 3
- highbd_butterfly_sse2(in[4], in[28], (int)cospi_28_64, (int)cospi_4_64,
- &step1[4], &step1[7]);
- highbd_butterfly_sse2(in[20], in[12], (int)cospi_12_64, (int)cospi_20_64,
- &step1[5], &step1[6]);
+ highbd_butterfly_sse2(in[4], in[28], cospi_28_64, cospi_4_64, &step1[4],
+ &step1[7]);
+ highbd_butterfly_sse2(in[20], in[12], cospi_12_64, cospi_20_64, &step1[5],
+ &step1[6]);
// stage 4
- highbd_butterfly_sse2(in[0], in[16], (int)cospi_16_64, (int)cospi_16_64,
- &step2[1], &step2[0]);
- highbd_butterfly_sse2(in[8], in[24], (int)cospi_24_64, (int)cospi_8_64,
- &step2[2], &step2[3]);
+ highbd_butterfly_sse2(in[0], in[16], cospi_16_64, cospi_16_64, &step2[1],
+ &step2[0]);
+ highbd_butterfly_sse2(in[8], in[24], cospi_24_64, cospi_8_64, &step2[2],
+ &step2[3]);
step2[4] = _mm_add_epi32(step1[4], step1[5]);
step2[5] = _mm_sub_epi32(step1[4], step1[5]);
step2[6] = _mm_sub_epi32(step1[7], step1[6]);
step1[2] = _mm_sub_epi32(step2[1], step2[2]);
step1[3] = _mm_sub_epi32(step2[0], step2[3]);
step1[4] = step2[4];
- highbd_butterfly_sse2(step2[6], step2[5], (int)cospi_16_64, (int)cospi_16_64,
- &step1[5], &step1[6]);
+ highbd_butterfly_sse2(step2[6], step2[5], cospi_16_64, cospi_16_64, &step1[5],
+ &step1[6]);
step1[7] = step2[7];
// stage 6
__m128i step1[32], step2[32];
// stage 2
- highbd_butterfly_sse2(in[2], in[30], (int)cospi_30_64, (int)cospi_2_64,
- &step2[8], &step2[15]);
- highbd_butterfly_sse2(in[18], in[14], (int)cospi_14_64, (int)cospi_18_64,
- &step2[9], &step2[14]);
- highbd_butterfly_sse2(in[10], in[22], (int)cospi_22_64, (int)cospi_10_64,
- &step2[10], &step2[13]);
- highbd_butterfly_sse2(in[26], in[6], (int)cospi_6_64, (int)cospi_26_64,
- &step2[11], &step2[12]);
+ highbd_butterfly_sse2(in[2], in[30], cospi_30_64, cospi_2_64, &step2[8],
+ &step2[15]);
+ highbd_butterfly_sse2(in[18], in[14], cospi_14_64, cospi_18_64, &step2[9],
+ &step2[14]);
+ highbd_butterfly_sse2(in[10], in[22], cospi_22_64, cospi_10_64, &step2[10],
+ &step2[13]);
+ highbd_butterfly_sse2(in[26], in[6], cospi_6_64, cospi_26_64, &step2[11],
+ &step2[12]);
// stage 3
step1[8] = _mm_add_epi32(step2[8], step2[9]);
__m128i step1[32], step2[32];
// stage 1
- highbd_butterfly_sse2(in[1], in[31], (int)cospi_31_64, (int)cospi_1_64,
- &step1[16], &step1[31]);
- highbd_butterfly_sse2(in[17], in[15], (int)cospi_15_64, (int)cospi_17_64,
- &step1[17], &step1[30]);
- highbd_butterfly_sse2(in[9], in[23], (int)cospi_23_64, (int)cospi_9_64,
- &step1[18], &step1[29]);
- highbd_butterfly_sse2(in[25], in[7], (int)cospi_7_64, (int)cospi_25_64,
- &step1[19], &step1[28]);
-
- highbd_butterfly_sse2(in[5], in[27], (int)cospi_27_64, (int)cospi_5_64,
- &step1[20], &step1[27]);
- highbd_butterfly_sse2(in[21], in[11], (int)cospi_11_64, (int)cospi_21_64,
- &step1[21], &step1[26]);
-
- highbd_butterfly_sse2(in[13], in[19], (int)cospi_19_64, (int)cospi_13_64,
- &step1[22], &step1[25]);
- highbd_butterfly_sse2(in[29], in[3], (int)cospi_3_64, (int)cospi_29_64,
- &step1[23], &step1[24]);
+ highbd_butterfly_sse2(in[1], in[31], cospi_31_64, cospi_1_64, &step1[16],
+ &step1[31]);
+ highbd_butterfly_sse2(in[17], in[15], cospi_15_64, cospi_17_64, &step1[17],
+ &step1[30]);
+ highbd_butterfly_sse2(in[9], in[23], cospi_23_64, cospi_9_64, &step1[18],
+ &step1[29]);
+ highbd_butterfly_sse2(in[25], in[7], cospi_7_64, cospi_25_64, &step1[19],
+ &step1[28]);
+
+ highbd_butterfly_sse2(in[5], in[27], cospi_27_64, cospi_5_64, &step1[20],
+ &step1[27]);
+ highbd_butterfly_sse2(in[21], in[11], cospi_11_64, cospi_21_64, &step1[21],
+ &step1[26]);
+
+ highbd_butterfly_sse2(in[13], in[19], cospi_19_64, cospi_13_64, &step1[22],
+ &step1[25]);
+ highbd_butterfly_sse2(in[29], in[3], cospi_3_64, cospi_29_64, &step1[23],
+ &step1[24]);
// stage 2
step2[16] = _mm_add_epi32(step1[16], step1[17]);
// stage 3
step1[16] = step2[16];
step1[31] = step2[31];
- highbd_butterfly_sse2(step2[30], step2[17], (int)cospi_28_64, (int)cospi_4_64,
+ highbd_butterfly_sse2(step2[30], step2[17], cospi_28_64, cospi_4_64,
&step1[17], &step1[30]);
- highbd_butterfly_sse2(step2[18], step2[29], (int)cospi_4_64, (int)cospi_28_64,
+ highbd_butterfly_sse2(step2[18], step2[29], cospi_4_64, cospi_28_64,
&step1[29], &step1[18]);
step1[19] = step2[19];
step1[20] = step2[20];
- highbd_butterfly_sse2(step2[26], step2[21], (int)cospi_12_64,
- (int)cospi_20_64, &step1[21], &step1[26]);
- highbd_butterfly_sse2(step2[22], step2[25], (int)cospi_20_64,
- (int)cospi_12_64, &step1[25], &step1[22]);
+ highbd_butterfly_sse2(step2[26], step2[21], cospi_12_64, cospi_20_64,
+ &step1[21], &step1[26]);
+ highbd_butterfly_sse2(step2[22], step2[25], cospi_20_64, cospi_12_64,
+ &step1[25], &step1[22]);
step1[23] = step2[23];
step1[24] = step2[24];
step1[27] = step2[27];
__m128i step1[8], step2[8];
// stage 3
- highbd_partial_butterfly_sse2(in[4], (int)cospi_28_64, (int)cospi_4_64,
- &step1[4], &step1[7]);
- highbd_partial_butterfly_neg_sse2(in[12], (int)cospi_12_64, (int)cospi_20_64,
- &step1[5], &step1[6]);
+ highbd_partial_butterfly_sse2(in[4], cospi_28_64, cospi_4_64, &step1[4],
+ &step1[7]);
+ highbd_partial_butterfly_neg_sse2(in[12], cospi_12_64, cospi_20_64, &step1[5],
+ &step1[6]);
// stage 4
- highbd_partial_butterfly_sse2(in[0], (int)cospi_16_64, (int)cospi_16_64,
- &step2[1], &step2[0]);
- highbd_partial_butterfly_sse2(in[8], (int)cospi_24_64, (int)cospi_8_64,
- &step2[2], &step2[3]);
+ highbd_partial_butterfly_sse2(in[0], cospi_16_64, cospi_16_64, &step2[1],
+ &step2[0]);
+ highbd_partial_butterfly_sse2(in[8], cospi_24_64, cospi_8_64, &step2[2],
+ &step2[3]);
step2[4] = _mm_add_epi32(step1[4], step1[5]);
step2[5] = _mm_sub_epi32(step1[4], step1[5]);
step2[6] = _mm_sub_epi32(step1[7], step1[6]);
step1[2] = _mm_sub_epi32(step2[1], step2[2]);
step1[3] = _mm_sub_epi32(step2[0], step2[3]);
step1[4] = step2[4];
- highbd_butterfly_sse2(step2[6], step2[5], (int)cospi_16_64, (int)cospi_16_64,
- &step1[5], &step1[6]);
+ highbd_butterfly_sse2(step2[6], step2[5], cospi_16_64, cospi_16_64, &step1[5],
+ &step1[6]);
step1[7] = step2[7];
// stage 6
__m128i step1[32], step2[32];
// stage 2
- highbd_partial_butterfly_sse2(in[2], (int)cospi_30_64, (int)cospi_2_64,
- &step2[8], &step2[15]);
- highbd_partial_butterfly_neg_sse2(in[14], (int)cospi_14_64, (int)cospi_18_64,
- &step2[9], &step2[14]);
- highbd_partial_butterfly_sse2(in[10], (int)cospi_22_64, (int)cospi_10_64,
- &step2[10], &step2[13]);
- highbd_partial_butterfly_neg_sse2(in[6], (int)cospi_6_64, (int)cospi_26_64,
- &step2[11], &step2[12]);
+ highbd_partial_butterfly_sse2(in[2], cospi_30_64, cospi_2_64, &step2[8],
+ &step2[15]);
+ highbd_partial_butterfly_neg_sse2(in[14], cospi_14_64, cospi_18_64, &step2[9],
+ &step2[14]);
+ highbd_partial_butterfly_sse2(in[10], cospi_22_64, cospi_10_64, &step2[10],
+ &step2[13]);
+ highbd_partial_butterfly_neg_sse2(in[6], cospi_6_64, cospi_26_64, &step2[11],
+ &step2[12]);
// stage 3
step1[8] = _mm_add_epi32(step2[8], step2[9]);
__m128i step1[32], step2[32];
// stage 1
- highbd_partial_butterfly_sse2(in[1], (int)cospi_31_64, (int)cospi_1_64,
- &step1[16], &step1[31]);
- highbd_partial_butterfly_neg_sse2(in[15], (int)cospi_15_64, (int)cospi_17_64,
+ highbd_partial_butterfly_sse2(in[1], cospi_31_64, cospi_1_64, &step1[16],
+ &step1[31]);
+ highbd_partial_butterfly_neg_sse2(in[15], cospi_15_64, cospi_17_64,
&step1[17], &step1[30]);
- highbd_partial_butterfly_sse2(in[9], (int)cospi_23_64, (int)cospi_9_64,
- &step1[18], &step1[29]);
- highbd_partial_butterfly_neg_sse2(in[7], (int)cospi_7_64, (int)cospi_25_64,
- &step1[19], &step1[28]);
-
- highbd_partial_butterfly_sse2(in[5], (int)cospi_27_64, (int)cospi_5_64,
- &step1[20], &step1[27]);
- highbd_partial_butterfly_neg_sse2(in[11], (int)cospi_11_64, (int)cospi_21_64,
+ highbd_partial_butterfly_sse2(in[9], cospi_23_64, cospi_9_64, &step1[18],
+ &step1[29]);
+ highbd_partial_butterfly_neg_sse2(in[7], cospi_7_64, cospi_25_64, &step1[19],
+ &step1[28]);
+
+ highbd_partial_butterfly_sse2(in[5], cospi_27_64, cospi_5_64, &step1[20],
+ &step1[27]);
+ highbd_partial_butterfly_neg_sse2(in[11], cospi_11_64, cospi_21_64,
&step1[21], &step1[26]);
- highbd_partial_butterfly_sse2(in[13], (int)cospi_19_64, (int)cospi_13_64,
- &step1[22], &step1[25]);
- highbd_partial_butterfly_neg_sse2(in[3], (int)cospi_3_64, (int)cospi_29_64,
- &step1[23], &step1[24]);
+ highbd_partial_butterfly_sse2(in[13], cospi_19_64, cospi_13_64, &step1[22],
+ &step1[25]);
+ highbd_partial_butterfly_neg_sse2(in[3], cospi_3_64, cospi_29_64, &step1[23],
+ &step1[24]);
// stage 2
step2[16] = _mm_add_epi32(step1[16], step1[17]);
// stage 3
step1[16] = step2[16];
step1[31] = step2[31];
- highbd_butterfly_sse2(step2[30], step2[17], (int)cospi_28_64, (int)cospi_4_64,
+ highbd_butterfly_sse2(step2[30], step2[17], cospi_28_64, cospi_4_64,
&step1[17], &step1[30]);
- highbd_butterfly_sse2(step2[18], step2[29], (int)cospi_4_64, (int)cospi_28_64,
+ highbd_butterfly_sse2(step2[18], step2[29], cospi_4_64, cospi_28_64,
&step1[29], &step1[18]);
step1[19] = step2[19];
step1[20] = step2[20];
- highbd_butterfly_sse2(step2[26], step2[21], (int)cospi_12_64,
- (int)cospi_20_64, &step1[21], &step1[26]);
- highbd_butterfly_sse2(step2[22], step2[25], (int)cospi_20_64,
- (int)cospi_12_64, &step1[25], &step1[22]);
+ highbd_butterfly_sse2(step2[26], step2[21], cospi_12_64, cospi_20_64,
+ &step1[21], &step1[26]);
+ highbd_butterfly_sse2(step2[22], step2[25], cospi_20_64, cospi_12_64,
+ &step1[25], &step1[22]);
step1[23] = step2[23];
step1[24] = step2[24];
step1[27] = step2[27];
__m128i step1[8], step2[8];
// stage 3
- highbd_partial_butterfly_sse2(in[4], (int)cospi_28_64, (int)cospi_4_64,
- &step1[4], &step1[7]);
+ highbd_partial_butterfly_sse2(in[4], cospi_28_64, cospi_4_64, &step1[4],
+ &step1[7]);
// stage 4
- highbd_partial_butterfly_sse2(in[0], (int)cospi_16_64, (int)cospi_16_64,
- &step2[1], &step2[0]);
+ highbd_partial_butterfly_sse2(in[0], cospi_16_64, cospi_16_64, &step2[1],
+ &step2[0]);
step2[4] = step1[4];
step2[5] = step1[4];
step2[6] = step1[7];
step1[2] = step2[1];
step1[3] = step2[0];
step1[4] = step2[4];
- highbd_butterfly_sse2(step2[6], step2[5], (int)cospi_16_64, (int)cospi_16_64,
- &step1[5], &step1[6]);
+ highbd_butterfly_sse2(step2[6], step2[5], cospi_16_64, cospi_16_64, &step1[5],
+ &step1[6]);
step1[7] = step2[7];
// stage 6
__m128i step1[32], step2[32];
// stage 2
- highbd_partial_butterfly_sse2(in[2], (int)cospi_30_64, (int)cospi_2_64,
- &step2[8], &step2[15]);
- highbd_partial_butterfly_neg_sse2(in[6], (int)cospi_6_64, (int)cospi_26_64,
- &step2[11], &step2[12]);
+ highbd_partial_butterfly_sse2(in[2], cospi_30_64, cospi_2_64, &step2[8],
+ &step2[15]);
+ highbd_partial_butterfly_neg_sse2(in[6], cospi_6_64, cospi_26_64, &step2[11],
+ &step2[12]);
// stage 3
step1[8] = step2[8];
__m128i step1[32], step2[32];
// stage 1
- highbd_partial_butterfly_sse2(in[1], (int)cospi_31_64, (int)cospi_1_64,
- &step1[16], &step1[31]);
- highbd_partial_butterfly_neg_sse2(in[7], (int)cospi_7_64, (int)cospi_25_64,
- &step1[19], &step1[28]);
+ highbd_partial_butterfly_sse2(in[1], cospi_31_64, cospi_1_64, &step1[16],
+ &step1[31]);
+ highbd_partial_butterfly_neg_sse2(in[7], cospi_7_64, cospi_25_64, &step1[19],
+ &step1[28]);
- highbd_partial_butterfly_sse2(in[5], (int)cospi_27_64, (int)cospi_5_64,
- &step1[20], &step1[27]);
- highbd_partial_butterfly_neg_sse2(in[3], (int)cospi_3_64, (int)cospi_29_64,
- &step1[23], &step1[24]);
+ highbd_partial_butterfly_sse2(in[5], cospi_27_64, cospi_5_64, &step1[20],
+ &step1[27]);
+ highbd_partial_butterfly_neg_sse2(in[3], cospi_3_64, cospi_29_64, &step1[23],
+ &step1[24]);
// stage 2
step2[16] = step1[16];
_mm_sub_epi32(_mm_setzero_si128(), step2[29]); // step2[29] = -step2[29]
step1[16] = step2[16];
step1[31] = step2[31];
- highbd_butterfly_sse2(step2[30], step2[17], (int)cospi_28_64, (int)cospi_4_64,
+ highbd_butterfly_sse2(step2[30], step2[17], cospi_28_64, cospi_4_64,
&step1[17], &step1[30]);
- highbd_butterfly_sse2(step2[18], step2[29], (int)cospi_4_64, (int)cospi_28_64,
+ highbd_butterfly_sse2(step2[18], step2[29], cospi_4_64, cospi_28_64,
&step1[29], &step1[18]);
step1[19] = step2[19];
step1[20] = step2[20];
- highbd_butterfly_sse2(step2[26], step2[21], (int)cospi_12_64,
- (int)cospi_20_64, &step1[21], &step1[26]);
- highbd_butterfly_sse2(step2[22], step2[25], (int)cospi_20_64,
- (int)cospi_12_64, &step1[25], &step1[22]);
+ highbd_butterfly_sse2(step2[26], step2[21], cospi_12_64, cospi_20_64,
+ &step1[21], &step1[26]);
+ highbd_butterfly_sse2(step2[22], step2[25], cospi_20_64, cospi_12_64,
+ &step1[25], &step1[22]);
step1[23] = step2[23];
step1[24] = step2[24];
step1[27] = step2[27];
// stage 4
step2[8] = step1[8];
step2[15] = step1[15];
- highbd_butterfly_sse4_1(step1[14], step1[9], (int)cospi_24_64,
- (int)cospi_8_64, &step2[9], &step2[14]);
- highbd_butterfly_sse4_1(step1[13], step1[10], -(int)cospi_8_64,
- (int)cospi_24_64, &step2[10], &step2[13]);
+ highbd_butterfly_sse4_1(step1[14], step1[9], cospi_24_64, cospi_8_64,
+ &step2[9], &step2[14]);
+ highbd_butterfly_sse4_1(step1[13], step1[10], -cospi_8_64, cospi_24_64,
+ &step2[10], &step2[13]);
step2[11] = step1[11];
step2[12] = step1[12];
// stage 6
out[8] = step1[8];
out[9] = step1[9];
- highbd_butterfly_sse4_1(step1[13], step1[10], (int)cospi_16_64,
- (int)cospi_16_64, &out[10], &out[13]);
- highbd_butterfly_sse4_1(step1[12], step1[11], (int)cospi_16_64,
- (int)cospi_16_64, &out[11], &out[12]);
+ highbd_butterfly_sse4_1(step1[13], step1[10], cospi_16_64, cospi_16_64,
+ &out[10], &out[13]);
+ highbd_butterfly_sse4_1(step1[12], step1[11], cospi_16_64, cospi_16_64,
+ &out[11], &out[12]);
out[14] = step1[14];
out[15] = step1[15];
}
// stage 5
step1[16] = step2[16];
step1[17] = step2[17];
- highbd_butterfly_sse4_1(step2[29], step2[18], (int)cospi_24_64,
- (int)cospi_8_64, &step1[18], &step1[29]);
- highbd_butterfly_sse4_1(step2[28], step2[19], (int)cospi_24_64,
- (int)cospi_8_64, &step1[19], &step1[28]);
- highbd_butterfly_sse4_1(step2[27], step2[20], -(int)cospi_8_64,
- (int)cospi_24_64, &step1[20], &step1[27]);
- highbd_butterfly_sse4_1(step2[26], step2[21], -(int)cospi_8_64,
- (int)cospi_24_64, &step1[21], &step1[26]);
+ highbd_butterfly_sse4_1(step2[29], step2[18], cospi_24_64, cospi_8_64,
+ &step1[18], &step1[29]);
+ highbd_butterfly_sse4_1(step2[28], step2[19], cospi_24_64, cospi_8_64,
+ &step1[19], &step1[28]);
+ highbd_butterfly_sse4_1(step2[27], step2[20], -cospi_8_64, cospi_24_64,
+ &step1[20], &step1[27]);
+ highbd_butterfly_sse4_1(step2[26], step2[21], -cospi_8_64, cospi_24_64,
+ &step1[21], &step1[26]);
step1[22] = step2[22];
step1[23] = step2[23];
step1[24] = step2[24];
out[17] = step2[17];
out[18] = step2[18];
out[19] = step2[19];
- highbd_butterfly_sse4_1(step2[27], step2[20], (int)cospi_16_64,
- (int)cospi_16_64, &out[20], &out[27]);
- highbd_butterfly_sse4_1(step2[26], step2[21], (int)cospi_16_64,
- (int)cospi_16_64, &out[21], &out[26]);
- highbd_butterfly_sse4_1(step2[25], step2[22], (int)cospi_16_64,
- (int)cospi_16_64, &out[22], &out[25]);
- highbd_butterfly_sse4_1(step2[24], step2[23], (int)cospi_16_64,
- (int)cospi_16_64, &out[23], &out[24]);
+ highbd_butterfly_sse4_1(step2[27], step2[20], cospi_16_64, cospi_16_64,
+ &out[20], &out[27]);
+ highbd_butterfly_sse4_1(step2[26], step2[21], cospi_16_64, cospi_16_64,
+ &out[21], &out[26]);
+ highbd_butterfly_sse4_1(step2[25], step2[22], cospi_16_64, cospi_16_64,
+ &out[22], &out[25]);
+ highbd_butterfly_sse4_1(step2[24], step2[23], cospi_16_64, cospi_16_64,
+ &out[23], &out[24]);
out[28] = step2[28];
out[29] = step2[29];
out[30] = step2[30];
__m128i step1[8], step2[8];
// stage 3
- highbd_butterfly_sse4_1(in[4], in[28], (int)cospi_28_64, (int)cospi_4_64,
- &step1[4], &step1[7]);
- highbd_butterfly_sse4_1(in[20], in[12], (int)cospi_12_64, (int)cospi_20_64,
- &step1[5], &step1[6]);
+ highbd_butterfly_sse4_1(in[4], in[28], cospi_28_64, cospi_4_64, &step1[4],
+ &step1[7]);
+ highbd_butterfly_sse4_1(in[20], in[12], cospi_12_64, cospi_20_64, &step1[5],
+ &step1[6]);
// stage 4
- highbd_butterfly_sse4_1(in[0], in[16], (int)cospi_16_64, (int)cospi_16_64,
- &step2[1], &step2[0]);
- highbd_butterfly_sse4_1(in[8], in[24], (int)cospi_24_64, (int)cospi_8_64,
- &step2[2], &step2[3]);
+ highbd_butterfly_sse4_1(in[0], in[16], cospi_16_64, cospi_16_64, &step2[1],
+ &step2[0]);
+ highbd_butterfly_sse4_1(in[8], in[24], cospi_24_64, cospi_8_64, &step2[2],
+ &step2[3]);
step2[4] = _mm_add_epi32(step1[4], step1[5]);
step2[5] = _mm_sub_epi32(step1[4], step1[5]);
step2[6] = _mm_sub_epi32(step1[7], step1[6]);
step1[2] = _mm_sub_epi32(step2[1], step2[2]);
step1[3] = _mm_sub_epi32(step2[0], step2[3]);
step1[4] = step2[4];
- highbd_butterfly_sse4_1(step2[6], step2[5], (int)cospi_16_64,
- (int)cospi_16_64, &step1[5], &step1[6]);
+ highbd_butterfly_sse4_1(step2[6], step2[5], cospi_16_64, cospi_16_64,
+ &step1[5], &step1[6]);
step1[7] = step2[7];
// stage 6
__m128i step1[32], step2[32];
// stage 2
- highbd_butterfly_sse4_1(in[2], in[30], (int)cospi_30_64, (int)cospi_2_64,
- &step2[8], &step2[15]);
- highbd_butterfly_sse4_1(in[18], in[14], (int)cospi_14_64, (int)cospi_18_64,
- &step2[9], &step2[14]);
- highbd_butterfly_sse4_1(in[10], in[22], (int)cospi_22_64, (int)cospi_10_64,
- &step2[10], &step2[13]);
- highbd_butterfly_sse4_1(in[26], in[6], (int)cospi_6_64, (int)cospi_26_64,
- &step2[11], &step2[12]);
+ highbd_butterfly_sse4_1(in[2], in[30], cospi_30_64, cospi_2_64, &step2[8],
+ &step2[15]);
+ highbd_butterfly_sse4_1(in[18], in[14], cospi_14_64, cospi_18_64, &step2[9],
+ &step2[14]);
+ highbd_butterfly_sse4_1(in[10], in[22], cospi_22_64, cospi_10_64, &step2[10],
+ &step2[13]);
+ highbd_butterfly_sse4_1(in[26], in[6], cospi_6_64, cospi_26_64, &step2[11],
+ &step2[12]);
// stage 3
step1[8] = _mm_add_epi32(step2[8], step2[9]);
__m128i step1[32], step2[32];
// stage 1
- highbd_butterfly_sse4_1(in[1], in[31], (int)cospi_31_64, (int)cospi_1_64,
- &step1[16], &step1[31]);
- highbd_butterfly_sse4_1(in[17], in[15], (int)cospi_15_64, (int)cospi_17_64,
- &step1[17], &step1[30]);
- highbd_butterfly_sse4_1(in[9], in[23], (int)cospi_23_64, (int)cospi_9_64,
- &step1[18], &step1[29]);
- highbd_butterfly_sse4_1(in[25], in[7], (int)cospi_7_64, (int)cospi_25_64,
- &step1[19], &step1[28]);
-
- highbd_butterfly_sse4_1(in[5], in[27], (int)cospi_27_64, (int)cospi_5_64,
- &step1[20], &step1[27]);
- highbd_butterfly_sse4_1(in[21], in[11], (int)cospi_11_64, (int)cospi_21_64,
- &step1[21], &step1[26]);
-
- highbd_butterfly_sse4_1(in[13], in[19], (int)cospi_19_64, (int)cospi_13_64,
- &step1[22], &step1[25]);
- highbd_butterfly_sse4_1(in[29], in[3], (int)cospi_3_64, (int)cospi_29_64,
- &step1[23], &step1[24]);
+ highbd_butterfly_sse4_1(in[1], in[31], cospi_31_64, cospi_1_64, &step1[16],
+ &step1[31]);
+ highbd_butterfly_sse4_1(in[17], in[15], cospi_15_64, cospi_17_64, &step1[17],
+ &step1[30]);
+ highbd_butterfly_sse4_1(in[9], in[23], cospi_23_64, cospi_9_64, &step1[18],
+ &step1[29]);
+ highbd_butterfly_sse4_1(in[25], in[7], cospi_7_64, cospi_25_64, &step1[19],
+ &step1[28]);
+
+ highbd_butterfly_sse4_1(in[5], in[27], cospi_27_64, cospi_5_64, &step1[20],
+ &step1[27]);
+ highbd_butterfly_sse4_1(in[21], in[11], cospi_11_64, cospi_21_64, &step1[21],
+ &step1[26]);
+
+ highbd_butterfly_sse4_1(in[13], in[19], cospi_19_64, cospi_13_64, &step1[22],
+ &step1[25]);
+ highbd_butterfly_sse4_1(in[29], in[3], cospi_3_64, cospi_29_64, &step1[23],
+ &step1[24]);
// stage 2
step2[16] = _mm_add_epi32(step1[16], step1[17]);
// stage 3
step1[16] = step2[16];
step1[31] = step2[31];
- highbd_butterfly_sse4_1(step2[30], step2[17], (int)cospi_28_64,
- (int)cospi_4_64, &step1[17], &step1[30]);
- highbd_butterfly_sse4_1(step2[29], step2[18], -(int)cospi_4_64,
- (int)cospi_28_64, &step1[18], &step1[29]);
+ highbd_butterfly_sse4_1(step2[30], step2[17], cospi_28_64, cospi_4_64,
+ &step1[17], &step1[30]);
+ highbd_butterfly_sse4_1(step2[29], step2[18], -cospi_4_64, cospi_28_64,
+ &step1[18], &step1[29]);
step1[19] = step2[19];
step1[20] = step2[20];
- highbd_butterfly_sse4_1(step2[26], step2[21], (int)cospi_12_64,
- (int)cospi_20_64, &step1[21], &step1[26]);
- highbd_butterfly_sse4_1(step2[25], step2[22], -(int)cospi_20_64,
- (int)cospi_12_64, &step1[22], &step1[25]);
+ highbd_butterfly_sse4_1(step2[26], step2[21], cospi_12_64, cospi_20_64,
+ &step1[21], &step1[26]);
+ highbd_butterfly_sse4_1(step2[25], step2[22], -cospi_20_64, cospi_12_64,
+ &step1[22], &step1[25]);
step1[23] = step2[23];
step1[24] = step2[24];
step1[27] = step2[27];
__m128i step1[8], step2[8];
// stage 3
- highbd_partial_butterfly_sse4_1(in[4], (int)cospi_28_64, (int)cospi_4_64,
- &step1[4], &step1[7]);
- highbd_partial_butterfly_sse4_1(in[12], -(int)cospi_20_64, (int)cospi_12_64,
- &step1[5], &step1[6]);
+ highbd_partial_butterfly_sse4_1(in[4], cospi_28_64, cospi_4_64, &step1[4],
+ &step1[7]);
+ highbd_partial_butterfly_sse4_1(in[12], -cospi_20_64, cospi_12_64, &step1[5],
+ &step1[6]);
// stage 4
- highbd_partial_butterfly_sse4_1(in[0], (int)cospi_16_64, (int)cospi_16_64,
- &step2[1], &step2[0]);
- highbd_partial_butterfly_sse4_1(in[8], (int)cospi_24_64, (int)cospi_8_64,
- &step2[2], &step2[3]);
+ highbd_partial_butterfly_sse4_1(in[0], cospi_16_64, cospi_16_64, &step2[1],
+ &step2[0]);
+ highbd_partial_butterfly_sse4_1(in[8], cospi_24_64, cospi_8_64, &step2[2],
+ &step2[3]);
step2[4] = _mm_add_epi32(step1[4], step1[5]);
step2[5] = _mm_sub_epi32(step1[4], step1[5]);
step2[6] = _mm_sub_epi32(step1[7], step1[6]);
step1[2] = _mm_sub_epi32(step2[1], step2[2]);
step1[3] = _mm_sub_epi32(step2[0], step2[3]);
step1[4] = step2[4];
- highbd_butterfly_sse4_1(step2[6], step2[5], (int)cospi_16_64,
- (int)cospi_16_64, &step1[5], &step1[6]);
+ highbd_butterfly_sse4_1(step2[6], step2[5], cospi_16_64, cospi_16_64,
+ &step1[5], &step1[6]);
step1[7] = step2[7];
// stage 6
__m128i step1[32], step2[32];
// stage 2
- highbd_partial_butterfly_sse4_1(in[2], (int)cospi_30_64, (int)cospi_2_64,
- &step2[8], &step2[15]);
- highbd_partial_butterfly_sse4_1(in[14], -(int)cospi_18_64, (int)cospi_14_64,
- &step2[9], &step2[14]);
- highbd_partial_butterfly_sse4_1(in[10], (int)cospi_22_64, (int)cospi_10_64,
- &step2[10], &step2[13]);
- highbd_partial_butterfly_sse4_1(in[6], -(int)cospi_26_64, (int)cospi_6_64,
- &step2[11], &step2[12]);
+ highbd_partial_butterfly_sse4_1(in[2], cospi_30_64, cospi_2_64, &step2[8],
+ &step2[15]);
+ highbd_partial_butterfly_sse4_1(in[14], -cospi_18_64, cospi_14_64, &step2[9],
+ &step2[14]);
+ highbd_partial_butterfly_sse4_1(in[10], cospi_22_64, cospi_10_64, &step2[10],
+ &step2[13]);
+ highbd_partial_butterfly_sse4_1(in[6], -cospi_26_64, cospi_6_64, &step2[11],
+ &step2[12]);
// stage 3
step1[8] = _mm_add_epi32(step2[8], step2[9]);
__m128i step1[32], step2[32];
// stage 1
- highbd_partial_butterfly_sse4_1(in[1], (int)cospi_31_64, (int)cospi_1_64,
- &step1[16], &step1[31]);
- highbd_partial_butterfly_sse4_1(in[15], -(int)cospi_17_64, (int)cospi_15_64,
- &step1[17], &step1[30]);
- highbd_partial_butterfly_sse4_1(in[9], (int)cospi_23_64, (int)cospi_9_64,
- &step1[18], &step1[29]);
- highbd_partial_butterfly_sse4_1(in[7], -(int)cospi_25_64, (int)cospi_7_64,
- &step1[19], &step1[28]);
-
- highbd_partial_butterfly_sse4_1(in[5], (int)cospi_27_64, (int)cospi_5_64,
- &step1[20], &step1[27]);
- highbd_partial_butterfly_sse4_1(in[11], -(int)cospi_21_64, (int)cospi_11_64,
- &step1[21], &step1[26]);
-
- highbd_partial_butterfly_sse4_1(in[13], (int)cospi_19_64, (int)cospi_13_64,
- &step1[22], &step1[25]);
- highbd_partial_butterfly_sse4_1(in[3], -(int)cospi_29_64, (int)cospi_3_64,
- &step1[23], &step1[24]);
+ highbd_partial_butterfly_sse4_1(in[1], cospi_31_64, cospi_1_64, &step1[16],
+ &step1[31]);
+ highbd_partial_butterfly_sse4_1(in[15], -cospi_17_64, cospi_15_64, &step1[17],
+ &step1[30]);
+ highbd_partial_butterfly_sse4_1(in[9], cospi_23_64, cospi_9_64, &step1[18],
+ &step1[29]);
+ highbd_partial_butterfly_sse4_1(in[7], -cospi_25_64, cospi_7_64, &step1[19],
+ &step1[28]);
+
+ highbd_partial_butterfly_sse4_1(in[5], cospi_27_64, cospi_5_64, &step1[20],
+ &step1[27]);
+ highbd_partial_butterfly_sse4_1(in[11], -cospi_21_64, cospi_11_64, &step1[21],
+ &step1[26]);
+
+ highbd_partial_butterfly_sse4_1(in[13], cospi_19_64, cospi_13_64, &step1[22],
+ &step1[25]);
+ highbd_partial_butterfly_sse4_1(in[3], -cospi_29_64, cospi_3_64, &step1[23],
+ &step1[24]);
// stage 2
step2[16] = _mm_add_epi32(step1[16], step1[17]);
// stage 3
step1[16] = step2[16];
step1[31] = step2[31];
- highbd_butterfly_sse4_1(step2[30], step2[17], (int)cospi_28_64,
- (int)cospi_4_64, &step1[17], &step1[30]);
- highbd_butterfly_sse4_1(step2[29], step2[18], -(int)cospi_4_64,
- (int)cospi_28_64, &step1[18], &step1[29]);
+ highbd_butterfly_sse4_1(step2[30], step2[17], cospi_28_64, cospi_4_64,
+ &step1[17], &step1[30]);
+ highbd_butterfly_sse4_1(step2[29], step2[18], -cospi_4_64, cospi_28_64,
+ &step1[18], &step1[29]);
step1[19] = step2[19];
step1[20] = step2[20];
- highbd_butterfly_sse4_1(step2[26], step2[21], (int)cospi_12_64,
- (int)cospi_20_64, &step1[21], &step1[26]);
- highbd_butterfly_sse4_1(step2[25], step2[22], -(int)cospi_20_64,
- (int)cospi_12_64, &step1[22], &step1[25]);
+ highbd_butterfly_sse4_1(step2[26], step2[21], cospi_12_64, cospi_20_64,
+ &step1[21], &step1[26]);
+ highbd_butterfly_sse4_1(step2[25], step2[22], -cospi_20_64, cospi_12_64,
+ &step1[22], &step1[25]);
step1[23] = step2[23];
step1[24] = step2[24];
step1[27] = step2[27];
__m128i step1[8], step2[8];
// stage 3
- highbd_partial_butterfly_sse4_1(in[4], (int)cospi_28_64, (int)cospi_4_64,
- &step1[4], &step1[7]);
+ highbd_partial_butterfly_sse4_1(in[4], cospi_28_64, cospi_4_64, &step1[4],
+ &step1[7]);
// stage 4
- highbd_partial_butterfly_sse4_1(in[0], (int)cospi_16_64, (int)cospi_16_64,
- &step2[1], &step2[0]);
+ highbd_partial_butterfly_sse4_1(in[0], cospi_16_64, cospi_16_64, &step2[1],
+ &step2[0]);
step2[4] = step1[4];
step2[5] = step1[4];
step2[6] = step1[7];
step1[2] = step2[1];
step1[3] = step2[0];
step1[4] = step2[4];
- highbd_butterfly_sse4_1(step2[6], step2[5], (int)cospi_16_64,
- (int)cospi_16_64, &step1[5], &step1[6]);
+ highbd_butterfly_sse4_1(step2[6], step2[5], cospi_16_64, cospi_16_64,
+ &step1[5], &step1[6]);
step1[7] = step2[7];
// stage 6
__m128i step1[32], step2[32];
// stage 2
- highbd_partial_butterfly_sse4_1(in[2], (int)cospi_30_64, (int)cospi_2_64,
- &step2[8], &step2[15]);
- highbd_partial_butterfly_sse4_1(in[6], -(int)cospi_26_64, (int)cospi_6_64,
- &step2[11], &step2[12]);
+ highbd_partial_butterfly_sse4_1(in[2], cospi_30_64, cospi_2_64, &step2[8],
+ &step2[15]);
+ highbd_partial_butterfly_sse4_1(in[6], -cospi_26_64, cospi_6_64, &step2[11],
+ &step2[12]);
// stage 3
step1[8] = step2[8];
__m128i step1[32], step2[32];
// stage 1
- highbd_partial_butterfly_sse4_1(in[1], (int)cospi_31_64, (int)cospi_1_64,
- &step1[16], &step1[31]);
- highbd_partial_butterfly_sse4_1(in[7], -(int)cospi_25_64, (int)cospi_7_64,
- &step1[19], &step1[28]);
+ highbd_partial_butterfly_sse4_1(in[1], cospi_31_64, cospi_1_64, &step1[16],
+ &step1[31]);
+ highbd_partial_butterfly_sse4_1(in[7], -cospi_25_64, cospi_7_64, &step1[19],
+ &step1[28]);
- highbd_partial_butterfly_sse4_1(in[5], (int)cospi_27_64, (int)cospi_5_64,
- &step1[20], &step1[27]);
- highbd_partial_butterfly_sse4_1(in[3], -(int)cospi_29_64, (int)cospi_3_64,
- &step1[23], &step1[24]);
+ highbd_partial_butterfly_sse4_1(in[5], cospi_27_64, cospi_5_64, &step1[20],
+ &step1[27]);
+ highbd_partial_butterfly_sse4_1(in[3], -cospi_29_64, cospi_3_64, &step1[23],
+ &step1[24]);
// stage 2
step2[16] = step1[16];
// stage 3
step1[16] = step2[16];
step1[31] = step2[31];
- highbd_butterfly_sse4_1(step2[30], step2[17], (int)cospi_28_64,
- (int)cospi_4_64, &step1[17], &step1[30]);
- highbd_butterfly_sse4_1(step2[29], step2[18], -(int)cospi_4_64,
- (int)cospi_28_64, &step1[18], &step1[29]);
+ highbd_butterfly_sse4_1(step2[30], step2[17], cospi_28_64, cospi_4_64,
+ &step1[17], &step1[30]);
+ highbd_butterfly_sse4_1(step2[29], step2[18], -cospi_4_64, cospi_28_64,
+ &step1[18], &step1[29]);
step1[19] = step2[19];
step1[20] = step2[20];
- highbd_butterfly_sse4_1(step2[26], step2[21], (int)cospi_12_64,
- (int)cospi_20_64, &step1[21], &step1[26]);
- highbd_butterfly_sse4_1(step2[25], step2[22], -(int)cospi_20_64,
- (int)cospi_12_64, &step1[22], &step1[25]);
+ highbd_butterfly_sse4_1(step2[26], step2[21], cospi_12_64, cospi_20_64,
+ &step1[21], &step1[26]);
+ highbd_butterfly_sse4_1(step2[25], step2[22], -cospi_20_64, cospi_12_64,
+ &step1[22], &step1[25]);
step1[23] = step2[23];
step1[24] = step2[24];
step1[27] = step2[27];
}
static INLINE void highbd_idct4_small_sse2(__m128i *const io) {
- const __m128i cospi_p16_p16 =
- _mm_setr_epi32((int)cospi_16_64, 0, (int)cospi_16_64, 0);
- const __m128i cospi_p08_p08 =
- _mm_setr_epi32((int)cospi_8_64, 0, (int)cospi_8_64, 0);
- const __m128i cospi_p24_p24 =
- _mm_setr_epi32((int)cospi_24_64, 0, (int)cospi_24_64, 0);
+ const __m128i cospi_p16_p16 = _mm_setr_epi32(cospi_16_64, 0, cospi_16_64, 0);
+ const __m128i cospi_p08_p08 = _mm_setr_epi32(cospi_8_64, 0, cospi_8_64, 0);
+ const __m128i cospi_p24_p24 = _mm_setr_epi32(cospi_24_64, 0, cospi_24_64, 0);
__m128i temp1[4], temp2[4], step[4];
transpose_32bit_4x4(io, io);
// stage 1
highbd_butterfly_cospi16_sse2(io[0], io[2], &step[0], &step[1]);
- highbd_butterfly_sse2(io[1], io[3], (int)cospi_24_64, (int)cospi_8_64,
- &step[2], &step[3]);
+ highbd_butterfly_sse2(io[1], io[3], cospi_24_64, cospi_8_64, &step[2],
+ &step[3]);
// stage 2
io[0] = _mm_add_epi32(step[0], step[3]); // step[0] + step[3]
// stage 1
temp[0] = _mm_add_epi32(io[0], io[2]); // input[0] + input[2]
extend_64bit(temp[0], temp);
- step[0] = multiplication_round_shift_sse4_1(temp, (int)cospi_16_64);
+ step[0] = multiplication_round_shift_sse4_1(temp, cospi_16_64);
temp[0] = _mm_sub_epi32(io[0], io[2]); // input[0] - input[2]
extend_64bit(temp[0], temp);
- step[1] = multiplication_round_shift_sse4_1(temp, (int)cospi_16_64);
- highbd_butterfly_sse4_1(io[1], io[3], (int)cospi_24_64, (int)cospi_8_64,
- &step[2], &step[3]);
+ step[1] = multiplication_round_shift_sse4_1(temp, cospi_16_64);
+ highbd_butterfly_sse4_1(io[1], io[3], cospi_24_64, cospi_8_64, &step[2],
+ &step[3]);
// stage 2
io[0] = _mm_add_epi32(step[0], step[3]); // step[0] + step[3]
step1[2] = io[4];
step1[1] = io[2];
step1[3] = io[6];
- highbd_butterfly_sse2(io[1], io[7], (int)cospi_28_64, (int)cospi_4_64,
- &step1[4], &step1[7]);
- highbd_butterfly_sse2(io[5], io[3], (int)cospi_12_64, (int)cospi_20_64,
- &step1[5], &step1[6]);
+ highbd_butterfly_sse2(io[1], io[7], cospi_28_64, cospi_4_64, &step1[4],
+ &step1[7]);
+ highbd_butterfly_sse2(io[5], io[3], cospi_12_64, cospi_20_64, &step1[5],
+ &step1[6]);
// stage 2
highbd_butterfly_cospi16_sse2(step1[0], step1[2], &step2[0], &step2[1]);
- highbd_butterfly_sse2(step1[1], step1[3], (int)cospi_24_64, (int)cospi_8_64,
- &step2[2], &step2[3]);
+ highbd_butterfly_sse2(step1[1], step1[3], cospi_24_64, cospi_8_64, &step2[2],
+ &step2[3]);
step2[4] = _mm_add_epi32(step1[4], step1[5]);
step2[5] = _mm_sub_epi32(step1[4], step1[5]);
step2[6] = _mm_sub_epi32(step1[7], step1[6]);
step1[0] = io[0];
step1[1] = io[2];
abs_extend_64bit_sse2(io[1], temp1, sign);
- step1[4] = multiplication_round_shift_sse2(temp1, sign, (int)cospi_28_64);
- step1[7] = multiplication_round_shift_sse2(temp1, sign, (int)cospi_4_64);
+ step1[4] = multiplication_round_shift_sse2(temp1, sign, cospi_28_64);
+ step1[7] = multiplication_round_shift_sse2(temp1, sign, cospi_4_64);
abs_extend_64bit_sse2(io[3], temp1, sign);
- step1[5] = multiplication_neg_round_shift_sse2(temp1, sign, (int)cospi_20_64);
- step1[6] = multiplication_round_shift_sse2(temp1, sign, (int)cospi_12_64);
+ step1[5] = multiplication_neg_round_shift_sse2(temp1, sign, cospi_20_64);
+ step1[6] = multiplication_round_shift_sse2(temp1, sign, cospi_12_64);
// stage 2
abs_extend_64bit_sse2(step1[0], temp1, sign);
- step2[0] = multiplication_round_shift_sse2(temp1, sign, (int)cospi_16_64);
+ step2[0] = multiplication_round_shift_sse2(temp1, sign, cospi_16_64);
abs_extend_64bit_sse2(step1[1], temp1, sign);
- step2[2] = multiplication_round_shift_sse2(temp1, sign, (int)cospi_24_64);
- step2[3] = multiplication_round_shift_sse2(temp1, sign, (int)cospi_8_64);
+ step2[2] = multiplication_round_shift_sse2(temp1, sign, cospi_24_64);
+ step2[3] = multiplication_round_shift_sse2(temp1, sign, cospi_8_64);
step2[4] = _mm_add_epi32(step1[4], step1[5]);
step2[5] = _mm_sub_epi32(step1[4], step1[5]);
step2[6] = _mm_sub_epi32(step1[7], step1[6]);
step1[2] = io[4];
step1[1] = io[2];
step1[3] = io[6];
- highbd_butterfly_sse4_1(io[1], io[7], (int)cospi_28_64, (int)cospi_4_64,
- &step1[4], &step1[7]);
- highbd_butterfly_sse4_1(io[5], io[3], (int)cospi_12_64, (int)cospi_20_64,
- &step1[5], &step1[6]);
+ highbd_butterfly_sse4_1(io[1], io[7], cospi_28_64, cospi_4_64, &step1[4],
+ &step1[7]);
+ highbd_butterfly_sse4_1(io[5], io[3], cospi_12_64, cospi_20_64, &step1[5],
+ &step1[6]);
// stage 2
highbd_butterfly_cospi16_sse4_1(step1[0], step1[2], &step2[0], &step2[1]);
- highbd_butterfly_sse4_1(step1[1], step1[3], (int)cospi_24_64, (int)cospi_8_64,
+ highbd_butterfly_sse4_1(step1[1], step1[3], cospi_24_64, cospi_8_64,
&step2[2], &step2[3]);
step2[4] = _mm_add_epi32(step1[4], step1[5]);
step2[5] = _mm_sub_epi32(step1[4], step1[5]);
step1[0] = io[0];
step1[1] = io[2];
extend_64bit(io[1], temp1);
- step1[4] = multiplication_round_shift_sse4_1(temp1, (int)cospi_28_64);
- step1[7] = multiplication_round_shift_sse4_1(temp1, (int)cospi_4_64);
+ step1[4] = multiplication_round_shift_sse4_1(temp1, cospi_28_64);
+ step1[7] = multiplication_round_shift_sse4_1(temp1, cospi_4_64);
extend_64bit(io[3], temp1);
- step1[5] = multiplication_round_shift_sse4_1(temp1, -(int)cospi_20_64);
- step1[6] = multiplication_round_shift_sse4_1(temp1, (int)cospi_12_64);
+ step1[5] = multiplication_round_shift_sse4_1(temp1, -cospi_20_64);
+ step1[6] = multiplication_round_shift_sse4_1(temp1, cospi_12_64);
// stage 2
extend_64bit(step1[0], temp1);
- step2[0] = multiplication_round_shift_sse4_1(temp1, (int)cospi_16_64);
+ step2[0] = multiplication_round_shift_sse4_1(temp1, cospi_16_64);
extend_64bit(step1[1], temp1);
- step2[2] = multiplication_round_shift_sse4_1(temp1, (int)cospi_24_64);
- step2[3] = multiplication_round_shift_sse4_1(temp1, (int)cospi_8_64);
+ step2[2] = multiplication_round_shift_sse4_1(temp1, cospi_24_64);
+ step2[3] = multiplication_round_shift_sse4_1(temp1, cospi_8_64);
step2[4] = _mm_add_epi32(step1[4], step1[5]);
step2[5] = _mm_sub_epi32(step1[4], step1[5]);
step2[6] = _mm_sub_epi32(step1[7], step1[6]);
temp2 = _mm_add_epi32(in0, in1);
abs_extend_64bit_sse2(temp2, temp1, sign);
- *out0 = multiplication_round_shift_sse2(temp1, sign, (int)cospi_16_64);
+ *out0 = multiplication_round_shift_sse2(temp1, sign, cospi_16_64);
temp2 = _mm_sub_epi32(in0, in1);
abs_extend_64bit_sse2(temp2, temp1, sign);
- *out1 = multiplication_round_shift_sse2(temp1, sign, (int)cospi_16_64);
+ *out1 = multiplication_round_shift_sse2(temp1, sign, cospi_16_64);
}
// Only do addition and subtraction butterfly, size = 16, 32
temp2 = _mm_add_epi32(in0, in1);
extend_64bit(temp2, temp1);
- *out0 = multiplication_round_shift_sse4_1(temp1, (int)cospi_16_64);
+ *out0 = multiplication_round_shift_sse4_1(temp1, cospi_16_64);
temp2 = _mm_sub_epi32(in0, in1);
extend_64bit(temp2, temp1);
- *out1 = multiplication_round_shift_sse4_1(temp1, (int)cospi_16_64);
+ *out1 = multiplication_round_shift_sse4_1(temp1, cospi_16_64);
}
static INLINE void highbd_partial_butterfly_sse4_1(const __m128i in,
__m128i step1[8], step2[8];
// stage 3
- butterfly(in[4], zero, (int)cospi_28_64, (int)cospi_4_64, &step1[4],
- &step1[7]);
+ butterfly(in[4], zero, cospi_28_64, cospi_4_64, &step1[4], &step1[7]);
// stage 4
step2[0] = butterfly_cospi16(in[0]);
step1[2] = step2[0];
step1[3] = step2[0];
step1[4] = step2[4];
- butterfly(step2[6], step2[5], (int)cospi_16_64, (int)cospi_16_64, &step1[5],
- &step1[6]);
+ butterfly(step2[6], step2[5], cospi_16_64, cospi_16_64, &step1[5], &step1[6]);
step1[7] = step2[7];
// stage 6
__m128i step1[16], step2[16];
// stage 2
- butterfly(in[2], zero, (int)cospi_30_64, (int)cospi_2_64, &step2[8],
- &step2[15]);
- butterfly(zero, in[6], (int)cospi_6_64, (int)cospi_26_64, &step2[11],
- &step2[12]);
+ butterfly(in[2], zero, cospi_30_64, cospi_2_64, &step2[8], &step2[15]);
+ butterfly(zero, in[6], cospi_6_64, cospi_26_64, &step2[11], &step2[12]);
// stage 3
step1[8] = step2[8];
__m128i step1[32];
// stage 1
- butterfly(in[1], zero, (int)cospi_31_64, (int)cospi_1_64, &step1[16],
- &step1[31]);
- butterfly(zero, in[7], (int)cospi_7_64, (int)cospi_25_64, &step1[19],
- &step1[28]);
- butterfly(in[5], zero, (int)cospi_27_64, (int)cospi_5_64, &step1[20],
- &step1[27]);
- butterfly(zero, in[3], (int)cospi_3_64, (int)cospi_29_64, &step1[23],
- &step1[24]);
+ butterfly(in[1], zero, cospi_31_64, cospi_1_64, &step1[16], &step1[31]);
+ butterfly(zero, in[7], cospi_7_64, cospi_25_64, &step1[19], &step1[28]);
+ butterfly(in[5], zero, cospi_27_64, cospi_5_64, &step1[20], &step1[27]);
+ butterfly(zero, in[3], cospi_3_64, cospi_29_64, &step1[23], &step1[24]);
// stage 3
- butterfly(step1[31], step1[16], (int)cospi_28_64, (int)cospi_4_64, &step1[17],
+ butterfly(step1[31], step1[16], cospi_28_64, cospi_4_64, &step1[17],
&step1[30]);
- butterfly(step1[28], step1[19], -(int)cospi_4_64, (int)cospi_28_64,
- &step1[18], &step1[29]);
- butterfly(step1[27], step1[20], (int)cospi_12_64, (int)cospi_20_64,
- &step1[21], &step1[26]);
- butterfly(step1[24], step1[23], -(int)cospi_20_64, (int)cospi_12_64,
- &step1[22], &step1[25]);
+ butterfly(step1[28], step1[19], -cospi_4_64, cospi_28_64, &step1[18],
+ &step1[29]);
+ butterfly(step1[27], step1[20], cospi_12_64, cospi_20_64, &step1[21],
+ &step1[26]);
+ butterfly(step1[24], step1[23], -cospi_20_64, cospi_12_64, &step1[22],
+ &step1[25]);
idct32_8x32_quarter_3_4_stage_4_to_7(step1, out);
}
__m128i step1[8], step2[8];
// stage 3
- butterfly(in[4], in[28], (int)cospi_28_64, (int)cospi_4_64, &step1[4],
- &step1[7]);
- butterfly(in[20], in[12], (int)cospi_12_64, (int)cospi_20_64, &step1[5],
- &step1[6]);
+ butterfly(in[4], in[28], cospi_28_64, cospi_4_64, &step1[4], &step1[7]);
+ butterfly(in[20], in[12], cospi_12_64, cospi_20_64, &step1[5], &step1[6]);
// stage 4
- butterfly(in[0], in[16], (int)cospi_16_64, (int)cospi_16_64, &step2[1],
- &step2[0]);
- butterfly(in[8], in[24], (int)cospi_24_64, (int)cospi_8_64, &step2[2],
- &step2[3]);
+ butterfly(in[0], in[16], cospi_16_64, cospi_16_64, &step2[1], &step2[0]);
+ butterfly(in[8], in[24], cospi_24_64, cospi_8_64, &step2[2], &step2[3]);
step2[4] = _mm_add_epi16(step1[4], step1[5]);
step2[5] = _mm_sub_epi16(step1[4], step1[5]);
step2[6] = _mm_sub_epi16(step1[7], step1[6]);
step1[2] = _mm_sub_epi16(step2[1], step2[2]);
step1[3] = _mm_sub_epi16(step2[0], step2[3]);
step1[4] = step2[4];
- butterfly(step2[6], step2[5], (int)cospi_16_64, (int)cospi_16_64, &step1[5],
- &step1[6]);
+ butterfly(step2[6], step2[5], cospi_16_64, cospi_16_64, &step1[5], &step1[6]);
step1[7] = step2[7];
// stage 6
__m128i step1[16], step2[16];
// stage 2
- butterfly(in[2], in[30], (int)cospi_30_64, (int)cospi_2_64, &step2[8],
- &step2[15]);
- butterfly(in[18], in[14], (int)cospi_14_64, (int)cospi_18_64, &step2[9],
- &step2[14]);
- butterfly(in[10], in[22], (int)cospi_22_64, (int)cospi_10_64, &step2[10],
- &step2[13]);
- butterfly(in[26], in[6], (int)cospi_6_64, (int)cospi_26_64, &step2[11],
- &step2[12]);
+ butterfly(in[2], in[30], cospi_30_64, cospi_2_64, &step2[8], &step2[15]);
+ butterfly(in[18], in[14], cospi_14_64, cospi_18_64, &step2[9], &step2[14]);
+ butterfly(in[10], in[22], cospi_22_64, cospi_10_64, &step2[10], &step2[13]);
+ butterfly(in[26], in[6], cospi_6_64, cospi_26_64, &step2[11], &step2[12]);
// stage 3
step1[8] = _mm_add_epi16(step2[8], step2[9]);
__m128i step1[32], step2[32];
// stage 1
- butterfly(in[1], in[31], (int)cospi_31_64, (int)cospi_1_64, &step1[16],
- &step1[31]);
- butterfly(in[17], in[15], (int)cospi_15_64, (int)cospi_17_64, &step1[17],
- &step1[30]);
- butterfly(in[9], in[23], (int)cospi_23_64, (int)cospi_9_64, &step1[18],
- &step1[29]);
- butterfly(in[25], in[7], (int)cospi_7_64, (int)cospi_25_64, &step1[19],
- &step1[28]);
+ butterfly(in[1], in[31], cospi_31_64, cospi_1_64, &step1[16], &step1[31]);
+ butterfly(in[17], in[15], cospi_15_64, cospi_17_64, &step1[17], &step1[30]);
+ butterfly(in[9], in[23], cospi_23_64, cospi_9_64, &step1[18], &step1[29]);
+ butterfly(in[25], in[7], cospi_7_64, cospi_25_64, &step1[19], &step1[28]);
- butterfly(in[5], in[27], (int)cospi_27_64, (int)cospi_5_64, &step1[20],
- &step1[27]);
- butterfly(in[21], in[11], (int)cospi_11_64, (int)cospi_21_64, &step1[21],
- &step1[26]);
+ butterfly(in[5], in[27], cospi_27_64, cospi_5_64, &step1[20], &step1[27]);
+ butterfly(in[21], in[11], cospi_11_64, cospi_21_64, &step1[21], &step1[26]);
- butterfly(in[13], in[19], (int)cospi_19_64, (int)cospi_13_64, &step1[22],
- &step1[25]);
- butterfly(in[29], in[3], (int)cospi_3_64, (int)cospi_29_64, &step1[23],
- &step1[24]);
+ butterfly(in[13], in[19], cospi_19_64, cospi_13_64, &step1[22], &step1[25]);
+ butterfly(in[29], in[3], cospi_3_64, cospi_29_64, &step1[23], &step1[24]);
// stage 2
step2[16] = _mm_add_epi16(step1[16], step1[17]);
// stage 3
step1[16] = step2[16];
step1[31] = step2[31];
- butterfly(step2[30], step2[17], (int)cospi_28_64, (int)cospi_4_64, &step1[17],
+ butterfly(step2[30], step2[17], cospi_28_64, cospi_4_64, &step1[17],
&step1[30]);
- butterfly(step2[29], step2[18], -(int)cospi_4_64, (int)cospi_28_64,
- &step1[18], &step1[29]);
+ butterfly(step2[29], step2[18], -cospi_4_64, cospi_28_64, &step1[18],
+ &step1[29]);
step1[19] = step2[19];
step1[20] = step2[20];
- butterfly(step2[26], step2[21], (int)cospi_12_64, (int)cospi_20_64,
- &step1[21], &step1[26]);
- butterfly(step2[25], step2[22], -(int)cospi_20_64, (int)cospi_12_64,
- &step1[22], &step1[25]);
+ butterfly(step2[26], step2[21], cospi_12_64, cospi_20_64, &step1[21],
+ &step1[26]);
+ butterfly(step2[25], step2[22], -cospi_20_64, cospi_12_64, &step1[22],
+ &step1[25]);
step1[23] = step2[23];
step1[24] = step2[24];
step1[27] = step2[27];
}
static INLINE __m128i butterfly_cospi16(const __m128i in) {
- const __m128i cst = pair_set_epi16((int)cospi_16_64, (int)cospi_16_64);
+ const __m128i cst = pair_set_epi16(cospi_16_64, cospi_16_64);
const __m128i lo = _mm_unpacklo_epi16(in, _mm_setzero_si128());
const __m128i hi = _mm_unpackhi_epi16(in, _mm_setzero_si128());
return idct_calc_wraplow_sse2(lo, hi, cst);
__m128i step1[8], step2[8];
// stage 1
- butterfly(in[1], in[7], (int)cospi_28_64, (int)cospi_4_64, &step1[4],
- &step1[7]);
- butterfly(in[5], in[3], (int)cospi_12_64, (int)cospi_20_64, &step1[5],
- &step1[6]);
+ butterfly(in[1], in[7], cospi_28_64, cospi_4_64, &step1[4], &step1[7]);
+ butterfly(in[5], in[3], cospi_12_64, cospi_20_64, &step1[5], &step1[6]);
// stage 2
- butterfly(in[0], in[4], (int)cospi_16_64, (int)cospi_16_64, &step2[1],
- &step2[0]);
- butterfly(in[2], in[6], (int)cospi_24_64, (int)cospi_8_64, &step2[2],
- &step2[3]);
+ butterfly(in[0], in[4], cospi_16_64, cospi_16_64, &step2[1], &step2[0]);
+ butterfly(in[2], in[6], cospi_24_64, cospi_8_64, &step2[2], &step2[3]);
step2[4] = _mm_add_epi16(step1[4], step1[5]);
step2[5] = _mm_sub_epi16(step1[4], step1[5]);
step1[1] = _mm_add_epi16(step2[1], step2[2]);
step1[2] = _mm_sub_epi16(step2[1], step2[2]);
step1[3] = _mm_sub_epi16(step2[0], step2[3]);
- butterfly(step2[6], step2[5], (int)cospi_16_64, (int)cospi_16_64, &step1[5],
- &step1[6]);
+ butterfly(step2[6], step2[5], cospi_16_64, cospi_16_64, &step1[5], &step1[6]);
// stage 4
out[0] = _mm_add_epi16(step1[0], step2[7]);
__m128i step1[16], step2[16];
// stage 2
- butterfly(in[1], in[15], (int)cospi_30_64, (int)cospi_2_64, &step2[8],
- &step2[15]);
- butterfly(in[9], in[7], (int)cospi_14_64, (int)cospi_18_64, &step2[9],
- &step2[14]);
- butterfly(in[5], in[11], (int)cospi_22_64, (int)cospi_10_64, &step2[10],
- &step2[13]);
- butterfly(in[13], in[3], (int)cospi_6_64, (int)cospi_26_64, &step2[11],
- &step2[12]);
+ butterfly(in[1], in[15], cospi_30_64, cospi_2_64, &step2[8], &step2[15]);
+ butterfly(in[9], in[7], cospi_14_64, cospi_18_64, &step2[9], &step2[14]);
+ butterfly(in[5], in[11], cospi_22_64, cospi_10_64, &step2[10], &step2[13]);
+ butterfly(in[13], in[3], cospi_6_64, cospi_26_64, &step2[11], &step2[12]);
// stage 3
- butterfly(in[2], in[14], (int)cospi_28_64, (int)cospi_4_64, &step1[4],
- &step1[7]);
- butterfly(in[10], in[6], (int)cospi_12_64, (int)cospi_20_64, &step1[5],
- &step1[6]);
+ butterfly(in[2], in[14], cospi_28_64, cospi_4_64, &step1[4], &step1[7]);
+ butterfly(in[10], in[6], cospi_12_64, cospi_20_64, &step1[5], &step1[6]);
step1[8] = _mm_add_epi16(step2[8], step2[9]);
step1[9] = _mm_sub_epi16(step2[8], step2[9]);
step1[10] = _mm_sub_epi16(step2[11], step2[10]);
step1[15] = _mm_add_epi16(step2[14], step2[15]);
// stage 4
- butterfly(in[0], in[8], (int)cospi_16_64, (int)cospi_16_64, &step2[1],
- &step2[0]);
- butterfly(in[4], in[12], (int)cospi_24_64, (int)cospi_8_64, &step2[2],
- &step2[3]);
- butterfly(step1[14], step1[9], (int)cospi_24_64, (int)cospi_8_64, &step2[9],
+ butterfly(in[0], in[8], cospi_16_64, cospi_16_64, &step2[1], &step2[0]);
+ butterfly(in[4], in[12], cospi_24_64, cospi_8_64, &step2[2], &step2[3]);
+ butterfly(step1[14], step1[9], cospi_24_64, cospi_8_64, &step2[9],
&step2[14]);
- butterfly(step1[10], step1[13], -(int)cospi_8_64, -(int)cospi_24_64,
- &step2[13], &step2[10]);
+ butterfly(step1[10], step1[13], -cospi_8_64, -cospi_24_64, &step2[13],
+ &step2[10]);
step2[5] = _mm_sub_epi16(step1[4], step1[5]);
step1[4] = _mm_add_epi16(step1[4], step1[5]);
step2[6] = _mm_sub_epi16(step1[7], step1[6]);
step1[1] = _mm_add_epi16(step2[1], step2[2]);
step1[2] = _mm_sub_epi16(step2[1], step2[2]);
step1[3] = _mm_sub_epi16(step2[0], step2[3]);
- butterfly(step2[6], step2[5], (int)cospi_16_64, (int)cospi_16_64, &step1[5],
- &step1[6]);
+ butterfly(step2[6], step2[5], cospi_16_64, cospi_16_64, &step1[5], &step1[6]);
step1[8] = _mm_add_epi16(step2[8], step2[11]);
step1[9] = _mm_add_epi16(step2[9], step2[10]);
step1[10] = _mm_sub_epi16(step2[9], step2[10]);
step2[5] = _mm_sub_epi16(step1[2], step1[5]);
step2[6] = _mm_sub_epi16(step1[1], step1[6]);
step2[7] = _mm_sub_epi16(step1[0], step1[7]);
- butterfly(step1[13], step1[10], (int)cospi_16_64, (int)cospi_16_64,
- &step2[10], &step2[13]);
- butterfly(step1[12], step1[11], (int)cospi_16_64, (int)cospi_16_64,
- &step2[11], &step2[12]);
+ butterfly(step1[13], step1[10], cospi_16_64, cospi_16_64, &step2[10],
+ &step2[13]);
+ butterfly(step1[12], step1[11], cospi_16_64, cospi_16_64, &step2[11],
+ &step2[12]);
// stage 7
out[0] = _mm_add_epi16(step2[0], step1[15]);
transpose_16bit_4x8(l, io);
// stage 2
- butterfly(io[1], zero, (int)cospi_30_64, (int)cospi_2_64, &step2[8],
- &step2[15]);
- butterfly(zero, io[3], (int)cospi_6_64, (int)cospi_26_64, &step2[11],
- &step2[12]);
+ butterfly(io[1], zero, cospi_30_64, cospi_2_64, &step2[8], &step2[15]);
+ butterfly(zero, io[3], cospi_6_64, cospi_26_64, &step2[11], &step2[12]);
// stage 3
- butterfly(io[2], zero, (int)cospi_28_64, (int)cospi_4_64, &step1[4],
- &step1[7]);
+ butterfly(io[2], zero, cospi_28_64, cospi_4_64, &step1[4], &step1[7]);
// stage 4
step1[0] = butterfly_cospi16(io[0]);
- butterfly(step2[15], step2[8], (int)cospi_24_64, (int)cospi_8_64, &step2[9],
+ butterfly(step2[15], step2[8], cospi_24_64, cospi_8_64, &step2[9],
&step2[14]);
- butterfly(step2[11], step2[12], -(int)cospi_8_64, -(int)cospi_24_64,
- &step2[13], &step2[10]);
+ butterfly(step2[11], step2[12], -cospi_8_64, -cospi_24_64, &step2[13],
+ &step2[10]);
// stage 5
- butterfly(step1[7], step1[4], (int)cospi_16_64, (int)cospi_16_64, &step1[5],
- &step1[6]);
+ butterfly(step1[7], step1[4], cospi_16_64, cospi_16_64, &step1[5], &step1[6]);
step1[8] = _mm_add_epi16(step2[8], step2[11]);
step1[9] = _mm_add_epi16(step2[9], step2[10]);
step1[10] = _mm_sub_epi16(step2[9], step2[10]);
step2[5] = _mm_sub_epi16(step1[0], step1[5]);
step2[6] = _mm_sub_epi16(step1[0], step1[6]);
step2[7] = _mm_sub_epi16(step1[0], step1[7]);
- butterfly(step1[13], step1[10], (int)cospi_16_64, (int)cospi_16_64,
- &step2[10], &step2[13]);
- butterfly(step1[12], step1[11], (int)cospi_16_64, (int)cospi_16_64,
- &step2[11], &step2[12]);
+ butterfly(step1[13], step1[10], cospi_16_64, cospi_16_64, &step2[10],
+ &step2[13]);
+ butterfly(step1[12], step1[11], cospi_16_64, cospi_16_64, &step2[11],
+ &step2[12]);
// stage 7
io[0] = _mm_add_epi16(step2[0], step1[15]);
// stage 4
step2[8] = step1[8];
step2[15] = step1[15];
- butterfly(step1[14], step1[9], (int)cospi_24_64, (int)cospi_8_64, &step2[9],
+ butterfly(step1[14], step1[9], cospi_24_64, cospi_8_64, &step2[9],
&step2[14]);
- butterfly(step1[13], step1[10], -(int)cospi_8_64, (int)cospi_24_64,
- &step2[10], &step2[13]);
+ butterfly(step1[13], step1[10], -cospi_8_64, cospi_24_64, &step2[10],
+ &step2[13]);
step2[11] = step1[11];
step2[12] = step1[12];
// stage 6
out[8] = step1[8];
out[9] = step1[9];
- butterfly(step1[13], step1[10], (int)cospi_16_64, (int)cospi_16_64, &out[10],
- &out[13]);
- butterfly(step1[12], step1[11], (int)cospi_16_64, (int)cospi_16_64, &out[11],
- &out[12]);
+ butterfly(step1[13], step1[10], cospi_16_64, cospi_16_64, &out[10], &out[13]);
+ butterfly(step1[12], step1[11], cospi_16_64, cospi_16_64, &out[11], &out[12]);
out[14] = step1[14];
out[15] = step1[15];
}
// stage 5
step1[16] = step2[16];
step1[17] = step2[17];
- butterfly(step2[29], step2[18], (int)cospi_24_64, (int)cospi_8_64, &step1[18],
+ butterfly(step2[29], step2[18], cospi_24_64, cospi_8_64, &step1[18],
&step1[29]);
- butterfly(step2[28], step2[19], (int)cospi_24_64, (int)cospi_8_64, &step1[19],
+ butterfly(step2[28], step2[19], cospi_24_64, cospi_8_64, &step1[19],
&step1[28]);
- butterfly(step2[27], step2[20], -(int)cospi_8_64, (int)cospi_24_64,
- &step1[20], &step1[27]);
- butterfly(step2[26], step2[21], -(int)cospi_8_64, (int)cospi_24_64,
- &step1[21], &step1[26]);
+ butterfly(step2[27], step2[20], -cospi_8_64, cospi_24_64, &step1[20],
+ &step1[27]);
+ butterfly(step2[26], step2[21], -cospi_8_64, cospi_24_64, &step1[21],
+ &step1[26]);
step1[22] = step2[22];
step1[23] = step2[23];
step1[24] = step2[24];
out[31] = _mm_add_epi16(step1[24], step1[31]);
// stage 7
- butterfly(step2[27], step2[20], (int)cospi_16_64, (int)cospi_16_64, &out[20],
- &out[27]);
- butterfly(step2[26], step2[21], (int)cospi_16_64, (int)cospi_16_64, &out[21],
- &out[26]);
- butterfly(step2[25], step2[22], (int)cospi_16_64, (int)cospi_16_64, &out[22],
- &out[25]);
- butterfly(step2[24], step2[23], (int)cospi_16_64, (int)cospi_16_64, &out[23],
- &out[24]);
+ butterfly(step2[27], step2[20], cospi_16_64, cospi_16_64, &out[20], &out[27]);
+ butterfly(step2[26], step2[21], cospi_16_64, cospi_16_64, &out[21], &out[26]);
+ butterfly(step2[25], step2[22], cospi_16_64, cospi_16_64, &out[22], &out[25]);
+ butterfly(step2[24], step2[23], cospi_16_64, cospi_16_64, &out[23], &out[24]);
}
void idct4_sse2(__m128i *const in);
}
static INLINE __m128i partial_butterfly_cospi16_ssse3(const __m128i in) {
- const __m128i coef_pair = _mm_set1_epi16(2 * (int)cospi_16_64);
+ const __m128i coef_pair = _mm_set1_epi16(2 * cospi_16_64);
return _mm_mulhrs_epi16(in, coef_pair);
}
__m128i step1[8], step2[8];
// stage 3
- partial_butterfly_ssse3(in[4], (int)cospi_28_64, (int)cospi_4_64, &step1[4],
- &step1[7]);
+ partial_butterfly_ssse3(in[4], cospi_28_64, cospi_4_64, &step1[4], &step1[7]);
// stage 4
step2[0] = partial_butterfly_cospi16_ssse3(in[0]);
step1[2] = step2[0];
step1[3] = step2[0];
step1[4] = step2[4];
- butterfly(step2[6], step2[5], (int)cospi_16_64, (int)cospi_16_64, &step1[5],
- &step1[6]);
+ butterfly(step2[6], step2[5], cospi_16_64, cospi_16_64, &step1[5], &step1[6]);
step1[7] = step2[7];
// stage 6
__m128i step1[16], step2[16];
// stage 2
- partial_butterfly_ssse3(in[2], (int)cospi_30_64, (int)cospi_2_64, &step2[8],
+ partial_butterfly_ssse3(in[2], cospi_30_64, cospi_2_64, &step2[8],
&step2[15]);
- partial_butterfly_ssse3(in[6], -(int)cospi_26_64, (int)cospi_6_64, &step2[11],
+ partial_butterfly_ssse3(in[6], -cospi_26_64, cospi_6_64, &step2[11],
&step2[12]);
// stage 3
__m128i step1[32];
// stage 1
- partial_butterfly_ssse3(in[1], (int)cospi_31_64, (int)cospi_1_64, &step1[16],
+ partial_butterfly_ssse3(in[1], cospi_31_64, cospi_1_64, &step1[16],
&step1[31]);
- partial_butterfly_ssse3(in[7], -(int)cospi_25_64, (int)cospi_7_64, &step1[19],
+ partial_butterfly_ssse3(in[7], -cospi_25_64, cospi_7_64, &step1[19],
&step1[28]);
- partial_butterfly_ssse3(in[5], (int)cospi_27_64, (int)cospi_5_64, &step1[20],
+ partial_butterfly_ssse3(in[5], cospi_27_64, cospi_5_64, &step1[20],
&step1[27]);
- partial_butterfly_ssse3(in[3], -(int)cospi_29_64, (int)cospi_3_64, &step1[23],
+ partial_butterfly_ssse3(in[3], -cospi_29_64, cospi_3_64, &step1[23],
&step1[24]);
// stage 3
- butterfly(step1[31], step1[16], (int)cospi_28_64, (int)cospi_4_64, &step1[17],
+ butterfly(step1[31], step1[16], cospi_28_64, cospi_4_64, &step1[17],
&step1[30]);
- butterfly(step1[28], step1[19], -(int)cospi_4_64, (int)cospi_28_64,
- &step1[18], &step1[29]);
- butterfly(step1[27], step1[20], (int)cospi_12_64, (int)cospi_20_64,
- &step1[21], &step1[26]);
- butterfly(step1[24], step1[23], -(int)cospi_20_64, (int)cospi_12_64,
- &step1[22], &step1[25]);
+ butterfly(step1[28], step1[19], -cospi_4_64, cospi_28_64, &step1[18],
+ &step1[29]);
+ butterfly(step1[27], step1[20], cospi_12_64, cospi_20_64, &step1[21],
+ &step1[26]);
+ butterfly(step1[24], step1[23], -cospi_20_64, cospi_12_64, &step1[22],
+ &step1[25]);
idct32_8x32_quarter_3_4_stage_4_to_7(step1, out);
}
__m128i step1[8], step2[8];
// stage 3
- partial_butterfly_ssse3(in[4], (int)cospi_28_64, (int)cospi_4_64, &step1[4],
- &step1[7]);
- partial_butterfly_ssse3(in[12], -(int)cospi_20_64, (int)cospi_12_64,
- &step1[5], &step1[6]);
+ partial_butterfly_ssse3(in[4], cospi_28_64, cospi_4_64, &step1[4], &step1[7]);
+ partial_butterfly_ssse3(in[12], -cospi_20_64, cospi_12_64, &step1[5],
+ &step1[6]);
// stage 4
step2[0] = partial_butterfly_cospi16_ssse3(in[0]);
- partial_butterfly_ssse3(in[8], (int)cospi_24_64, (int)cospi_8_64, &step2[2],
- &step2[3]);
+ partial_butterfly_ssse3(in[8], cospi_24_64, cospi_8_64, &step2[2], &step2[3]);
step2[4] = _mm_add_epi16(step1[4], step1[5]);
step2[5] = _mm_sub_epi16(step1[4], step1[5]);
step2[6] = _mm_sub_epi16(step1[7], step1[6]);
step1[2] = _mm_sub_epi16(step2[0], step2[2]);
step1[3] = _mm_sub_epi16(step2[0], step2[3]);
step1[4] = step2[4];
- butterfly(step2[6], step2[5], (int)cospi_16_64, (int)cospi_16_64, &step1[5],
- &step1[6]);
+ butterfly(step2[6], step2[5], cospi_16_64, cospi_16_64, &step1[5], &step1[6]);
step1[7] = step2[7];
// stage 6
__m128i step1[16], step2[16];
// stage 2
- partial_butterfly_ssse3(in[2], (int)cospi_30_64, (int)cospi_2_64, &step2[8],
+ partial_butterfly_ssse3(in[2], cospi_30_64, cospi_2_64, &step2[8],
&step2[15]);
- partial_butterfly_ssse3(in[14], -(int)cospi_18_64, (int)cospi_14_64,
- &step2[9], &step2[14]);
- partial_butterfly_ssse3(in[10], (int)cospi_22_64, (int)cospi_10_64,
- &step2[10], &step2[13]);
- partial_butterfly_ssse3(in[6], -(int)cospi_26_64, (int)cospi_6_64, &step2[11],
+ partial_butterfly_ssse3(in[14], -cospi_18_64, cospi_14_64, &step2[9],
+ &step2[14]);
+ partial_butterfly_ssse3(in[10], cospi_22_64, cospi_10_64, &step2[10],
+ &step2[13]);
+ partial_butterfly_ssse3(in[6], -cospi_26_64, cospi_6_64, &step2[11],
&step2[12]);
// stage 3
__m128i step1[32], step2[32];
// stage 1
- partial_butterfly_ssse3(in[1], (int)cospi_31_64, (int)cospi_1_64, &step1[16],
+ partial_butterfly_ssse3(in[1], cospi_31_64, cospi_1_64, &step1[16],
&step1[31]);
- partial_butterfly_ssse3(in[15], -(int)cospi_17_64, (int)cospi_15_64,
- &step1[17], &step1[30]);
- partial_butterfly_ssse3(in[9], (int)cospi_23_64, (int)cospi_9_64, &step1[18],
+ partial_butterfly_ssse3(in[15], -cospi_17_64, cospi_15_64, &step1[17],
+ &step1[30]);
+ partial_butterfly_ssse3(in[9], cospi_23_64, cospi_9_64, &step1[18],
&step1[29]);
- partial_butterfly_ssse3(in[7], -(int)cospi_25_64, (int)cospi_7_64, &step1[19],
+ partial_butterfly_ssse3(in[7], -cospi_25_64, cospi_7_64, &step1[19],
&step1[28]);
- partial_butterfly_ssse3(in[5], (int)cospi_27_64, (int)cospi_5_64, &step1[20],
+ partial_butterfly_ssse3(in[5], cospi_27_64, cospi_5_64, &step1[20],
&step1[27]);
- partial_butterfly_ssse3(in[11], -(int)cospi_21_64, (int)cospi_11_64,
- &step1[21], &step1[26]);
+ partial_butterfly_ssse3(in[11], -cospi_21_64, cospi_11_64, &step1[21],
+ &step1[26]);
- partial_butterfly_ssse3(in[13], (int)cospi_19_64, (int)cospi_13_64,
- &step1[22], &step1[25]);
- partial_butterfly_ssse3(in[3], -(int)cospi_29_64, (int)cospi_3_64, &step1[23],
+ partial_butterfly_ssse3(in[13], cospi_19_64, cospi_13_64, &step1[22],
+ &step1[25]);
+ partial_butterfly_ssse3(in[3], -cospi_29_64, cospi_3_64, &step1[23],
&step1[24]);
// stage 2
// stage 3
step1[16] = step2[16];
step1[31] = step2[31];
- butterfly(step2[30], step2[17], (int)cospi_28_64, (int)cospi_4_64, &step1[17],
+ butterfly(step2[30], step2[17], cospi_28_64, cospi_4_64, &step1[17],
&step1[30]);
- butterfly(step2[29], step2[18], -(int)cospi_4_64, (int)cospi_28_64,
- &step1[18], &step1[29]);
+ butterfly(step2[29], step2[18], -cospi_4_64, cospi_28_64, &step1[18],
+ &step1[29]);
step1[19] = step2[19];
step1[20] = step2[20];
- butterfly(step2[26], step2[21], (int)cospi_12_64, (int)cospi_20_64,
- &step1[21], &step1[26]);
- butterfly(step2[25], step2[22], -(int)cospi_20_64, (int)cospi_12_64,
- &step1[22], &step1[25]);
+ butterfly(step2[26], step2[21], cospi_12_64, cospi_20_64, &step1[21],
+ &step1[26]);
+ butterfly(step2[25], step2[22], -cospi_20_64, cospi_12_64, &step1[22],
+ &step1[25]);
step1[23] = step2[23];
step1[24] = step2[24];
step1[27] = step2[27];
step1[1] = _mm_add_epi16(step2[0], step2[2]);
step1[2] = _mm_sub_epi16(step2[0], step2[2]);
step1[3] = _mm_sub_epi16(step2[0], step2[3]);
- butterfly(step2[6], step2[5], (int)cospi_16_64, (int)cospi_16_64, &step1[5],
- &step1[6]);
+ butterfly(step2[6], step2[5], cospi_16_64, cospi_16_64, &step1[5], &step1[6]);
// stage 4
io[0] = _mm_add_epi16(step1[0], step2[7]);