summaryrefslogtreecommitdiffstats
path: root/third_party/aom/av1/common/av1_inv_txfm1d.c
diff options
context:
space:
mode:
authortrav90 <travawine@palemoon.org>2018-10-17 05:59:08 -0500
committertrav90 <travawine@palemoon.org>2018-10-17 05:59:08 -0500
commitdf9477dfa60ebb5d31bc142e58ce46535c17abce (patch)
treec4fdd5d1b09d08c0514f208246260fc87372cb56 /third_party/aom/av1/common/av1_inv_txfm1d.c
parent0cc51bc106250988cc3b89cb5d743a5af52cd35a (diff)
downloadUXP-df9477dfa60ebb5d31bc142e58ce46535c17abce.tar
UXP-df9477dfa60ebb5d31bc142e58ce46535c17abce.tar.gz
UXP-df9477dfa60ebb5d31bc142e58ce46535c17abce.tar.lz
UXP-df9477dfa60ebb5d31bc142e58ce46535c17abce.tar.xz
UXP-df9477dfa60ebb5d31bc142e58ce46535c17abce.zip
Update aom to slightly newer commit ID
Diffstat (limited to 'third_party/aom/av1/common/av1_inv_txfm1d.c')
-rw-r--r--third_party/aom/av1/common/av1_inv_txfm1d.c124
1 files changed, 83 insertions, 41 deletions
diff --git a/third_party/aom/av1/common/av1_inv_txfm1d.c b/third_party/aom/av1/common/av1_inv_txfm1d.c
index 54bbe9adf..3399b7cb9 100644
--- a/third_party/aom/av1/common/av1_inv_txfm1d.c
+++ b/third_party/aom/av1/common/av1_inv_txfm1d.c
@@ -10,6 +10,7 @@
*/
#include <stdlib.h>
+#include "aom_dsp/inv_txfm.h"
#include "av1/common/av1_inv_txfm1d.h"
#if CONFIG_COEFFICIENT_RANGE_CHECKING
@@ -66,6 +67,7 @@ void av1_idct4_new(const int32_t *input, int32_t *output, const int8_t *cos_bit,
// stage 1;
stage++;
+ assert(output != input);
bf1 = output;
bf1[0] = input[0];
bf1[1] = input[2];
@@ -75,7 +77,7 @@ void av1_idct4_new(const int32_t *input, int32_t *output, const int8_t *cos_bit,
// stage 2
stage++;
- cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
+ cospi = cospi_arr(cos_bit[stage]);
bf0 = output;
bf1 = step;
bf1[0] = half_btf(cospi[32], bf0[0], cospi[32], bf0[1], cos_bit[stage]);
@@ -109,6 +111,7 @@ void av1_idct8_new(const int32_t *input, int32_t *output, const int8_t *cos_bit,
// stage 1;
stage++;
+ assert(output != input);
bf1 = output;
bf1[0] = input[0];
bf1[1] = input[4];
@@ -122,7 +125,7 @@ void av1_idct8_new(const int32_t *input, int32_t *output, const int8_t *cos_bit,
// stage 2
stage++;
- cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
+ cospi = cospi_arr(cos_bit[stage]);
bf0 = output;
bf1 = step;
bf1[0] = bf0[0];
@@ -137,7 +140,7 @@ void av1_idct8_new(const int32_t *input, int32_t *output, const int8_t *cos_bit,
// stage 3
stage++;
- cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
+ cospi = cospi_arr(cos_bit[stage]);
bf0 = step;
bf1 = output;
bf1[0] = half_btf(cospi[32], bf0[0], cospi[32], bf0[1], cos_bit[stage]);
@@ -152,7 +155,7 @@ void av1_idct8_new(const int32_t *input, int32_t *output, const int8_t *cos_bit,
// stage 4
stage++;
- cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
+ cospi = cospi_arr(cos_bit[stage]);
bf0 = output;
bf1 = step;
bf1[0] = bf0[0] + bf0[3];
@@ -194,6 +197,7 @@ void av1_idct16_new(const int32_t *input, int32_t *output,
// stage 1;
stage++;
+ assert(output != input);
bf1 = output;
bf1[0] = input[0];
bf1[1] = input[8];
@@ -215,7 +219,7 @@ void av1_idct16_new(const int32_t *input, int32_t *output,
// stage 2
stage++;
- cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
+ cospi = cospi_arr(cos_bit[stage]);
bf0 = output;
bf1 = step;
bf1[0] = bf0[0];
@@ -238,7 +242,7 @@ void av1_idct16_new(const int32_t *input, int32_t *output,
// stage 3
stage++;
- cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
+ cospi = cospi_arr(cos_bit[stage]);
bf0 = step;
bf1 = output;
bf1[0] = bf0[0];
@@ -261,7 +265,7 @@ void av1_idct16_new(const int32_t *input, int32_t *output,
// stage 4
stage++;
- cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
+ cospi = cospi_arr(cos_bit[stage]);
bf0 = output;
bf1 = step;
bf1[0] = half_btf(cospi[32], bf0[0], cospi[32], bf0[1], cos_bit[stage]);
@@ -284,7 +288,7 @@ void av1_idct16_new(const int32_t *input, int32_t *output,
// stage 5
stage++;
- cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
+ cospi = cospi_arr(cos_bit[stage]);
bf0 = step;
bf1 = output;
bf1[0] = bf0[0] + bf0[3];
@@ -307,7 +311,7 @@ void av1_idct16_new(const int32_t *input, int32_t *output,
// stage 6
stage++;
- cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
+ cospi = cospi_arr(cos_bit[stage]);
bf0 = output;
bf1 = step;
bf1[0] = bf0[0] + bf0[7];
@@ -365,6 +369,7 @@ void av1_idct32_new(const int32_t *input, int32_t *output,
// stage 1;
stage++;
+ assert(output != input);
bf1 = output;
bf1[0] = input[0];
bf1[1] = input[16];
@@ -402,7 +407,7 @@ void av1_idct32_new(const int32_t *input, int32_t *output,
// stage 2
stage++;
- cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
+ cospi = cospi_arr(cos_bit[stage]);
bf0 = output;
bf1 = step;
bf1[0] = bf0[0];
@@ -441,7 +446,7 @@ void av1_idct32_new(const int32_t *input, int32_t *output,
// stage 3
stage++;
- cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
+ cospi = cospi_arr(cos_bit[stage]);
bf0 = step;
bf1 = output;
bf1[0] = bf0[0];
@@ -480,7 +485,7 @@ void av1_idct32_new(const int32_t *input, int32_t *output,
// stage 4
stage++;
- cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
+ cospi = cospi_arr(cos_bit[stage]);
bf0 = output;
bf1 = step;
bf1[0] = bf0[0];
@@ -519,7 +524,7 @@ void av1_idct32_new(const int32_t *input, int32_t *output,
// stage 5
stage++;
- cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
+ cospi = cospi_arr(cos_bit[stage]);
bf0 = step;
bf1 = output;
bf1[0] = half_btf(cospi[32], bf0[0], cospi[32], bf0[1], cos_bit[stage]);
@@ -558,7 +563,7 @@ void av1_idct32_new(const int32_t *input, int32_t *output,
// stage 6
stage++;
- cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
+ cospi = cospi_arr(cos_bit[stage]);
bf0 = output;
bf1 = step;
bf1[0] = bf0[0] + bf0[3];
@@ -597,7 +602,7 @@ void av1_idct32_new(const int32_t *input, int32_t *output,
// stage 7
stage++;
- cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
+ cospi = cospi_arr(cos_bit[stage]);
bf0 = step;
bf1 = output;
bf1[0] = bf0[0] + bf0[7];
@@ -636,7 +641,7 @@ void av1_idct32_new(const int32_t *input, int32_t *output,
// stage 8
stage++;
- cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
+ cospi = cospi_arr(cos_bit[stage]);
bf0 = output;
bf1 = step;
bf1[0] = bf0[0] + bf0[15];
@@ -726,6 +731,7 @@ void av1_iadst4_new(const int32_t *input, int32_t *output,
// stage 1;
stage++;
+ assert(output != input);
bf1 = output;
bf1[0] = input[0];
bf1[1] = -input[3];
@@ -735,7 +741,7 @@ void av1_iadst4_new(const int32_t *input, int32_t *output,
// stage 2
stage++;
- cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
+ cospi = cospi_arr(cos_bit[stage]);
bf0 = output;
bf1 = step;
bf1[0] = bf0[0];
@@ -756,7 +762,7 @@ void av1_iadst4_new(const int32_t *input, int32_t *output,
// stage 4
stage++;
- cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
+ cospi = cospi_arr(cos_bit[stage]);
bf0 = output;
bf1 = step;
bf1[0] = half_btf(cospi[8], bf0[0], cospi[56], bf0[1], cos_bit[stage]);
@@ -790,6 +796,7 @@ 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];
@@ -803,7 +810,7 @@ void av1_iadst8_new(const int32_t *input, int32_t *output,
// stage 2
stage++;
- cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
+ cospi = cospi_arr(cos_bit[stage]);
bf0 = output;
bf1 = step;
bf1[0] = bf0[0];
@@ -832,7 +839,7 @@ void av1_iadst8_new(const int32_t *input, int32_t *output,
// stage 4
stage++;
- cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
+ cospi = cospi_arr(cos_bit[stage]);
bf0 = output;
bf1 = step;
bf1[0] = bf0[0];
@@ -861,7 +868,7 @@ void av1_iadst8_new(const int32_t *input, int32_t *output,
// stage 6
stage++;
- cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
+ 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]);
@@ -903,6 +910,7 @@ 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];
@@ -924,7 +932,7 @@ void av1_iadst16_new(const int32_t *input, int32_t *output,
// stage 2
stage++;
- cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
+ cospi = cospi_arr(cos_bit[stage]);
bf0 = output;
bf1 = step;
bf1[0] = bf0[0];
@@ -969,7 +977,7 @@ void av1_iadst16_new(const int32_t *input, int32_t *output,
// stage 4
stage++;
- cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
+ cospi = cospi_arr(cos_bit[stage]);
bf0 = output;
bf1 = step;
bf1[0] = bf0[0];
@@ -1014,7 +1022,7 @@ void av1_iadst16_new(const int32_t *input, int32_t *output,
// stage 6
stage++;
- cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
+ cospi = cospi_arr(cos_bit[stage]);
bf0 = output;
bf1 = step;
bf1[0] = bf0[0];
@@ -1059,7 +1067,7 @@ void av1_iadst16_new(const int32_t *input, int32_t *output,
// stage 8
stage++;
- cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
+ 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]);
@@ -1117,6 +1125,7 @@ void av1_iadst32_new(const int32_t *input, int32_t *output,
// stage 1;
stage++;
+ assert(output != input);
bf1 = output;
bf1[0] = input[0];
bf1[1] = -input[31];
@@ -1154,7 +1163,7 @@ void av1_iadst32_new(const int32_t *input, int32_t *output,
// stage 2
stage++;
- cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
+ cospi = cospi_arr(cos_bit[stage]);
bf0 = output;
bf1 = step;
bf1[0] = bf0[0];
@@ -1231,7 +1240,7 @@ void av1_iadst32_new(const int32_t *input, int32_t *output,
// stage 4
stage++;
- cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
+ cospi = cospi_arr(cos_bit[stage]);
bf0 = output;
bf1 = step;
bf1[0] = bf0[0];
@@ -1308,7 +1317,7 @@ void av1_iadst32_new(const int32_t *input, int32_t *output,
// stage 6
stage++;
- cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
+ cospi = cospi_arr(cos_bit[stage]);
bf0 = output;
bf1 = step;
bf1[0] = bf0[0];
@@ -1385,7 +1394,7 @@ void av1_iadst32_new(const int32_t *input, int32_t *output,
// stage 8
stage++;
- cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
+ cospi = cospi_arr(cos_bit[stage]);
bf0 = output;
bf1 = step;
bf1[0] = bf0[0];
@@ -1462,7 +1471,7 @@ void av1_iadst32_new(const int32_t *input, int32_t *output,
// stage 10
stage++;
- cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
+ cospi = cospi_arr(cos_bit[stage]);
bf0 = output;
bf1 = step;
bf1[0] = half_btf(cospi[1], bf0[0], cospi[63], bf0[1], cos_bit[stage]);
@@ -1538,6 +1547,38 @@ void av1_iadst32_new(const int32_t *input, int32_t *output,
range_check(stage, input, bf1, size, stage_range[stage]);
}
+#if CONFIG_EXT_TX
+void av1_iidentity4_c(const int32_t *input, int32_t *output,
+ const int8_t *cos_bit, const int8_t *stage_range) {
+ (void)cos_bit;
+ for (int i = 0; i < 4; ++i)
+ output[i] = (int32_t)dct_const_round_shift(input[i] * Sqrt2);
+ range_check(0, input, output, 4, stage_range[0]);
+}
+
+void av1_iidentity8_c(const int32_t *input, int32_t *output,
+ const int8_t *cos_bit, const int8_t *stage_range) {
+ (void)cos_bit;
+ for (int i = 0; i < 8; ++i) output[i] = input[i] * 2;
+ range_check(0, input, output, 8, stage_range[0]);
+}
+
+void av1_iidentity16_c(const int32_t *input, int32_t *output,
+ const int8_t *cos_bit, const int8_t *stage_range) {
+ (void)cos_bit;
+ for (int i = 0; i < 16; ++i)
+ output[i] = (int32_t)dct_const_round_shift(input[i] * 2 * Sqrt2);
+ range_check(0, input, output, 16, stage_range[0]);
+}
+
+void av1_iidentity32_c(const int32_t *input, int32_t *output,
+ const int8_t *cos_bit, const int8_t *stage_range) {
+ (void)cos_bit;
+ for (int i = 0; i < 32; ++i) output[i] = input[i] * 4;
+ range_check(0, input, output, 32, stage_range[0]);
+}
+#endif // CONFIG_EXT_TX
+
#if CONFIG_TX64X64
void av1_idct64_new(const int32_t *input, int32_t *output,
const int8_t *cos_bit, const int8_t *stage_range) {
@@ -1553,7 +1594,8 @@ void av1_idct64_new(const int32_t *input, int32_t *output,
// stage 1;
stage++;
- cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
+ cospi = cospi_arr(cos_bit[stage]);
+ assert(output != input);
bf1 = output;
bf1[0] = input[0];
bf1[1] = input[32];
@@ -1623,7 +1665,7 @@ void av1_idct64_new(const int32_t *input, int32_t *output,
// stage 2
stage++;
- cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
+ cospi = cospi_arr(cos_bit[stage]);
bf0 = output;
bf1 = step;
bf1[0] = bf0[0];
@@ -1694,7 +1736,7 @@ void av1_idct64_new(const int32_t *input, int32_t *output,
// stage 3
stage++;
- cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
+ cospi = cospi_arr(cos_bit[stage]);
bf0 = step;
bf1 = output;
bf1[0] = bf0[0];
@@ -1765,7 +1807,7 @@ void av1_idct64_new(const int32_t *input, int32_t *output,
// stage 4
stage++;
- cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
+ cospi = cospi_arr(cos_bit[stage]);
bf0 = output;
bf1 = step;
bf1[0] = bf0[0];
@@ -1836,7 +1878,7 @@ void av1_idct64_new(const int32_t *input, int32_t *output,
// stage 5
stage++;
- cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
+ cospi = cospi_arr(cos_bit[stage]);
bf0 = step;
bf1 = output;
bf1[0] = bf0[0];
@@ -1907,7 +1949,7 @@ void av1_idct64_new(const int32_t *input, int32_t *output,
// stage 6
stage++;
- cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
+ cospi = cospi_arr(cos_bit[stage]);
bf0 = output;
bf1 = step;
bf1[0] = half_btf(cospi[32], bf0[0], cospi[32], bf0[1], cos_bit[stage]);
@@ -1978,7 +2020,7 @@ void av1_idct64_new(const int32_t *input, int32_t *output,
// stage 7
stage++;
- cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
+ cospi = cospi_arr(cos_bit[stage]);
bf0 = step;
bf1 = output;
bf1[0] = bf0[0] + bf0[3];
@@ -2049,7 +2091,7 @@ void av1_idct64_new(const int32_t *input, int32_t *output,
// stage 8
stage++;
- cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
+ cospi = cospi_arr(cos_bit[stage]);
bf0 = output;
bf1 = step;
bf1[0] = bf0[0] + bf0[7];
@@ -2120,7 +2162,7 @@ void av1_idct64_new(const int32_t *input, int32_t *output,
// stage 9
stage++;
- cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
+ cospi = cospi_arr(cos_bit[stage]);
bf0 = step;
bf1 = output;
bf1[0] = bf0[0] + bf0[15];
@@ -2191,7 +2233,7 @@ void av1_idct64_new(const int32_t *input, int32_t *output,
// stage 10
stage++;
- cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
+ cospi = cospi_arr(cos_bit[stage]);
bf0 = output;
bf1 = step;
bf1[0] = bf0[0] + bf0[31];
@@ -2262,7 +2304,7 @@ void av1_idct64_new(const int32_t *input, int32_t *output,
// stage 11
stage++;
- cospi = cospi_arr[cos_bit[stage] - cos_bit_min];
+ cospi = cospi_arr(cos_bit[stage]);
bf0 = step;
bf1 = output;
bf1[0] = bf0[0] + bf0[63];