diff options
Diffstat (limited to 'vp8/encoder')
-rw-r--r-- | vp8/encoder/bitstream.c | 2 | ||||
-rw-r--r-- | vp8/encoder/encodeframe.c | 3 | ||||
-rw-r--r-- | vp8/encoder/onyx_if.c | 21 | ||||
-rw-r--r-- | vp8/encoder/onyx_int.h | 11 | ||||
-rw-r--r-- | vp8/encoder/rdopt.c | 45 |
5 files changed, 6 insertions, 76 deletions
diff --git a/vp8/encoder/bitstream.c b/vp8/encoder/bitstream.c index 7875cf93b..a4df16fee 100644 --- a/vp8/encoder/bitstream.c +++ b/vp8/encoder/bitstream.c @@ -29,7 +29,7 @@ #include "vp8/common/entropy.h" #include "vp8/encoder/encodemv.h" -#if CONFIG_NEW_MVREF +#if CONFIG_NEWBESTREFMV #include "vp8/common/mvref_common.h" #endif diff --git a/vp8/encoder/encodeframe.c b/vp8/encoder/encodeframe.c index 4670c314d..bbbbc7870 100644 --- a/vp8/encoder/encodeframe.c +++ b/vp8/encoder/encodeframe.c @@ -34,7 +34,7 @@ #include "vp8/common/pred_common.h" #define DBG_PRNT_SEGMAP 0 -#if CONFIG_NEW_MVREF +#if CONFIG_NEWBESTREFMV #include "vp8/common/mvref_common.h" #endif @@ -1304,7 +1304,6 @@ static void encode_frame_internal(VP8_COMP *cpi) { #if CONFIG_NEW_MVREF // temp stats reset - vp8_zero( cpi->mv_ref_sum_distance ); vp8_zero( cpi->best_ref_index_counts ); #endif diff --git a/vp8/encoder/onyx_if.c b/vp8/encoder/onyx_if.c index ea6e45d83..ca6570e68 100644 --- a/vp8/encoder/onyx_if.c +++ b/vp8/encoder/onyx_if.c @@ -40,7 +40,7 @@ #include "bitstream.h" #include "ratectrl.h" -#if CONFIG_NEW_MVREF +#if CONFIG_NEWBESTREFMV #include "vp8/common/mvref_common.h" #endif @@ -3874,25 +3874,10 @@ static void encode_frame_to_data_rate // in this frame. update_base_skip_probs(cpi); - -#if CONFIG_NEW_MVREF -#if 0 && CONFIG_INTERNAL_STATS +#if 0 //CONFIG_NEW_MVREF && CONFIG_INTERNAL_STATS { FILE *f = fopen("mv_ref_dist.stt", "a"); unsigned int i; - //fprintf(f, "%10d %10d %10d %10d %10d %10d %10d %10d %10d %10d\n", - /*fprintf(f, "%10d %10d %10d %10d %10d %10d %10d %10d %10d %10d", - cpi->common.current_video_frame, - cpi->mv_ref_sum_distance[1][0], - cpi->mv_ref_sum_distance[1][1], - cpi->mv_ref_sum_distance[1][2], - cpi->mv_ref_sum_distance[2][0], - cpi->mv_ref_sum_distance[2][1], - cpi->mv_ref_sum_distance[2][2], - cpi->mv_ref_sum_distance[3][0], - cpi->mv_ref_sum_distance[3][1], - cpi->mv_ref_sum_distance[3][2] );*/ - for (i = 0; i < MAX_MV_REFS; ++i) { fprintf(f, "%10d", cpi->best_ref_index_counts[i] ); } @@ -3901,8 +3886,6 @@ static void encode_frame_to_data_rate fclose(f); } #endif -#endif - #if 0// 1 && CONFIG_INTERNAL_STATS { diff --git a/vp8/encoder/onyx_int.h b/vp8/encoder/onyx_int.h index 0bdc07fc2..159cb8527 100644 --- a/vp8/encoder/onyx_int.h +++ b/vp8/encoder/onyx_int.h @@ -59,13 +59,6 @@ #define VP8_TEMPORAL_ALT_REF 1 -#if CONFIG_NEW_MVREF -// temp. relate to mv_ref_sum_distance stats -#define CUR_BEST 0 -#define NEW_BEST 1 -#define BEST_SELECTED 2 -#endif - typedef struct { #if CONFIG_NEWMVENTROPY nmv_context nmvc; @@ -771,9 +764,7 @@ typedef struct VP8_COMP { #endif #if CONFIG_NEW_MVREF - // temp stats [REF_FRAME]{REF_METHOD] - unsigned int mv_ref_sum_distance[4][3]; - unsigned int best_ref_index_counts[17]; + unsigned int best_ref_index_counts[MAX_MV_REFS]; #endif } VP8_COMP; diff --git a/vp8/encoder/rdopt.c b/vp8/encoder/rdopt.c index 673d631b1..a9a78e7e0 100644 --- a/vp8/encoder/rdopt.c +++ b/vp8/encoder/rdopt.c @@ -42,7 +42,7 @@ #include "vp8/common/seg_common.h" #include "vp8/common/pred_common.h" -#if CONFIG_NEW_MVREF +#if CONFIG_NEWBESTREFMV #include "vp8/common/mvref_common.h" #endif @@ -3045,7 +3045,6 @@ void setup_buffer_inter(VP8_COMP *cpi, MACROBLOCK *x, int idx, int frame_type, v_buffer[frame_type] = yv12->v_buffer + recon_uvoffset; #if CONFIG_NEWBESTREFMV -#if CONFIG_NEW_MVREF // Update stats on relative distance of chosen vector to the // possible best reference vectors. { @@ -3055,15 +3054,10 @@ void setup_buffer_inter(VP8_COMP *cpi, MACROBLOCK *x, int idx, int frame_type, mbmi->ref_mvs[frame_type], cpi->common.ref_frame_sign_bias ); } -#endif vp8_find_best_ref_mvs(xd, y_buffer[frame_type], yv12->y_stride, -#if CONFIG_NEW_MVREF mbmi->ref_mvs[frame_type], -#else - xd->ref_mv, -#endif &frame_best_ref_mv[frame_type], &frame_nearest_mv[frame_type], &frame_near_mv[frame_type]); @@ -3574,43 +3568,6 @@ void vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int d->bmi.as_mv.first.as_int = tmp_mv.as_int; frame_mv[NEWMV][refs[0]].as_int = d->bmi.as_mv.first.as_int; -#if 0 //CONFIG_NEW_MVREF - // Update stats on relative distance of chosen vector to the - // possible best reference vectors. - { - unsigned int distance; - MV_REFERENCE_FRAME ref = mbmi->ref_frame; - int_mv selected_best_ref; - unsigned int best_index = 0; - - find_mv_refs(xd, xd->mode_info_context, - xd->prev_mode_info_context, - ref, - mbmi->ref_mvs[ref], - cpi->common.ref_frame_sign_bias ); - - distance = mv_distance(&tmp_mv, &best_ref_mv); - cpi->mv_ref_sum_distance[ref][CUR_BEST] += distance; - - distance = - mv_distance(&tmp_mv, - &mbmi->ref_mvs[ref][0]); - cpi->mv_ref_sum_distance[ref][NEW_BEST] += distance; - - best_index = pick_best_mv_ref(x, tmp_mv, mbmi->ref_mvs[ref], - &selected_best_ref); - - distance = mv_distance(&tmp_mv, &selected_best_ref); - mbmi->mv_ref_index[ref] = best_index; - cpi->mv_ref_sum_distance[ref][BEST_SELECTED] += distance; - cpi->best_ref_index_counts[best_index]++; - - // Temp - //mbmi->mv_ref_index[ref] = 0; - //mbmi->ref_mvs[ref][0].as_int = best_ref_mv.as_int; - } -#endif - // Add the new motion vector cost to our rolling cost variable rate2 += vp8_mv_bit_cost(&tmp_mv, &best_ref_mv, XMVCOST, 96, |