Commit 3e42acd4 authored by Urvang Joshi's avatar Urvang Joshi

SMOOTH_PRED: Use 8-bit weights.

Using 8-bit weights gives similar results as 12-bit, with only noise
level difference. Here's what 8-bit looks like compared to 12-bit:

* AWCY Objective-1-fast:
                          high latency          low latency
ALL keyframes             0.00                  0.01
Video                     0.00                  0.04

* Google sets:

All Keyframes:
lowres: 0
midres: -0.001
hdres: -0.001

Video overall:
lowres: 0
midres: -0.063
hdres: 0.026

Change-Id: Ibed6015aa7cce12fcc6f314ffde76624df4ad2a1
parent 246d2737
......@@ -260,8 +260,9 @@ static INLINE void paeth_predictor(uint8_t *dst, ptrdiff_t stride, int bs,
}
}
// Weights are quadratic from '1' to '1 / block_size', scaled by 2^12.
static const int sm_weight_log2_scale = 12;
// Weights are quadratic from '1' to '1 / block_size', scaled by
// 2^sm_weight_log2_scale.
static const int sm_weight_log2_scale = 8;
#if CONFIG_TX64X64
static const uint32_t sm_weight_arrays[6][64] = {
......@@ -269,26 +270,25 @@ static const uint32_t sm_weight_arrays[6][64] = {
static const uint32_t sm_weight_arrays[5][32] = {
#endif // CONFIG_TX64X64
// bs = 2
{ 4096, 2048 },
{ 256, 128 },
// bs = 4
{ 4096, 2389, 1365, 1024 },
{ 256, 149, 85, 64 },
// bs = 8
{ 4096, 3145, 2341, 1682, 1170, 805, 585, 512 },
{ 256, 197, 146, 105, 73, 50, 37, 32 },
// bs = 16
{ 4096, 3601, 3140, 2714, 2321, 1963, 1638, 1348, 1092, 870, 683, 529, 410,
324, 273, 256 },
{ 256, 225, 196, 170, 145, 123, 102, 84, 68, 54, 43, 33, 26, 20, 17, 16 },
// bs = 32
{ 4096, 3844, 3601, 3365, 3138, 2919, 2709, 2506, 2312, 2126, 1949,
1780, 1619, 1466, 1321, 1185, 1057, 937, 826, 723, 628, 541,
462, 392, 330, 277, 231, 194, 165, 145, 132, 128 },
{
256, 240, 225, 210, 196, 182, 169, 157, 145, 133, 122,
111, 101, 92, 83, 74, 66, 59, 52, 45, 39, 34,
29, 25, 21, 17, 14, 12, 10, 9, 8, 8 },
#if CONFIG_TX64X64
// bs = 64
{ 4096, 3969, 3844, 3721, 3600, 3481, 3365, 3250, 3137, 3026, 2918,
2811, 2706, 2604, 2503, 2405, 2308, 2214, 2121, 2031, 1942, 1856,
1772, 1689, 1609, 1531, 1455, 1381, 1308, 1238, 1170, 1104, 1040,
978, 918, 860, 805, 751, 699, 649, 601, 556, 512, 470,
431, 393, 358, 324, 293, 263, 236, 210, 187, 166, 146,
129, 114, 101, 89, 80, 73, 68, 65, 64 },
{ 256, 248, 240, 233, 225, 218, 210, 203, 196, 189, 182, 176, 169,
163, 156, 150, 144, 138, 133, 127, 121, 116, 111, 106, 101, 96,
91, 86, 82, 77, 73, 69, 65, 61, 57, 54, 50, 47, 44,
41, 38, 35, 32, 29, 27, 25, 22, 20, 18, 16, 15, 13,
12, 10, 9, 8, 7, 6, 6, 5, 5, 4, 4, 4 },
#endif // CONFIG_TX64X64
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment