Merge "Eliminated prev_mip memsets/memcpys" into experimental

This commit is contained in:
Scott LaVarnway 2013-04-23 10:22:13 -07:00 committed by Gerrit Code Review
commit e3167b8c23
6 changed files with 19 additions and 12 deletions

View File

@ -137,9 +137,6 @@ int vp9_alloc_frame_buffers(VP9_COMMON *oci, int width, int height) {
return 1;
}
vp9_update_mode_info_border(oci, oci->mip);
vp9_update_mode_info_in_image(oci, oci->mi);
return 0;
}

View File

@ -718,6 +718,9 @@ void vp9_setup_past_independence(VP9_COMMON *cm, MACROBLOCKD *xd) {
vp9_update_mode_info_border(cm, cm->mip);
vp9_update_mode_info_in_image(cm, cm->mi);
vp9_update_mode_info_border(cm, cm->prev_mip);
vp9_update_mode_info_in_image(cm, cm->prev_mi);
cm->ref_frame_sign_bias[GOLDEN_FRAME] = 0;
cm->ref_frame_sign_bias[ALTREF_FRAME] = 0;

View File

@ -196,6 +196,7 @@ typedef struct VP9Common {
FRAME_TYPE frame_type;
int show_frame;
int last_show_frame;
int frame_flags;
int MBs;

View File

@ -601,7 +601,8 @@ static void read_mb_modes_mv(VP9D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
const int use_prev_in_find_mv_refs = cm->width == cm->last_width &&
cm->height == cm->last_height &&
!cm->error_resilient_mode;
!cm->error_resilient_mode &&
cm->last_show_frame;
int mb_to_left_edge, mb_to_right_edge, mb_to_top_edge, mb_to_bottom_edge;

View File

@ -1078,10 +1078,12 @@ static void update_frame_size(VP9D_COMP *pbi) {
memset(cm->mip, 0,
(cm->mb_cols + 1) * (cm->mb_rows + 1) * sizeof(MODE_INFO));
vp9_update_mode_info_border(cm, cm->mip);
vp9_update_mode_info_border(cm, cm->prev_mip);
cm->mi = cm->mip + cm->mode_info_stride + 1;
cm->prev_mi = cm->prev_mip + cm->mode_info_stride + 1;
vp9_update_mode_info_in_image(cm, cm->mi);
vp9_update_mode_info_in_image(cm, cm->prev_mi);
}
static void setup_segmentation(VP9_COMMON *pc, MACROBLOCKD *xd, vp9_reader *r) {

View File

@ -365,20 +365,23 @@ int vp9_receive_compressed_data(VP9D_PTR ptr,
vp9_clear_system_state();
cm->last_show_frame = cm->show_frame;
if (cm->show_frame) {
vpx_memcpy(cm->prev_mip, cm->mip,
(cm->mb_cols + 1) * (cm->mb_rows + 1)* sizeof(MODE_INFO));
} else {
vpx_memset(cm->prev_mip, 0,
(cm->mb_cols + 1) * (cm->mb_rows + 1)* sizeof(MODE_INFO));
// current mip will be the prev_mip for the next frame
MODE_INFO *temp = cm->prev_mip;
cm->prev_mip = cm->mip;
cm->mip = temp;
// update the upper left visible macroblock ptrs
cm->mi = cm->mip + cm->mode_info_stride + 1;
cm->prev_mi = cm->prev_mip + cm->mode_info_stride + 1;
cm->current_video_frame++;
}
/*vp9_print_modes_and_motion_vectors(cm->mi, cm->mb_rows,cm->mb_cols,
cm->current_video_frame);*/
if (cm->show_frame)
cm->current_video_frame++;
pbi->ready_for_new_data = 0;
pbi->last_time_stamp = time_stamp;
pbi->source_sz = 0;