vpm: Updating module to use CalcBufferSize
BUG= TEST= Review URL: https://webrtc-codereview.appspot.com/666008 git-svn-id: http://webrtc.googlecode.com/svn/trunk@2513 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
08329f4a13
commit
d96dcef422
@ -83,10 +83,7 @@ VPMSimpleSpatialResampler::ResampleFrame(const VideoFrame& inFrame,
|
||||
return retVal;
|
||||
|
||||
// Disabling cut/pad for now - only scaling.
|
||||
int target_half_width = (_targetWidth + 1) >> 1;
|
||||
int target_half_height = (_targetHeight + 1) >> 1;
|
||||
int requiredSize = static_cast<int>(_targetWidth * _targetHeight + 2 *
|
||||
(target_half_width * target_half_height));
|
||||
int requiredSize = CalcBufferSize(kI420, _targetWidth, _targetHeight);
|
||||
outFrame.VerifyAndAllocate(requiredSize);
|
||||
outFrame.SetTimeStamp(inFrame.TimeStamp());
|
||||
outFrame.SetRenderTime(inFrame.RenderTimeMs());
|
||||
|
Loading…
x
Reference in New Issue
Block a user