From 4c8f5ad6d86524acd3862e23a424586c2137b2b2 Mon Sep 17 00:00:00 2001
From: Angie Chiang <angiebird@google.com>
Date: Fri, 5 Jan 2018 17:46:25 -0800
Subject: [PATCH] Correct 1:2 2:1 fwd rect txfm stage range

Change-Id: Icb3fb748da11d96cc9768aa0721482f8edc28b2e
---
 av1/encoder/av1_fwd_txfm1d_cfg.h | 57 ++++++++++++++++----------------
 1 file changed, 29 insertions(+), 28 deletions(-)

diff --git a/av1/encoder/av1_fwd_txfm1d_cfg.h b/av1/encoder/av1_fwd_txfm1d_cfg.h
index 1d3841cdd3..294253b667 100644
--- a/av1/encoder/av1_fwd_txfm1d_cfg.h
+++ b/av1/encoder/av1_fwd_txfm1d_cfg.h
@@ -129,20 +129,18 @@ static const int8_t fwd_cos_bit_row_dct_64[12] = { 13, 13, 12, 11, 10, 10,
 
 //  ---------------- 4x8 1D constants -----------------------
 #define fwd_shift_4x8 fwd_shift_8
-static const int8_t fwd_stage_range_row_dct_4x8[4] =
-    ARRAYOFFSET4(3, 0, 1, 2, 2);
-static const int8_t fwd_stage_range_row_adst_4x8[6] =
-    ARRAYOFFSET6(3, 0, 0, 1, 2, 2, 2);
+static const int8_t fwd_stage_range_row_dct_4x8[4] = { 3, 4, 4, 4 };
+static const int8_t fwd_stage_range_row_adst_4x8[6] = { 3, 3, 3, 4, 4, 4 };
 static const int8_t fwd_stage_range_row_idx_4x8[1] = { 4 };
 static const int8_t fwd_cos_bit_row_dct_4x8[6] = { 13, 12, 12, 12 };
 static const int8_t fwd_cos_bit_row_adst_4x8[6] = { 13, 13, 12, 12, 12, 12 };
 
 //  ---------------- 8x4 1D constants -----------------------
 #define fwd_shift_8x4 fwd_shift_8
-static const int8_t fwd_stage_range_row_dct_8x4[6] =
-    ARRAYOFFSET6(2, 0, 1, 2, 3, 3, 3);
-static const int8_t fwd_stage_range_row_adst_8x4[8] =
-    ARRAYOFFSET8(2, 0, 0, 1, 2, 2, 3, 3, 3);
+static const int8_t fwd_stage_range_row_dct_8x4[6] = { 2, 3, 4, 4, 4, 4 };
+static const int8_t fwd_stage_range_row_adst_8x4[8] = {
+  2, 2, 2, 3, 3, 4, 4, 4
+};
 static const int8_t fwd_stage_range_row_idx_8x4[1] = { 3 };
 static const int8_t fwd_cos_bit_row_dct_8x4[6] = { 13, 13, 12, 12, 12, 12 };
 static const int8_t fwd_cos_bit_row_adst_8x4[8] = { 13, 13, 13, 13,
@@ -150,10 +148,10 @@ static const int8_t fwd_cos_bit_row_adst_8x4[8] = { 13, 13, 13, 13,
 
 //  ---------------- 8x16 1D constants -----------------------
 #define fwd_shift_8x16 fwd_shift_16
-static const int8_t fwd_stage_range_row_dct_8x16[6] =
-    ARRAYOFFSET6(4, 0, 1, 2, 3, 3, 3);
-static const int8_t fwd_stage_range_row_adst_8x16[8] =
-    ARRAYOFFSET8(4, 0, 0, 1, 2, 2, 3, 3, 3);
+static const int8_t fwd_stage_range_row_dct_8x16[6] = { 4, 5, 6, 6, 6, 6 };
+static const int8_t fwd_stage_range_row_adst_8x16[8] = {
+  4, 4, 4, 5, 5, 6, 6, 6
+};
 static const int8_t fwd_stage_range_row_idx_8x16[1] = { 5 };
 static const int8_t fwd_cos_bit_row_dct_8x16[6] = { 12, 12, 11, 11, 11, 11 };
 static const int8_t fwd_cos_bit_row_adst_8x16[8] = { 12, 12, 12, 12,
@@ -161,10 +159,11 @@ static const int8_t fwd_cos_bit_row_adst_8x16[8] = { 12, 12, 12, 12,
 
 //  ---------------- 16x8 1D constants -----------------------
 #define fwd_shift_16x8 fwd_shift_16
-static const int8_t fwd_stage_range_row_dct_16x8[8] =
-    ARRAYOFFSET8(3, 0, 1, 2, 3, 4, 4, 4, 4);
-static const int8_t fwd_stage_range_row_adst_16x8[10] =
-    ARRAYOFFSET10(3, 0, 0, 1, 2, 2, 3, 3, 4, 4, 4);
+static const int8_t fwd_stage_range_row_dct_16x8[8] = {
+  3, 4, 5, 6, 6, 6, 6, 6
+};
+static const int8_t fwd_stage_range_row_adst_16x8[10] = { 3, 3, 3, 4, 4,
+                                                          5, 5, 6, 6, 6 };
 static const int8_t fwd_stage_range_row_idx_16x8[1] = { 5 };
 static const int8_t fwd_cos_bit_row_dct_16x8[8] = { 12, 12, 12, 11,
                                                     11, 11, 11, 11 };
@@ -173,10 +172,11 @@ static const int8_t fwd_cos_bit_row_adst_16x8[10] = { 12, 12, 12, 12, 12,
 
 //  ---------------- 16x32 1D constants -----------------------
 #define fwd_shift_16x32 fwd_shift_32
-static const int8_t fwd_stage_range_row_dct_16x32[8] =
-    ARRAYOFFSET8(5, 0, 1, 2, 3, 4, 4, 4, 4);
-static const int8_t fwd_stage_range_row_adst_16x32[10] =
-    ARRAYOFFSET10(5, 0, 0, 1, 2, 2, 3, 3, 4, 4, 4);
+static const int8_t fwd_stage_range_row_dct_16x32[8] = {
+  5, 6, 7, 8, 8, 8, 8, 8
+};
+static const int8_t fwd_stage_range_row_adst_16x32[10] = { 5, 5, 5, 6, 6,
+                                                           7, 7, 8, 8, 8 };
 static const int8_t fwd_stage_range_row_idx_16x32[1] = { 7 };
 static const int8_t fwd_cos_bit_row_dct_16x32[8] = { 12, 12, 12, 11,
                                                      11, 11, 11, 11 };
@@ -185,10 +185,10 @@ static const int8_t fwd_cos_bit_row_adst_16x32[10] = { 12, 12, 12, 12, 12,
 
 //  ---------------- 32x16 1D constants -----------------------
 #define fwd_shift_32x16 fwd_shift_32
-static const int8_t fwd_stage_range_row_dct_32x16[10] =
-    ARRAYOFFSET10(4, 0, 1, 2, 3, 4, 5, 5, 5, 5, 5);
-static const int8_t fwd_stage_range_row_adst_32x16[12] =
-    ARRAYOFFSET12(4, 0, 0, 1, 2, 2, 3, 3, 4, 4, 5, 5, 5);
+static const int8_t fwd_stage_range_row_dct_32x16[10] = { 4, 5, 6, 7, 8,
+                                                          8, 8, 8, 8, 8 };
+static const int8_t fwd_stage_range_row_adst_32x16[12] = { 4, 4, 4, 5, 5, 6,
+                                                           6, 7, 7, 8, 8, 8 };
 static const int8_t fwd_stage_range_row_idx_32x16[1] = { 6 };
 static const int8_t fwd_cos_bit_row_dct_32x16[10] = { 12, 12, 12, 12, 11,
                                                       11, 11, 11, 11, 11 };
@@ -197,16 +197,17 @@ static const int8_t fwd_cos_bit_row_adst_32x16[12] = { 12, 12, 12, 12, 12, 12,
 
 //  ---------------- 32x64 1D constants -----------------------
 #define fwd_shift_32x64 fwd_shift_64
-static const int8_t fwd_stage_range_row_dct_32x64[10] =
-    ARRAYOFFSET10(6, 0, 1, 2, 3, 4, 5, 5, 5, 5, 5);
+static const int8_t fwd_stage_range_row_dct_32x64[10] = { 6,  7,  8,  9,  10,
+                                                          10, 10, 10, 10, 10 };
 static const int8_t fwd_stage_range_row_idx_32x64[1] = { 8 };
 static const int8_t fwd_cos_bit_row_dct_32x64[10] = { 13, 12, 12, 11, 10,
                                                       10, 10, 10, 10, 10 };
 
 //  ---------------- 64x32 1D constants -----------------------
 #define fwd_shift_64x32 fwd_shift_64
-static const int8_t fwd_stage_range_row_dct_64x32[12] =
-    ARRAYOFFSET12(5, 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6);
+static const int8_t fwd_stage_range_row_dct_64x32[12] = {
+  5, 6, 7, 8, 9, 10, 10, 10, 10, 10, 10, 10
+};
 static const int8_t fwd_stage_range_row_idx_64x32[1] = { 8 };
 static const int8_t fwd_cos_bit_row_dct_64x32[12] = { 13, 13, 12, 11, 10, 10,
                                                       10, 10, 10, 10, 10, 10 };
-- 
GitLab