diff --git a/vp8/encoder/rdopt.c b/vp8/encoder/rdopt.c index e239281ffa29d5b2415327955e0a56451bc4c92f..dc12b61981721a139dcaf96943573750c3409e8f 100644 --- a/vp8/encoder/rdopt.c +++ b/vp8/encoder/rdopt.c @@ -214,7 +214,14 @@ static void fill_token_costs( for (i = 0; i < BLOCK_TYPES; i++) for (j = 0; j < COEF_BANDS; j++) for (k = 0; k < PREV_COEF_CONTEXTS; k++) - vp8_cost_tokens((int *)(c [i][j][k]), p [i][j][k], vp8_coef_tree); + { + + if(k == 0 && ((j > 0 && i > 0) || (j > 1 && i == 0))) + vp8_cost_tokens_skip((int *)(c [i][j][k]), p [i][j][k], vp8_coef_tree); + else + + vp8_cost_tokens((int *)(c [i][j][k]), p [i][j][k], vp8_coef_tree); + } } @@ -250,7 +257,7 @@ int compute_rd_mult( int qindex ) int q; q = vp8_dc_quant(qindex,0); - return (3 * q * q) >> 4; + return (11 * q * q) >> 6; } void vp8cx_initialize_me_consts(VP8_COMP *cpi, int QIndex) diff --git a/vp8/encoder/treewriter.c b/vp8/encoder/treewriter.c index 03967c835dc2e0ef57e2b2abaf82691d09c264f5..3a777f222f631744df258aeb948b7bfe4cb480f8 100644 --- a/vp8/encoder/treewriter.c +++ b/vp8/encoder/treewriter.c @@ -37,3 +37,9 @@ void vp8_cost_tokens(int *c, const vp8_prob *p, vp8_tree t) { cost(c, t, p, 0, 0); } + +void vp8_cost_tokens_skip(int *c, const vp8_prob *p, vp8_tree t) +{ + cost(c, t, p, 2, 0); +} +