Commit 59129afc authored by Yaowu Xu's avatar Yaowu Xu Committed by Code Review
Browse files

Merge "adjust sad per bit constants"

parents 5c166470 221e00ea
...@@ -155,51 +155,50 @@ static int rd_iifactor [ 32 ] = { 4, 4, 3, 2, 1, 0, 0, 0, ...@@ -155,51 +155,50 @@ static int rd_iifactor [ 32 ] = { 4, 4, 3, 2, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
}; };
/* values are now correlated to quantizer */ /* values are now correlated to quantizer */
static int sad_per_bit16lut[QINDEX_RANGE] = static int sad_per_bit16lut[QINDEX_RANGE] =
{ {
2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2,
3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 6, 6, 5, 5, 5, 5, 5, 5, 6, 6,
6, 6, 6, 6, 6, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6,
7, 7, 7, 7, 8, 8, 8, 8, 6, 6, 7, 7, 7, 7, 7, 7,
8, 8, 8, 8, 8, 8, 9, 9, 7, 7, 7, 7, 7, 7, 8, 8,
9, 9, 9, 9, 10, 10, 10, 10, 8, 8, 8, 8, 8, 8, 8, 8,
10, 10, 11, 11, 11, 11, 11, 11, 8, 8, 9, 9, 9, 9, 9, 9,
12, 12, 12, 12, 12, 12, 12, 13, 9, 9, 9, 9, 9, 9, 10, 10,
13, 13, 13, 13, 13, 14, 14, 14, 10, 10, 10, 10, 10, 10, 11, 11,
14, 14, 15, 15, 15, 15, 15, 15, 11, 11, 11, 11, 12, 12, 12, 12,
16, 16, 16, 16, 16, 16, 17, 17, 12, 12, 13, 13, 13, 13, 14, 14
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[QINDEX_RANGE] = static int sad_per_bit4lut[QINDEX_RANGE] =
{ {
5, 5, 5, 5, 5, 5, 7, 7, 2, 2, 2, 2, 2, 2, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 5, 5,
5, 5, 5, 5, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6,
7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 8, 8, 8, 7, 7, 7, 7, 7, 8, 8, 8,
8, 8, 8, 8, 10, 10, 10, 10, 8, 8, 9, 9, 9, 9, 9, 9,
10, 10, 10, 10, 10, 10, 11, 11, 10, 10, 10, 10, 10, 10, 10, 10,
11, 11, 11, 11, 13, 13, 13, 13, 11, 11, 11, 11, 11, 11, 11, 11,
13, 13, 14, 14, 14, 14, 14, 14, 12, 12, 12, 12, 12, 12, 12, 12,
16, 16, 16, 16, 16, 16, 16, 17, 13, 13, 13, 13, 13, 13, 13, 14,
17, 17, 17, 17, 17, 19, 19, 19, 14, 14, 14, 14, 15, 15, 15, 15,
19, 19, 20, 20, 20, 20, 20, 20, 16, 16, 16, 16, 17, 17, 17, 18,
22, 22, 22, 22, 22, 22, 23, 23, 18, 18, 19, 19, 19, 20, 20, 20,
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) void vp8cx_initialize_me_consts(VP8_COMP *cpi, int QIndex)
{ {
cpi->mb.sadperbit16 = sad_per_bit16lut[QIndex]/2; cpi->mb.sadperbit16 = sad_per_bit16lut[QIndex];
cpi->mb.sadperbit4 = sad_per_bit4lut[QIndex]/2; cpi->mb.sadperbit4 = sad_per_bit4lut[QIndex];
} }
void vp8_initialize_rd_consts(VP8_COMP *cpi, int Qvalue) void vp8_initialize_rd_consts(VP8_COMP *cpi, int Qvalue)
......
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