Merge "Tidy up comments & remove commented out code."
This commit is contained in:
commit
a858c5c227
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
3
vpxdec.c
3
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user