Tidy up comments & remove commented out code.
Change-Id: I46dd5ce06f36362c6274511cd1531d93926aa9bc
diff --git a/vp9/encoder/vp9_onyx_if.c b/vp9/encoder/vp9_onyx_if.c
index 3e1daca..3c0d1bc 100644
--- a/vp9/encoder/vp9_onyx_if.c
+++ b/vp9/encoder/vp9_onyx_if.c
@@ -3379,7 +3379,6 @@
struct vpx_usec_timer cmptimer;
YV12_BUFFER_CONFIG *force_src_buffer = NULL;
MV_REFERENCE_FRAME ref_frame;
- // FILE *fp_out = fopen("enc_frame_type.txt", "a");
if (!cpi)
return -1;
@@ -3501,8 +3500,6 @@
vp9_end_first_pass(cpi); /* get last stats packet */
cpi->twopass.first_pass_done = 1;
}
-
- // fclose(fp_out);
return -1;
}
@@ -3671,7 +3668,6 @@
}
#endif
- // fclose(fp_out);
return 0;
}
diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c
index 3c1bd39..242aa87 100644
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -233,8 +233,8 @@
const int q = compute_rd_thresh_factor(qindex);
for (bsize = 0; bsize < BLOCK_SIZES; ++bsize) {
- // Threshold here seem unecessarily harsh but fine given actual
- // range of values used for cpi->sf.thresh_mult[]
+ // Threshold here seems unnecessarily harsh but fine given actual
+ // range of values used for cpi->sf.thresh_mult[].
const int t = q * rd_thresh_block_size_factor[bsize];
const int thresh_max = INT_MAX / t;
diff --git a/vp9/vp9_cx_iface.c b/vp9/vp9_cx_iface.c
index 5c14b2e..897ecd7 100644
--- a/vp9/vp9_cx_iface.c
+++ b/vp9/vp9_cx_iface.c
@@ -513,10 +513,8 @@
priv->vp8_cfg = extracfg_map[i].cfg;
priv->vp8_cfg.pkt_list = &priv->pkt_list.head;
- // TODO(agrange) Check the limits set on this buffer, or the check that is
- // applied in vp9e_encode.
+ // Maximum buffer size approximated based on having multiple ARF.
priv->cx_data_sz = priv->cfg.g_w * priv->cfg.g_h * 3 / 2 * 8;
-// priv->cx_data_sz = priv->cfg.g_w * priv->cfg.g_h * 3 / 2 * 2;
if (priv->cx_data_sz < 4096) priv->cx_data_sz = 4096;
@@ -692,7 +690,7 @@
}
}
- /* Initialize the encoder instance on the first frame*/
+ /* Initialize the encoder instance on the first frame. */
if (!res && ctx->cpi) {
unsigned int lib_flags;
YV12_BUFFER_CONFIG sd;
@@ -704,9 +702,6 @@
if (ctx->base.init_flags & VPX_CODEC_USE_PSNR)
((VP9_COMP *)ctx->cpi)->b_calculate_psnr = 1;
- // if (ctx->base.init_flags & VPX_CODEC_USE_OUTPUT_PARTITION)
- // ((VP9_COMP *)ctx->cpi)->output_partition = 1;
-
/* Convert API flags to internal codec lib flags */
lib_flags = (flags & VPX_EFLAG_FORCE_KF) ? FRAMEFLAGS_KEY : 0;
diff --git a/vp9/vp9_iface_common.h b/vp9/vp9_iface_common.h
index ed0122c..95ab13f 100644
--- a/vp9/vp9_iface_common.h
+++ b/vp9/vp9_iface_common.h
@@ -75,7 +75,7 @@
yv12->border = (img->stride[VPX_PLANE_Y] - img->w) / 2;
#if CONFIG_ALPHA
- // For development purposes, force alpha to hold the same data a Y for now.
+ // For development purposes, force alpha to hold the same data as Y for now.
yv12->alpha_buffer = yv12->y_buffer;
yv12->alpha_width = yv12->y_width;
yv12->alpha_height = yv12->y_height;
diff --git a/vpxdec.c b/vpxdec.c
index c067609..6581f13 100644
--- a/vpxdec.c
+++ b/vpxdec.c
@@ -861,7 +861,8 @@
// If the output frames are to be scaled to a fixed display size then
// use the width and height specified in the container. If either of
// these is set to 0, use the display size set in the first frame
- // header.
+ // header. If that is unavailable, use the raw decoded size of the
+ // first decoded frame.
int display_width = vpx_input_ctx.width;
int display_height = vpx_input_ctx.height;
if (!display_width || !display_height) {