diff options
author | Scott LaVarnway <slavarnway@google.com> | 2011-06-02 13:46:41 -0400 |
---|---|---|
committer | Scott LaVarnway <slavarnway@google.com> | 2011-06-02 13:46:41 -0400 |
commit | 773768ae27bfe427f153c8e6fadb3912b8f94c1f (patch) | |
tree | 96bc9e8a572b9e8ecf4d43fc7960a90f06551565 /vp8/encoder/rdopt.c | |
parent | 9e4f76c154a355bac2a3e005e47882219801bdae (diff) | |
download | libvpx-773768ae27bfe427f153c8e6fadb3912b8f94c1f.tar libvpx-773768ae27bfe427f153c8e6fadb3912b8f94c1f.tar.gz libvpx-773768ae27bfe427f153c8e6fadb3912b8f94c1f.tar.bz2 libvpx-773768ae27bfe427f153c8e6fadb3912b8f94c1f.zip |
Removed B_MODE_INFO
Declared the bmi in BLOCKD as a union instead of B_MODE_INFO.
Then removed B_MODE_INFO completely.
Change-Id: Ieb7469899e265892c66f7aeac87b7f2bf38e7a67
Diffstat (limited to 'vp8/encoder/rdopt.c')
-rw-r--r-- | vp8/encoder/rdopt.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/vp8/encoder/rdopt.c b/vp8/encoder/rdopt.c index bed2bb5f6..3ab8ea300 100644 --- a/vp8/encoder/rdopt.c +++ b/vp8/encoder/rdopt.c @@ -650,7 +650,7 @@ static int rd_pick_intra4x4block( vpx_memcpy(best_dqcoeff, b->dqcoeff, 32); } } - b->bmi.mode = (B_PREDICTION_MODE)(*best_mode); + b->bmi.as_mode = (B_PREDICTION_MODE)(*best_mode); IDCT_INVOKE(IF_RTCD(&cpi->rtcd.common->idct), idct16)(best_dqcoeff, b->diff, 32); RECON_INVOKE(IF_RTCD(&cpi->rtcd.common->recon), recon)(best_predictor, b->diff, *(b->base_dst) + b->dst, b->dst_stride); @@ -1398,8 +1398,7 @@ static int vp8_rd_pick_best_mbsegmentation(VP8_COMP *cpi, MACROBLOCK *x, { BLOCKD *bd = &x->e_mbd.block[i]; - bd->bmi.mv.as_mv = bsi.mvs[i].as_mv; - bd->bmi.mode = bsi.modes[i]; + bd->bmi.mv.as_int = bsi.mvs[i].as_int; bd->eob = bsi.eobs[i]; } @@ -1714,7 +1713,7 @@ void vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int BLOCK *b = &x->block[0]; BLOCKD *d = &x->e_mbd.block[0]; MACROBLOCKD *xd = &x->e_mbd; - B_MODE_INFO best_bmodes[16]; + union b_mode_info best_bmodes[16]; MB_MODE_INFO best_mbmode; PARTITION_INFO best_partition; int_mv best_ref_mv; @@ -1758,6 +1757,7 @@ void vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int unsigned char *v_buffer[4]; vpx_memset(&best_mbmode, 0, sizeof(best_mbmode)); + vpx_memset(&best_bmodes, 0, sizeof(best_bmodes)); if (cpi->ref_frame_flags & VP8_LAST_FLAG) { @@ -2319,10 +2319,12 @@ void vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int vpx_memcpy(&best_mbmode, &x->e_mbd.mode_info_context->mbmi, sizeof(MB_MODE_INFO)); vpx_memcpy(&best_partition, x->partition_info, sizeof(PARTITION_INFO)); - for (i = 0; i < 16; i++) - { - vpx_memcpy(&best_bmodes[i], &x->e_mbd.block[i].bmi, sizeof(B_MODE_INFO)); - } + if ((this_mode == B_PRED) || (this_mode == SPLITMV)) + for (i = 0; i < 16; i++) + { + best_bmodes[i] = x->e_mbd.block[i].bmi; + } + // Testing this mode gave rise to an improvement in best error score. Lower threshold a bit for next time cpi->rd_thresh_mult[mode_index] = (cpi->rd_thresh_mult[mode_index] >= (MIN_THRESHMULT + 2)) ? cpi->rd_thresh_mult[mode_index] - 2 : MIN_THRESHMULT; @@ -2396,7 +2398,7 @@ void vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int if (best_mbmode.mode == B_PRED) { for (i = 0; i < 16; i++) - x->e_mbd.block[i].bmi.mode = best_bmodes[i].mode; + x->e_mbd.block[i].bmi.as_mode = best_bmodes[i].as_mode; } if (best_mbmode.mode == SPLITMV) |