diff --git a/vp8/encoder/rdopt.c b/vp8/encoder/rdopt.c index 80f19812b7f86a57ffe6b60205e5140cafcfcd43..fdc7213f33bf05d1255704e6bcda50e356d05985 100644 --- a/vp8/encoder/rdopt.c +++ b/vp8/encoder/rdopt.c @@ -137,9 +137,11 @@ 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); - + // check for pt=0 and band > 1 if block type 0 and 0 if blocktype 1 + if(k==0 && j>(i==0) ) + vp8_cost_tokens2((int *)(c [i][j][k]), p [i][j][k], vp8_coef_tree,2); + else + vp8_cost_tokens((int *)(c [i][j][k]), p [i][j][k], vp8_coef_tree); } static int rd_iifactor [ 32 ] = { 4, 4, 3, 2, 1, 0, 0, 0, @@ -199,7 +201,7 @@ void vp8_initialize_rd_consts(VP8_COMP *cpi, int Qvalue) int q; int i; double capped_q = (Qvalue < 160) ? (double)Qvalue : 160.0; - double rdconst = 2.70; + double rdconst = 2.60; vp8_clear_system_state(); //__asm emms; diff --git a/vp8/encoder/treewriter.c b/vp8/encoder/treewriter.c index 03967c835dc2e0ef57e2b2abaf82691d09c264f5..ef25f670b3a4b5b422186d6fc6a944af814ffd93 100644 --- a/vp8/encoder/treewriter.c +++ b/vp8/encoder/treewriter.c @@ -37,3 +37,7 @@ void vp8_cost_tokens(int *c, const vp8_prob *p, vp8_tree t) { cost(c, t, p, 0, 0); } +void vp8_cost_tokens2(int *c, const vp8_prob *p, vp8_tree t,int start) +{ + cost(c, t, p, start, 0); +} diff --git a/vp8/encoder/treewriter.h b/vp8/encoder/treewriter.h index c28a0fa370d85338a8843f595f9422fed0090b1c..0aa19431cdb97f6201cd591f0230f17e2bdf5b62 100644 --- a/vp8/encoder/treewriter.h +++ b/vp8/encoder/treewriter.h @@ -119,4 +119,8 @@ void vp8_cost_tokens( int *Costs, const vp8_prob *, vp8_tree ); +void vp8_cost_tokens2( + int *Costs, const vp8_prob *, vp8_tree, int +); + #endif