ref: 2a68727af9d0705fbafef7a69e6101cc6a8a2ce5
parent: 7c8ae69ad8049d0d20f9c84bd85e10c6cd37d59f
parent: 95dbe9ccfd6ee9ef4cc5b87228cf612ea3596ba0
author: John Koleszar <jkoleszar@google.com>
date: Sun Dec 26 19:05:05 EST 2010
Merge remote branch 'origin/master' into experimental Change-Id: I238df40ea8e0f34b85a38525605f7c91905f650a
--- a/vp8/encoder/rdopt.c
+++ b/vp8/encoder/rdopt.c
@@ -173,45 +173,44 @@
};
-// The values in this table should be reviewed
-static int sad_per_bit16lut[128] =
+/* values are now correlated to quantizer */
+static int sad_per_bit16lut[QINDEX_RANGE] =
{
- 4, 4, 4, 4, 4, 4, 4, 4, // 4
- 4, 4, 4, 4, 4, 4, 4, 4, // 1
- 4, 4, 4, 4, 4, 4, 4, 4, // 2
- 4, 4, 4, 4, 4, 4, 4, 4, // 3
- 4, 4, 4, 4, 4, 4, 4, 4, // 4
- 4, 4, 12, 12, 13, 13, 14, 14, // 5
- 14, 14, 14, 15, 15, 15, 15, 15, // 6
- 15, 15, 15, 15, 15, 15, 15, 15, // 7
- 15, 15, 15, 15, 15, 16, 16, 16, // 8
- 16, 16, 18, 18, 18, 18, 19, 19, // 9
- 19, 19, 19, 19, 19, 19, 19, 19, // 10
- 20, 20, 22, 22, 22, 22, 21, 21, // 11
- 22, 22, 22, 22, 22, 22, 22, 22, // 12
- 22, 22, 22, 22, 22, 22, 22, 22, // 13
- 22, 22, 22, 22, 22, 22, 22, 22, // 14
- 22, 22, 22, 22, 22, 22, 22, 22, // 15
+ 5, 5, 5, 5, 5, 5, 6, 6,
+ 6, 6, 6, 6, 6, 7, 7, 7,
+ 7, 7, 7, 7, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 9, 9,
+ 9, 9, 9, 9, 10, 10, 10, 10,
+ 10, 10, 11, 11, 11, 11, 11, 11,
+ 12, 12, 12, 12, 12, 12, 12, 13,
+ 13, 13, 13, 13, 13, 14, 14, 14,
+ 14, 14, 15, 15, 15, 15, 15, 15,
+ 16, 16, 16, 16, 16, 16, 17, 17,
+ 17, 17, 17, 17, 17, 18, 18, 18,
+ 18, 18, 19, 19, 19, 19, 19, 19,
+ 20, 20, 20, 21, 21, 21, 21, 22,
+ 22, 22, 23, 23, 23, 24, 24, 24,
+ 25, 25, 26, 26, 27, 27, 27, 28,
+ 28, 28, 29, 29, 30, 30, 31, 31
};
-
-static int sad_per_bit4lut[128] =
+static int sad_per_bit4lut[QINDEX_RANGE] =
{
- 4, 4, 4, 4, 4, 4, 4, 4, // 4
- 4, 4, 4, 4, 4, 4, 4, 4, // 1
- 4, 4, 4, 4, 4, 4, 4, 4, // 2
- 4, 4, 4, 4, 4, 4, 4, 4, // 3
- 4, 4, 4, 4, 4, 4, 4, 4, // 4
- 4, 4, 15, 15, 15, 15, 16, 16, // 5
- 16, 17, 17, 17, 17, 17, 17, 17, // 6
- 17, 17, 19, 19, 22, 22, 21, 21, // 7
- 23, 23, 23, 23, 23, 24, 24, 24, // 8
- 25, 25, 27, 27, 27, 27, 28, 28, // 9
- 28, 28, 29, 29, 29, 29, 29, 29, // 10
- 30, 30, 31, 31, 31, 31, 32, 32, // 11
- 34, 34, 34, 34, 34, 34, 34, 34, // 12
- 34, 34, 34, 34, 34, 34, 34, 34, // 13
- 34, 34, 34, 34, 34, 34, 34, 34, // 14
- 34, 34, 34, 34, 34, 34, 34, 34, // 15
+ 5, 5, 5, 5, 5, 5, 7, 7,
+ 7, 7, 7, 7, 7, 8, 8, 8,
+ 8, 8, 8, 8, 10, 10, 10, 10,
+ 10, 10, 10, 10, 10, 10, 11, 11,
+ 11, 11, 11, 11, 13, 13, 13, 13,
+ 13, 13, 14, 14, 14, 14, 14, 14,
+ 16, 16, 16, 16, 16, 16, 16, 17,
+ 17, 17, 17, 17, 17, 19, 19, 19,
+ 19, 19, 20, 20, 20, 20, 20, 20,
+ 22, 22, 22, 22, 22, 22, 23, 23,
+ 23, 23, 23, 23, 23, 25, 25, 25,
+ 25, 25, 26, 26, 26, 26, 26, 26,
+ 28, 28, 28, 29, 29, 29, 29, 31,
+ 31, 31, 32, 32, 32, 34, 34, 34,
+ 35, 35, 37, 37, 38, 38, 38, 40,
+ 40, 40, 41, 41, 43, 43, 44, 44,
};
void vp8cx_initialize_me_consts(VP8_COMP *cpi, int QIndex)
@@ -262,10 +261,6 @@
cpi->RDMULT = 125;
cpi->mb.errorperbit = (cpi->RDMULT / 100);
-
- if (cpi->mb.errorperbit < 1)
- cpi->mb.errorperbit = 1;
-
vp8_set_speed_features(cpi);
if (cpi->common.simpler_lpf)