From bfd54ef5cbc2e9e7b218b09bd0eb9cc195137dea Mon Sep 17 00:00:00 2001 From: Sergey Silkin Date: Fri, 13 Apr 2018 23:41:11 +0200 Subject: [PATCH] Round down when converting layer bitrate from bits to kilobits. This aligns rounding in videoprocessor with rounding in encoder wrappers. Bug: none Change-Id: I8bdab7c02628b433d35d63c4bf4c841ffb1c2d1b Reviewed-on: https://webrtc-review.googlesource.com/69983 Commit-Queue: Sergey Silkin Reviewed-by: Rasmus Brandt Cr-Commit-Position: refs/heads/master@{#22880} --- modules/video_coding/codecs/test/videoprocessor.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/video_coding/codecs/test/videoprocessor.cc b/modules/video_coding/codecs/test/videoprocessor.cc index 36e35665dc..60926287da 100644 --- a/modules/video_coding/codecs/test/videoprocessor.cc +++ b/modules/video_coding/codecs/test/videoprocessor.cc @@ -345,9 +345,7 @@ void VideoProcessor::FrameEncoded( frame_stat->encode_time_us = GetElapsedTimeMicroseconds( frame_stat->encode_start_ns, encode_stop_ns - post_encode_time_ns_); frame_stat->target_bitrate_kbps = - (bitrate_allocation_.GetTemporalLayerSum(spatial_idx, temporal_idx) + - 500) / - 1000; + bitrate_allocation_.GetTemporalLayerSum(spatial_idx, temporal_idx) / 1000; frame_stat->length_bytes = encoded_image._length; frame_stat->frame_type = encoded_image._frameType; frame_stat->temporal_idx = temporal_idx;