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 <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22880}
This commit is contained in:
Sergey Silkin
2018-04-13 23:41:11 +02:00
committed by Commit Bot
parent 098f8d2c1c
commit bfd54ef5cb

View File

@ -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;