ref: e3f7991f99692327e54970644cd10edbac2048f4
parent: e90d4f0a03e7e167d10e0f2c3eaf9d63bf85e6cc
parent: e4ac8820073179f1899bacebc6b8d576fc54432e
author: James Zern <jzern@google.com>
date: Tue Jul 19 15:12:23 EDT 2016
Merge changes Ia6004c08,I1954f9d6 * changes: cosmetics: Add a few explanatory comments cosmetics: Correct grammar/spelling in comments
--- a/vp9/common/vp9_blockd.h
+++ b/vp9/common/vp9_blockd.h
@@ -78,6 +78,9 @@
// 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 @@
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;
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -54,7 +54,7 @@
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 @@
// 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 @@
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;
--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -420,7 +420,6 @@
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 @@
}
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 @@
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
--- a/vp9/encoder/vp9_firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -931,7 +931,7 @@
#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 @@
#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;
--- a/vp9/encoder/vp9_temporal_filter.c
+++ b/vp9/encoder/vp9_temporal_filter.c
@@ -401,7 +401,7 @@
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