vp10: merge keyframe/interframe uvintramode/partition probabilities.

This has various benefits:
- simplify implementations because we don't have to switch between
  multiple probability tables depending on frametype
- allows fw subexp and bw adaptivity for partitions/uvmode in keyframes

See issue 1040 point 5.

Change-Id: Ia566aa2863252d130cee9deedcf123bb2a0d3765
This commit is contained in:
Ronald S. Bultje
2015-10-13 14:07:47 -04:00
parent 6e5a1165be
commit d8f3bb1837
10 changed files with 53 additions and 57 deletions

View File

@@ -1347,8 +1347,7 @@ static int64_t rd_pick_intra_sbuv_mode(VP10_COMP *cpi, MACROBLOCK *x,
if (!super_block_uvrd(cpi, x, &this_rate_tokenonly,
&this_distortion, &s, &this_sse, bsize, best_rd))
continue;
this_rate = this_rate_tokenonly +
cpi->intra_uv_mode_cost[cpi->common.frame_type][mode];
this_rate = this_rate_tokenonly + cpi->intra_uv_mode_cost[mode];
this_rd = RDCOST(x->rdmult, x->rddiv, this_rate, this_distortion);
if (this_rd < best_rd) {
@@ -1371,14 +1370,13 @@ static int64_t rd_sbuv_dcpred(const VP10_COMP *cpi, MACROBLOCK *x,
int *rate, int *rate_tokenonly,
int64_t *distortion, int *skippable,
BLOCK_SIZE bsize) {
const VP10_COMMON *cm = &cpi->common;
int64_t unused;
x->e_mbd.mi[0]->mbmi.uv_mode = DC_PRED;
memset(x->skip_txfm, SKIP_TXFM_NONE, sizeof(x->skip_txfm));
super_block_uvrd(cpi, x, rate_tokenonly, distortion,
skippable, &unused, bsize, INT64_MAX);
*rate = *rate_tokenonly + cpi->intra_uv_mode_cost[cm->frame_type][DC_PRED];
*rate = *rate_tokenonly + cpi->intra_uv_mode_cost[DC_PRED];
return RDCOST(x->rdmult, x->rddiv, *rate, *distortion);
}