// When adopting aggressive denoiser, the adj_val for each pixel
// could be at most 8 (this is current max adjustment of the map).
// In SSE code, we calculate the sum of adj_val for
- // the columns, so the sum could be upto 128(16 rows). However,
+ // the columns, so the sum could be up to 128(16 rows). However,
// the range of the value is -128 ~ 127 in SSE code, that's why
// we do this change in C code.
// We don't do this for UV denoiser, since there are only 8 rows,
alt_boost = calc_arf_boost(cpi, 0, (i - 1), (i - 1), &f_boost, &b_boost);
#endif
- /* Should we use the alternate refernce frame */
+ /* Should we use the alternate reference frame */
if (allow_alt_ref && (i >= MIN_GF_INTERVAL) &&
/* don't use ARF very near next kf */
(i <= (cpi->twopass.frames_to_key - MIN_GF_INTERVAL)) &&
BLOCK *c;
BLOCKD *e;
- /* Is the best so far sufficiently good that we cant justify
+ /* Is the best so far sufficiently good that we can't justify
* doing a new motion search.
*/
if (best_label_rd < label_mv_thresh) break;
}
}
-// Read the referncence frame
+// Read the reference frame
static void read_ref_frames(VP9_COMMON *const cm, MACROBLOCKD *const xd,
vpx_reader *r, int segment_id,
MV_REFERENCE_FRAME ref_frame[2]) {
uint8_t *skin_map;
- // segment threashold for encode breakout
+ // segment threshold for encode breakout
int segment_encode_breakout[MAX_SEGMENTS];
CYCLIC_REFRESH *cyclic_refresh;
#define FP_MAX_DN_THRESH 24
#define KERNEL_SIZE 3
-// Baseline Kernal weights for first pass noise metric
+// Baseline Kernel weights for first pass noise metric
static uint8_t fp_dn_kernel_3[KERNEL_SIZE * KERNEL_SIZE] = { 1, 2, 1, 2, 4,
2, 1, 2, 1 };
accumulate_stats(&twopass->total_stats, &fps);
}
- // Copy the previous Last Frame back into gf and and arf buffers if
+ // Copy the previous Last Frame back into gf and arf buffers if
// the prediction is good enough... but also don't allow it to lag too far.
if ((twopass->sr_update_lag > 3) ||
((cm->current_video_frame > 0) &&
// Scan the first pass file and calculate a modified score for each
// frame that is used to distribute bits. The modified score is assumed
- // to provide a linear basis for bit allocation. I.e a frame A with a score
+ // to provide a linear basis for bit allocation. I.e., a frame A with a score
// that is double that of frame B will be allocated 2x as many bits.
{
double modified_score_total = 0.0;
#define MIN_INTRA_LEVEL 0.25
// Threshold for use of the lagging second reference frame. Scene cuts do not
// usually have a high second ref usage.
-#define SECOND_REF_USEAGE_THRESH 0.2
+#define SECOND_REF_USAGE_THRESH 0.2
// Hard threshold where the first pass chooses intra for almost all blocks.
// In such a case even if the frame is not a scene cut coding a key frame
// may be a good option.
detect_flash_from_frame_stats(next_frame);
if (!detect_flash_from_frame_stats(this_frame) &&
!detect_flash_from_frame_stats(next_frame) &&
- (this_frame->pcnt_second_ref < SECOND_REF_USEAGE_THRESH) &&
+ (this_frame->pcnt_second_ref < SECOND_REF_USAGE_THRESH) &&
((this_frame->pcnt_inter < VERY_LOW_INTER_THRESH) ||
(slide_transition(this_frame, last_frame, next_frame)) ||
(intra_step_transition(this_frame, last_frame, next_frame)) ||
// The second (lagging) ref error is not valid immediately after
// a key frame because either the lag has not built up (in the case of
- // the first key frame or it points to a refernce before the new key
+ // the first key frame or it points to a reference before the new key
// frame.
if (i < 2) sr_accumulator = 0.0;
frame_boost =
}
#define MAX_PATTERN_SCALES 11
-#define MAX_PATTERN_CANDIDATES 8 // max number of canddiates per scale
+#define MAX_PATTERN_CANDIDATES 8 // max number of candidates per scale
#define PATTERN_CANDIDATES_REF 3 // number of refinement candidates
// Calculate and return a sad+mvcost list around an integer best pel.
in_what->stride) +
mvsad_err_cost(x, ref_mv, &fcenter_mv, sad_per_bit);
- // Search all possible scales upto the search param around the center point
+ // Search all possible scales up to the search param around the center point
// pick the scale of the point that is best as the starting scale of
// further steps around it.
if (do_init_search) {
in_what->stride) +
mvsad_err_cost(x, ref_mv, &fcenter_mv, sad_per_bit);
- // Search all possible scales upto the search param around the center point
+ // Search all possible scales up to the search param around the center point
// pick the scale of the point that is best as the starting scale of
// further steps around it.
if (do_init_search) {
int cost_list[5];
const MvLimits tmp_mv_limits = x->mv_limits;
- /* Is the best so far sufficiently good that we cant justify doing
+ /* Is the best so far sufficiently good that we can't justify doing
* and new motion search. */
if (best_rd < label_mv_thresh) break;
// Sets a partition size down to which the auto partition code will always
// search (can go lower), based on the image dimensions. The logic here
// is that the extent to which ringing artefacts are offensive, depends
-// partly on the screen area that over which they propogate. Propogation is
+// partly on the screen area that over which they propagate. Propagation is
// limited by transform block size but the screen area take up by a given block
// size will be larger for a small image format stretched to full screen.
static BLOCK_SIZE set_partition_min_limit(VP9_COMMON *const cm) {