changed find_near_mvs search to include a mb from last frame
This is an experiment to include a mv contribution from last frame to nearest and near mv definition. Initial test showed some small though consistent gain. latest patch slightly better result ~.13%-~.18%. TODO: the entropy used to encode the mode choice, i.e. the mv counts based conditional distribution of modes should be re-collected to reflect this change, it is expected that there is some further gain from that. Change-Id: Ief1e284a36d8aa56b49ae5b360c91419ec494fa4
This commit is contained in:
@@ -767,6 +767,12 @@ void encode_mb_row(VP8_COMP *cpi,
|
||||
|
||||
// skip to next mb
|
||||
xd->mode_info_context++;
|
||||
|
||||
#if CONFIG_NEWNEAR
|
||||
xd->prev_mode_info_context++;
|
||||
assert((xd->prev_mode_info_context - cpi->common.prev_mip)
|
||||
==(xd->mode_info_context - cpi->common.mip));
|
||||
#endif
|
||||
x->partition_info++;
|
||||
|
||||
xd->above_context++;
|
||||
@@ -786,6 +792,9 @@ void encode_mb_row(VP8_COMP *cpi,
|
||||
xd->dst.v_buffer + 8);
|
||||
|
||||
// this is to account for the border
|
||||
#if CONFIG_NEWNEAR
|
||||
xd->prev_mode_info_context++;
|
||||
#endif
|
||||
xd->mode_info_context++;
|
||||
x->partition_info++;
|
||||
|
||||
@@ -829,6 +838,10 @@ void init_encode_frame_mb_context(VP8_COMP *cpi)
|
||||
|
||||
xd->mode_info_context = cm->mi;
|
||||
xd->mode_info_stride = cm->mode_info_stride;
|
||||
#if CONFIG_NEWNEAR
|
||||
xd->prev_mode_info_context = cm->prev_mi;
|
||||
#endif
|
||||
|
||||
|
||||
xd->frame_type = cm->frame_type;
|
||||
|
||||
@@ -970,6 +983,11 @@ void vp8_encode_frame(VP8_COMP *cpi)
|
||||
|
||||
xd->mode_info_context = cm->mi;
|
||||
|
||||
#if CONFIG_NEWNEAR
|
||||
xd->prev_mode_info_context = cm->prev_mi;
|
||||
#endif
|
||||
|
||||
|
||||
vp8_zero(cpi->MVcount);
|
||||
vp8_zero(cpi->coef_counts);
|
||||
|
||||
@@ -1022,7 +1040,13 @@ void vp8_encode_frame(VP8_COMP *cpi)
|
||||
x->src.u_buffer += 8 * x->src.uv_stride * (cpi->encoding_thread_count + 1) - 8 * cm->mb_cols;
|
||||
x->src.v_buffer += 8 * x->src.uv_stride * (cpi->encoding_thread_count + 1) - 8 * cm->mb_cols;
|
||||
|
||||
xd->mode_info_context += xd->mode_info_stride * cpi->encoding_thread_count;
|
||||
xd->mode_info_context += xd->mode_info_stride
|
||||
* cpi->encoding_thread_count;
|
||||
#if CONFIG_NEWNEAR
|
||||
xd->prev_mode_info_context += xd->mode_info_stride
|
||||
* cpi->encoding_thread_count;
|
||||
#endif
|
||||
|
||||
x->partition_info += xd->mode_info_stride * cpi->encoding_thread_count;
|
||||
x->gf_active_ptr += cm->mb_cols * cpi->encoding_thread_count;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user