diff options
author | Jerome Jiang <jianj@google.com> | 2019-03-21 19:04:38 -0700 |
---|---|---|
committer | Jerome Jiang <jianj@google.com> | 2019-03-21 19:04:38 -0700 |
commit | 4bfa583c6e139198a9db83016fbd787648b70ef5 (patch) | |
tree | fe89a4f81883283fd7b466c07949644efb2d6e73 /examples | |
parent | dc3b508f573de77abe8ec15d0644d9ad87898699 (diff) | |
download | libvpx-4bfa583c6e139198a9db83016fbd787648b70ef5.tar libvpx-4bfa583c6e139198a9db83016fbd787648b70ef5.tar.gz libvpx-4bfa583c6e139198a9db83016fbd787648b70ef5.tar.bz2 libvpx-4bfa583c6e139198a9db83016fbd787648b70ef5.zip |
fix redundant cast in examples.
Change-Id: I84280de82053f9056bda9d813baa6165ca9bcd1e
Diffstat (limited to 'examples')
-rw-r--r-- | examples/svc_encodeframe.c | 11 | ||||
-rw-r--r-- | examples/vp9_spatial_svc_encoder.c | 2 |
2 files changed, 6 insertions, 7 deletions
diff --git a/examples/svc_encodeframe.c b/examples/svc_encodeframe.c index 40d6e3a3c..d9e66b6e4 100644 --- a/examples/svc_encodeframe.c +++ b/examples/svc_encodeframe.c @@ -457,8 +457,7 @@ vpx_codec_err_t vpx_svc_init(SvcContext *svc_ctx, vpx_codec_ctx_t *codec_ctx, svc_log(svc_ctx, SVC_LOG_ERROR, "spatial layers * temporal layers exceeds the maximum number of " "allowed layers of %d\n", - svc_ctx->spatial_layers * svc_ctx->temporal_layers, - (int)VPX_MAX_LAYERS); + svc_ctx->spatial_layers * svc_ctx->temporal_layers, VPX_MAX_LAYERS); return VPX_CODEC_INVALID_PARAM; } res = assign_layer_bitrates(svc_ctx, enc_cfg); @@ -584,10 +583,10 @@ void vpx_svc_dump_statistics(SvcContext *svc_ctx) { for (i = 0; i < svc_ctx->spatial_layers; ++i) { svc_log(svc_ctx, SVC_LOG_INFO, "Layer %d Average PSNR=[%2.3f, %2.3f, %2.3f, %2.3f], Bytes=[%u]\n", - i, (double)si->psnr_sum[i][0] / number_of_frames, - (double)si->psnr_sum[i][1] / number_of_frames, - (double)si->psnr_sum[i][2] / number_of_frames, - (double)si->psnr_sum[i][3] / number_of_frames, si->bytes_sum[i]); + i, si->psnr_sum[i][0] / number_of_frames, + si->psnr_sum[i][1] / number_of_frames, + si->psnr_sum[i][2] / number_of_frames, + si->psnr_sum[i][3] / number_of_frames, si->bytes_sum[i]); // the following psnr calculation is deduced from ffmpeg.c#print_report y_scale = si->width * si->height * 255.0 * 255.0 * number_of_frames; scale[1] = y_scale; diff --git a/examples/vp9_spatial_svc_encoder.c b/examples/vp9_spatial_svc_encoder.c index 85463faff..b987989a8 100644 --- a/examples/vp9_spatial_svc_encoder.c +++ b/examples/vp9_spatial_svc_encoder.c @@ -1125,7 +1125,7 @@ int main(int argc, const char **argv) { &ref_frame_config); // Keep track of input frames, to account for frame drops in rate control // stats/metrics. - for (sl = 0; sl < (unsigned int)enc_cfg.ss_number_layers; ++sl) { + for (sl = 0; sl < enc_cfg.ss_number_layers; ++sl) { ++rc.layer_input_frames[sl * enc_cfg.ts_number_layers + layer_id.temporal_layer_id]; } |