From 6503ecdc39aac8be42fc4bd1db12ca177e36cfef Mon Sep 17 00:00:00 2001 From: "marpan@webrtc.org" Date: Wed, 21 Mar 2012 00:18:13 +0000 Subject: [PATCH] Fix to windows test from commit 1914. Review URL: https://webrtc-codereview.appspot.com/455002 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1917 4adac7df-926f-26a2-2b94-8c16560cd09d --- src/modules/video_coding/main/source/qm_select.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/modules/video_coding/main/source/qm_select.cc b/src/modules/video_coding/main/source/qm_select.cc index 28193518f6..ba1e3af02b 100644 --- a/src/modules/video_coding/main/source/qm_select.cc +++ b/src/modules/video_coding/main/source/qm_select.cc @@ -622,9 +622,10 @@ void VCMQmResolution::UpdateDownsamplingState(UpDownAction up_down) { void VCMQmResolution::UpdateCodecResolution() { if (action_.spatial != kNoChangeSpatial) { qm_->change_resolution_spatial = true; - qm_->codec_width = static_cast(width_ / qm_->spatial_width_fact); - qm_->codec_height = static_cast - (height_ / qm_->spatial_height_fact); + qm_->codec_width = static_cast(width_ / + qm_->spatial_width_fact + 0.5f); + qm_->codec_height = static_cast(height_ / + qm_->spatial_height_fact + 0.5f); // Size can never exceed native sizes. assert(qm_->codec_width <= native_width_); assert(qm_->codec_height <= native_height_);