From 82f6af600952f8924b3fd56e1f6296a74816c2c2 Mon Sep 17 00:00:00 2001 From: Adrian Grange Date: Wed, 22 Jan 2014 09:36:07 -0800 Subject: [PATCH] Tidy up comments & remove commented out code. Change-Id: I46dd5ce06f36362c6274511cd1531d93926aa9bc --- vp9/encoder/vp9_onyx_if.c | 4 ---- vp9/encoder/vp9_rdopt.c | 4 ++-- vp9/vp9_cx_iface.c | 9 ++------- vp9/vp9_iface_common.h | 2 +- vpxdec.c | 3 ++- 5 files changed, 7 insertions(+), 15 deletions(-) diff --git a/vp9/encoder/vp9_onyx_if.c b/vp9/encoder/vp9_onyx_if.c index 3e1daca28..3c0d1bcaa 100644 --- a/vp9/encoder/vp9_onyx_if.c +++ b/vp9/encoder/vp9_onyx_if.c @@ -3379,7 +3379,6 @@ int vp9_get_compressed_data(VP9_PTR ptr, unsigned int *frame_flags, 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 @@ int vp9_get_compressed_data(VP9_PTR ptr, unsigned int *frame_flags, vp9_end_first_pass(cpi); /* get last stats packet */ cpi->twopass.first_pass_done = 1; } - - // fclose(fp_out); return -1; } @@ -3671,7 +3668,6 @@ int vp9_get_compressed_data(VP9_PTR ptr, unsigned int *frame_flags, } #endif - // fclose(fp_out); return 0; } diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c index 3c1bd392d..242aa8710 100644 --- a/vp9/encoder/vp9_rdopt.c +++ b/vp9/encoder/vp9_rdopt.c @@ -233,8 +233,8 @@ static void set_block_thresholds(VP9_COMP *cpi) { 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 5c14b2e40..897ecd702 100644 --- a/vp9/vp9_cx_iface.c +++ b/vp9/vp9_cx_iface.c @@ -513,10 +513,8 @@ static vpx_codec_err_t vp9e_common_init(vpx_codec_ctx_t *ctx) { 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 @@ static vpx_codec_err_t vp9e_encode(vpx_codec_alg_priv_t *ctx, } } - /* 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 @@ static vpx_codec_err_t vp9e_encode(vpx_codec_alg_priv_t *ctx, 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 ed0122c1b..95ab13fdb 100644 --- a/vp9/vp9_iface_common.h +++ b/vp9/vp9_iface_common.h @@ -75,7 +75,7 @@ static vpx_codec_err_t image2yuvconfig(const vpx_image_t *img, 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 c067609c4..6581f136d 100644 --- a/vpxdec.c +++ b/vpxdec.c @@ -861,7 +861,8 @@ int main_loop(int argc, const char **argv_) { // 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) {