Merge changes Ia6004c08,I1954f9d6

* changes:
  cosmetics: Add a few explanatory comments
  cosmetics: Correct grammar/spelling in comments
This commit is contained in:
James Zern 2016-07-19 19:12:23 +00:00 committed by Gerrit Code Review
commit e3f7991f99
5 changed files with 15 additions and 11 deletions

View File

@ -78,6 +78,9 @@ typedef struct MODE_INFO {
// Only for INTER blocks
INTERP_FILTER interp_filter;
// if ref_frame[idx] is equal to ALTREF_FRAME then
// MACROBLOCKD::block_ref[idx] is an altref
MV_REFERENCE_FRAME ref_frame[2];
// TODO(slavarnway): Delete and use bmi[3].as_mv[] instead.
@ -154,6 +157,9 @@ typedef struct macroblockd {
int mi_stride;
// Grid of 8x8 cells is placed over the block.
// If some of them belong to the same mbtree-block
// they will just have same mi[i][j] value
MODE_INFO **mi;
MODE_INFO *left_mi;
MODE_INFO *above_mi;

View File

@ -54,7 +54,7 @@ static void encode_superblock(VP9_COMP *cpi, ThreadData * td,
PICK_MODE_CONTEXT *ctx);
// This is used as a reference when computing the source variance for the
// purposes of activity masking.
// purpose of activity masking.
// Eventually this should be replaced by custom no-reference routines,
// which will be faster.
static const uint8_t VP9_VAR_OFFS[64] = {
@ -4301,9 +4301,9 @@ void vp9_encode_frame(VP9_COMP *cpi) {
// either compound, single or hybrid prediction as per whatever has
// worked best for that type of frame in the past.
// It also predicts whether another coding mode would have worked
// better that this coding mode. If that is the case, it remembers
// better than this coding mode. If that is the case, it remembers
// that for subsequent frames.
// It does the same analysis for transform size selection also.
// It also does the same analysis for transform size selection.
const MV_REFERENCE_FRAME frame_type = get_frame_type(cpi);
int64_t *const mode_thrs = rd_opt->prediction_type_threshes[frame_type];
int64_t *const filter_thrs = rd_opt->filter_threshes[frame_type];
@ -4391,12 +4391,13 @@ void vp9_encode_frame(VP9_COMP *cpi) {
encode_frame_internal(cpi);
}
// If segmentated AQ is enabled compute the average AQ weighting.
// If segmented AQ is enabled compute the average AQ weighting.
if (cm->seg.enabled && (cpi->oxcf.aq_mode != NO_AQ) &&
(cm->seg.update_map || cm->seg.update_data)) {
cm->seg.aq_av_offset = compute_frame_aq_offset(cpi);
}
}
static void sum_intra_stats(FRAME_COUNTS *counts, const MODE_INFO *mi) {
const PREDICTION_MODE y_mode = mi->mode;
const PREDICTION_MODE uv_mode = mi->uv_mode;

View File

@ -420,7 +420,6 @@ static void dealloc_compressor_data(VP9_COMP *cpi) {
vpx_free(cpi->tile_data);
cpi->tile_data = NULL;
// Delete sementation map
vpx_free(cpi->segmentation_map);
cpi->segmentation_map = NULL;
vpx_free(cpi->coding_context.last_frame_seg_map_copy);
@ -3392,11 +3391,10 @@ static void encode_without_recode_loop(VP9_COMP *cpi,
}
apply_active_map(cpi);
// transform / motion compensation build reconstruction frame
vp9_encode_frame(cpi);
// Check if we should drop this frame because of high overshoot.
// Only for frames where high temporal-source sad is detected.
// Only for frames where high temporal-source SAD is detected.
if (cpi->oxcf.pass == 0 &&
cpi->oxcf.rc_mode == VPX_CBR &&
cpi->resize_state == 0 &&
@ -3538,7 +3536,6 @@ static void encode_with_recode_loop(VP9_COMP *cpi,
vp9_setup_in_frame_q_adj(cpi);
}
// transform / motion compensation build reconstruction frame
vp9_encode_frame(cpi);
// Update the skip mb flag probabilities based on the distribution

View File

@ -931,7 +931,7 @@ void vp9_first_pass(VP9_COMP *cpi, const struct lookahead_entry *source) {
#if CONFIG_FP_MB_STATS
if (cpi->use_fp_mb_stats) {
// intra predication statistics
// intra prediction statistics
cpi->twopass.frame_mb_stats_buf[mb_index] = 0;
cpi->twopass.frame_mb_stats_buf[mb_index] |= FPMB_DCINTRA_MASK;
cpi->twopass.frame_mb_stats_buf[mb_index] |= FPMB_MOTION_ZERO_MASK;
@ -982,7 +982,7 @@ void vp9_first_pass(VP9_COMP *cpi, const struct lookahead_entry *source) {
#if CONFIG_FP_MB_STATS
if (cpi->use_fp_mb_stats) {
// inter predication statistics
// inter prediction statistics
cpi->twopass.frame_mb_stats_buf[mb_index] = 0;
cpi->twopass.frame_mb_stats_buf[mb_index] &= ~FPMB_DCINTRA_MASK;
cpi->twopass.frame_mb_stats_buf[mb_index] |= FPMB_MOTION_ZERO_MASK;

View File

@ -401,7 +401,7 @@ static void temporal_filter_iterate_c(VP9_COMP *cpi,
frames[frame]->y_buffer + mb_y_offset,
frames[frame]->y_stride);
// Assign higher weight to matching MB if it's error
// Assign higher weight to matching MB if its error
// score is lower. If not applying MC default behavior
// is to weight all MBs equal.
filter_weight = err < thresh_low