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;
vp9_end_first_pass(cpi); /* get last stats packet */
cpi->twopass.first_pass_done = 1;
}
-
- // fclose(fp_out);
return -1;
}
}
#endif
- // fclose(fp_out);
return 0;
}
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;
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;
}
}
- /* 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;
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;
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;
// 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) {