Commit 4d5cf537 authored by Urvang Joshi's avatar Urvang Joshi
Browse files

Swap new size 8 and 16 fwd/inv transforms for ADST

This is to make them similar to the ones in VP9.

Change-Id: Iaebf625f2dce4f159b8a8615f37003d773ee6450
parent eb2fd5c5
......@@ -812,16 +812,15 @@ void av1_iadst8_new(const int32_t *input, int32_t *output,
// stage 1;
stage++;
assert(output != input);
bf1 = output;
bf1[0] = input[0];
bf1[1] = -input[7];
bf1[2] = -input[3];
bf1[3] = input[4];
bf1[4] = -input[1];
bf1[5] = input[6];
bf1[6] = input[2];
bf1[7] = -input[5];
bf1[0] = input[7];
bf1[1] = input[0];
bf1[2] = input[5];
bf1[3] = input[2];
bf1[4] = input[3];
bf1[5] = input[4];
bf1[6] = input[1];
bf1[7] = input[6];
range_check(stage, input, bf1, size, stage_range[stage]);
// stage 2
......@@ -829,28 +828,28 @@ void av1_iadst8_new(const int32_t *input, int32_t *output,
cospi = cospi_arr(cos_bit[stage]);
bf0 = output;
bf1 = step;
bf1[0] = bf0[0];
bf1[1] = bf0[1];
bf1[2] = half_btf(cospi[32], bf0[2], cospi[32], bf0[3], cos_bit[stage]);
bf1[3] = half_btf(cospi[32], bf0[2], -cospi[32], bf0[3], cos_bit[stage]);
bf1[4] = bf0[4];
bf1[5] = bf0[5];
bf1[6] = half_btf(cospi[32], bf0[6], cospi[32], bf0[7], cos_bit[stage]);
bf1[7] = half_btf(cospi[32], bf0[6], -cospi[32], bf0[7], cos_bit[stage]);
bf1[0] = half_btf(cospi[4], bf0[0], cospi[60], bf0[1], cos_bit[stage]);
bf1[1] = half_btf(-cospi[4], bf0[1], cospi[60], bf0[0], cos_bit[stage]);
bf1[2] = half_btf(cospi[20], bf0[2], cospi[44], bf0[3], cos_bit[stage]);
bf1[3] = half_btf(-cospi[20], bf0[3], cospi[44], bf0[2], cos_bit[stage]);
bf1[4] = half_btf(cospi[36], bf0[4], cospi[28], bf0[5], cos_bit[stage]);
bf1[5] = half_btf(-cospi[36], bf0[5], cospi[28], bf0[4], cos_bit[stage]);
bf1[6] = half_btf(cospi[52], bf0[6], cospi[12], bf0[7], cos_bit[stage]);
bf1[7] = half_btf(-cospi[52], bf0[7], cospi[12], bf0[6], cos_bit[stage]);
range_check(stage, input, bf1, size, stage_range[stage]);
// stage 3
stage++;
bf0 = step;
bf1 = output;
bf1[0] = bf0[0] + bf0[2];
bf1[1] = bf0[1] + bf0[3];
bf1[2] = bf0[0] - bf0[2];
bf1[3] = bf0[1] - bf0[3];
bf1[4] = bf0[4] + bf0[6];
bf1[5] = bf0[5] + bf0[7];
bf1[6] = bf0[4] - bf0[6];
bf1[7] = bf0[5] - bf0[7];
bf1[0] = bf0[0] + bf0[4];
bf1[1] = bf0[1] + bf0[5];
bf1[2] = bf0[2] + bf0[6];
bf1[3] = bf0[3] + bf0[7];
bf1[4] = -bf0[4] + bf0[0];
bf1[5] = -bf0[5] + bf0[1];
bf1[6] = -bf0[6] + bf0[2];
bf1[7] = -bf0[7] + bf0[3];
range_check(stage, input, bf1, size, stage_range[stage]);
// stage 4
......@@ -863,23 +862,23 @@ void av1_iadst8_new(const int32_t *input, int32_t *output,
bf1[2] = bf0[2];
bf1[3] = bf0[3];
bf1[4] = half_btf(cospi[16], bf0[4], cospi[48], bf0[5], cos_bit[stage]);
bf1[5] = half_btf(cospi[48], bf0[4], -cospi[16], bf0[5], cos_bit[stage]);
bf1[5] = half_btf(-cospi[16], bf0[5], cospi[48], bf0[4], cos_bit[stage]);
bf1[6] = half_btf(-cospi[48], bf0[6], cospi[16], bf0[7], cos_bit[stage]);
bf1[7] = half_btf(cospi[16], bf0[6], cospi[48], bf0[7], cos_bit[stage]);
bf1[7] = half_btf(cospi[48], bf0[7], cospi[16], bf0[6], cos_bit[stage]);
range_check(stage, input, bf1, size, stage_range[stage]);
// stage 5
stage++;
bf0 = step;
bf1 = output;
bf1[0] = bf0[0] + bf0[4];
bf1[1] = bf0[1] + bf0[5];
bf1[2] = bf0[2] + bf0[6];
bf1[3] = bf0[3] + bf0[7];
bf1[4] = bf0[0] - bf0[4];
bf1[5] = bf0[1] - bf0[5];
bf1[6] = bf0[2] - bf0[6];
bf1[7] = bf0[3] - bf0[7];
bf1[0] = bf0[0] + bf0[2];
bf1[1] = bf0[1] + bf0[3];
bf1[2] = -bf0[2] + bf0[0];
bf1[3] = -bf0[3] + bf0[1];
bf1[4] = bf0[4] + bf0[6];
bf1[5] = bf0[5] + bf0[7];
bf1[6] = -bf0[6] + bf0[4];
bf1[7] = -bf0[7] + bf0[5];
range_check(stage, input, bf1, size, stage_range[stage]);
// stage 6
......@@ -887,28 +886,28 @@ void av1_iadst8_new(const int32_t *input, int32_t *output,
cospi = cospi_arr(cos_bit[stage]);
bf0 = output;
bf1 = step;
bf1[0] = half_btf(cospi[4], bf0[0], cospi[60], bf0[1], cos_bit[stage]);
bf1[1] = half_btf(cospi[60], bf0[0], -cospi[4], bf0[1], cos_bit[stage]);
bf1[2] = half_btf(cospi[20], bf0[2], cospi[44], bf0[3], cos_bit[stage]);
bf1[3] = half_btf(cospi[44], bf0[2], -cospi[20], bf0[3], cos_bit[stage]);
bf1[4] = half_btf(cospi[36], bf0[4], cospi[28], bf0[5], cos_bit[stage]);
bf1[5] = half_btf(cospi[28], bf0[4], -cospi[36], bf0[5], cos_bit[stage]);
bf1[6] = half_btf(cospi[52], bf0[6], cospi[12], bf0[7], cos_bit[stage]);
bf1[7] = half_btf(cospi[12], bf0[6], -cospi[52], bf0[7], cos_bit[stage]);
bf1[0] = bf0[0];
bf1[1] = bf0[1];
bf1[2] = half_btf(cospi[32], bf0[2], cospi[32], bf0[3], cos_bit[stage]);
bf1[3] = half_btf(-cospi[32], bf0[3], cospi[32], bf0[2], cos_bit[stage]);
bf1[4] = bf0[4];
bf1[5] = bf0[5];
bf1[6] = half_btf(cospi[32], bf0[6], cospi[32], bf0[7], cos_bit[stage]);
bf1[7] = half_btf(-cospi[32], bf0[7], cospi[32], bf0[6], cos_bit[stage]);
range_check(stage, input, bf1, size, stage_range[stage]);
// stage 7
stage++;
bf0 = step;
bf1 = output;
bf1[0] = bf0[1];
bf1[1] = bf0[6];
bf1[2] = bf0[3];
bf1[3] = bf0[4];
bf1[4] = bf0[5];
bf1[5] = bf0[2];
bf1[6] = bf0[7];
bf1[7] = bf0[0];
bf1[0] = bf0[0];
bf1[1] = -bf0[4];
bf1[2] = bf0[6];
bf1[3] = -bf0[2];
bf1[4] = bf0[3];
bf1[5] = -bf0[7];
bf1[6] = bf0[5];
bf1[7] = -bf0[1];
range_check(stage, input, bf1, size, stage_range[stage]);
}
......@@ -926,24 +925,23 @@ void av1_iadst16_new(const int32_t *input, int32_t *output,
// stage 1;
stage++;
assert(output != input);
bf1 = output;
bf1[0] = input[0];
bf1[1] = -input[15];
bf1[2] = -input[7];
bf1[3] = input[8];
bf1[4] = -input[3];
bf1[5] = input[12];
bf1[6] = input[4];
bf1[7] = -input[11];
bf1[8] = -input[1];
bf1[9] = input[14];
bf1[10] = input[6];
bf1[11] = -input[9];
bf1[12] = input[2];
bf1[13] = -input[13];
bf1[14] = -input[5];
bf1[15] = input[10];
bf1[0] = input[15];
bf1[1] = input[0];
bf1[2] = input[13];
bf1[3] = input[2];
bf1[4] = input[11];
bf1[5] = input[4];
bf1[6] = input[9];
bf1[7] = input[6];
bf1[8] = input[7];
bf1[9] = input[8];
bf1[10] = input[5];
bf1[11] = input[10];
bf1[12] = input[3];
bf1[13] = input[12];
bf1[14] = input[1];
bf1[15] = input[14];
range_check(stage, input, bf1, size, stage_range[stage]);
// stage 2
......@@ -951,44 +949,44 @@ void av1_iadst16_new(const int32_t *input, int32_t *output,
cospi = cospi_arr(cos_bit[stage]);
bf0 = output;
bf1 = step;
bf1[0] = bf0[0];
bf1[1] = bf0[1];
bf1[2] = half_btf(cospi[32], bf0[2], cospi[32], bf0[3], cos_bit[stage]);
bf1[3] = half_btf(cospi[32], bf0[2], -cospi[32], bf0[3], cos_bit[stage]);
bf1[4] = bf0[4];
bf1[5] = bf0[5];
bf1[6] = half_btf(cospi[32], bf0[6], cospi[32], bf0[7], cos_bit[stage]);
bf1[7] = half_btf(cospi[32], bf0[6], -cospi[32], bf0[7], cos_bit[stage]);
bf1[8] = bf0[8];
bf1[9] = bf0[9];
bf1[10] = half_btf(cospi[32], bf0[10], cospi[32], bf0[11], cos_bit[stage]);
bf1[11] = half_btf(cospi[32], bf0[10], -cospi[32], bf0[11], cos_bit[stage]);
bf1[12] = bf0[12];
bf1[13] = bf0[13];
bf1[14] = half_btf(cospi[32], bf0[14], cospi[32], bf0[15], cos_bit[stage]);
bf1[15] = half_btf(cospi[32], bf0[14], -cospi[32], bf0[15], cos_bit[stage]);
bf1[0] = half_btf(cospi[2], bf0[0], cospi[62], bf0[1], cos_bit[stage]);
bf1[1] = half_btf(-cospi[2], bf0[1], cospi[62], bf0[0], cos_bit[stage]);
bf1[2] = half_btf(cospi[10], bf0[2], cospi[54], bf0[3], cos_bit[stage]);
bf1[3] = half_btf(-cospi[10], bf0[3], cospi[54], bf0[2], cos_bit[stage]);
bf1[4] = half_btf(cospi[18], bf0[4], cospi[46], bf0[5], cos_bit[stage]);
bf1[5] = half_btf(-cospi[18], bf0[5], cospi[46], bf0[4], cos_bit[stage]);
bf1[6] = half_btf(cospi[26], bf0[6], cospi[38], bf0[7], cos_bit[stage]);
bf1[7] = half_btf(-cospi[26], bf0[7], cospi[38], bf0[6], cos_bit[stage]);
bf1[8] = half_btf(cospi[34], bf0[8], cospi[30], bf0[9], cos_bit[stage]);
bf1[9] = half_btf(-cospi[34], bf0[9], cospi[30], bf0[8], cos_bit[stage]);
bf1[10] = half_btf(cospi[42], bf0[10], cospi[22], bf0[11], cos_bit[stage]);
bf1[11] = half_btf(-cospi[42], bf0[11], cospi[22], bf0[10], cos_bit[stage]);
bf1[12] = half_btf(cospi[50], bf0[12], cospi[14], bf0[13], cos_bit[stage]);
bf1[13] = half_btf(-cospi[50], bf0[13], cospi[14], bf0[12], cos_bit[stage]);
bf1[14] = half_btf(cospi[58], bf0[14], cospi[6], bf0[15], cos_bit[stage]);
bf1[15] = half_btf(-cospi[58], bf0[15], cospi[6], bf0[14], cos_bit[stage]);
range_check(stage, input, bf1, size, stage_range[stage]);
// stage 3
stage++;
bf0 = step;
bf1 = output;
bf1[0] = bf0[0] + bf0[2];
bf1[1] = bf0[1] + bf0[3];
bf1[2] = bf0[0] - bf0[2];
bf1[3] = bf0[1] - bf0[3];
bf1[4] = bf0[4] + bf0[6];
bf1[5] = bf0[5] + bf0[7];
bf1[6] = bf0[4] - bf0[6];
bf1[7] = bf0[5] - bf0[7];
bf1[8] = bf0[8] + bf0[10];
bf1[9] = bf0[9] + bf0[11];
bf1[10] = bf0[8] - bf0[10];
bf1[11] = bf0[9] - bf0[11];
bf1[12] = bf0[12] + bf0[14];
bf1[13] = bf0[13] + bf0[15];
bf1[14] = bf0[12] - bf0[14];
bf1[15] = bf0[13] - bf0[15];
bf1[0] = bf0[0] + bf0[8];
bf1[1] = bf0[1] + bf0[9];
bf1[2] = bf0[2] + bf0[10];
bf1[3] = bf0[3] + bf0[11];
bf1[4] = bf0[4] + bf0[12];
bf1[5] = bf0[5] + bf0[13];
bf1[6] = bf0[6] + bf0[14];
bf1[7] = bf0[7] + bf0[15];
bf1[8] = -bf0[8] + bf0[0];
bf1[9] = -bf0[9] + bf0[1];
bf1[10] = -bf0[10] + bf0[2];
bf1[11] = -bf0[11] + bf0[3];
bf1[12] = -bf0[12] + bf0[4];
bf1[13] = -bf0[13] + bf0[5];
bf1[14] = -bf0[14] + bf0[6];
bf1[15] = -bf0[15] + bf0[7];
range_check(stage, input, bf1, size, stage_range[stage]);
// stage 4
......@@ -1000,18 +998,18 @@ void av1_iadst16_new(const int32_t *input, int32_t *output,
bf1[1] = bf0[1];
bf1[2] = bf0[2];
bf1[3] = bf0[3];
bf1[4] = half_btf(cospi[16], bf0[4], cospi[48], bf0[5], cos_bit[stage]);
bf1[5] = half_btf(cospi[48], bf0[4], -cospi[16], bf0[5], cos_bit[stage]);
bf1[6] = half_btf(-cospi[48], bf0[6], cospi[16], bf0[7], cos_bit[stage]);
bf1[7] = half_btf(cospi[16], bf0[6], cospi[48], bf0[7], cos_bit[stage]);
bf1[8] = bf0[8];
bf1[9] = bf0[9];
bf1[10] = bf0[10];
bf1[11] = bf0[11];
bf1[12] = half_btf(cospi[16], bf0[12], cospi[48], bf0[13], cos_bit[stage]);
bf1[13] = half_btf(cospi[48], bf0[12], -cospi[16], bf0[13], cos_bit[stage]);
bf1[14] = half_btf(-cospi[48], bf0[14], cospi[16], bf0[15], cos_bit[stage]);
bf1[15] = half_btf(cospi[16], bf0[14], cospi[48], bf0[15], cos_bit[stage]);
bf1[4] = bf0[4];
bf1[5] = bf0[5];
bf1[6] = bf0[6];
bf1[7] = bf0[7];
bf1[8] = half_btf(cospi[8], bf0[8], cospi[56], bf0[9], cos_bit[stage]);
bf1[9] = half_btf(-cospi[8], bf0[9], cospi[56], bf0[8], cos_bit[stage]);
bf1[10] = half_btf(cospi[40], bf0[10], cospi[24], bf0[11], cos_bit[stage]);
bf1[11] = half_btf(-cospi[40], bf0[11], cospi[24], bf0[10], cos_bit[stage]);
bf1[12] = half_btf(-cospi[56], bf0[12], cospi[8], bf0[13], cos_bit[stage]);
bf1[13] = half_btf(cospi[56], bf0[13], cospi[8], bf0[12], cos_bit[stage]);
bf1[14] = half_btf(-cospi[24], bf0[14], cospi[40], bf0[15], cos_bit[stage]);
bf1[15] = half_btf(cospi[24], bf0[15], cospi[40], bf0[14], cos_bit[stage]);
range_check(stage, input, bf1, size, stage_range[stage]);
// stage 5
......@@ -1022,18 +1020,18 @@ void av1_iadst16_new(const int32_t *input, int32_t *output,
bf1[1] = bf0[1] + bf0[5];
bf1[2] = bf0[2] + bf0[6];
bf1[3] = bf0[3] + bf0[7];
bf1[4] = bf0[0] - bf0[4];
bf1[5] = bf0[1] - bf0[5];
bf1[6] = bf0[2] - bf0[6];
bf1[7] = bf0[3] - bf0[7];
bf1[4] = -bf0[4] + bf0[0];
bf1[5] = -bf0[5] + bf0[1];
bf1[6] = -bf0[6] + bf0[2];
bf1[7] = -bf0[7] + bf0[3];
bf1[8] = bf0[8] + bf0[12];
bf1[9] = bf0[9] + bf0[13];
bf1[10] = bf0[10] + bf0[14];
bf1[11] = bf0[11] + bf0[15];
bf1[12] = bf0[8] - bf0[12];
bf1[13] = bf0[9] - bf0[13];
bf1[14] = bf0[10] - bf0[14];
bf1[15] = bf0[11] - bf0[15];
bf1[12] = -bf0[12] + bf0[8];
bf1[13] = -bf0[13] + bf0[9];
bf1[14] = -bf0[14] + bf0[10];
bf1[15] = -bf0[15] + bf0[11];
range_check(stage, input, bf1, size, stage_range[stage]);
// stage 6
......@@ -1045,40 +1043,40 @@ void av1_iadst16_new(const int32_t *input, int32_t *output,
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[8], bf0[8], cospi[56], bf0[9], cos_bit[stage]);
bf1[9] = half_btf(cospi[56], bf0[8], -cospi[8], bf0[9], cos_bit[stage]);
bf1[10] = half_btf(cospi[40], bf0[10], cospi[24], bf0[11], cos_bit[stage]);
bf1[11] = half_btf(cospi[24], bf0[10], -cospi[40], bf0[11], cos_bit[stage]);
bf1[12] = half_btf(-cospi[56], bf0[12], cospi[8], bf0[13], cos_bit[stage]);
bf1[13] = half_btf(cospi[8], bf0[12], cospi[56], bf0[13], cos_bit[stage]);
bf1[14] = half_btf(-cospi[24], bf0[14], cospi[40], bf0[15], cos_bit[stage]);
bf1[15] = half_btf(cospi[40], bf0[14], cospi[24], bf0[15], cos_bit[stage]);
bf1[4] = half_btf(cospi[16], bf0[4], cospi[48], bf0[5], cos_bit[stage]);
bf1[5] = half_btf(-cospi[16], bf0[5], cospi[48], bf0[4], cos_bit[stage]);
bf1[6] = half_btf(-cospi[48], bf0[6], cospi[16], bf0[7], cos_bit[stage]);
bf1[7] = half_btf(cospi[48], bf0[7], cospi[16], bf0[6], cos_bit[stage]);
bf1[8] = bf0[8];
bf1[9] = bf0[9];
bf1[10] = bf0[10];
bf1[11] = bf0[11];
bf1[12] = half_btf(cospi[16], bf0[12], cospi[48], bf0[13], cos_bit[stage]);
bf1[13] = half_btf(-cospi[16], bf0[13], cospi[48], bf0[12], cos_bit[stage]);
bf1[14] = half_btf(-cospi[48], bf0[14], cospi[16], bf0[15], cos_bit[stage]);
bf1[15] = half_btf(cospi[48], bf0[15], cospi[16], bf0[14], cos_bit[stage]);
range_check(stage, input, bf1, size, stage_range[stage]);
// stage 7
stage++;
bf0 = step;
bf1 = output;
bf1[0] = bf0[0] + bf0[8];
bf1[1] = bf0[1] + bf0[9];
bf1[2] = bf0[2] + bf0[10];
bf1[3] = bf0[3] + bf0[11];
bf1[4] = bf0[4] + bf0[12];
bf1[5] = bf0[5] + bf0[13];
bf1[6] = bf0[6] + bf0[14];
bf1[7] = bf0[7] + bf0[15];
bf1[8] = bf0[0] - bf0[8];
bf1[9] = bf0[1] - bf0[9];
bf1[10] = bf0[2] - bf0[10];
bf1[11] = bf0[3] - bf0[11];
bf1[12] = bf0[4] - bf0[12];
bf1[13] = bf0[5] - bf0[13];
bf1[14] = bf0[6] - bf0[14];
bf1[15] = bf0[7] - bf0[15];
bf1[0] = bf0[0] + bf0[2];
bf1[1] = bf0[1] + bf0[3];
bf1[2] = -bf0[2] + bf0[0];
bf1[3] = -bf0[3] + bf0[1];
bf1[4] = bf0[4] + bf0[6];
bf1[5] = bf0[5] + bf0[7];
bf1[6] = -bf0[6] + bf0[4];
bf1[7] = -bf0[7] + bf0[5];
bf1[8] = bf0[8] + bf0[10];
bf1[9] = bf0[9] + bf0[11];
bf1[10] = -bf0[10] + bf0[8];
bf1[11] = -bf0[11] + bf0[9];
bf1[12] = bf0[12] + bf0[14];
bf1[13] = bf0[13] + bf0[15];
bf1[14] = -bf0[14] + bf0[12];
bf1[15] = -bf0[15] + bf0[13];
range_check(stage, input, bf1, size, stage_range[stage]);
// stage 8
......@@ -1086,44 +1084,44 @@ void av1_iadst16_new(const int32_t *input, int32_t *output,
cospi = cospi_arr(cos_bit[stage]);
bf0 = output;
bf1 = step;
bf1[0] = half_btf(cospi[2], bf0[0], cospi[62], bf0[1], cos_bit[stage]);
bf1[1] = half_btf(cospi[62], bf0[0], -cospi[2], bf0[1], cos_bit[stage]);
bf1[2] = half_btf(cospi[10], bf0[2], cospi[54], bf0[3], cos_bit[stage]);
bf1[3] = half_btf(cospi[54], bf0[2], -cospi[10], bf0[3], cos_bit[stage]);
bf1[4] = half_btf(cospi[18], bf0[4], cospi[46], bf0[5], cos_bit[stage]);
bf1[5] = half_btf(cospi[46], bf0[4], -cospi[18], bf0[5], cos_bit[stage]);
bf1[6] = half_btf(cospi[26], bf0[6], cospi[38], bf0[7], cos_bit[stage]);
bf1[7] = half_btf(cospi[38], bf0[6], -cospi[26], bf0[7], cos_bit[stage]);
bf1[8] = half_btf(cospi[34], bf0[8], cospi[30], bf0[9], cos_bit[stage]);
bf1[9] = half_btf(cospi[30], bf0[8], -cospi[34], bf0[9], cos_bit[stage]);
bf1[10] = half_btf(cospi[42], bf0[10], cospi[22], bf0[11], cos_bit[stage]);
bf1[11] = half_btf(cospi[22], bf0[10], -cospi[42], bf0[11], cos_bit[stage]);
bf1[12] = half_btf(cospi[50], bf0[12], cospi[14], bf0[13], cos_bit[stage]);
bf1[13] = half_btf(cospi[14], bf0[12], -cospi[50], bf0[13], cos_bit[stage]);
bf1[14] = half_btf(cospi[58], bf0[14], cospi[6], bf0[15], cos_bit[stage]);
bf1[15] = half_btf(cospi[6], bf0[14], -cospi[58], bf0[15], cos_bit[stage]);
bf1[0] = bf0[0];
bf1[1] = bf0[1];
bf1[2] = half_btf(cospi[32], bf0[2], cospi[32], bf0[3], cos_bit[stage]);
bf1[3] = half_btf(-cospi[32], bf0[3], cospi[32], bf0[2], cos_bit[stage]);
bf1[4] = bf0[4];
bf1[5] = bf0[5];
bf1[6] = half_btf(cospi[32], bf0[6], cospi[32], bf0[7], cos_bit[stage]);
bf1[7] = half_btf(-cospi[32], bf0[7], cospi[32], bf0[6], cos_bit[stage]);
bf1[8] = bf0[8];
bf1[9] = bf0[9];
bf1[10] = half_btf(cospi[32], bf0[10], cospi[32], bf0[11], cos_bit[stage]);
bf1[11] = half_btf(-cospi[32], bf0[11], cospi[32], bf0[10], cos_bit[stage]);
bf1[12] = bf0[12];
bf1[13] = bf0[13];
bf1[14] = half_btf(cospi[32], bf0[14], cospi[32], bf0[15], cos_bit[stage]);
bf1[15] = half_btf(-cospi[32], bf0[15], cospi[32], bf0[14], cos_bit[stage]);
range_check(stage, input, bf1, size, stage_range[stage]);
// stage 9
stage++;
bf0 = step;
bf1 = output;
bf1[0] = bf0[1];
bf1[1] = bf0[14];
bf1[2] = bf0[3];
bf1[3] = bf0[12];
bf1[4] = bf0[5];
bf1[5] = bf0[10];
bf1[6] = bf0[7];
bf1[7] = bf0[8];
bf1[8] = bf0[9];
bf1[9] = bf0[6];
bf1[10] = bf0[11];
bf1[11] = bf0[4];
bf1[12] = bf0[13];
bf1[13] = bf0[2];
bf1[14] = bf0[15];
bf1[15] = bf0[0];
bf1[0] = bf0[0];
bf1[1] = -bf0[8];
bf1[2] = bf0[12];
bf1[3] = -bf0[4];
bf1[4] = bf0[6];
bf1[5] = -bf0[14];
bf1[6] = bf0[10];
bf1[7] = -bf0[2];
bf1[8] = bf0[3];
bf1[9] = -bf0[11];
bf1[10] = bf0[15];
bf1[11] = -bf0[7];
bf1[12] = bf0[5];
bf1[13] = -bf0[13];
bf1[14] = bf0[9];
bf1[15] = -bf0[1];
range_check(stage, input, bf1, size, stage_range[stage]);
}
......
This diff is collapsed.
......@@ -30,7 +30,6 @@ void range_check_func(int32_t stage, const int32_t *input, const int32_t *buf,
}
#endif
// TODO(angiebird): Make 1-d txfm functions static
void av1_fdct4_new(const int32_t *input, int32_t *output, const int8_t *cos_bit,
const int8_t *stage_range) {
const int32_t size = 4;
......@@ -769,15 +768,16 @@ void av1_fadst8_new(const int32_t *input, int32_t *output,
// stage 1;
stage++;
assert(output != input);
bf1 = output;
bf1[0] = input[7];
bf1[1] = input[0];
bf1[2] = input[5];
bf1[3] = input[2];
bf1[4] = input[3];
bf1[5] = input[4];
bf1[6] = input[1];
bf1[7] = input[6];
bf1[0] = input[0];
bf1[1] = -input[7];
bf1[2] = -input[3];
bf1[3] = input[4];
bf1[4] = -input[1];
bf1[5] = input[6];
bf1[6] = input[2];
bf1[7] = -input[5];
range_check(stage, input, bf1, size, stage_range[stage]);
// stage 2
......@@ -785,28 +785,28 @@ void av1_fadst8_new(const int32_t *input, int32_t *output,
cospi = cospi_arr(cos_bit[stage]);