From 811f80ca25728ed3a1e5be9a3e8dfae5c7cc52c1 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Wed, 24 Apr 2013 11:28:57 -0700 Subject: [PATCH] Remove write-only variables that store refframe, signbias and mv. These were superseeded by prev_mip. Change-Id: Ide240475350ce003d68aa990eddc2ee30920663a --- vp9/encoder/vp9_onyx_if.c | 38 -------------------------------------- vp9/encoder/vp9_onyx_int.h | 5 ----- 2 files changed, 43 deletions(-) diff --git a/vp9/encoder/vp9_onyx_if.c b/vp9/encoder/vp9_onyx_if.c index 9d693a09a..706cf9ac9 100644 --- a/vp9/encoder/vp9_onyx_if.c +++ b/vp9/encoder/vp9_onyx_if.c @@ -304,16 +304,6 @@ static void setup_features(VP9_COMP *cpi) { static void dealloc_compressor_data(VP9_COMP *cpi) { - // Delete last frame MV storage buffers - vpx_free(cpi->lfmv); - cpi->lfmv = 0; - - vpx_free(cpi->lf_ref_frame_sign_bias); - cpi->lf_ref_frame_sign_bias = 0; - - vpx_free(cpi->lf_ref_frame); - cpi->lf_ref_frame = 0; - // Delete sementation map vpx_free(cpi->segmentation_map); cpi->segmentation_map = 0; @@ -1443,11 +1433,6 @@ VP9_PTR vp9_create_compressor(VP9_CONFIG *oxcf) { cpi->alt_is_last = 0; cpi->gold_is_alt = 0; - // allocate memory for storing last frame's MVs for MV prediction. - CHECK_MEM_ERROR(cpi->lfmv, vpx_calloc((cpi->common.mb_rows + 2) * (cpi->common.mb_cols + 2), sizeof(int_mv))); - CHECK_MEM_ERROR(cpi->lf_ref_frame_sign_bias, vpx_calloc((cpi->common.mb_rows + 2) * (cpi->common.mb_cols + 2), sizeof(int))); - CHECK_MEM_ERROR(cpi->lf_ref_frame, vpx_calloc((cpi->common.mb_rows + 2) * (cpi->common.mb_cols + 2), sizeof(int))); - // Create the encoder segmentation map and set all entries to 0 CHECK_MEM_ERROR(cpi->segmentation_map, vpx_calloc((cpi->common.mb_rows * cpi->common.mb_cols), 1)); @@ -3305,29 +3290,6 @@ static void encode_frame_to_data_rate(VP9_COMP *cpi, &cm->yv12_fb[cm->new_fb_idx]); } - // This frame's MVs are saved and will be used in next frame's MV - // prediction. Last frame has one more line(add to bottom) and one - // more column(add to right) than cm->mip. The edge elements are - // initialized to 0. - if (cm->show_frame) { // do not save for altref frame - int mb_row; - int mb_col; - MODE_INFO *tmp = cm->mip; - - if (cm->frame_type != KEY_FRAME) { - for (mb_row = 0; mb_row < cm->mb_rows + 1; mb_row ++) { - for (mb_col = 0; mb_col < cm->mb_cols + 1; mb_col ++) { - if (tmp->mbmi.ref_frame != INTRA_FRAME) - cpi->lfmv[mb_col + mb_row * (cm->mode_info_stride + 1)].as_int = tmp->mbmi.mv[0].as_int; - - cpi->lf_ref_frame_sign_bias[mb_col + mb_row * (cm->mode_info_stride + 1)] = cm->ref_frame_sign_bias[tmp->mbmi.ref_frame]; - cpi->lf_ref_frame[mb_col + mb_row * (cm->mode_info_stride + 1)] = tmp->mbmi.ref_frame; - tmp++; - } - } - } - } - if (cm->frame_type == KEY_FRAME) cpi->refresh_last_frame = 1; diff --git a/vp9/encoder/vp9_onyx_int.h b/vp9/encoder/vp9_onyx_int.h index a01c7d16e..aeaf1bda3 100644 --- a/vp9/encoder/vp9_onyx_int.h +++ b/vp9/encoder/vp9_onyx_int.h @@ -633,11 +633,6 @@ typedef struct VP9_COMP { int *mb_norm_activity_map; int output_partition; - // Store last frame's MV info for next frame MV prediction - int_mv *lfmv; - int *lf_ref_frame_sign_bias; - int *lf_ref_frame; - /* force next frame to intra when kf_auto says so */ int force_next_frame_intra; -- 2.40.0