Delete DCT 64x64 functions to save code size

- gcc x86_64 build binary is about 47 KB smaller.

Change-Id: I9e5f41fc9c5c75aec453f8b8567e228a6a6cd71d
This commit is contained in:
Yi Luo 2016-08-16 11:47:55 -07:00
Родитель 0818a7c828
Коммит 166dd79368
8 изменённых файлов: 5 добавлений и 2502 удалений

Просмотреть файл

@ -23,11 +23,10 @@ const int txfm_type_num = 2;
const TYPE_TXFM txfm_type_ls[2] = { TYPE_DCT, TYPE_ADST };
const int txfm_size_num = 5;
const int txfm_size_ls[5] = { 4, 8, 16, 32, 64 };
const int txfm_size_ls[5] = { 4, 8, 16, 32 };
const TxfmFunc fwd_txfm_func_ls[2][5] = {
{ vp10_fdct4_new, vp10_fdct8_new, vp10_fdct16_new, vp10_fdct32_new,
vp10_fdct64_new },
{ vp10_fdct4_new, vp10_fdct8_new, vp10_fdct16_new, vp10_fdct32_new, NULL },
{ vp10_fadst4_new, vp10_fadst8_new, vp10_fadst16_new, vp10_fadst32_new, NULL }
};

Просмотреть файл

@ -18,17 +18,15 @@ using libvpx_test::input_base;
namespace {
const int txfm_type_num = 2;
const int txfm_size_num = 5;
const int txfm_size_ls[5] = { 4, 8, 16, 32, 64 };
const int txfm_size_ls[5] = { 4, 8, 16, 32 };
const TxfmFunc fwd_txfm_func_ls[2][5] = {
{ vp10_fdct4_new, vp10_fdct8_new, vp10_fdct16_new, vp10_fdct32_new,
vp10_fdct64_new },
{ vp10_fdct4_new, vp10_fdct8_new, vp10_fdct16_new, vp10_fdct32_new, NULL },
{ vp10_fadst4_new, vp10_fadst8_new, vp10_fadst16_new, vp10_fadst32_new, NULL }
};
const TxfmFunc inv_txfm_func_ls[2][5] = {
{ vp10_idct4_new, vp10_idct8_new, vp10_idct16_new, vp10_idct32_new,
vp10_idct64_new },
{ vp10_idct4_new, vp10_idct8_new, vp10_idct16_new, vp10_idct32_new, NULL },
{ vp10_iadst4_new, vp10_iadst8_new, vp10_iadst16_new, vp10_iadst32_new, NULL }
};

Просмотреть файл

@ -1528,796 +1528,3 @@ void vp10_fadst32_new(const int32_t *input, int32_t *output,
bf1[31] = -bf0[1];
range_check(stage, input, bf1, size, stage_range[stage]);
}
void vp10_fdct64_new(const int32_t *input, int32_t *output,
const int8_t *cos_bit, const int8_t *stage_range) {
const int32_t size = 64;
const int32_t *cospi;
int32_t stage = 0;
int32_t *bf0, *bf1;
int32_t step[64];
// stage 0;
range_check(stage, input, input, size, stage_range[stage]);
// stage 1;
stage++;
cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
bf1 = output;
bf1[0] = input[0] + input[63];
bf1[1] = input[1] + input[62];
bf1[2] = input[2] + input[61];
bf1[3] = input[3] + input[60];
bf1[4] = input[4] + input[59];
bf1[5] = input[5] + input[58];
bf1[6] = input[6] + input[57];
bf1[7] = input[7] + input[56];
bf1[8] = input[8] + input[55];
bf1[9] = input[9] + input[54];
bf1[10] = input[10] + input[53];
bf1[11] = input[11] + input[52];
bf1[12] = input[12] + input[51];
bf1[13] = input[13] + input[50];
bf1[14] = input[14] + input[49];
bf1[15] = input[15] + input[48];
bf1[16] = input[16] + input[47];
bf1[17] = input[17] + input[46];
bf1[18] = input[18] + input[45];
bf1[19] = input[19] + input[44];
bf1[20] = input[20] + input[43];
bf1[21] = input[21] + input[42];
bf1[22] = input[22] + input[41];
bf1[23] = input[23] + input[40];
bf1[24] = input[24] + input[39];
bf1[25] = input[25] + input[38];
bf1[26] = input[26] + input[37];
bf1[27] = input[27] + input[36];
bf1[28] = input[28] + input[35];
bf1[29] = input[29] + input[34];
bf1[30] = input[30] + input[33];
bf1[31] = input[31] + input[32];
bf1[32] = -input[32] + input[31];
bf1[33] = -input[33] + input[30];
bf1[34] = -input[34] + input[29];
bf1[35] = -input[35] + input[28];
bf1[36] = -input[36] + input[27];
bf1[37] = -input[37] + input[26];
bf1[38] = -input[38] + input[25];
bf1[39] = -input[39] + input[24];
bf1[40] = -input[40] + input[23];
bf1[41] = -input[41] + input[22];
bf1[42] = -input[42] + input[21];
bf1[43] = -input[43] + input[20];
bf1[44] = -input[44] + input[19];
bf1[45] = -input[45] + input[18];
bf1[46] = -input[46] + input[17];
bf1[47] = -input[47] + input[16];
bf1[48] = -input[48] + input[15];
bf1[49] = -input[49] + input[14];
bf1[50] = -input[50] + input[13];
bf1[51] = -input[51] + input[12];
bf1[52] = -input[52] + input[11];
bf1[53] = -input[53] + input[10];
bf1[54] = -input[54] + input[9];
bf1[55] = -input[55] + input[8];
bf1[56] = -input[56] + input[7];
bf1[57] = -input[57] + input[6];
bf1[58] = -input[58] + input[5];
bf1[59] = -input[59] + input[4];
bf1[60] = -input[60] + input[3];
bf1[61] = -input[61] + input[2];
bf1[62] = -input[62] + input[1];
bf1[63] = -input[63] + input[0];
range_check(stage, input, bf1, size, stage_range[stage]);
// stage 2
stage++;
cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
bf0 = output;
bf1 = step;
bf1[0] = bf0[0] + bf0[31];
bf1[1] = bf0[1] + bf0[30];
bf1[2] = bf0[2] + bf0[29];
bf1[3] = bf0[3] + bf0[28];
bf1[4] = bf0[4] + bf0[27];
bf1[5] = bf0[5] + bf0[26];
bf1[6] = bf0[6] + bf0[25];
bf1[7] = bf0[7] + bf0[24];
bf1[8] = bf0[8] + bf0[23];
bf1[9] = bf0[9] + bf0[22];
bf1[10] = bf0[10] + bf0[21];
bf1[11] = bf0[11] + bf0[20];
bf1[12] = bf0[12] + bf0[19];
bf1[13] = bf0[13] + bf0[18];
bf1[14] = bf0[14] + bf0[17];
bf1[15] = bf0[15] + bf0[16];
bf1[16] = -bf0[16] + bf0[15];
bf1[17] = -bf0[17] + bf0[14];
bf1[18] = -bf0[18] + bf0[13];
bf1[19] = -bf0[19] + bf0[12];
bf1[20] = -bf0[20] + bf0[11];
bf1[21] = -bf0[21] + bf0[10];
bf1[22] = -bf0[22] + bf0[9];
bf1[23] = -bf0[23] + bf0[8];
bf1[24] = -bf0[24] + bf0[7];
bf1[25] = -bf0[25] + bf0[6];
bf1[26] = -bf0[26] + bf0[5];
bf1[27] = -bf0[27] + bf0[4];
bf1[28] = -bf0[28] + bf0[3];
bf1[29] = -bf0[29] + bf0[2];
bf1[30] = -bf0[30] + bf0[1];
bf1[31] = -bf0[31] + bf0[0];
bf1[32] = bf0[32];
bf1[33] = bf0[33];
bf1[34] = bf0[34];
bf1[35] = bf0[35];
bf1[36] = bf0[36];
bf1[37] = bf0[37];
bf1[38] = bf0[38];
bf1[39] = bf0[39];
bf1[40] = half_btf(-cospi[32], bf0[40], cospi[32], bf0[55], cos_bit[stage]);
bf1[41] = half_btf(-cospi[32], bf0[41], cospi[32], bf0[54], cos_bit[stage]);
bf1[42] = half_btf(-cospi[32], bf0[42], cospi[32], bf0[53], cos_bit[stage]);
bf1[43] = half_btf(-cospi[32], bf0[43], cospi[32], bf0[52], cos_bit[stage]);
bf1[44] = half_btf(-cospi[32], bf0[44], cospi[32], bf0[51], cos_bit[stage]);
bf1[45] = half_btf(-cospi[32], bf0[45], cospi[32], bf0[50], cos_bit[stage]);
bf1[46] = half_btf(-cospi[32], bf0[46], cospi[32], bf0[49], cos_bit[stage]);
bf1[47] = half_btf(-cospi[32], bf0[47], cospi[32], bf0[48], cos_bit[stage]);
bf1[48] = half_btf(cospi[32], bf0[48], cospi[32], bf0[47], cos_bit[stage]);
bf1[49] = half_btf(cospi[32], bf0[49], cospi[32], bf0[46], cos_bit[stage]);
bf1[50] = half_btf(cospi[32], bf0[50], cospi[32], bf0[45], cos_bit[stage]);
bf1[51] = half_btf(cospi[32], bf0[51], cospi[32], bf0[44], cos_bit[stage]);
bf1[52] = half_btf(cospi[32], bf0[52], cospi[32], bf0[43], cos_bit[stage]);
bf1[53] = half_btf(cospi[32], bf0[53], cospi[32], bf0[42], cos_bit[stage]);
bf1[54] = half_btf(cospi[32], bf0[54], cospi[32], bf0[41], cos_bit[stage]);
bf1[55] = half_btf(cospi[32], bf0[55], cospi[32], bf0[40], cos_bit[stage]);
bf1[56] = bf0[56];
bf1[57] = bf0[57];
bf1[58] = bf0[58];
bf1[59] = bf0[59];
bf1[60] = bf0[60];
bf1[61] = bf0[61];
bf1[62] = bf0[62];
bf1[63] = bf0[63];
range_check(stage, input, bf1, size, stage_range[stage]);
// stage 3
stage++;
cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
bf0 = step;
bf1 = output;
bf1[0] = bf0[0] + bf0[15];
bf1[1] = bf0[1] + bf0[14];
bf1[2] = bf0[2] + bf0[13];
bf1[3] = bf0[3] + bf0[12];
bf1[4] = bf0[4] + bf0[11];
bf1[5] = bf0[5] + bf0[10];
bf1[6] = bf0[6] + bf0[9];
bf1[7] = bf0[7] + bf0[8];
bf1[8] = -bf0[8] + bf0[7];
bf1[9] = -bf0[9] + bf0[6];
bf1[10] = -bf0[10] + bf0[5];
bf1[11] = -bf0[11] + bf0[4];
bf1[12] = -bf0[12] + bf0[3];
bf1[13] = -bf0[13] + bf0[2];
bf1[14] = -bf0[14] + bf0[1];
bf1[15] = -bf0[15] + bf0[0];
bf1[16] = bf0[16];
bf1[17] = bf0[17];
bf1[18] = bf0[18];
bf1[19] = bf0[19];
bf1[20] = half_btf(-cospi[32], bf0[20], cospi[32], bf0[27], cos_bit[stage]);
bf1[21] = half_btf(-cospi[32], bf0[21], cospi[32], bf0[26], cos_bit[stage]);
bf1[22] = half_btf(-cospi[32], bf0[22], cospi[32], bf0[25], cos_bit[stage]);
bf1[23] = half_btf(-cospi[32], bf0[23], cospi[32], bf0[24], cos_bit[stage]);
bf1[24] = half_btf(cospi[32], bf0[24], cospi[32], bf0[23], cos_bit[stage]);
bf1[25] = half_btf(cospi[32], bf0[25], cospi[32], bf0[22], cos_bit[stage]);
bf1[26] = half_btf(cospi[32], bf0[26], cospi[32], bf0[21], cos_bit[stage]);
bf1[27] = half_btf(cospi[32], bf0[27], cospi[32], bf0[20], cos_bit[stage]);
bf1[28] = bf0[28];
bf1[29] = bf0[29];
bf1[30] = bf0[30];
bf1[31] = bf0[31];
bf1[32] = bf0[32] + bf0[47];
bf1[33] = bf0[33] + bf0[46];
bf1[34] = bf0[34] + bf0[45];
bf1[35] = bf0[35] + bf0[44];
bf1[36] = bf0[36] + bf0[43];
bf1[37] = bf0[37] + bf0[42];
bf1[38] = bf0[38] + bf0[41];
bf1[39] = bf0[39] + bf0[40];
bf1[40] = -bf0[40] + bf0[39];
bf1[41] = -bf0[41] + bf0[38];
bf1[42] = -bf0[42] + bf0[37];
bf1[43] = -bf0[43] + bf0[36];
bf1[44] = -bf0[44] + bf0[35];
bf1[45] = -bf0[45] + bf0[34];
bf1[46] = -bf0[46] + bf0[33];
bf1[47] = -bf0[47] + bf0[32];
bf1[48] = -bf0[48] + bf0[63];
bf1[49] = -bf0[49] + bf0[62];
bf1[50] = -bf0[50] + bf0[61];
bf1[51] = -bf0[51] + bf0[60];
bf1[52] = -bf0[52] + bf0[59];
bf1[53] = -bf0[53] + bf0[58];
bf1[54] = -bf0[54] + bf0[57];
bf1[55] = -bf0[55] + bf0[56];
bf1[56] = bf0[56] + bf0[55];
bf1[57] = bf0[57] + bf0[54];
bf1[58] = bf0[58] + bf0[53];
bf1[59] = bf0[59] + bf0[52];
bf1[60] = bf0[60] + bf0[51];
bf1[61] = bf0[61] + bf0[50];
bf1[62] = bf0[62] + bf0[49];
bf1[63] = bf0[63] + bf0[48];
range_check(stage, input, bf1, size, stage_range[stage]);
// stage 4
stage++;
cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
bf0 = output;
bf1 = step;
bf1[0] = bf0[0] + bf0[7];
bf1[1] = bf0[1] + bf0[6];
bf1[2] = bf0[2] + bf0[5];
bf1[3] = bf0[3] + bf0[4];
bf1[4] = -bf0[4] + bf0[3];
bf1[5] = -bf0[5] + bf0[2];
bf1[6] = -bf0[6] + bf0[1];
bf1[7] = -bf0[7] + bf0[0];
bf1[8] = bf0[8];
bf1[9] = bf0[9];
bf1[10] = half_btf(-cospi[32], bf0[10], cospi[32], bf0[13], cos_bit[stage]);
bf1[11] = half_btf(-cospi[32], bf0[11], cospi[32], bf0[12], cos_bit[stage]);
bf1[12] = half_btf(cospi[32], bf0[12], cospi[32], bf0[11], cos_bit[stage]);
bf1[13] = half_btf(cospi[32], bf0[13], cospi[32], bf0[10], cos_bit[stage]);
bf1[14] = bf0[14];
bf1[15] = bf0[15];
bf1[16] = bf0[16] + bf0[23];
bf1[17] = bf0[17] + bf0[22];
bf1[18] = bf0[18] + bf0[21];
bf1[19] = bf0[19] + bf0[20];
bf1[20] = -bf0[20] + bf0[19];
bf1[21] = -bf0[21] + bf0[18];
bf1[22] = -bf0[22] + bf0[17];
bf1[23] = -bf0[23] + bf0[16];
bf1[24] = -bf0[24] + bf0[31];
bf1[25] = -bf0[25] + bf0[30];
bf1[26] = -bf0[26] + bf0[29];
bf1[27] = -bf0[27] + bf0[28];
bf1[28] = bf0[28] + bf0[27];
bf1[29] = bf0[29] + bf0[26];
bf1[30] = bf0[30] + bf0[25];
bf1[31] = bf0[31] + bf0[24];
bf1[32] = bf0[32];
bf1[33] = bf0[33];
bf1[34] = bf0[34];
bf1[35] = bf0[35];
bf1[36] = half_btf(-cospi[16], bf0[36], cospi[48], bf0[59], cos_bit[stage]);
bf1[37] = half_btf(-cospi[16], bf0[37], cospi[48], bf0[58], cos_bit[stage]);
bf1[38] = half_btf(-cospi[16], bf0[38], cospi[48], bf0[57], cos_bit[stage]);
bf1[39] = half_btf(-cospi[16], bf0[39], cospi[48], bf0[56], cos_bit[stage]);
bf1[40] = half_btf(-cospi[48], bf0[40], -cospi[16], bf0[55], cos_bit[stage]);
bf1[41] = half_btf(-cospi[48], bf0[41], -cospi[16], bf0[54], cos_bit[stage]);
bf1[42] = half_btf(-cospi[48], bf0[42], -cospi[16], bf0[53], cos_bit[stage]);
bf1[43] = half_btf(-cospi[48], bf0[43], -cospi[16], bf0[52], cos_bit[stage]);
bf1[44] = bf0[44];
bf1[45] = bf0[45];
bf1[46] = bf0[46];
bf1[47] = bf0[47];
bf1[48] = bf0[48];
bf1[49] = bf0[49];
bf1[50] = bf0[50];
bf1[51] = bf0[51];
bf1[52] = half_btf(cospi[48], bf0[52], -cospi[16], bf0[43], cos_bit[stage]);
bf1[53] = half_btf(cospi[48], bf0[53], -cospi[16], bf0[42], cos_bit[stage]);
bf1[54] = half_btf(cospi[48], bf0[54], -cospi[16], bf0[41], cos_bit[stage]);
bf1[55] = half_btf(cospi[48], bf0[55], -cospi[16], bf0[40], cos_bit[stage]);
bf1[56] = half_btf(cospi[16], bf0[56], cospi[48], bf0[39], cos_bit[stage]);
bf1[57] = half_btf(cospi[16], bf0[57], cospi[48], bf0[38], cos_bit[stage]);
bf1[58] = half_btf(cospi[16], bf0[58], cospi[48], bf0[37], cos_bit[stage]);
bf1[59] = half_btf(cospi[16], bf0[59], cospi[48], bf0[36], cos_bit[stage]);
bf1[60] = bf0[60];
bf1[61] = bf0[61];
bf1[62] = bf0[62];
bf1[63] = bf0[63];
range_check(stage, input, bf1, size, stage_range[stage]);
// stage 5
stage++;
cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
bf0 = step;
bf1 = output;
bf1[0] = bf0[0] + bf0[3];
bf1[1] = bf0[1] + bf0[2];
bf1[2] = -bf0[2] + bf0[1];
bf1[3] = -bf0[3] + bf0[0];
bf1[4] = bf0[4];
bf1[5] = half_btf(-cospi[32], bf0[5], cospi[32], bf0[6], cos_bit[stage]);
bf1[6] = half_btf(cospi[32], bf0[6], cospi[32], bf0[5], cos_bit[stage]);
bf1[7] = bf0[7];
bf1[8] = bf0[8] + bf0[11];
bf1[9] = bf0[9] + bf0[10];
bf1[10] = -bf0[10] + bf0[9];
bf1[11] = -bf0[11] + bf0[8];
bf1[12] = -bf0[12] + bf0[15];
bf1[13] = -bf0[13] + bf0[14];
bf1[14] = bf0[14] + bf0[13];
bf1[15] = bf0[15] + bf0[12];
bf1[16] = bf0[16];
bf1[17] = bf0[17];
bf1[18] = half_btf(-cospi[16], bf0[18], cospi[48], bf0[29], cos_bit[stage]);
bf1[19] = half_btf(-cospi[16], bf0[19], cospi[48], bf0[28], cos_bit[stage]);
bf1[20] = half_btf(-cospi[48], bf0[20], -cospi[16], bf0[27], cos_bit[stage]);
bf1[21] = half_btf(-cospi[48], bf0[21], -cospi[16], bf0[26], cos_bit[stage]);
bf1[22] = bf0[22];
bf1[23] = bf0[23];
bf1[24] = bf0[24];
bf1[25] = bf0[25];
bf1[26] = half_btf(cospi[48], bf0[26], -cospi[16], bf0[21], cos_bit[stage]);
bf1[27] = half_btf(cospi[48], bf0[27], -cospi[16], bf0[20], cos_bit[stage]);
bf1[28] = half_btf(cospi[16], bf0[28], cospi[48], bf0[19], cos_bit[stage]);
bf1[29] = half_btf(cospi[16], bf0[29], cospi[48], bf0[18], cos_bit[stage]);
bf1[30] = bf0[30];
bf1[31] = bf0[31];
bf1[32] = bf0[32] + bf0[39];
bf1[33] = bf0[33] + bf0[38];
bf1[34] = bf0[34] + bf0[37];
bf1[35] = bf0[35] + bf0[36];
bf1[36] = -bf0[36] + bf0[35];
bf1[37] = -bf0[37] + bf0[34];
bf1[38] = -bf0[38] + bf0[33];
bf1[39] = -bf0[39] + bf0[32];
bf1[40] = -bf0[40] + bf0[47];
bf1[41] = -bf0[41] + bf0[46];
bf1[42] = -bf0[42] + bf0[45];
bf1[43] = -bf0[43] + bf0[44];
bf1[44] = bf0[44] + bf0[43];
bf1[45] = bf0[45] + bf0[42];
bf1[46] = bf0[46] + bf0[41];
bf1[47] = bf0[47] + bf0[40];
bf1[48] = bf0[48] + bf0[55];
bf1[49] = bf0[49] + bf0[54];
bf1[50] = bf0[50] + bf0[53];
bf1[51] = bf0[51] + bf0[52];
bf1[52] = -bf0[52] + bf0[51];
bf1[53] = -bf0[53] + bf0[50];
bf1[54] = -bf0[54] + bf0[49];
bf1[55] = -bf0[55] + bf0[48];
bf1[56] = -bf0[56] + bf0[63];
bf1[57] = -bf0[57] + bf0[62];
bf1[58] = -bf0[58] + bf0[61];
bf1[59] = -bf0[59] + bf0[60];
bf1[60] = bf0[60] + bf0[59];
bf1[61] = bf0[61] + bf0[58];
bf1[62] = bf0[62] + bf0[57];
bf1[63] = bf0[63] + bf0[56];
range_check(stage, input, bf1, size, stage_range[stage]);
// stage 6
stage++;
cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
bf0 = output;
bf1 = step;
bf1[0] = half_btf(cospi[32], bf0[0], cospi[32], bf0[1], cos_bit[stage]);
bf1[1] = half_btf(-cospi[32], bf0[1], cospi[32], bf0[0], cos_bit[stage]);
bf1[2] = half_btf(cospi[48], bf0[2], cospi[16], bf0[3], cos_bit[stage]);
bf1[3] = half_btf(cospi[48], bf0[3], -cospi[16], bf0[2], cos_bit[stage]);
bf1[4] = bf0[4] + bf0[5];
bf1[5] = -bf0[5] + bf0[4];
bf1[6] = -bf0[6] + bf0[7];
bf1[7] = bf0[7] + bf0[6];
bf1[8] = bf0[8];
bf1[9] = half_btf(-cospi[16], bf0[9], cospi[48], bf0[14], cos_bit[stage]);
bf1[10] = half_btf(-cospi[48], bf0[10], -cospi[16], bf0[13], cos_bit[stage]);
bf1[11] = bf0[11];
bf1[12] = bf0[12];
bf1[13] = half_btf(cospi[48], bf0[13], -cospi[16], bf0[10], cos_bit[stage]);
bf1[14] = half_btf(cospi[16], bf0[14], cospi[48], bf0[9], cos_bit[stage]);
bf1[15] = bf0[15];
bf1[16] = bf0[16] + bf0[19];
bf1[17] = bf0[17] + bf0[18];
bf1[18] = -bf0[18] + bf0[17];
bf1[19] = -bf0[19] + bf0[16];
bf1[20] = -bf0[20] + bf0[23];
bf1[21] = -bf0[21] + bf0[22];
bf1[22] = bf0[22] + bf0[21];
bf1[23] = bf0[23] + bf0[20];
bf1[24] = bf0[24] + bf0[27];
bf1[25] = bf0[25] + bf0[26];
bf1[26] = -bf0[26] + bf0[25];
bf1[27] = -bf0[27] + bf0[24];
bf1[28] = -bf0[28] + bf0[31];
bf1[29] = -bf0[29] + bf0[30];
bf1[30] = bf0[30] + bf0[29];
bf1[31] = bf0[31] + bf0[28];
bf1[32] = bf0[32];
bf1[33] = bf0[33];
bf1[34] = half_btf(-cospi[8], bf0[34], cospi[56], bf0[61], cos_bit[stage]);
bf1[35] = half_btf(-cospi[8], bf0[35], cospi[56], bf0[60], cos_bit[stage]);
bf1[36] = half_btf(-cospi[56], bf0[36], -cospi[8], bf0[59], cos_bit[stage]);
bf1[37] = half_btf(-cospi[56], bf0[37], -cospi[8], bf0[58], cos_bit[stage]);
bf1[38] = bf0[38];
bf1[39] = bf0[39];
bf1[40] = bf0[40];
bf1[41] = bf0[41];
bf1[42] = half_btf(-cospi[40], bf0[42], cospi[24], bf0[53], cos_bit[stage]);
bf1[43] = half_btf(-cospi[40], bf0[43], cospi[24], bf0[52], cos_bit[stage]);
bf1[44] = half_btf(-cospi[24], bf0[44], -cospi[40], bf0[51], cos_bit[stage]);
bf1[45] = half_btf(-cospi[24], bf0[45], -cospi[40], bf0[50], cos_bit[stage]);
bf1[46] = bf0[46];
bf1[47] = bf0[47];
bf1[48] = bf0[48];
bf1[49] = bf0[49];
bf1[50] = half_btf(cospi[24], bf0[50], -cospi[40], bf0[45], cos_bit[stage]);
bf1[51] = half_btf(cospi[24], bf0[51], -cospi[40], bf0[44], cos_bit[stage]);
bf1[52] = half_btf(cospi[40], bf0[52], cospi[24], bf0[43], cos_bit[stage]);
bf1[53] = half_btf(cospi[40], bf0[53], cospi[24], bf0[42], cos_bit[stage]);
bf1[54] = bf0[54];
bf1[55] = bf0[55];
bf1[56] = bf0[56];
bf1[57] = bf0[57];
bf1[58] = half_btf(cospi[56], bf0[58], -cospi[8], bf0[37], cos_bit[stage]);
bf1[59] = half_btf(cospi[56], bf0[59], -cospi[8], bf0[36], cos_bit[stage]);
bf1[60] = half_btf(cospi[8], bf0[60], cospi[56], bf0[35], cos_bit[stage]);
bf1[61] = half_btf(cospi[8], bf0[61], cospi[56], bf0[34], cos_bit[stage]);
bf1[62] = bf0[62];
bf1[63] = bf0[63];
range_check(stage, input, bf1, size, stage_range[stage]);
// stage 7
stage++;
cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
bf0 = step;
bf1 = output;
bf1[0] = bf0[0];
bf1[1] = bf0[1];
bf1[2] = bf0[2];
bf1[3] = bf0[3];
bf1[4] = half_btf(cospi[56], bf0[4], cospi[8], bf0[7], cos_bit[stage]);
bf1[5] = half_btf(cospi[24], bf0[5], cospi[40], bf0[6], cos_bit[stage]);
bf1[6] = half_btf(cospi[24], bf0[6], -cospi[40], bf0[5], cos_bit[stage]);
bf1[7] = half_btf(cospi[56], bf0[7], -cospi[8], bf0[4], cos_bit[stage]);
bf1[8] = bf0[8] + bf0[9];
bf1[9] = -bf0[9] + bf0[8];
bf1[10] = -bf0[10] + bf0[11];
bf1[11] = bf0[11] + bf0[10];
bf1[12] = bf0[12] + bf0[13];
bf1[13] = -bf0[13] + bf0[12];
bf1[14] = -bf0[14] + bf0[15];
bf1[15] = bf0[15] + bf0[14];
bf1[16] = bf0[16];
bf1[17] = half_btf(-cospi[8], bf0[17], cospi[56], bf0[30], cos_bit[stage]);
bf1[18] = half_btf(-cospi[56], bf0[18], -cospi[8], bf0[29], cos_bit[stage]);
bf1[19] = bf0[19];
bf1[20] = bf0[20];
bf1[21] = half_btf(-cospi[40], bf0[21], cospi[24], bf0[26], cos_bit[stage]);
bf1[22] = half_btf(-cospi[24], bf0[22], -cospi[40], bf0[25], cos_bit[stage]);
bf1[23] = bf0[23];
bf1[24] = bf0[24];
bf1[25] = half_btf(cospi[24], bf0[25], -cospi[40], bf0[22], cos_bit[stage]);
bf1[26] = half_btf(cospi[40], bf0[26], cospi[24], bf0[21], cos_bit[stage]);
bf1[27] = bf0[27];
bf1[28] = bf0[28];
bf1[29] = half_btf(cospi[56], bf0[29], -cospi[8], bf0[18], cos_bit[stage]);
bf1[30] = half_btf(cospi[8], bf0[30], cospi[56], bf0[17], cos_bit[stage]);
bf1[31] = bf0[31];
bf1[32] = bf0[32] + bf0[35];
bf1[33] = bf0[33] + bf0[34];
bf1[34] = -bf0[34] + bf0[33];
bf1[35] = -bf0[35] + bf0[32];
bf1[36] = -bf0[36] + bf0[39];
bf1[37] = -bf0[37] + bf0[38];
bf1[38] = bf0[38] + bf0[37];
bf1[39] = bf0[39] + bf0[36];
bf1[40] = bf0[40] + bf0[43];
bf1[41] = bf0[41] + bf0[42];
bf1[42] = -bf0[42] + bf0[41];
bf1[43] = -bf0[43] + bf0[40];
bf1[44] = -bf0[44] + bf0[47];
bf1[45] = -bf0[45] + bf0[46];
bf1[46] = bf0[46] + bf0[45];
bf1[47] = bf0[47] + bf0[44];
bf1[48] = bf0[48] + bf0[51];
bf1[49] = bf0[49] + bf0[50];
bf1[50] = -bf0[50] + bf0[49];
bf1[51] = -bf0[51] + bf0[48];
bf1[52] = -bf0[52] + bf0[55];
bf1[53] = -bf0[53] + bf0[54];
bf1[54] = bf0[54] + bf0[53];
bf1[55] = bf0[55] + bf0[52];
bf1[56] = bf0[56] + bf0[59];
bf1[57] = bf0[57] + bf0[58];
bf1[58] = -bf0[58] + bf0[57];
bf1[59] = -bf0[59] + bf0[56];
bf1[60] = -bf0[60] + bf0[63];
bf1[61] = -bf0[61] + bf0[62];
bf1[62] = bf0[62] + bf0[61];
bf1[63] = bf0[63] + bf0[60];
range_check(stage, input, bf1, size, stage_range[stage]);
// stage 8
stage++;
cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
bf0 = output;
bf1 = step;
bf1[0] = bf0[0];
bf1[1] = bf0[1];
bf1[2] = bf0[2];
bf1[3] = bf0[3];
bf1[4] = bf0[4];
bf1[5] = bf0[5];
bf1[6] = bf0[6];
bf1[7] = bf0[7];
bf1[8] = half_btf(cospi[60], bf0[8], cospi[4], bf0[15], cos_bit[stage]);
bf1[9] = half_btf(cospi[28], bf0[9], cospi[36], bf0[14], cos_bit[stage]);
bf1[10] = half_btf(cospi[44], bf0[10], cospi[20], bf0[13], cos_bit[stage]);
bf1[11] = half_btf(cospi[12], bf0[11], cospi[52], bf0[12], cos_bit[stage]);
bf1[12] = half_btf(cospi[12], bf0[12], -cospi[52], bf0[11], cos_bit[stage]);
bf1[13] = half_btf(cospi[44], bf0[13], -cospi[20], bf0[10], cos_bit[stage]);
bf1[14] = half_btf(cospi[28], bf0[14], -cospi[36], bf0[9], cos_bit[stage]);
bf1[15] = half_btf(cospi[60], bf0[15], -cospi[4], bf0[8], cos_bit[stage]);
bf1[16] = bf0[16] + bf0[17];
bf1[17] = -bf0[17] + bf0[16];
bf1[18] = -bf0[18] + bf0[19];
bf1[19] = bf0[19] + bf0[18];
bf1[20] = bf0[20] + bf0[21];
bf1[21] = -bf0[21] + bf0[20];
bf1[22] = -bf0[22] + bf0[23];
bf1[23] = bf0[23] + bf0[22];
bf1[24] = bf0[24] + bf0[25];
bf1[25] = -bf0[25] + bf0[24];
bf1[26] = -bf0[26] + bf0[27];
bf1[27] = bf0[27] + bf0[26];
bf1[28] = bf0[28] + bf0[29];
bf1[29] = -bf0[29] + bf0[28];
bf1[30] = -bf0[30] + bf0[31];
bf1[31] = bf0[31] + bf0[30];
bf1[32] = bf0[32];
bf1[33] = half_btf(-cospi[4], bf0[33], cospi[60], bf0[62], cos_bit[stage]);
bf1[34] = half_btf(-cospi[60], bf0[34], -cospi[4], bf0[61], cos_bit[stage]);
bf1[35] = bf0[35];
bf1[36] = bf0[36];
bf1[37] = half_btf(-cospi[36], bf0[37], cospi[28], bf0[58], cos_bit[stage]);
bf1[38] = half_btf(-cospi[28], bf0[38], -cospi[36], bf0[57], cos_bit[stage]);
bf1[39] = bf0[39];
bf1[40] = bf0[40];
bf1[41] = half_btf(-cospi[20], bf0[41], cospi[44], bf0[54], cos_bit[stage]);
bf1[42] = half_btf(-cospi[44], bf0[42], -cospi[20], bf0[53], cos_bit[stage]);
bf1[43] = bf0[43];
bf1[44] = bf0[44];
bf1[45] = half_btf(-cospi[52], bf0[45], cospi[12], bf0[50], cos_bit[stage]);
bf1[46] = half_btf(-cospi[12], bf0[46], -cospi[52], bf0[49], cos_bit[stage]);
bf1[47] = bf0[47];
bf1[48] = bf0[48];
bf1[49] = half_btf(cospi[12], bf0[49], -cospi[52], bf0[46], cos_bit[stage]);
bf1[50] = half_btf(cospi[52], bf0[50], cospi[12], bf0[45], cos_bit[stage]);
bf1[51] = bf0[51];
bf1[52] = bf0[52];
bf1[53] = half_btf(cospi[44], bf0[53], -cospi[20], bf0[42], cos_bit[stage]);
bf1[54] = half_btf(cospi[20], bf0[54], cospi[44], bf0[41], cos_bit[stage]);
bf1[55] = bf0[55];
bf1[56] = bf0[56];
bf1[57] = half_btf(cospi[28], bf0[57], -cospi[36], bf0[38], cos_bit[stage]);
bf1[58] = half_btf(cospi[36], bf0[58], cospi[28], bf0[37], cos_bit[stage]);
bf1[59] = bf0[59];
bf1[60] = bf0[60];
bf1[61] = half_btf(cospi[60], bf0[61], -cospi[4], bf0[34], cos_bit[stage]);
bf1[62] = half_btf(cospi[4], bf0[62], cospi[60], bf0[33], cos_bit[stage]);
bf1[63] = bf0[63];
range_check(stage, input, bf1, size, stage_range[stage]);
// stage 9
stage++;
cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
bf0 = step;
bf1 = output;
bf1[0] = bf0[0];
bf1[1] = bf0[1];
bf1[2] = bf0[2];
bf1[3] = bf0[3];
bf1[4] = bf0[4];
bf1[5] = bf0[5];
bf1[6] = bf0[6];
bf1[7] = bf0[7];
bf1[8] = bf0[8];
bf1[9] = bf0[9];
bf1[10] = bf0[10];
bf1[11] = bf0[11];
bf1[12] = bf0[12];
bf1[13] = bf0[13];
bf1[14] = bf0[14];
bf1[15] = bf0[15];
bf1[16] = half_btf(cospi[62], bf0[16], cospi[2], bf0[31], cos_bit[stage]);
bf1[17] = half_btf(cospi[30], bf0[17], cospi[34], bf0[30], cos_bit[stage]);
bf1[18] = half_btf(cospi[46], bf0[18], cospi[18], bf0[29], cos_bit[stage]);
bf1[19] = half_btf(cospi[14], bf0[19], cospi[50], bf0[28], cos_bit[stage]);
bf1[20] = half_btf(cospi[54], bf0[20], cospi[10], bf0[27], cos_bit[stage]);
bf1[21] = half_btf(cospi[22], bf0[21], cospi[42], bf0[26], cos_bit[stage]);
bf1[22] = half_btf(cospi[38], bf0[22], cospi[26], bf0[25], cos_bit[stage]);
bf1[23] = half_btf(cospi[6], bf0[23], cospi[58], bf0[24], cos_bit[stage]);
bf1[24] = half_btf(cospi[6], bf0[24], -cospi[58], bf0[23], cos_bit[stage]);
bf1[25] = half_btf(cospi[38], bf0[25], -cospi[26], bf0[22], cos_bit[stage]);
bf1[26] = half_btf(cospi[22], bf0[26], -cospi[42], bf0[21], cos_bit[stage]);
bf1[27] = half_btf(cospi[54], bf0[27], -cospi[10], bf0[20], cos_bit[stage]);
bf1[28] = half_btf(cospi[14], bf0[28], -cospi[50], bf0[19], cos_bit[stage]);
bf1[29] = half_btf(cospi[46], bf0[29], -cospi[18], bf0[18], cos_bit[stage]);
bf1[30] = half_btf(cospi[30], bf0[30], -cospi[34], bf0[17], cos_bit[stage]);
bf1[31] = half_btf(cospi[62], bf0[31], -cospi[2], bf0[16], cos_bit[stage]);
bf1[32] = bf0[32] + bf0[33];
bf1[33] = -bf0[33] + bf0[32];
bf1[34] = -bf0[34] + bf0[35];
bf1[35] = bf0[35] + bf0[34];
bf1[36] = bf0[36] + bf0[37];
bf1[37] = -bf0[37] + bf0[36];
bf1[38] = -bf0[38] + bf0[39];
bf1[39] = bf0[39] + bf0[38];
bf1[40] = bf0[40] + bf0[41];
bf1[41] = -bf0[41] + bf0[40];
bf1[42] = -bf0[42] + bf0[43];
bf1[43] = bf0[43] + bf0[42];
bf1[44] = bf0[44] + bf0[45];
bf1[45] = -bf0[45] + bf0[44];
bf1[46] = -bf0[46] + bf0[47];
bf1[47] = bf0[47] + bf0[46];
bf1[48] = bf0[48] + bf0[49];
bf1[49] = -bf0[49] + bf0[48];
bf1[50] = -bf0[50] + bf0[51];
bf1[51] = bf0[51] + bf0[50];
bf1[52] = bf0[52] + bf0[53];
bf1[53] = -bf0[53] + bf0[52];
bf1[54] = -bf0[54] + bf0[55];
bf1[55] = bf0[55] + bf0[54];
bf1[56] = bf0[56] + bf0[57];
bf1[57] = -bf0[57] + bf0[56];
bf1[58] = -bf0[58] + bf0[59];
bf1[59] = bf0[59] + bf0[58];
bf1[60] = bf0[60] + bf0[61];
bf1[61] = -bf0[61] + bf0[60];
bf1[62] = -bf0[62] + bf0[63];
bf1[63] = bf0[63] + bf0[62];
range_check(stage, input, bf1, size, stage_range[stage]);
// stage 10
stage++;
cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
bf0 = output;
bf1 = step;
bf1[0] = bf0[0];
bf1[1] = bf0[1];
bf1[2] = bf0[2];
bf1[3] = bf0[3];
bf1[4] = bf0[4];
bf1[5] = bf0[5];
bf1[6] = bf0[6];
bf1[7] = bf0[7];
bf1[8] = bf0[8];
bf1[9] = bf0[9];
bf1[10] = bf0[10];
bf1[11] = bf0[11];
bf1[12] = bf0[12];
bf1[13] = bf0[13];
bf1[14] = bf0[14];
bf1[15] = bf0[15];
bf1[16] = bf0[16];
bf1[17] = bf0[17];
bf1[18] = bf0[18];
bf1[19] = bf0[19];
bf1[20] = bf0[20];
bf1[21] = bf0[21];
bf1[22] = bf0[22];
bf1[23] = bf0[23];
bf1[24] = bf0[24];
bf1[25] = bf0[25];
bf1[26] = bf0[26];
bf1[27] = bf0[27];
bf1[28] = bf0[28];
bf1[29] = bf0[29];
bf1[30] = bf0[30];
bf1[31] = bf0[31];
bf1[32] = half_btf(cospi[63], bf0[32], cospi[1], bf0[63], cos_bit[stage]);
bf1[33] = half_btf(cospi[31], bf0[33], cospi[33], bf0[62], cos_bit[stage]);
bf1[34] = half_btf(cospi[47], bf0[34], cospi[17], bf0[61], cos_bit[stage]);
bf1[35] = half_btf(cospi[15], bf0[35], cospi[49], bf0[60], cos_bit[stage]);
bf1[36] = half_btf(cospi[55], bf0[36], cospi[9], bf0[59], cos_bit[stage]);
bf1[37] = half_btf(cospi[23], bf0[37], cospi[41], bf0[58], cos_bit[stage]);
bf1[38] = half_btf(cospi[39], bf0[38], cospi[25], bf0[57], cos_bit[stage]);
bf1[39] = half_btf(cospi[7], bf0[39], cospi[57], bf0[56], cos_bit[stage]);
bf1[40] = half_btf(cospi[59], bf0[40], cospi[5], bf0[55], cos_bit[stage]);
bf1[41] = half_btf(cospi[27], bf0[41], cospi[37], bf0[54], cos_bit[stage]);
bf1[42] = half_btf(cospi[43], bf0[42], cospi[21], bf0[53], cos_bit[stage]);
bf1[43] = half_btf(cospi[11], bf0[43], cospi[53], bf0[52], cos_bit[stage]);
bf1[44] = half_btf(cospi[51], bf0[44], cospi[13], bf0[51], cos_bit[stage]);
bf1[45] = half_btf(cospi[19], bf0[45], cospi[45], bf0[50], cos_bit[stage]);
bf1[46] = half_btf(cospi[35], bf0[46], cospi[29], bf0[49], cos_bit[stage]);
bf1[47] = half_btf(cospi[3], bf0[47], cospi[61], bf0[48], cos_bit[stage]);
bf1[48] = half_btf(cospi[3], bf0[48], -cospi[61], bf0[47], cos_bit[stage]);
bf1[49] = half_btf(cospi[35], bf0[49], -cospi[29], bf0[46], cos_bit[stage]);
bf1[50] = half_btf(cospi[19], bf0[50], -cospi[45], bf0[45], cos_bit[stage]);
bf1[51] = half_btf(cospi[51], bf0[51], -cospi[13], bf0[44], cos_bit[stage]);
bf1[52] = half_btf(cospi[11], bf0[52], -cospi[53], bf0[43], cos_bit[stage]);
bf1[53] = half_btf(cospi[43], bf0[53], -cospi[21], bf0[42], cos_bit[stage]);
bf1[54] = half_btf(cospi[27], bf0[54], -cospi[37], bf0[41], cos_bit[stage]);
bf1[55] = half_btf(cospi[59], bf0[55], -cospi[5], bf0[40], cos_bit[stage]);
bf1[56] = half_btf(cospi[7], bf0[56], -cospi[57], bf0[39], cos_bit[stage]);
bf1[57] = half_btf(cospi[39], bf0[57], -cospi[25], bf0[38], cos_bit[stage]);
bf1[58] = half_btf(cospi[23], bf0[58], -cospi[41], bf0[37], cos_bit[stage]);
bf1[59] = half_btf(cospi[55], bf0[59], -cospi[9], bf0[36], cos_bit[stage]);
bf1[60] = half_btf(cospi[15], bf0[60], -cospi[49], bf0[35], cos_bit[stage]);
bf1[61] = half_btf(cospi[47], bf0[61], -cospi[17], bf0[34], cos_bit[stage]);
bf1[62] = half_btf(cospi[31], bf0[62], -cospi[33], bf0[33], cos_bit[stage]);
bf1[63] = half_btf(cospi[63], bf0[63], -cospi[1], bf0[32], cos_bit[stage]);
range_check(stage, input, bf1, size, stage_range[stage]);
// stage 11
stage++;
cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
bf0 = step;
bf1 = output;
bf1[0] = bf0[0];
bf1[1] = bf0[32];
bf1[2] = bf0[16];
bf1[3] = bf0[48];
bf1[4] = bf0[8];
bf1[5] = bf0[40];
bf1[6] = bf0[24];
bf1[7] = bf0[56];
bf1[8] = bf0[4];
bf1[9] = bf0[36];
bf1[10] = bf0[20];
bf1[11] = bf0[52];
bf1[12] = bf0[12];
bf1[13] = bf0[44];
bf1[14] = bf0[28];
bf1[15] = bf0[60];
bf1[16] = bf0[2];
bf1[17] = bf0[34];
bf1[18] = bf0[18];
bf1[19] = bf0[50];
bf1[20] = bf0[10];
bf1[21] = bf0[42];
bf1[22] = bf0[26];
bf1[23] = bf0[58];
bf1[24] = bf0[6];
bf1[25] = bf0[38];
bf1[26] = bf0[22];
bf1[27] = bf0[54];
bf1[28] = bf0[14];
bf1[29] = bf0[46];
bf1[30] = bf0[30];
bf1[31] = bf0[62];
bf1[32] = bf0[1];
bf1[33] = bf0[33];
bf1[34] = bf0[17];
bf1[35] = bf0[49];
bf1[36] = bf0[9];
bf1[37] = bf0[41];
bf1[38] = bf0[25];
bf1[39] = bf0[57];
bf1[40] = bf0[5];
bf1[41] = bf0[37];
bf1[42] = bf0[21];
bf1[43] = bf0[53];
bf1[44] = bf0[13];
bf1[45] = bf0[45];
bf1[46] = bf0[29];
bf1[47] = bf0[61];
bf1[48] = bf0[3];
bf1[49] = bf0[35];
bf1[50] = bf0[19];
bf1[51] = bf0[51];
bf1[52] = bf0[11];
bf1[53] = bf0[43];
bf1[54] = bf0[27];
bf1[55] = bf0[59];
bf1[56] = bf0[7];
bf1[57] = bf0[39];
bf1[58] = bf0[23];
bf1[59] = bf0[55];
bf1[60] = bf0[15];
bf1[61] = bf0[47];
bf1[62] = bf0[31];
bf1[63] = bf0[63];
range_check(stage, input, bf1, size, stage_range[stage]);
}

Просмотреть файл

@ -22,7 +22,6 @@ static INLINE TxfmFunc fwd_txfm_type_to_func(TXFM_TYPE txfm_type) {
case TXFM_TYPE_DCT8: return vp10_fdct8_new;
case TXFM_TYPE_DCT16: return vp10_fdct16_new;
case TXFM_TYPE_DCT32: return vp10_fdct32_new;
case TXFM_TYPE_DCT64: return vp10_fdct64_new;
case TXFM_TYPE_ADST4: return vp10_fadst4_new;
case TXFM_TYPE_ADST8: return vp10_fadst8_new;
case TXFM_TYPE_ADST16: return vp10_fadst16_new;

Просмотреть файл

@ -1535,796 +1535,3 @@ void vp10_iadst32_new(const int32_t *input, int32_t *output,
bf1[31] = bf0[0];
range_check(stage, input, bf1, size, stage_range[stage]);
}
void vp10_idct64_new(const int32_t *input, int32_t *output,
const int8_t *cos_bit, const int8_t *stage_range) {
const int32_t size = 64;
const int32_t *cospi;
int32_t stage = 0;
int32_t *bf0, *bf1;
int32_t step[64];
// stage 0;
range_check(stage, input, input, size, stage_range[stage]);
// stage 1;
stage++;
cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
bf1 = output;
bf1[0] = input[0];
bf1[1] = input[32];
bf1[2] = input[16];
bf1[3] = input[48];
bf1[4] = input[8];
bf1[5] = input[40];
bf1[6] = input[24];
bf1[7] = input[56];
bf1[8] = input[4];
bf1[9] = input[36];
bf1[10] = input[20];
bf1[11] = input[52];
bf1[12] = input[12];
bf1[13] = input[44];
bf1[14] = input[28];
bf1[15] = input[60];
bf1[16] = input[2];
bf1[17] = input[34];
bf1[18] = input[18];
bf1[19] = input[50];
bf1[20] = input[10];
bf1[21] = input[42];
bf1[22] = input[26];
bf1[23] = input[58];
bf1[24] = input[6];
bf1[25] = input[38];
bf1[26] = input[22];
bf1[27] = input[54];
bf1[28] = input[14];
bf1[29] = input[46];
bf1[30] = input[30];
bf1[31] = input[62];
bf1[32] = input[1];
bf1[33] = input[33];
bf1[34] = input[17];
bf1[35] = input[49];
bf1[36] = input[9];
bf1[37] = input[41];
bf1[38] = input[25];
bf1[39] = input[57];
bf1[40] = input[5];
bf1[41] = input[37];
bf1[42] = input[21];
bf1[43] = input[53];
bf1[44] = input[13];
bf1[45] = input[45];
bf1[46] = input[29];
bf1[47] = input[61];
bf1[48] = input[3];
bf1[49] = input[35];
bf1[50] = input[19];
bf1[51] = input[51];
bf1[52] = input[11];
bf1[53] = input[43];
bf1[54] = input[27];
bf1[55] = input[59];
bf1[56] = input[7];
bf1[57] = input[39];
bf1[58] = input[23];
bf1[59] = input[55];
bf1[60] = input[15];
bf1[61] = input[47];
bf1[62] = input[31];
bf1[63] = input[63];
range_check(stage, input, bf1, size, stage_range[stage]);
// stage 2
stage++;
cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
bf0 = output;
bf1 = step;
bf1[0] = bf0[0];
bf1[1] = bf0[1];
bf1[2] = bf0[2];
bf1[3] = bf0[3];
bf1[4] = bf0[4];
bf1[5] = bf0[5];
bf1[6] = bf0[6];
bf1[7] = bf0[7];
bf1[8] = bf0[8];
bf1[9] = bf0[9];
bf1[10] = bf0[10];
bf1[11] = bf0[11];
bf1[12] = bf0[12];
bf1[13] = bf0[13];
bf1[14] = bf0[14];
bf1[15] = bf0[15];
bf1[16] = bf0[16];
bf1[17] = bf0[17];
bf1[18] = bf0[18];
bf1[19] = bf0[19];
bf1[20] = bf0[20];
bf1[21] = bf0[21];
bf1[22] = bf0[22];
bf1[23] = bf0[23];
bf1[24] = bf0[24];
bf1[25] = bf0[25];
bf1[26] = bf0[26];
bf1[27] = bf0[27];
bf1[28] = bf0[28];
bf1[29] = bf0[29];
bf1[30] = bf0[30];
bf1[31] = bf0[31];
bf1[32] = half_btf(cospi[63], bf0[32], -cospi[1], bf0[63], cos_bit[stage]);
bf1[33] = half_btf(cospi[31], bf0[33], -cospi[33], bf0[62], cos_bit[stage]);
bf1[34] = half_btf(cospi[47], bf0[34], -cospi[17], bf0[61], cos_bit[stage]);
bf1[35] = half_btf(cospi[15], bf0[35], -cospi[49], bf0[60], cos_bit[stage]);
bf1[36] = half_btf(cospi[55], bf0[36], -cospi[9], bf0[59], cos_bit[stage]);
bf1[37] = half_btf(cospi[23], bf0[37], -cospi[41], bf0[58], cos_bit[stage]);
bf1[38] = half_btf(cospi[39], bf0[38], -cospi[25], bf0[57], cos_bit[stage]);
bf1[39] = half_btf(cospi[7], bf0[39], -cospi[57], bf0[56], cos_bit[stage]);
bf1[40] = half_btf(cospi[59], bf0[40], -cospi[5], bf0[55], cos_bit[stage]);
bf1[41] = half_btf(cospi[27], bf0[41], -cospi[37], bf0[54], cos_bit[stage]);
bf1[42] = half_btf(cospi[43], bf0[42], -cospi[21], bf0[53], cos_bit[stage]);
bf1[43] = half_btf(cospi[11], bf0[43], -cospi[53], bf0[52], cos_bit[stage]);
bf1[44] = half_btf(cospi[51], bf0[44], -cospi[13], bf0[51], cos_bit[stage]);
bf1[45] = half_btf(cospi[19], bf0[45], -cospi[45], bf0[50], cos_bit[stage]);
bf1[46] = half_btf(cospi[35], bf0[46], -cospi[29], bf0[49], cos_bit[stage]);
bf1[47] = half_btf(cospi[3], bf0[47], -cospi[61], bf0[48], cos_bit[stage]);
bf1[48] = half_btf(cospi[61], bf0[47], cospi[3], bf0[48], cos_bit[stage]);
bf1[49] = half_btf(cospi[29], bf0[46], cospi[35], bf0[49], cos_bit[stage]);
bf1[50] = half_btf(cospi[45], bf0[45], cospi[19], bf0[50], cos_bit[stage]);
bf1[51] = half_btf(cospi[13], bf0[44], cospi[51], bf0[51], cos_bit[stage]);
bf1[52] = half_btf(cospi[53], bf0[43], cospi[11], bf0[52], cos_bit[stage]);
bf1[53] = half_btf(cospi[21], bf0[42], cospi[43], bf0[53], cos_bit[stage]);
bf1[54] = half_btf(cospi[37], bf0[41], cospi[27], bf0[54], cos_bit[stage]);
bf1[55] = half_btf(cospi[5], bf0[40], cospi[59], bf0[55], cos_bit[stage]);
bf1[56] = half_btf(cospi[57], bf0[39], cospi[7], bf0[56], cos_bit[stage]);
bf1[57] = half_btf(cospi[25], bf0[38], cospi[39], bf0[57], cos_bit[stage]);
bf1[58] = half_btf(cospi[41], bf0[37], cospi[23], bf0[58], cos_bit[stage]);
bf1[59] = half_btf(cospi[9], bf0[36], cospi[55], bf0[59], cos_bit[stage]);
bf1[60] = half_btf(cospi[49], bf0[35], cospi[15], bf0[60], cos_bit[stage]);
bf1[61] = half_btf(cospi[17], bf0[34], cospi[47], bf0[61], cos_bit[stage]);
bf1[62] = half_btf(cospi[33], bf0[33], cospi[31], bf0[62], cos_bit[stage]);
bf1[63] = half_btf(cospi[1], bf0[32], cospi[63], bf0[63], cos_bit[stage]);
range_check(stage, input, bf1, size, stage_range[stage]);
// stage 3
stage++;
cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
bf0 = step;
bf1 = output;
bf1[0] = bf0[0];
bf1[1] = bf0[1];
bf1[2] = bf0[2];
bf1[3] = bf0[3];
bf1[4] = bf0[4];
bf1[5] = bf0[5];
bf1[6] = bf0[6];
bf1[7] = bf0[7];
bf1[8] = bf0[8];
bf1[9] = bf0[9];
bf1[10] = bf0[10];
bf1[11] = bf0[11];
bf1[12] = bf0[12];
bf1[13] = bf0[13];
bf1[14] = bf0[14];
bf1[15] = bf0[15];
bf1[16] = half_btf(cospi[62], bf0[16], -cospi[2], bf0[31], cos_bit[stage]);
bf1[17] = half_btf(cospi[30], bf0[17], -cospi[34], bf0[30], cos_bit[stage]);
bf1[18] = half_btf(cospi[46], bf0[18], -cospi[18], bf0[29], cos_bit[stage]);
bf1[19] = half_btf(cospi[14], bf0[19], -cospi[50], bf0[28], cos_bit[stage]);
bf1[20] = half_btf(cospi[54], bf0[20], -cospi[10], bf0[27], cos_bit[stage]);
bf1[21] = half_btf(cospi[22], bf0[21], -cospi[42], bf0[26], cos_bit[stage]);
bf1[22] = half_btf(cospi[38], bf0[22], -cospi[26], bf0[25], cos_bit[stage]);
bf1[23] = half_btf(cospi[6], bf0[23], -cospi[58], bf0[24], cos_bit[stage]);
bf1[24] = half_btf(cospi[58], bf0[23], cospi[6], bf0[24], cos_bit[stage]);
bf1[25] = half_btf(cospi[26], bf0[22], cospi[38], bf0[25], cos_bit[stage]);
bf1[26] = half_btf(cospi[42], bf0[21], cospi[22], bf0[26], cos_bit[stage]);
bf1[27] = half_btf(cospi[10], bf0[20], cospi[54], bf0[27], cos_bit[stage]);
bf1[28] = half_btf(cospi[50], bf0[19], cospi[14], bf0[28], cos_bit[stage]);
bf1[29] = half_btf(cospi[18], bf0[18], cospi[46], bf0[29], cos_bit[stage]);
bf1[30] = half_btf(cospi[34], bf0[17], cospi[30], bf0[30], cos_bit[stage]);
bf1[31] = half_btf(cospi[2], bf0[16], cospi[62], bf0[31], cos_bit[stage]);
bf1[32] = bf0[32] + bf0[33];
bf1[33] = bf0[32] - bf0[33];
bf1[34] = -bf0[34] + bf0[35];
bf1[35] = bf0[34] + bf0[35];
bf1[36] = bf0[36] + bf0[37];
bf1[37] = bf0[36] - bf0[37];
bf1[38] = -bf0[38] + bf0[39];
bf1[39] = bf0[38] + bf0[39];
bf1[40] = bf0[40] + bf0[41];
bf1[41] = bf0[40] - bf0[41];
bf1[42] = -bf0[42] + bf0[43];
bf1[43] = bf0[42] + bf0[43];
bf1[44] = bf0[44] + bf0[45];
bf1[45] = bf0[44] - bf0[45];
bf1[46] = -bf0[46] + bf0[47];
bf1[47] = bf0[46] + bf0[47];
bf1[48] = bf0[48] + bf0[49];
bf1[49] = bf0[48] - bf0[49];
bf1[50] = -bf0[50] + bf0[51];
bf1[51] = bf0[50] + bf0[51];
bf1[52] = bf0[52] + bf0[53];
bf1[53] = bf0[52] - bf0[53];
bf1[54] = -bf0[54] + bf0[55];
bf1[55] = bf0[54] + bf0[55];
bf1[56] = bf0[56] + bf0[57];
bf1[57] = bf0[56] - bf0[57];
bf1[58] = -bf0[58] + bf0[59];
bf1[59] = bf0[58] + bf0[59];
bf1[60] = bf0[60] + bf0[61];
bf1[61] = bf0[60] - bf0[61];
bf1[62] = -bf0[62] + bf0[63];
bf1[63] = bf0[62] + bf0[63];
range_check(stage, input, bf1, size, stage_range[stage]);
// stage 4
stage++;
cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
bf0 = output;
bf1 = step;
bf1[0] = bf0[0];
bf1[1] = bf0[1];
bf1[2] = bf0[2];
bf1[3] = bf0[3];
bf1[4] = bf0[4];
bf1[5] = bf0[5];
bf1[6] = bf0[6];
bf1[7] = bf0[7];
bf1[8] = half_btf(cospi[60], bf0[8], -cospi[4], bf0[15], cos_bit[stage]);
bf1[9] = half_btf(cospi[28], bf0[9], -cospi[36], bf0[14], cos_bit[stage]);
bf1[10] = half_btf(cospi[44], bf0[10], -cospi[20], bf0[13], cos_bit[stage]);
bf1[11] = half_btf(cospi[12], bf0[11], -cospi[52], bf0[12], cos_bit[stage]);
bf1[12] = half_btf(cospi[52], bf0[11], cospi[12], bf0[12], cos_bit[stage]);
bf1[13] = half_btf(cospi[20], bf0[10], cospi[44], bf0[13], cos_bit[stage]);
bf1[14] = half_btf(cospi[36], bf0[9], cospi[28], bf0[14], cos_bit[stage]);
bf1[15] = half_btf(cospi[4], bf0[8], cospi[60], bf0[15], cos_bit[stage]);
bf1[16] = bf0[16] + bf0[17];
bf1[17] = bf0[16] - bf0[17];
bf1[18] = -bf0[18] + bf0[19];
bf1[19] = bf0[18] + bf0[19];
bf1[20] = bf0[20] + bf0[21];
bf1[21] = bf0[20] - bf0[21];
bf1[22] = -bf0[22] + bf0[23];
bf1[23] = bf0[22] + bf0[23];
bf1[24] = bf0[24] + bf0[25];
bf1[25] = bf0[24] - bf0[25];
bf1[26] = -bf0[26] + bf0[27];
bf1[27] = bf0[26] + bf0[27];
bf1[28] = bf0[28] + bf0[29];
bf1[29] = bf0[28] - bf0[29];
bf1[30] = -bf0[30] + bf0[31];
bf1[31] = bf0[30] + bf0[31];
bf1[32] = bf0[32];
bf1[33] = half_btf(-cospi[4], bf0[33], cospi[60], bf0[62], cos_bit[stage]);
bf1[34] = half_btf(-cospi[60], bf0[34], -cospi[4], bf0[61], cos_bit[stage]);
bf1[35] = bf0[35];
bf1[36] = bf0[36];
bf1[37] = half_btf(-cospi[36], bf0[37], cospi[28], bf0[58], cos_bit[stage]);
bf1[38] = half_btf(-cospi[28], bf0[38], -cospi[36], bf0[57], cos_bit[stage]);
bf1[39] = bf0[39];
bf1[40] = bf0[40];
bf1[41] = half_btf(-cospi[20], bf0[41], cospi[44], bf0[54], cos_bit[stage]);
bf1[42] = half_btf(-cospi[44], bf0[42], -cospi[20], bf0[53], cos_bit[stage]);
bf1[43] = bf0[43];
bf1[44] = bf0[44];
bf1[45] = half_btf(-cospi[52], bf0[45], cospi[12], bf0[50], cos_bit[stage]);
bf1[46] = half_btf(-cospi[12], bf0[46], -cospi[52], bf0[49], cos_bit[stage]);
bf1[47] = bf0[47];
bf1[48] = bf0[48];
bf1[49] = half_btf(-cospi[52], bf0[46], cospi[12], bf0[49], cos_bit[stage]);
bf1[50] = half_btf(cospi[12], bf0[45], cospi[52], bf0[50], cos_bit[stage]);
bf1[51] = bf0[51];
bf1[52] = bf0[52];
bf1[53] = half_btf(-cospi[20], bf0[42], cospi[44], bf0[53], cos_bit[stage]);
bf1[54] = half_btf(cospi[44], bf0[41], cospi[20], bf0[54], cos_bit[stage]);
bf1[55] = bf0[55];
bf1[56] = bf0[56];
bf1[57] = half_btf(-cospi[36], bf0[38], cospi[28], bf0[57], cos_bit[stage]);
bf1[58] = half_btf(cospi[28], bf0[37], cospi[36], bf0[58], cos_bit[stage]);
bf1[59] = bf0[59];
bf1[60] = bf0[60];
bf1[61] = half_btf(-cospi[4], bf0[34], cospi[60], bf0[61], cos_bit[stage]);
bf1[62] = half_btf(cospi[60], bf0[33], cospi[4], bf0[62], cos_bit[stage]);
bf1[63] = bf0[63];
range_check(stage, input, bf1, size, stage_range[stage]);
// stage 5
stage++;
cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
bf0 = step;
bf1 = output;
bf1[0] = bf0[0];
bf1[1] = bf0[1];
bf1[2] = bf0[2];
bf1[3] = bf0[3];
bf1[4] = half_btf(cospi[56], bf0[4], -cospi[8], bf0[7], cos_bit[stage]);
bf1[5] = half_btf(cospi[24], bf0[5], -cospi[40], bf0[6], cos_bit[stage]);
bf1[6] = half_btf(cospi[40], bf0[5], cospi[24], bf0[6], cos_bit[stage]);
bf1[7] = half_btf(cospi[8], bf0[4], cospi[56], bf0[7], cos_bit[stage]);
bf1[8] = bf0[8] + bf0[9];
bf1[9] = bf0[8] - bf0[9];
bf1[10] = -bf0[10] + bf0[11];
bf1[11] = bf0[10] + bf0[11];
bf1[12] = bf0[12] + bf0[13];
bf1[13] = bf0[12] - bf0[13];
bf1[14] = -bf0[14] + bf0[15];
bf1[15] = bf0[14] + bf0[15];
bf1[16] = bf0[16];
bf1[17] = half_btf(-cospi[8], bf0[17], cospi[56], bf0[30], cos_bit[stage]);
bf1[18] = half_btf(-cospi[56], bf0[18], -cospi[8], bf0[29], cos_bit[stage]);
bf1[19] = bf0[19];
bf1[20] = bf0[20];
bf1[21] = half_btf(-cospi[40], bf0[21], cospi[24], bf0[26], cos_bit[stage]);
bf1[22] = half_btf(-cospi[24], bf0[22], -cospi[40], bf0[25], cos_bit[stage]);
bf1[23] = bf0[23];
bf1[24] = bf0[24];
bf1[25] = half_btf(-cospi[40], bf0[22], cospi[24], bf0[25], cos_bit[stage]);
bf1[26] = half_btf(cospi[24], bf0[21], cospi[40], bf0[26], cos_bit[stage]);
bf1[27] = bf0[27];
bf1[28] = bf0[28];
bf1[29] = half_btf(-cospi[8], bf0[18], cospi[56], bf0[29], cos_bit[stage]);
bf1[30] = half_btf(cospi[56], bf0[17], cospi[8], bf0[30], cos_bit[stage]);
bf1[31] = bf0[31];
bf1[32] = bf0[32] + bf0[35];
bf1[33] = bf0[33] + bf0[34];
bf1[34] = bf0[33] - bf0[34];
bf1[35] = bf0[32] - bf0[35];
bf1[36] = -bf0[36] + bf0[39];
bf1[37] = -bf0[37] + bf0[38];
bf1[38] = bf0[37] + bf0[38];
bf1[39] = bf0[36] + bf0[39];
bf1[40] = bf0[40] + bf0[43];
bf1[41] = bf0[41] + bf0[42];
bf1[42] = bf0[41] - bf0[42];
bf1[43] = bf0[40] - bf0[43];
bf1[44] = -bf0[44] + bf0[47];
bf1[45] = -bf0[45] + bf0[46];
bf1[46] = bf0[45] + bf0[46];
bf1[47] = bf0[44] + bf0[47];
bf1[48] = bf0[48] + bf0[51];
bf1[49] = bf0[49] + bf0[50];
bf1[50] = bf0[49] - bf0[50];
bf1[51] = bf0[48] - bf0[51];
bf1[52] = -bf0[52] + bf0[55];
bf1[53] = -bf0[53] + bf0[54];
bf1[54] = bf0[53] + bf0[54];
bf1[55] = bf0[52] + bf0[55];
bf1[56] = bf0[56] + bf0[59];
bf1[57] = bf0[57] + bf0[58];
bf1[58] = bf0[57] - bf0[58];
bf1[59] = bf0[56] - bf0[59];
bf1[60] = -bf0[60] + bf0[63];
bf1[61] = -bf0[61] + bf0[62];
bf1[62] = bf0[61] + bf0[62];
bf1[63] = bf0[60] + bf0[63];
range_check(stage, input, bf1, size, stage_range[stage]);
// stage 6
stage++;
cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
bf0 = output;
bf1 = step;
bf1[0] = half_btf(cospi[32], bf0[0], cospi[32], bf0[1], cos_bit[stage]);
bf1[1] = half_btf(cospi[32], bf0[0], -cospi[32], bf0[1], cos_bit[stage]);
bf1[2] = half_btf(cospi[48], bf0[2], -cospi[16], bf0[3], cos_bit[stage]);
bf1[3] = half_btf(cospi[16], bf0[2], cospi[48], bf0[3], cos_bit[stage]);
bf1[4] = bf0[4] + bf0[5];
bf1[5] = bf0[4] - bf0[5];
bf1[6] = -bf0[6] + bf0[7];
bf1[7] = bf0[6] + bf0[7];
bf1[8] = bf0[8];
bf1[9] = half_btf(-cospi[16], bf0[9], cospi[48], bf0[14], cos_bit[stage]);
bf1[10] = half_btf(-cospi[48], bf0[10], -cospi[16], bf0[13], cos_bit[stage]);
bf1[11] = bf0[11];
bf1[12] = bf0[12];
bf1[13] = half_btf(-cospi[16], bf0[10], cospi[48], bf0[13], cos_bit[stage]);
bf1[14] = half_btf(cospi[48], bf0[9], cospi[16], bf0[14], cos_bit[stage]);
bf1[15] = bf0[15];
bf1[16] = bf0[16] + bf0[19];
bf1[17] = bf0[17] + bf0[18];
bf1[18] = bf0[17] - bf0[18];
bf1[19] = bf0[16] - bf0[19];
bf1[20] = -bf0[20] + bf0[23];
bf1[21] = -bf0[21] + bf0[22];
bf1[22] = bf0[21] + bf0[22];
bf1[23] = bf0[20] + bf0[23];
bf1[24] = bf0[24] + bf0[27];
bf1[25] = bf0[25] + bf0[26];
bf1[26] = bf0[25] - bf0[26];
bf1[27] = bf0[24] - bf0[27];
bf1[28] = -bf0[28] + bf0[31];
bf1[29] = -bf0[29] + bf0[30];
bf1[30] = bf0[29] + bf0[30];
bf1[31] = bf0[28] + bf0[31];
bf1[32] = bf0[32];
bf1[33] = bf0[33];
bf1[34] = half_btf(-cospi[8], bf0[34], cospi[56], bf0[61], cos_bit[stage]);
bf1[35] = half_btf(-cospi[8], bf0[35], cospi[56], bf0[60], cos_bit[stage]);
bf1[36] = half_btf(-cospi[56], bf0[36], -cospi[8], bf0[59], cos_bit[stage]);
bf1[37] = half_btf(-cospi[56], bf0[37], -cospi[8], bf0[58], cos_bit[stage]);
bf1[38] = bf0[38];
bf1[39] = bf0[39];
bf1[40] = bf0[40];
bf1[41] = bf0[41];
bf1[42] = half_btf(-cospi[40], bf0[42], cospi[24], bf0[53], cos_bit[stage]);
bf1[43] = half_btf(-cospi[40], bf0[43], cospi[24], bf0[52], cos_bit[stage]);
bf1[44] = half_btf(-cospi[24], bf0[44], -cospi[40], bf0[51], cos_bit[stage]);
bf1[45] = half_btf(-cospi[24], bf0[45], -cospi[40], bf0[50], cos_bit[stage]);
bf1[46] = bf0[46];
bf1[47] = bf0[47];
bf1[48] = bf0[48];
bf1[49] = bf0[49];
bf1[50] = half_btf(-cospi[40], bf0[45], cospi[24], bf0[50], cos_bit[stage]);
bf1[51] = half_btf(-cospi[40], bf0[44], cospi[24], bf0[51], cos_bit[stage]);
bf1[52] = half_btf(cospi[24], bf0[43], cospi[40], bf0[52], cos_bit[stage]);
bf1[53] = half_btf(cospi[24], bf0[42], cospi[40], bf0[53], cos_bit[stage]);
bf1[54] = bf0[54];
bf1[55] = bf0[55];
bf1[56] = bf0[56];
bf1[57] = bf0[57];
bf1[58] = half_btf(-cospi[8], bf0[37], cospi[56], bf0[58], cos_bit[stage]);
bf1[59] = half_btf(-cospi[8], bf0[36], cospi[56], bf0[59], cos_bit[stage]);
bf1[60] = half_btf(cospi[56], bf0[35], cospi[8], bf0[60], cos_bit[stage]);
bf1[61] = half_btf(cospi[56], bf0[34], cospi[8], bf0[61], cos_bit[stage]);
bf1[62] = bf0[62];
bf1[63] = bf0[63];
range_check(stage, input, bf1, size, stage_range[stage]);
// stage 7
stage++;
cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
bf0 = step;
bf1 = output;
bf1[0] = bf0[0] + bf0[3];
bf1[1] = bf0[1] + bf0[2];
bf1[2] = bf0[1] - bf0[2];
bf1[3] = bf0[0] - bf0[3];
bf1[4] = bf0[4];
bf1[5] = half_btf(-cospi[32], bf0[5], cospi[32], bf0[6], cos_bit[stage]);
bf1[6] = half_btf(cospi[32], bf0[5], cospi[32], bf0[6], cos_bit[stage]);
bf1[7] = bf0[7];
bf1[8] = bf0[8] + bf0[11];
bf1[9] = bf0[9] + bf0[10];
bf1[10] = bf0[9] - bf0[10];
bf1[11] = bf0[8] - bf0[11];
bf1[12] = -bf0[12] + bf0[15];
bf1[13] = -bf0[13] + bf0[14];
bf1[14] = bf0[13] + bf0[14];
bf1[15] = bf0[12] + bf0[15];
bf1[16] = bf0[16];
bf1[17] = bf0[17];
bf1[18] = half_btf(-cospi[16], bf0[18], cospi[48], bf0[29], cos_bit[stage]);
bf1[19] = half_btf(-cospi[16], bf0[19], cospi[48], bf0[28], cos_bit[stage]);
bf1[20] = half_btf(-cospi[48], bf0[20], -cospi[16], bf0[27], cos_bit[stage]);
bf1[21] = half_btf(-cospi[48], bf0[21], -cospi[16], bf0[26], cos_bit[stage]);
bf1[22] = bf0[22];
bf1[23] = bf0[23];
bf1[24] = bf0[24];
bf1[25] = bf0[25];
bf1[26] = half_btf(-cospi[16], bf0[21], cospi[48], bf0[26], cos_bit[stage]);
bf1[27] = half_btf(-cospi[16], bf0[20], cospi[48], bf0[27], cos_bit[stage]);
bf1[28] = half_btf(cospi[48], bf0[19], cospi[16], bf0[28], cos_bit[stage]);
bf1[29] = half_btf(cospi[48], bf0[18], cospi[16], bf0[29], cos_bit[stage]);
bf1[30] = bf0[30];
bf1[31] = bf0[31];
bf1[32] = bf0[32] + bf0[39];
bf1[33] = bf0[33] + bf0[38];
bf1[34] = bf0[34] + bf0[37];
bf1[35] = bf0[35] + bf0[36];
bf1[36] = bf0[35] - bf0[36];
bf1[37] = bf0[34] - bf0[37];
bf1[38] = bf0[33] - bf0[38];
bf1[39] = bf0[32] - bf0[39];
bf1[40] = -bf0[40] + bf0[47];
bf1[41] = -bf0[41] + bf0[46];
bf1[42] = -bf0[42] + bf0[45];
bf1[43] = -bf0[43] + bf0[44];
bf1[44] = bf0[43] + bf0[44];
bf1[45] = bf0[42] + bf0[45];
bf1[46] = bf0[41] + bf0[46];
bf1[47] = bf0[40] + bf0[47];
bf1[48] = bf0[48] + bf0[55];
bf1[49] = bf0[49] + bf0[54];
bf1[50] = bf0[50] + bf0[53];
bf1[51] = bf0[51] + bf0[52];
bf1[52] = bf0[51] - bf0[52];
bf1[53] = bf0[50] - bf0[53];
bf1[54] = bf0[49] - bf0[54];
bf1[55] = bf0[48] - bf0[55];
bf1[56] = -bf0[56] + bf0[63];
bf1[57] = -bf0[57] + bf0[62];
bf1[58] = -bf0[58] + bf0[61];
bf1[59] = -bf0[59] + bf0[60];
bf1[60] = bf0[59] + bf0[60];
bf1[61] = bf0[58] + bf0[61];
bf1[62] = bf0[57] + bf0[62];
bf1[63] = bf0[56] + bf0[63];
range_check(stage, input, bf1, size, stage_range[stage]);
// stage 8
stage++;
cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
bf0 = output;
bf1 = step;
bf1[0] = bf0[0] + bf0[7];
bf1[1] = bf0[1] + bf0[6];
bf1[2] = bf0[2] + bf0[5];
bf1[3] = bf0[3] + bf0[4];
bf1[4] = bf0[3] - bf0[4];
bf1[5] = bf0[2] - bf0[5];
bf1[6] = bf0[1] - bf0[6];
bf1[7] = bf0[0] - bf0[7];
bf1[8] = bf0[8];
bf1[9] = bf0[9];
bf1[10] = half_btf(-cospi[32], bf0[10], cospi[32], bf0[13], cos_bit[stage]);
bf1[11] = half_btf(-cospi[32], bf0[11], cospi[32], bf0[12], cos_bit[stage]);
bf1[12] = half_btf(cospi[32], bf0[11], cospi[32], bf0[12], cos_bit[stage]);
bf1[13] = half_btf(cospi[32], bf0[10], cospi[32], bf0[13], cos_bit[stage]);
bf1[14] = bf0[14];
bf1[15] = bf0[15];
bf1[16] = bf0[16] + bf0[23];
bf1[17] = bf0[17] + bf0[22];
bf1[18] = bf0[18] + bf0[21];
bf1[19] = bf0[19] + bf0[20];
bf1[20] = bf0[19] - bf0[20];
bf1[21] = bf0[18] - bf0[21];
bf1[22] = bf0[17] - bf0[22];
bf1[23] = bf0[16] - bf0[23];
bf1[24] = -bf0[24] + bf0[31];
bf1[25] = -bf0[25] + bf0[30];
bf1[26] = -bf0[26] + bf0[29];
bf1[27] = -bf0[27] + bf0[28];
bf1[28] = bf0[27] + bf0[28];
bf1[29] = bf0[26] + bf0[29];
bf1[30] = bf0[25] + bf0[30];
bf1[31] = bf0[24] + bf0[31];
bf1[32] = bf0[32];
bf1[33] = bf0[33];
bf1[34] = bf0[34];
bf1[35] = bf0[35];
bf1[36] = half_btf(-cospi[16], bf0[36], cospi[48], bf0[59], cos_bit[stage]);
bf1[37] = half_btf(-cospi[16], bf0[37], cospi[48], bf0[58], cos_bit[stage]);
bf1[38] = half_btf(-cospi[16], bf0[38], cospi[48], bf0[57], cos_bit[stage]);
bf1[39] = half_btf(-cospi[16], bf0[39], cospi[48], bf0[56], cos_bit[stage]);
bf1[40] = half_btf(-cospi[48], bf0[40], -cospi[16], bf0[55], cos_bit[stage]);
bf1[41] = half_btf(-cospi[48], bf0[41], -cospi[16], bf0[54], cos_bit[stage]);
bf1[42] = half_btf(-cospi[48], bf0[42], -cospi[16], bf0[53], cos_bit[stage]);
bf1[43] = half_btf(-cospi[48], bf0[43], -cospi[16], bf0[52], cos_bit[stage]);
bf1[44] = bf0[44];
bf1[45] = bf0[45];
bf1[46] = bf0[46];
bf1[47] = bf0[47];
bf1[48] = bf0[48];
bf1[49] = bf0[49];
bf1[50] = bf0[50];
bf1[51] = bf0[51];
bf1[52] = half_btf(-cospi[16], bf0[43], cospi[48], bf0[52], cos_bit[stage]);
bf1[53] = half_btf(-cospi[16], bf0[42], cospi[48], bf0[53], cos_bit[stage]);
bf1[54] = half_btf(-cospi[16], bf0[41], cospi[48], bf0[54], cos_bit[stage]);
bf1[55] = half_btf(-cospi[16], bf0[40], cospi[48], bf0[55], cos_bit[stage]);
bf1[56] = half_btf(cospi[48], bf0[39], cospi[16], bf0[56], cos_bit[stage]);
bf1[57] = half_btf(cospi[48], bf0[38], cospi[16], bf0[57], cos_bit[stage]);
bf1[58] = half_btf(cospi[48], bf0[37], cospi[16], bf0[58], cos_bit[stage]);
bf1[59] = half_btf(cospi[48], bf0[36], cospi[16], bf0[59], cos_bit[stage]);
bf1[60] = bf0[60];
bf1[61] = bf0[61];
bf1[62] = bf0[62];
bf1[63] = bf0[63];
range_check(stage, input, bf1, size, stage_range[stage]);
// stage 9
stage++;
cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
bf0 = step;
bf1 = output;
bf1[0] = bf0[0] + bf0[15];
bf1[1] = bf0[1] + bf0[14];
bf1[2] = bf0[2] + bf0[13];
bf1[3] = bf0[3] + bf0[12];
bf1[4] = bf0[4] + bf0[11];
bf1[5] = bf0[5] + bf0[10];
bf1[6] = bf0[6] + bf0[9];
bf1[7] = bf0[7] + bf0[8];
bf1[8] = bf0[7] - bf0[8];
bf1[9] = bf0[6] - bf0[9];
bf1[10] = bf0[5] - bf0[10];
bf1[11] = bf0[4] - bf0[11];
bf1[12] = bf0[3] - bf0[12];
bf1[13] = bf0[2] - bf0[13];
bf1[14] = bf0[1] - bf0[14];
bf1[15] = bf0[0] - bf0[15];
bf1[16] = bf0[16];
bf1[17] = bf0[17];
bf1[18] = bf0[18];
bf1[19] = bf0[19];
bf1[20] = half_btf(-cospi[32], bf0[20], cospi[32], bf0[27], cos_bit[stage]);
bf1[21] = half_btf(-cospi[32], bf0[21], cospi[32], bf0[26], cos_bit[stage]);
bf1[22] = half_btf(-cospi[32], bf0[22], cospi[32], bf0[25], cos_bit[stage]);
bf1[23] = half_btf(-cospi[32], bf0[23], cospi[32], bf0[24], cos_bit[stage]);
bf1[24] = half_btf(cospi[32], bf0[23], cospi[32], bf0[24], cos_bit[stage]);
bf1[25] = half_btf(cospi[32], bf0[22], cospi[32], bf0[25], cos_bit[stage]);
bf1[26] = half_btf(cospi[32], bf0[21], cospi[32], bf0[26], cos_bit[stage]);
bf1[27] = half_btf(cospi[32], bf0[20], cospi[32], bf0[27], cos_bit[stage]);
bf1[28] = bf0[28];
bf1[29] = bf0[29];
bf1[30] = bf0[30];
bf1[31] = bf0[31];
bf1[32] = bf0[32] + bf0[47];
bf1[33] = bf0[33] + bf0[46];
bf1[34] = bf0[34] + bf0[45];
bf1[35] = bf0[35] + bf0[44];
bf1[36] = bf0[36] + bf0[43];
bf1[37] = bf0[37] + bf0[42];
bf1[38] = bf0[38] + bf0[41];
bf1[39] = bf0[39] + bf0[40];
bf1[40] = bf0[39] - bf0[40];
bf1[41] = bf0[38] - bf0[41];
bf1[42] = bf0[37] - bf0[42];
bf1[43] = bf0[36] - bf0[43];
bf1[44] = bf0[35] - bf0[44];
bf1[45] = bf0[34] - bf0[45];
bf1[46] = bf0[33] - bf0[46];
bf1[47] = bf0[32] - bf0[47];
bf1[48] = -bf0[48] + bf0[63];
bf1[49] = -bf0[49] + bf0[62];
bf1[50] = -bf0[50] + bf0[61];
bf1[51] = -bf0[51] + bf0[60];
bf1[52] = -bf0[52] + bf0[59];
bf1[53] = -bf0[53] + bf0[58];
bf1[54] = -bf0[54] + bf0[57];
bf1[55] = -bf0[55] + bf0[56];
bf1[56] = bf0[55] + bf0[56];
bf1[57] = bf0[54] + bf0[57];
bf1[58] = bf0[53] + bf0[58];
bf1[59] = bf0[52] + bf0[59];
bf1[60] = bf0[51] + bf0[60];
bf1[61] = bf0[50] + bf0[61];
bf1[62] = bf0[49] + bf0[62];
bf1[63] = bf0[48] + bf0[63];
range_check(stage, input, bf1, size, stage_range[stage]);
// stage 10
stage++;
cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
bf0 = output;
bf1 = step;
bf1[0] = bf0[0] + bf0[31];
bf1[1] = bf0[1] + bf0[30];
bf1[2] = bf0[2] + bf0[29];
bf1[3] = bf0[3] + bf0[28];
bf1[4] = bf0[4] + bf0[27];
bf1[5] = bf0[5] + bf0[26];
bf1[6] = bf0[6] + bf0[25];
bf1[7] = bf0[7] + bf0[24];
bf1[8] = bf0[8] + bf0[23];
bf1[9] = bf0[9] + bf0[22];
bf1[10] = bf0[10] + bf0[21];
bf1[11] = bf0[11] + bf0[20];
bf1[12] = bf0[12] + bf0[19];
bf1[13] = bf0[13] + bf0[18];
bf1[14] = bf0[14] + bf0[17];
bf1[15] = bf0[15] + bf0[16];
bf1[16] = bf0[15] - bf0[16];
bf1[17] = bf0[14] - bf0[17];
bf1[18] = bf0[13] - bf0[18];
bf1[19] = bf0[12] - bf0[19];
bf1[20] = bf0[11] - bf0[20];
bf1[21] = bf0[10] - bf0[21];
bf1[22] = bf0[9] - bf0[22];
bf1[23] = bf0[8] - bf0[23];
bf1[24] = bf0[7] - bf0[24];
bf1[25] = bf0[6] - bf0[25];
bf1[26] = bf0[5] - bf0[26];
bf1[27] = bf0[4] - bf0[27];
bf1[28] = bf0[3] - bf0[28];
bf1[29] = bf0[2] - bf0[29];
bf1[30] = bf0[1] - bf0[30];
bf1[31] = bf0[0] - bf0[31];
bf1[32] = bf0[32];
bf1[33] = bf0[33];
bf1[34] = bf0[34];
bf1[35] = bf0[35];
bf1[36] = bf0[36];
bf1[37] = bf0[37];
bf1[38] = bf0[38];
bf1[39] = bf0[39];
bf1[40] = half_btf(-cospi[32], bf0[40], cospi[32], bf0[55], cos_bit[stage]);
bf1[41] = half_btf(-cospi[32], bf0[41], cospi[32], bf0[54], cos_bit[stage]);
bf1[42] = half_btf(-cospi[32], bf0[42], cospi[32], bf0[53], cos_bit[stage]);
bf1[43] = half_btf(-cospi[32], bf0[43], cospi[32], bf0[52], cos_bit[stage]);
bf1[44] = half_btf(-cospi[32], bf0[44], cospi[32], bf0[51], cos_bit[stage]);
bf1[45] = half_btf(-cospi[32], bf0[45], cospi[32], bf0[50], cos_bit[stage]);
bf1[46] = half_btf(-cospi[32], bf0[46], cospi[32], bf0[49], cos_bit[stage]);
bf1[47] = half_btf(-cospi[32], bf0[47], cospi[32], bf0[48], cos_bit[stage]);
bf1[48] = half_btf(cospi[32], bf0[47], cospi[32], bf0[48], cos_bit[stage]);
bf1[49] = half_btf(cospi[32], bf0[46], cospi[32], bf0[49], cos_bit[stage]);
bf1[50] = half_btf(cospi[32], bf0[45], cospi[32], bf0[50], cos_bit[stage]);
bf1[51] = half_btf(cospi[32], bf0[44], cospi[32], bf0[51], cos_bit[stage]);
bf1[52] = half_btf(cospi[32], bf0[43], cospi[32], bf0[52], cos_bit[stage]);
bf1[53] = half_btf(cospi[32], bf0[42], cospi[32], bf0[53], cos_bit[stage]);
bf1[54] = half_btf(cospi[32], bf0[41], cospi[32], bf0[54], cos_bit[stage]);
bf1[55] = half_btf(cospi[32], bf0[40], cospi[32], bf0[55], cos_bit[stage]);
bf1[56] = bf0[56];
bf1[57] = bf0[57];
bf1[58] = bf0[58];
bf1[59] = bf0[59];
bf1[60] = bf0[60];
bf1[61] = bf0[61];
bf1[62] = bf0[62];
bf1[63] = bf0[63];
range_check(stage, input, bf1, size, stage_range[stage]);
// stage 11
stage++;
cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
bf0 = step;
bf1 = output;
bf1[0] = bf0[0] + bf0[63];
bf1[1] = bf0[1] + bf0[62];
bf1[2] = bf0[2] + bf0[61];
bf1[3] = bf0[3] + bf0[60];
bf1[4] = bf0[4] + bf0[59];
bf1[5] = bf0[5] + bf0[58];
bf1[6] = bf0[6] + bf0[57];
bf1[7] = bf0[7] + bf0[56];
bf1[8] = bf0[8] + bf0[55];
bf1[9] = bf0[9] + bf0[54];
bf1[10] = bf0[10] + bf0[53];
bf1[11] = bf0[11] + bf0[52];
bf1[12] = bf0[12] + bf0[51];
bf1[13] = bf0[13] + bf0[50];
bf1[14] = bf0[14] + bf0[49];
bf1[15] = bf0[15] + bf0[48];
bf1[16] = bf0[16] + bf0[47];
bf1[17] = bf0[17] + bf0[46];
bf1[18] = bf0[18] + bf0[45];
bf1[19] = bf0[19] + bf0[44];
bf1[20] = bf0[20] + bf0[43];
bf1[21] = bf0[21] + bf0[42];
bf1[22] = bf0[22] + bf0[41];
bf1[23] = bf0[23] + bf0[40];
bf1[24] = bf0[24] + bf0[39];
bf1[25] = bf0[25] + bf0[38];
bf1[26] = bf0[26] + bf0[37];
bf1[27] = bf0[27] + bf0[36];
bf1[28] = bf0[28] + bf0[35];
bf1[29] = bf0[29] + bf0[34];
bf1[30] = bf0[30] + bf0[33];
bf1[31] = bf0[31] + bf0[32];
bf1[32] = bf0[31] - bf0[32];
bf1[33] = bf0[30] - bf0[33];
bf1[34] = bf0[29] - bf0[34];
bf1[35] = bf0[28] - bf0[35];
bf1[36] = bf0[27] - bf0[36];
bf1[37] = bf0[26] - bf0[37];
bf1[38] = bf0[25] - bf0[38];
bf1[39] = bf0[24] - bf0[39];
bf1[40] = bf0[23] - bf0[40];
bf1[41] = bf0[22] - bf0[41];
bf1[42] = bf0[21] - bf0[42];
bf1[43] = bf0[20] - bf0[43];
bf1[44] = bf0[19] - bf0[44];
bf1[45] = bf0[18] - bf0[45];
bf1[46] = bf0[17] - bf0[46];
bf1[47] = bf0[16] - bf0[47];
bf1[48] = bf0[15] - bf0[48];
bf1[49] = bf0[14] - bf0[49];
bf1[50] = bf0[13] - bf0[50];
bf1[51] = bf0[12] - bf0[51];
bf1[52] = bf0[11] - bf0[52];
bf1[53] = bf0[10] - bf0[53];
bf1[54] = bf0[9] - bf0[54];
bf1[55] = bf0[8] - bf0[55];
bf1[56] = bf0[7] - bf0[56];
bf1[57] = bf0[6] - bf0[57];
bf1[58] = bf0[5] - bf0[58];
bf1[59] = bf0[4] - bf0[59];
bf1[60] = bf0[3] - bf0[60];
bf1[61] = bf0[2] - bf0[61];
bf1[62] = bf0[1] - bf0[62];
bf1[63] = bf0[0] - bf0[63];
range_check(stage, input, bf1, size, stage_range[stage]);
}

Просмотреть файл

@ -20,7 +20,6 @@ static INLINE TxfmFunc inv_txfm_type_to_func(TXFM_TYPE txfm_type) {
case TXFM_TYPE_DCT8: return vp10_idct8_new;
case TXFM_TYPE_DCT16: return vp10_idct16_new;
case TXFM_TYPE_DCT32: return vp10_idct32_new;
case TXFM_TYPE_DCT64: return vp10_idct64_new;
case TXFM_TYPE_ADST4: return vp10_iadst4_new;
case TXFM_TYPE_ADST8: return vp10_iadst8_new;
case TXFM_TYPE_ADST16: return vp10_iadst16_new;

Просмотреть файл

@ -1687,908 +1687,3 @@ void vp10_fadst32_new_sse4_1(const __m128i *input, __m128i *output,
output[31 * col_num + col] = buf1[31];
}
}
void vp10_fdct64_new_sse4_1(const __m128i *input, __m128i *output,
const int8_t *cos_bit, const int8_t *stage_range) {
const int txfm_size = 64;
const int num_per_128 = 4;
const int32_t *cospi;
__m128i buf0[64];
__m128i buf1[64];
int col_num = txfm_size / num_per_128;
int bit;
int col;
(void)stage_range;
for (col = 0; col < col_num; col++) {
// stage 0;
int32_t stage_idx = 0;
buf0[0] = input[0 * col_num + col];
buf0[1] = input[1 * col_num + col];
buf0[2] = input[2 * col_num + col];
buf0[3] = input[3 * col_num + col];
buf0[4] = input[4 * col_num + col];
buf0[5] = input[5 * col_num + col];
buf0[6] = input[6 * col_num + col];
buf0[7] = input[7 * col_num + col];
buf0[8] = input[8 * col_num + col];
buf0[9] = input[9 * col_num + col];
buf0[10] = input[10 * col_num + col];
buf0[11] = input[11 * col_num + col];
buf0[12] = input[12 * col_num + col];
buf0[13] = input[13 * col_num + col];
buf0[14] = input[14 * col_num + col];
buf0[15] = input[15 * col_num + col];
buf0[16] = input[16 * col_num + col];
buf0[17] = input[17 * col_num + col];
buf0[18] = input[18 * col_num + col];
buf0[19] = input[19 * col_num + col];
buf0[20] = input[20 * col_num + col];
buf0[21] = input[21 * col_num + col];
buf0[22] = input[22 * col_num + col];
buf0[23] = input[23 * col_num + col];
buf0[24] = input[24 * col_num + col];
buf0[25] = input[25 * col_num + col];
buf0[26] = input[26 * col_num + col];
buf0[27] = input[27 * col_num + col];
buf0[28] = input[28 * col_num + col];
buf0[29] = input[29 * col_num + col];
buf0[30] = input[30 * col_num + col];
buf0[31] = input[31 * col_num + col];
buf0[32] = input[32 * col_num + col];
buf0[33] = input[33 * col_num + col];
buf0[34] = input[34 * col_num + col];
buf0[35] = input[35 * col_num + col];
buf0[36] = input[36 * col_num + col];
buf0[37] = input[37 * col_num + col];
buf0[38] = input[38 * col_num + col];
buf0[39] = input[39 * col_num + col];
buf0[40] = input[40 * col_num + col];
buf0[41] = input[41 * col_num + col];
buf0[42] = input[42 * col_num + col];
buf0[43] = input[43 * col_num + col];
buf0[44] = input[44 * col_num + col];
buf0[45] = input[45 * col_num + col];
buf0[46] = input[46 * col_num + col];
buf0[47] = input[47 * col_num + col];
buf0[48] = input[48 * col_num + col];
buf0[49] = input[49 * col_num + col];
buf0[50] = input[50 * col_num + col];
buf0[51] = input[51 * col_num + col];
buf0[52] = input[52 * col_num + col];
buf0[53] = input[53 * col_num + col];
buf0[54] = input[54 * col_num + col];
buf0[55] = input[55 * col_num + col];
buf0[56] = input[56 * col_num + col];
buf0[57] = input[57 * col_num + col];
buf0[58] = input[58 * col_num + col];
buf0[59] = input[59 * col_num + col];
buf0[60] = input[60 * col_num + col];
buf0[61] = input[61 * col_num + col];
buf0[62] = input[62 * col_num + col];
buf0[63] = input[63 * col_num + col];
// stage 1
stage_idx++;
bit = cos_bit[stage_idx];
cospi = cospi_arr[bit - cos_bit_min];
buf1[0] = _mm_add_epi32(buf0[0], buf0[63]);
buf1[63] = _mm_sub_epi32(buf0[0], buf0[63]);
buf1[1] = _mm_add_epi32(buf0[1], buf0[62]);
buf1[62] = _mm_sub_epi32(buf0[1], buf0[62]);
buf1[2] = _mm_add_epi32(buf0[2], buf0[61]);
buf1[61] = _mm_sub_epi32(buf0[2], buf0[61]);
buf1[3] = _mm_add_epi32(buf0[3], buf0[60]);
buf1[60] = _mm_sub_epi32(buf0[3], buf0[60]);
buf1[4] = _mm_add_epi32(buf0[4], buf0[59]);
buf1[59] = _mm_sub_epi32(buf0[4], buf0[59]);
buf1[5] = _mm_add_epi32(buf0[5], buf0[58]);
buf1[58] = _mm_sub_epi32(buf0[5], buf0[58]);
buf1[6] = _mm_add_epi32(buf0[6], buf0[57]);
buf1[57] = _mm_sub_epi32(buf0[6], buf0[57]);
buf1[7] = _mm_add_epi32(buf0[7], buf0[56]);
buf1[56] = _mm_sub_epi32(buf0[7], buf0[56]);
buf1[8] = _mm_add_epi32(buf0[8], buf0[55]);
buf1[55] = _mm_sub_epi32(buf0[8], buf0[55]);
buf1[9] = _mm_add_epi32(buf0[9], buf0[54]);
buf1[54] = _mm_sub_epi32(buf0[9], buf0[54]);
buf1[10] = _mm_add_epi32(buf0[10], buf0[53]);
buf1[53] = _mm_sub_epi32(buf0[10], buf0[53]);
buf1[11] = _mm_add_epi32(buf0[11], buf0[52]);
buf1[52] = _mm_sub_epi32(buf0[11], buf0[52]);
buf1[12] = _mm_add_epi32(buf0[12], buf0[51]);
buf1[51] = _mm_sub_epi32(buf0[12], buf0[51]);
buf1[13] = _mm_add_epi32(buf0[13], buf0[50]);
buf1[50] = _mm_sub_epi32(buf0[13], buf0[50]);
buf1[14] = _mm_add_epi32(buf0[14], buf0[49]);
buf1[49] = _mm_sub_epi32(buf0[14], buf0[49]);
buf1[15] = _mm_add_epi32(buf0[15], buf0[48]);
buf1[48] = _mm_sub_epi32(buf0[15], buf0[48]);
buf1[16] = _mm_add_epi32(buf0[16], buf0[47]);
buf1[47] = _mm_sub_epi32(buf0[16], buf0[47]);
buf1[17] = _mm_add_epi32(buf0[17], buf0[46]);
buf1[46] = _mm_sub_epi32(buf0[17], buf0[46]);
buf1[18] = _mm_add_epi32(buf0[18], buf0[45]);
buf1[45] = _mm_sub_epi32(buf0[18], buf0[45]);
buf1[19] = _mm_add_epi32(buf0[19], buf0[44]);
buf1[44] = _mm_sub_epi32(buf0[19], buf0[44]);
buf1[20] = _mm_add_epi32(buf0[20], buf0[43]);
buf1[43] = _mm_sub_epi32(buf0[20], buf0[43]);
buf1[21] = _mm_add_epi32(buf0[21], buf0[42]);
buf1[42] = _mm_sub_epi32(buf0[21], buf0[42]);
buf1[22] = _mm_add_epi32(buf0[22], buf0[41]);
buf1[41] = _mm_sub_epi32(buf0[22], buf0[41]);
buf1[23] = _mm_add_epi32(buf0[23], buf0[40]);
buf1[40] = _mm_sub_epi32(buf0[23], buf0[40]);
buf1[24] = _mm_add_epi32(buf0[24], buf0[39]);
buf1[39] = _mm_sub_epi32(buf0[24], buf0[39]);
buf1[25] = _mm_add_epi32(buf0[25], buf0[38]);
buf1[38] = _mm_sub_epi32(buf0[25], buf0[38]);
buf1[26] = _mm_add_epi32(buf0[26], buf0[37]);
buf1[37] = _mm_sub_epi32(buf0[26], buf0[37]);
buf1[27] = _mm_add_epi32(buf0[27], buf0[36]);
buf1[36] = _mm_sub_epi32(buf0[27], buf0[36]);
buf1[28] = _mm_add_epi32(buf0[28], buf0[35]);
buf1[35] = _mm_sub_epi32(buf0[28], buf0[35]);
buf1[29] = _mm_add_epi32(buf0[29], buf0[34]);
buf1[34] = _mm_sub_epi32(buf0[29], buf0[34]);
buf1[30] = _mm_add_epi32(buf0[30], buf0[33]);
buf1[33] = _mm_sub_epi32(buf0[30], buf0[33]);
buf1[31] = _mm_add_epi32(buf0[31], buf0[32]);
buf1[32] = _mm_sub_epi32(buf0[31], buf0[32]);
// stage 2
stage_idx++;
bit = cos_bit[stage_idx];
cospi = cospi_arr[bit - cos_bit_min];
buf0[0] = _mm_add_epi32(buf1[0], buf1[31]);
buf0[31] = _mm_sub_epi32(buf1[0], buf1[31]);
buf0[1] = _mm_add_epi32(buf1[1], buf1[30]);
buf0[30] = _mm_sub_epi32(buf1[1], buf1[30]);
buf0[2] = _mm_add_epi32(buf1[2], buf1[29]);
buf0[29] = _mm_sub_epi32(buf1[2], buf1[29]);
buf0[3] = _mm_add_epi32(buf1[3], buf1[28]);
buf0[28] = _mm_sub_epi32(buf1[3], buf1[28]);
buf0[4] = _mm_add_epi32(buf1[4], buf1[27]);
buf0[27] = _mm_sub_epi32(buf1[4], buf1[27]);
buf0[5] = _mm_add_epi32(buf1[5], buf1[26]);
buf0[26] = _mm_sub_epi32(buf1[5], buf1[26]);
buf0[6] = _mm_add_epi32(buf1[6], buf1[25]);
buf0[25] = _mm_sub_epi32(buf1[6], buf1[25]);
buf0[7] = _mm_add_epi32(buf1[7], buf1[24]);
buf0[24] = _mm_sub_epi32(buf1[7], buf1[24]);
buf0[8] = _mm_add_epi32(buf1[8], buf1[23]);
buf0[23] = _mm_sub_epi32(buf1[8], buf1[23]);
buf0[9] = _mm_add_epi32(buf1[9], buf1[22]);
buf0[22] = _mm_sub_epi32(buf1[9], buf1[22]);
buf0[10] = _mm_add_epi32(buf1[10], buf1[21]);
buf0[21] = _mm_sub_epi32(buf1[10], buf1[21]);
buf0[11] = _mm_add_epi32(buf1[11], buf1[20]);
buf0[20] = _mm_sub_epi32(buf1[11], buf1[20]);
buf0[12] = _mm_add_epi32(buf1[12], buf1[19]);
buf0[19] = _mm_sub_epi32(buf1[12], buf1[19]);
buf0[13] = _mm_add_epi32(buf1[13], buf1[18]);
buf0[18] = _mm_sub_epi32(buf1[13], buf1[18]);
buf0[14] = _mm_add_epi32(buf1[14], buf1[17]);
buf0[17] = _mm_sub_epi32(buf1[14], buf1[17]);
buf0[15] = _mm_add_epi32(buf1[15], buf1[16]);
buf0[16] = _mm_sub_epi32(buf1[15], buf1[16]);
buf0[32] = buf1[32];
buf0[33] = buf1[33];
buf0[34] = buf1[34];
buf0[35] = buf1[35];
buf0[36] = buf1[36];
buf0[37] = buf1[37];
buf0[38] = buf1[38];
buf0[39] = buf1[39];
btf_32_sse4_1_type0(-cospi[32], cospi[32], buf1[40], buf1[55], buf0[40],
buf0[55], bit);
btf_32_sse4_1_type0(-cospi[32], cospi[32], buf1[41], buf1[54], buf0[41],
buf0[54], bit);
btf_32_sse4_1_type0(-cospi[32], cospi[32], buf1[42], buf1[53], buf0[42],
buf0[53], bit);
btf_32_sse4_1_type0(-cospi[32], cospi[32], buf1[43], buf1[52], buf0[43],
buf0[52], bit);
btf_32_sse4_1_type0(-cospi[32], cospi[32], buf1[44], buf1[51], buf0[44],
buf0[51], bit);
btf_32_sse4_1_type0(-cospi[32], cospi[32], buf1[45], buf1[50], buf0[45],
buf0[50], bit);
btf_32_sse4_1_type0(-cospi[32], cospi[32], buf1[46], buf1[49], buf0[46],
buf0[49], bit);
btf_32_sse4_1_type0(-cospi[32], cospi[32], buf1[47], buf1[48], buf0[47],
buf0[48], bit);
buf0[56] = buf1[56];
buf0[57] = buf1[57];
buf0[58] = buf1[58];
buf0[59] = buf1[59];
buf0[60] = buf1[60];
buf0[61] = buf1[61];
buf0[62] = buf1[62];
buf0[63] = buf1[63];
// stage 3
stage_idx++;
bit = cos_bit[stage_idx];
cospi = cospi_arr[bit - cos_bit_min];
buf1[0] = _mm_add_epi32(buf0[0], buf0[15]);
buf1[15] = _mm_sub_epi32(buf0[0], buf0[15]);
buf1[1] = _mm_add_epi32(buf0[1], buf0[14]);
buf1[14] = _mm_sub_epi32(buf0[1], buf0[14]);
buf1[2] = _mm_add_epi32(buf0[2], buf0[13]);
buf1[13] = _mm_sub_epi32(buf0[2], buf0[13]);
buf1[3] = _mm_add_epi32(buf0[3], buf0[12]);
buf1[12] = _mm_sub_epi32(buf0[3], buf0[12]);
buf1[4] = _mm_add_epi32(buf0[4], buf0[11]);
buf1[11] = _mm_sub_epi32(buf0[4], buf0[11]);
buf1[5] = _mm_add_epi32(buf0[5], buf0[10]);
buf1[10] = _mm_sub_epi32(buf0[5], buf0[10]);
buf1[6] = _mm_add_epi32(buf0[6], buf0[9]);
buf1[9] = _mm_sub_epi32(buf0[6], buf0[9]);
buf1[7] = _mm_add_epi32(buf0[7], buf0[8]);
buf1[8] = _mm_sub_epi32(buf0[7], buf0[8]);
buf1[16] = buf0[16];
buf1[17] = buf0[17];
buf1[18] = buf0[18];
buf1[19] = buf0[19];
btf_32_sse4_1_type0(-cospi[32], cospi[32], buf0[20], buf0[27], buf1[20],
buf1[27], bit);
btf_32_sse4_1_type0(-cospi[32], cospi[32], buf0[21], buf0[26], buf1[21],
buf1[26], bit);
btf_32_sse4_1_type0(-cospi[32], cospi[32], buf0[22], buf0[25], buf1[22],
buf1[25], bit);
btf_32_sse4_1_type0(-cospi[32], cospi[32], buf0[23], buf0[24], buf1[23],
buf1[24], bit);
buf1[28] = buf0[28];
buf1[29] = buf0[29];
buf1[30] = buf0[30];
buf1[31] = buf0[31];
buf1[32] = _mm_add_epi32(buf0[32], buf0[47]);
buf1[47] = _mm_sub_epi32(buf0[32], buf0[47]);
buf1[33] = _mm_add_epi32(buf0[33], buf0[46]);
buf1[46] = _mm_sub_epi32(buf0[33], buf0[46]);
buf1[34] = _mm_add_epi32(buf0[34], buf0[45]);
buf1[45] = _mm_sub_epi32(buf0[34], buf0[45]);
buf1[35] = _mm_add_epi32(buf0[35], buf0[44]);
buf1[44] = _mm_sub_epi32(buf0[35], buf0[44]);
buf1[36] = _mm_add_epi32(buf0[36], buf0[43]);
buf1[43] = _mm_sub_epi32(buf0[36], buf0[43]);
buf1[37] = _mm_add_epi32(buf0[37], buf0[42]);
buf1[42] = _mm_sub_epi32(buf0[37], buf0[42]);
buf1[38] = _mm_add_epi32(buf0[38], buf0[41]);
buf1[41] = _mm_sub_epi32(buf0[38], buf0[41]);
buf1[39] = _mm_add_epi32(buf0[39], buf0[40]);
buf1[40] = _mm_sub_epi32(buf0[39], buf0[40]);
buf1[48] = _mm_sub_epi32(buf0[63], buf0[48]);
buf1[63] = _mm_add_epi32(buf0[63], buf0[48]);
buf1[49] = _mm_sub_epi32(buf0[62], buf0[49]);
buf1[62] = _mm_add_epi32(buf0[62], buf0[49]);
buf1[50] = _mm_sub_epi32(buf0[61], buf0[50]);
buf1[61] = _mm_add_epi32(buf0[61], buf0[50]);
buf1[51] = _mm_sub_epi32(buf0[60], buf0[51]);
buf1[60] = _mm_add_epi32(buf0[60], buf0[51]);
buf1[52] = _mm_sub_epi32(buf0[59], buf0[52]);
buf1[59] = _mm_add_epi32(buf0[59], buf0[52]);
buf1[53] = _mm_sub_epi32(buf0[58], buf0[53]);
buf1[58] = _mm_add_epi32(buf0[58], buf0[53]);
buf1[54] = _mm_sub_epi32(buf0[57], buf0[54]);
buf1[57] = _mm_add_epi32(buf0[57], buf0[54]);
buf1[55] = _mm_sub_epi32(buf0[56], buf0[55]);
buf1[56] = _mm_add_epi32(buf0[56], buf0[55]);
// stage 4
stage_idx++;
bit = cos_bit[stage_idx];
cospi = cospi_arr[bit - cos_bit_min];
buf0[0] = _mm_add_epi32(buf1[0], buf1[7]);
buf0[7] = _mm_sub_epi32(buf1[0], buf1[7]);
buf0[1] = _mm_add_epi32(buf1[1], buf1[6]);
buf0[6] = _mm_sub_epi32(buf1[1], buf1[6]);
buf0[2] = _mm_add_epi32(buf1[2], buf1[5]);
buf0[5] = _mm_sub_epi32(buf1[2], buf1[5]);
buf0[3] = _mm_add_epi32(buf1[3], buf1[4]);
buf0[4] = _mm_sub_epi32(buf1[3], buf1[4]);
buf0[8] = buf1[8];
buf0[9] = buf1[9];
btf_32_sse4_1_type0(-cospi[32], cospi[32], buf1[10], buf1[13], buf0[10],
buf0[13], bit);
btf_32_sse4_1_type0(-cospi[32], cospi[32], buf1[11], buf1[12], buf0[11],
buf0[12], bit);
buf0[14] = buf1[14];
buf0[15] = buf1[15];
buf0[16] = _mm_add_epi32(buf1[16], buf1[23]);
buf0[23] = _mm_sub_epi32(buf1[16], buf1[23]);
buf0[17] = _mm_add_epi32(buf1[17], buf1[22]);
buf0[22] = _mm_sub_epi32(buf1[17], buf1[22]);
buf0[18] = _mm_add_epi32(buf1[18], buf1[21]);
buf0[21] = _mm_sub_epi32(buf1[18], buf1[21]);
buf0[19] = _mm_add_epi32(buf1[19], buf1[20]);
buf0[20] = _mm_sub_epi32(buf1[19], buf1[20]);
buf0[24] = _mm_sub_epi32(buf1[31], buf1[24]);
buf0[31] = _mm_add_epi32(buf1[31], buf1[24]);
buf0[25] = _mm_sub_epi32(buf1[30], buf1[25]);
buf0[30] = _mm_add_epi32(buf1[30], buf1[25]);
buf0[26] = _mm_sub_epi32(buf1[29], buf1[26]);
buf0[29] = _mm_add_epi32(buf1[29], buf1[26]);
buf0[27] = _mm_sub_epi32(buf1[28], buf1[27]);
buf0[28] = _mm_add_epi32(buf1[28], buf1[27]);
buf0[32] = buf1[32];
buf0[33] = buf1[33];
buf0[34] = buf1[34];
buf0[35] = buf1[35];
btf_32_sse4_1_type0(-cospi[16], cospi[48], buf1[36], buf1[59], buf0[36],
buf0[59], bit);
btf_32_sse4_1_type0(-cospi[16], cospi[48], buf1[37], buf1[58], buf0[37],
buf0[58], bit);
btf_32_sse4_1_type0(-cospi[16], cospi[48], buf1[38], buf1[57], buf0[38],
buf0[57], bit);
btf_32_sse4_1_type0(-cospi[16], cospi[48], buf1[39], buf1[56], buf0[39],
buf0[56], bit);
btf_32_sse4_1_type0(-cospi[48], -cospi[16], buf1[40], buf1[55], buf0[40],
buf0[55], bit);
btf_32_sse4_1_type0(-cospi[48], -cospi[16], buf1[41], buf1[54], buf0[41],
buf0[54], bit);
btf_32_sse4_1_type0(-cospi[48], -cospi[16], buf1[42], buf1[53], buf0[42],
buf0[53], bit);
btf_32_sse4_1_type0(-cospi[48], -cospi[16], buf1[43], buf1[52], buf0[43],
buf0[52], bit);
buf0[44] = buf1[44];
buf0[45] = buf1[45];
buf0[46] = buf1[46];
buf0[47] = buf1[47];
buf0[48] = buf1[48];
buf0[49] = buf1[49];
buf0[50] = buf1[50];
buf0[51] = buf1[51];
buf0[60] = buf1[60];
buf0[61] = buf1[61];
buf0[62] = buf1[62];
buf0[63] = buf1[63];
// stage 5
stage_idx++;
bit = cos_bit[stage_idx];
cospi = cospi_arr[bit - cos_bit_min];
buf1[0] = _mm_add_epi32(buf0[0], buf0[3]);
buf1[3] = _mm_sub_epi32(buf0[0], buf0[3]);
buf1[1] = _mm_add_epi32(buf0[1], buf0[2]);
buf1[2] = _mm_sub_epi32(buf0[1], buf0[2]);
buf1[4] = buf0[4];
btf_32_sse4_1_type0(-cospi[32], cospi[32], buf0[5], buf0[6], buf1[5],
buf1[6], bit);
buf1[7] = buf0[7];
buf1[8] = _mm_add_epi32(buf0[8], buf0[11]);
buf1[11] = _mm_sub_epi32(buf0[8], buf0[11]);
buf1[9] = _mm_add_epi32(buf0[9], buf0[10]);
buf1[10] = _mm_sub_epi32(buf0[9], buf0[10]);
buf1[12] = _mm_sub_epi32(buf0[15], buf0[12]);
buf1[15] = _mm_add_epi32(buf0[15], buf0[12]);
buf1[13] = _mm_sub_epi32(buf0[14], buf0[13]);
buf1[14] = _mm_add_epi32(buf0[14], buf0[13]);
buf1[16] = buf0[16];
buf1[17] = buf0[17];
btf_32_sse4_1_type0(-cospi[16], cospi[48], buf0[18], buf0[29], buf1[18],
buf1[29], bit);
btf_32_sse4_1_type0(-cospi[16], cospi[48], buf0[19], buf0[28], buf1[19],
buf1[28], bit);
btf_32_sse4_1_type0(-cospi[48], -cospi[16], buf0[20], buf0[27], buf1[20],
buf1[27], bit);
btf_32_sse4_1_type0(-cospi[48], -cospi[16], buf0[21], buf0[26], buf1[21],
buf1[26], bit);
buf1[22] = buf0[22];
buf1[23] = buf0[23];
buf1[24] = buf0[24];
buf1[25] = buf0[25];
buf1[30] = buf0[30];
buf1[31] = buf0[31];
buf1[32] = _mm_add_epi32(buf0[32], buf0[39]);
buf1[39] = _mm_sub_epi32(buf0[32], buf0[39]);
buf1[33] = _mm_add_epi32(buf0[33], buf0[38]);
buf1[38] = _mm_sub_epi32(buf0[33], buf0[38]);
buf1[34] = _mm_add_epi32(buf0[34], buf0[37]);
buf1[37] = _mm_sub_epi32(buf0[34], buf0[37]);
buf1[35] = _mm_add_epi32(buf0[35], buf0[36]);
buf1[36] = _mm_sub_epi32(buf0[35], buf0[36]);
buf1[40] = _mm_sub_epi32(buf0[47], buf0[40]);
buf1[47] = _mm_add_epi32(buf0[47], buf0[40]);
buf1[41] = _mm_sub_epi32(buf0[46], buf0[41]);
buf1[46] = _mm_add_epi32(buf0[46], buf0[41]);
buf1[42] = _mm_sub_epi32(buf0[45], buf0[42]);
buf1[45] = _mm_add_epi32(buf0[45], buf0[42]);
buf1[43] = _mm_sub_epi32(buf0[44], buf0[43]);
buf1[44] = _mm_add_epi32(buf0[44], buf0[43]);
buf1[48] = _mm_add_epi32(buf0[48], buf0[55]);
buf1[55] = _mm_sub_epi32(buf0[48], buf0[55]);
buf1[49] = _mm_add_epi32(buf0[49], buf0[54]);
buf1[54] = _mm_sub_epi32(buf0[49], buf0[54]);
buf1[50] = _mm_add_epi32(buf0[50], buf0[53]);
buf1[53] = _mm_sub_epi32(buf0[50], buf0[53]);
buf1[51] = _mm_add_epi32(buf0[51], buf0[52]);
buf1[52] = _mm_sub_epi32(buf0[51], buf0[52]);
buf1[56] = _mm_sub_epi32(buf0[63], buf0[56]);
buf1[63] = _mm_add_epi32(buf0[63], buf0[56]);
buf1[57] = _mm_sub_epi32(buf0[62], buf0[57]);
buf1[62] = _mm_add_epi32(buf0[62], buf0[57]);
buf1[58] = _mm_sub_epi32(buf0[61], buf0[58]);
buf1[61] = _mm_add_epi32(buf0[61], buf0[58]);
buf1[59] = _mm_sub_epi32(buf0[60], buf0[59]);
buf1[60] = _mm_add_epi32(buf0[60], buf0[59]);
// stage 6
stage_idx++;
bit = cos_bit[stage_idx];
cospi = cospi_arr[bit - cos_bit_min];
btf_32_sse4_1_type0(cospi[32], cospi[32], buf1[0], buf1[1], buf0[0],
buf0[1], bit);
btf_32_sse4_1_type1(cospi[48], cospi[16], buf1[2], buf1[3], buf0[2],
buf0[3], bit);
buf0[4] = _mm_add_epi32(buf1[4], buf1[5]);
buf0[5] = _mm_sub_epi32(buf1[4], buf1[5]);
buf0[6] = _mm_sub_epi32(buf1[7], buf1[6]);
buf0[7] = _mm_add_epi32(buf1[7], buf1[6]);
buf0[8] = buf1[8];
btf_32_sse4_1_type0(-cospi[16], cospi[48], buf1[9], buf1[14], buf0[9],
buf0[14], bit);
btf_32_sse4_1_type0(-cospi[48], -cospi[16], buf1[10], buf1[13], buf0[10],
buf0[13], bit);
buf0[11] = buf1[11];
buf0[12] = buf1[12];
buf0[15] = buf1[15];
buf0[16] = _mm_add_epi32(buf1[16], buf1[19]);
buf0[19] = _mm_sub_epi32(buf1[16], buf1[19]);
buf0[17] = _mm_add_epi32(buf1[17], buf1[18]);
buf0[18] = _mm_sub_epi32(buf1[17], buf1[18]);
buf0[20] = _mm_sub_epi32(buf1[23], buf1[20]);
buf0[23] = _mm_add_epi32(buf1[23], buf1[20]);
buf0[21] = _mm_sub_epi32(buf1[22], buf1[21]);
buf0[22] = _mm_add_epi32(buf1[22], buf1[21]);
buf0[24] = _mm_add_epi32(buf1[24], buf1[27]);
buf0[27] = _mm_sub_epi32(buf1[24], buf1[27]);
buf0[25] = _mm_add_epi32(buf1[25], buf1[26]);
buf0[26] = _mm_sub_epi32(buf1[25], buf1[26]);
buf0[28] = _mm_sub_epi32(buf1[31], buf1[28]);
buf0[31] = _mm_add_epi32(buf1[31], buf1[28]);
buf0[29] = _mm_sub_epi32(buf1[30], buf1[29]);
buf0[30] = _mm_add_epi32(buf1[30], buf1[29]);
buf0[32] = buf1[32];
buf0[33] = buf1[33];
btf_32_sse4_1_type0(-cospi[8], cospi[56], buf1[34], buf1[61], buf0[34],
buf0[61], bit);
btf_32_sse4_1_type0(-cospi[8], cospi[56], buf1[35], buf1[60], buf0[35],
buf0[60], bit);
btf_32_sse4_1_type0(-cospi[56], -cospi[8], buf1[36], buf1[59], buf0[36],
buf0[59], bit);
btf_32_sse4_1_type0(-cospi[56], -cospi[8], buf1[37], buf1[58], buf0[37],
buf0[58], bit);
buf0[38] = buf1[38];
buf0[39] = buf1[39];
buf0[40] = buf1[40];
buf0[41] = buf1[41];
btf_32_sse4_1_type0(-cospi[40], cospi[24], buf1[42], buf1[53], buf0[42],
buf0[53], bit);
btf_32_sse4_1_type0(-cospi[40], cospi[24], buf1[43], buf1[52], buf0[43],
buf0[52], bit);
btf_32_sse4_1_type0(-cospi[24], -cospi[40], buf1[44], buf1[51], buf0[44],
buf0[51], bit);
btf_32_sse4_1_type0(-cospi[24], -cospi[40], buf1[45], buf1[50], buf0[45],
buf0[50], bit);
buf0[46] = buf1[46];
buf0[47] = buf1[47];
buf0[48] = buf1[48];
buf0[49] = buf1[49];
buf0[54] = buf1[54];
buf0[55] = buf1[55];
buf0[56] = buf1[56];
buf0[57] = buf1[57];
buf0[62] = buf1[62];
buf0[63] = buf1[63];
// stage 7
stage_idx++;
bit = cos_bit[stage_idx];
cospi = cospi_arr[bit - cos_bit_min];
buf1[0] = buf0[0];
buf1[1] = buf0[1];
buf1[2] = buf0[2];
buf1[3] = buf0[3];
btf_32_sse4_1_type1(cospi[56], cospi[8], buf0[4], buf0[7], buf1[4], buf1[7],
bit);
btf_32_sse4_1_type1(cospi[24], cospi[40], buf0[5], buf0[6], buf1[5],
buf1[6], bit);
buf1[8] = _mm_add_epi32(buf0[8], buf0[9]);
buf1[9] = _mm_sub_epi32(buf0[8], buf0[9]);
buf1[10] = _mm_sub_epi32(buf0[11], buf0[10]);
buf1[11] = _mm_add_epi32(buf0[11], buf0[10]);
buf1[12] = _mm_add_epi32(buf0[12], buf0[13]);
buf1[13] = _mm_sub_epi32(buf0[12], buf0[13]);
buf1[14] = _mm_sub_epi32(buf0[15], buf0[14]);
buf1[15] = _mm_add_epi32(buf0[15], buf0[14]);
buf1[16] = buf0[16];
btf_32_sse4_1_type0(-cospi[8], cospi[56], buf0[17], buf0[30], buf1[17],
buf1[30], bit);
btf_32_sse4_1_type0(-cospi[56], -cospi[8], buf0[18], buf0[29], buf1[18],
buf1[29], bit);
buf1[19] = buf0[19];
buf1[20] = buf0[20];
btf_32_sse4_1_type0(-cospi[40], cospi[24], buf0[21], buf0[26], buf1[21],
buf1[26], bit);
btf_32_sse4_1_type0(-cospi[24], -cospi[40], buf0[22], buf0[25], buf1[22],
buf1[25], bit);
buf1[23] = buf0[23];
buf1[24] = buf0[24];
buf1[27] = buf0[27];
buf1[28] = buf0[28];
buf1[31] = buf0[31];
buf1[32] = _mm_add_epi32(buf0[32], buf0[35]);
buf1[35] = _mm_sub_epi32(buf0[32], buf0[35]);
buf1[33] = _mm_add_epi32(buf0[33], buf0[34]);
buf1[34] = _mm_sub_epi32(buf0[33], buf0[34]);
buf1[36] = _mm_sub_epi32(buf0[39], buf0[36]);
buf1[39] = _mm_add_epi32(buf0[39], buf0[36]);
buf1[37] = _mm_sub_epi32(buf0[38], buf0[37]);
buf1[38] = _mm_add_epi32(buf0[38], buf0[37]);
buf1[40] = _mm_add_epi32(buf0[40], buf0[43]);
buf1[43] = _mm_sub_epi32(buf0[40], buf0[43]);
buf1[41] = _mm_add_epi32(buf0[41], buf0[42]);
buf1[42] = _mm_sub_epi32(buf0[41], buf0[42]);
buf1[44] = _mm_sub_epi32(buf0[47], buf0[44]);
buf1[47] = _mm_add_epi32(buf0[47], buf0[44]);
buf1[45] = _mm_sub_epi32(buf0[46], buf0[45]);
buf1[46] = _mm_add_epi32(buf0[46], buf0[45]);
buf1[48] = _mm_add_epi32(buf0[48], buf0[51]);
buf1[51] = _mm_sub_epi32(buf0[48], buf0[51]);
buf1[49] = _mm_add_epi32(buf0[49], buf0[50]);
buf1[50] = _mm_sub_epi32(buf0[49], buf0[50]);
buf1[52] = _mm_sub_epi32(buf0[55], buf0[52]);
buf1[55] = _mm_add_epi32(buf0[55], buf0[52]);
buf1[53] = _mm_sub_epi32(buf0[54], buf0[53]);
buf1[54] = _mm_add_epi32(buf0[54], buf0[53]);
buf1[56] = _mm_add_epi32(buf0[56], buf0[59]);
buf1[59] = _mm_sub_epi32(buf0[56], buf0[59]);
buf1[57] = _mm_add_epi32(buf0[57], buf0[58]);
buf1[58] = _mm_sub_epi32(buf0[57], buf0[58]);
buf1[60] = _mm_sub_epi32(buf0[63], buf0[60]);
buf1[63] = _mm_add_epi32(buf0[63], buf0[60]);
buf1[61] = _mm_sub_epi32(buf0[62], buf0[61]);
buf1[62] = _mm_add_epi32(buf0[62], buf0[61]);
// stage 8
stage_idx++;
bit = cos_bit[stage_idx];
cospi = cospi_arr[bit - cos_bit_min];
buf0[0] = buf1[0];
buf0[1] = buf1[1];
buf0[2] = buf1[2];
buf0[3] = buf1[3];
buf0[4] = buf1[4];
buf0[5] = buf1[5];
buf0[6] = buf1[6];
buf0[7] = buf1[7];
btf_32_sse4_1_type1(cospi[60], cospi[4], buf1[8], buf1[15], buf0[8],
buf0[15], bit);
btf_32_sse4_1_type1(cospi[28], cospi[36], buf1[9], buf1[14], buf0[9],
buf0[14], bit);
btf_32_sse4_1_type1(cospi[44], cospi[20], buf1[10], buf1[13], buf0[10],
buf0[13], bit);
btf_32_sse4_1_type1(cospi[12], cospi[52], buf1[11], buf1[12], buf0[11],
buf0[12], bit);
buf0[16] = _mm_add_epi32(buf1[16], buf1[17]);
buf0[17] = _mm_sub_epi32(buf1[16], buf1[17]);
buf0[18] = _mm_sub_epi32(buf1[19], buf1[18]);
buf0[19] = _mm_add_epi32(buf1[19], buf1[18]);
buf0[20] = _mm_add_epi32(buf1[20], buf1[21]);
buf0[21] = _mm_sub_epi32(buf1[20], buf1[21]);
buf0[22] = _mm_sub_epi32(buf1[23], buf1[22]);
buf0[23] = _mm_add_epi32(buf1[23], buf1[22]);
buf0[24] = _mm_add_epi32(buf1[24], buf1[25]);
buf0[25] = _mm_sub_epi32(buf1[24], buf1[25]);
buf0[26] = _mm_sub_epi32(buf1[27], buf1[26]);
buf0[27] = _mm_add_epi32(buf1[27], buf1[26]);
buf0[28] = _mm_add_epi32(buf1[28], buf1[29]);
buf0[29] = _mm_sub_epi32(buf1[28], buf1[29]);
buf0[30] = _mm_sub_epi32(buf1[31], buf1[30]);
buf0[31] = _mm_add_epi32(buf1[31], buf1[30]);
buf0[32] = buf1[32];
btf_32_sse4_1_type0(-cospi[4], cospi[60], buf1[33], buf1[62], buf0[33],
buf0[62], bit);
btf_32_sse4_1_type0(-cospi[60], -cospi[4], buf1[34], buf1[61], buf0[34],
buf0[61], bit);
buf0[35] = buf1[35];
buf0[36] = buf1[36];
btf_32_sse4_1_type0(-cospi[36], cospi[28], buf1[37], buf1[58], buf0[37],
buf0[58], bit);
btf_32_sse4_1_type0(-cospi[28], -cospi[36], buf1[38], buf1[57], buf0[38],
buf0[57], bit);
buf0[39] = buf1[39];
buf0[40] = buf1[40];
btf_32_sse4_1_type0(-cospi[20], cospi[44], buf1[41], buf1[54], buf0[41],
buf0[54], bit);
btf_32_sse4_1_type0(-cospi[44], -cospi[20], buf1[42], buf1[53], buf0[42],
buf0[53], bit);
buf0[43] = buf1[43];
buf0[44] = buf1[44];
btf_32_sse4_1_type0(-cospi[52], cospi[12], buf1[45], buf1[50], buf0[45],
buf0[50], bit);
btf_32_sse4_1_type0(-cospi[12], -cospi[52], buf1[46], buf1[49], buf0[46],
buf0[49], bit);
buf0[47] = buf1[47];
buf0[48] = buf1[48];
buf0[51] = buf1[51];
buf0[52] = buf1[52];
buf0[55] = buf1[55];
buf0[56] = buf1[56];
buf0[59] = buf1[59];
buf0[60] = buf1[60];
buf0[63] = buf1[63];
// stage 9
stage_idx++;
bit = cos_bit[stage_idx];
cospi = cospi_arr[bit - cos_bit_min];
buf1[0] = buf0[0];
buf1[1] = buf0[1];
buf1[2] = buf0[2];
buf1[3] = buf0[3];
buf1[4] = buf0[4];
buf1[5] = buf0[5];
buf1[6] = buf0[6];
buf1[7] = buf0[7];
buf1[8] = buf0[8];
buf1[9] = buf0[9];
buf1[10] = buf0[10];
buf1[11] = buf0[11];
buf1[12] = buf0[12];
buf1[13] = buf0[13];
buf1[14] = buf0[14];
buf1[15] = buf0[15];
btf_32_sse4_1_type1(cospi[62], cospi[2], buf0[16], buf0[31], buf1[16],
buf1[31], bit);
btf_32_sse4_1_type1(cospi[30], cospi[34], buf0[17], buf0[30], buf1[17],
buf1[30], bit);
btf_32_sse4_1_type1(cospi[46], cospi[18], buf0[18], buf0[29], buf1[18],
buf1[29], bit);
btf_32_sse4_1_type1(cospi[14], cospi[50], buf0[19], buf0[28], buf1[19],
buf1[28], bit);
btf_32_sse4_1_type1(cospi[54], cospi[10], buf0[20], buf0[27], buf1[20],
buf1[27], bit);
btf_32_sse4_1_type1(cospi[22], cospi[42], buf0[21], buf0[26], buf1[21],
buf1[26], bit);
btf_32_sse4_1_type1(cospi[38], cospi[26], buf0[22], buf0[25], buf1[22],
buf1[25], bit);
btf_32_sse4_1_type1(cospi[6], cospi[58], buf0[23], buf0[24], buf1[23],
buf1[24], bit);
buf1[32] = _mm_add_epi32(buf0[32], buf0[33]);
buf1[33] = _mm_sub_epi32(buf0[32], buf0[33]);
buf1[34] = _mm_sub_epi32(buf0[35], buf0[34]);
buf1[35] = _mm_add_epi32(buf0[35], buf0[34]);
buf1[36] = _mm_add_epi32(buf0[36], buf0[37]);
buf1[37] = _mm_sub_epi32(buf0[36], buf0[37]);
buf1[38] = _mm_sub_epi32(buf0[39], buf0[38]);
buf1[39] = _mm_add_epi32(buf0[39], buf0[38]);
buf1[40] = _mm_add_epi32(buf0[40], buf0[41]);
buf1[41] = _mm_sub_epi32(buf0[40], buf0[41]);
buf1[42] = _mm_sub_epi32(buf0[43], buf0[42]);
buf1[43] = _mm_add_epi32(buf0[43], buf0[42]);
buf1[44] = _mm_add_epi32(buf0[44], buf0[45]);
buf1[45] = _mm_sub_epi32(buf0[44], buf0[45]);
buf1[46] = _mm_sub_epi32(buf0[47], buf0[46]);
buf1[47] = _mm_add_epi32(buf0[47], buf0[46]);
buf1[48] = _mm_add_epi32(buf0[48], buf0[49]);
buf1[49] = _mm_sub_epi32(buf0[48], buf0[49]);
buf1[50] = _mm_sub_epi32(buf0[51], buf0[50]);
buf1[51] = _mm_add_epi32(buf0[51], buf0[50]);
buf1[52] = _mm_add_epi32(buf0[52], buf0[53]);
buf1[53] = _mm_sub_epi32(buf0[52], buf0[53]);
buf1[54] = _mm_sub_epi32(buf0[55], buf0[54]);
buf1[55] = _mm_add_epi32(buf0[55], buf0[54]);
buf1[56] = _mm_add_epi32(buf0[56], buf0[57]);
buf1[57] = _mm_sub_epi32(buf0[56], buf0[57]);
buf1[58] = _mm_sub_epi32(buf0[59], buf0[58]);
buf1[59] = _mm_add_epi32(buf0[59], buf0[58]);
buf1[60] = _mm_add_epi32(buf0[60], buf0[61]);
buf1[61] = _mm_sub_epi32(buf0[60], buf0[61]);
buf1[62] = _mm_sub_epi32(buf0[63], buf0[62]);
buf1[63] = _mm_add_epi32(buf0[63], buf0[62]);
// stage 10
stage_idx++;
bit = cos_bit[stage_idx];
cospi = cospi_arr[bit - cos_bit_min];
buf0[0] = buf1[0];
buf0[1] = buf1[1];
buf0[2] = buf1[2];
buf0[3] = buf1[3];
buf0[4] = buf1[4];
buf0[5] = buf1[5];
buf0[6] = buf1[6];
buf0[7] = buf1[7];
buf0[8] = buf1[8];
buf0[9] = buf1[9];
buf0[10] = buf1[10];
buf0[11] = buf1[11];
buf0[12] = buf1[12];
buf0[13] = buf1[13];
buf0[14] = buf1[14];
buf0[15] = buf1[15];
buf0[16] = buf1[16];
buf0[17] = buf1[17];
buf0[18] = buf1[18];
buf0[19] = buf1[19];
buf0[20] = buf1[20];
buf0[21] = buf1[21];
buf0[22] = buf1[22];
buf0[23] = buf1[23];
buf0[24] = buf1[24];
buf0[25] = buf1[25];
buf0[26] = buf1[26];
buf0[27] = buf1[27];
buf0[28] = buf1[28];
buf0[29] = buf1[29];
buf0[30] = buf1[30];
buf0[31] = buf1[31];
btf_32_sse4_1_type1(cospi[63], cospi[1], buf1[32], buf1[63], buf0[32],
buf0[63], bit);
btf_32_sse4_1_type1(cospi[31], cospi[33], buf1[33], buf1[62], buf0[33],
buf0[62], bit);
btf_32_sse4_1_type1(cospi[47], cospi[17], buf1[34], buf1[61], buf0[34],
buf0[61], bit);
btf_32_sse4_1_type1(cospi[15], cospi[49], buf1[35], buf1[60], buf0[35],
buf0[60], bit);
btf_32_sse4_1_type1(cospi[55], cospi[9], buf1[36], buf1[59], buf0[36],
buf0[59], bit);
btf_32_sse4_1_type1(cospi[23], cospi[41], buf1[37], buf1[58], buf0[37],
buf0[58], bit);
btf_32_sse4_1_type1(cospi[39], cospi[25], buf1[38], buf1[57], buf0[38],
buf0[57], bit);
btf_32_sse4_1_type1(cospi[7], cospi[57], buf1[39], buf1[56], buf0[39],
buf0[56], bit);
btf_32_sse4_1_type1(cospi[59], cospi[5], buf1[40], buf1[55], buf0[40],
buf0[55], bit);
btf_32_sse4_1_type1(cospi[27], cospi[37], buf1[41], buf1[54], buf0[41],
buf0[54], bit);
btf_32_sse4_1_type1(cospi[43], cospi[21], buf1[42], buf1[53], buf0[42],
buf0[53], bit);
btf_32_sse4_1_type1(cospi[11], cospi[53], buf1[43], buf1[52], buf0[43],
buf0[52], bit);
btf_32_sse4_1_type1(cospi[51], cospi[13], buf1[44], buf1[51], buf0[44],
buf0[51], bit);
btf_32_sse4_1_type1(cospi[19], cospi[45], buf1[45], buf1[50], buf0[45],
buf0[50], bit);
btf_32_sse4_1_type1(cospi[35], cospi[29], buf1[46], buf1[49], buf0[46],
buf0[49], bit);
btf_32_sse4_1_type1(cospi[3], cospi[61], buf1[47], buf1[48], buf0[47],
buf0[48], bit);
// stage 11
stage_idx++;
bit = cos_bit[stage_idx];
cospi = cospi_arr[bit - cos_bit_min];
buf1[0] = buf0[0];
buf1[1] = buf0[32];
buf1[2] = buf0[16];
buf1[3] = buf0[48];
buf1[4] = buf0[8];
buf1[5] = buf0[40];
buf1[6] = buf0[24];
buf1[7] = buf0[56];
buf1[8] = buf0[4];
buf1[9] = buf0[36];
buf1[10] = buf0[20];
buf1[11] = buf0[52];
buf1[12] = buf0[12];
buf1[13] = buf0[44];
buf1[14] = buf0[28];
buf1[15] = buf0[60];
buf1[16] = buf0[2];
buf1[17] = buf0[34];
buf1[18] = buf0[18];
buf1[19] = buf0[50];
buf1[20] = buf0[10];
buf1[21] = buf0[42];
buf1[22] = buf0[26];
buf1[23] = buf0[58];
buf1[24] = buf0[6];
buf1[25] = buf0[38];
buf1[26] = buf0[22];
buf1[27] = buf0[54];
buf1[28] = buf0[14];
buf1[29] = buf0[46];
buf1[30] = buf0[30];
buf1[31] = buf0[62];
buf1[32] = buf0[1];
buf1[33] = buf0[33];
buf1[34] = buf0[17];
buf1[35] = buf0[49];
buf1[36] = buf0[9];
buf1[37] = buf0[41];
buf1[38] = buf0[25];
buf1[39] = buf0[57];
buf1[40] = buf0[5];
buf1[41] = buf0[37];
buf1[42] = buf0[21];
buf1[43] = buf0[53];
buf1[44] = buf0[13];
buf1[45] = buf0[45];
buf1[46] = buf0[29];
buf1[47] = buf0[61];
buf1[48] = buf0[3];
buf1[49] = buf0[35];
buf1[50] = buf0[19];
buf1[51] = buf0[51];
buf1[52] = buf0[11];
buf1[53] = buf0[43];
buf1[54] = buf0[27];
buf1[55] = buf0[59];
buf1[56] = buf0[7];
buf1[57] = buf0[39];
buf1[58] = buf0[23];
buf1[59] = buf0[55];
buf1[60] = buf0[15];
buf1[61] = buf0[47];
buf1[62] = buf0[31];
buf1[63] = buf0[63];
output[0 * col_num + col] = buf1[0];
output[1 * col_num + col] = buf1[1];
output[2 * col_num + col] = buf1[2];
output[3 * col_num + col] = buf1[3];
output[4 * col_num + col] = buf1[4];
output[5 * col_num + col] = buf1[5];
output[6 * col_num + col] = buf1[6];
output[7 * col_num + col] = buf1[7];
output[8 * col_num + col] = buf1[8];
output[9 * col_num + col] = buf1[9];
output[10 * col_num + col] = buf1[10];
output[11 * col_num + col] = buf1[11];
output[12 * col_num + col] = buf1[12];
output[13 * col_num + col] = buf1[13];
output[14 * col_num + col] = buf1[14];
output[15 * col_num + col] = buf1[15];
output[16 * col_num + col] = buf1[16];
output[17 * col_num + col] = buf1[17];
output[18 * col_num + col] = buf1[18];
output[19 * col_num + col] = buf1[19];
output[20 * col_num + col] = buf1[20];
output[21 * col_num + col] = buf1[21];
output[22 * col_num + col] = buf1[22];
output[23 * col_num + col] = buf1[23];
output[24 * col_num + col] = buf1[24];
output[25 * col_num + col] = buf1[25];
output[26 * col_num + col] = buf1[26];
output[27 * col_num + col] = buf1[27];
output[28 * col_num + col] = buf1[28];
output[29 * col_num + col] = buf1[29];
output[30 * col_num + col] = buf1[30];
output[31 * col_num + col] = buf1[31];
output[32 * col_num + col] = buf1[32];
output[33 * col_num + col] = buf1[33];
output[34 * col_num + col] = buf1[34];
output[35 * col_num + col] = buf1[35];
output[36 * col_num + col] = buf1[36];
output[37 * col_num + col] = buf1[37];
output[38 * col_num + col] = buf1[38];
output[39 * col_num + col] = buf1[39];
output[40 * col_num + col] = buf1[40];
output[41 * col_num + col] = buf1[41];
output[42 * col_num + col] = buf1[42];
output[43 * col_num + col] = buf1[43];
output[44 * col_num + col] = buf1[44];
output[45 * col_num + col] = buf1[45];
output[46 * col_num + col] = buf1[46];
output[47 * col_num + col] = buf1[47];
output[48 * col_num + col] = buf1[48];
output[49 * col_num + col] = buf1[49];
output[50 * col_num + col] = buf1[50];
output[51 * col_num + col] = buf1[51];
output[52 * col_num + col] = buf1[52];
output[53 * col_num + col] = buf1[53];
output[54 * col_num + col] = buf1[54];
output[55 * col_num + col] = buf1[55];
output[56 * col_num + col] = buf1[56];
output[57 * col_num + col] = buf1[57];
output[58 * col_num + col] = buf1[58];
output[59 * col_num + col] = buf1[59];
output[60 * col_num + col] = buf1[60];
output[61 * col_num + col] = buf1[61];
output[62 * col_num + col] = buf1[62];
output[63 * col_num + col] = buf1[63];
}
}

Просмотреть файл

@ -32,7 +32,6 @@ static INLINE TxfmFuncSSE2 fwd_txfm_type_to_func(TXFM_TYPE txfm_type) {
case TXFM_TYPE_DCT8: return vp10_fdct8_new_sse4_1; break;
case TXFM_TYPE_DCT16: return vp10_fdct16_new_sse4_1; break;
case TXFM_TYPE_DCT32: return vp10_fdct32_new_sse4_1; break;
case TXFM_TYPE_DCT64: return vp10_fdct64_new_sse4_1; break;
case TXFM_TYPE_ADST4: return vp10_fadst4_new_sse4_1; break;
case TXFM_TYPE_ADST8: return vp10_fadst8_new_sse4_1; break;
case TXFM_TYPE_ADST16: return vp10_fadst16_new_sse4_1; break;