diff options
author | Jim Bankoski <jimbankoski@google.com> | 2011-12-09 16:56:18 -0800 |
---|---|---|
committer | Jim Bankoski <jimbankoski@google.com> | 2011-12-09 16:56:18 -0800 |
commit | 6de67cd6e8827f8b90a7999c33dad7a21341a9ef (patch) | |
tree | 34a7293c0c190ba3a55203ab8ecea2cfefea1ccb /vp8/encoder/rdopt.c | |
parent | 254889cdfc64de8d042117c3dfeb9f83fee736bd (diff) | |
download | libvpx-6de67cd6e8827f8b90a7999c33dad7a21341a9ef.tar libvpx-6de67cd6e8827f8b90a7999c33dad7a21341a9ef.tar.gz libvpx-6de67cd6e8827f8b90a7999c33dad7a21341a9ef.tar.bz2 libvpx-6de67cd6e8827f8b90a7999c33dad7a21341a9ef.zip |
vp8e - entropy stats per frame type
Change-Id: I4168eb6ea22ae541471738a7a3453e7d52059275
Diffstat (limited to 'vp8/encoder/rdopt.c')
-rw-r--r-- | vp8/encoder/rdopt.c | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/vp8/encoder/rdopt.c b/vp8/encoder/rdopt.c index 62a2cfc53..4f9a0ce80 100644 --- a/vp8/encoder/rdopt.c +++ b/vp8/encoder/rdopt.c @@ -288,12 +288,33 @@ void vp8_initialize_rd_consts(VP8_COMP *cpi, int Qvalue) } } - fill_token_costs( - cpi->mb.token_costs, - (const vp8_prob( *)[8][3][11]) cpi->common.fc.coef_probs - ); + { + // build token cost array for the type of frame we have now + FRAME_CONTEXT *l = &cpi->lfc_n; + + if(cpi->common.refresh_alt_ref_frame) + l = &cpi->lfc_a; + else if(cpi->common.refresh_golden_frame) + l = &cpi->lfc_g; + + fill_token_costs( + cpi->mb.token_costs, + (const vp8_prob( *)[8][3][11]) l->coef_probs + ); + /* + fill_token_costs( + cpi->mb.token_costs, + (const vp8_prob( *)[8][3][11]) cpi->common.fc.coef_probs); + */ + - vp8_init_mode_costs(cpi); + // TODO make these mode costs depend on last,alt or gold too. (jbb) + vp8_init_mode_costs(cpi); + + // TODO figure onnnnuut why making mv cost frame type dependent didn't help (jbb) + //vp8_build_component_cost_table(cpi->mb.mvcost, (const MV_CONTEXT *) l->mvc, flags); + + } } |