U/V buffer fix for bilinear scale.
U/V buffers do not need the same alignment constraints as the Y buffers. Review URL: http://webrtc-codereview.appspot.com/61008 git-svn-id: http://webrtc.googlecode.com/svn/trunk@195 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
db3c5cb279
commit
a046202382
@ -217,7 +217,7 @@ ScaleBilinear(const WebRtc_UWord8* srcFrame, WebRtc_UWord8*& dstFrame,
|
|||||||
|
|
||||||
// Setting destination
|
// Setting destination
|
||||||
const WebRtc_UWord32 dstStride = (dstWidth + 31) & ~31;
|
const WebRtc_UWord32 dstStride = (dstWidth + 31) & ~31;
|
||||||
const WebRtc_UWord32 dstUvStride = (((dstStride + 1 >> 1) + 31) & ~31);
|
const WebRtc_UWord32 dstUvStride = dstStride >> 1;
|
||||||
|
|
||||||
WebRtc_UWord32 dstRequiredSize = dstStride * dstHeight +
|
WebRtc_UWord32 dstRequiredSize = dstStride * dstHeight +
|
||||||
2 * (dstUvStride * ((dstHeight + 1) >> 1));
|
2 * (dstUvStride * ((dstHeight + 1) >> 1));
|
||||||
@ -311,7 +311,7 @@ ScaleBilinear(const WebRtc_UWord8* srcFrame, WebRtc_UWord8*& dstFrame,
|
|||||||
{
|
{
|
||||||
memcpy(horizontalFilteredBuf, ptr_1, srcWidthArray[p]);
|
memcpy(horizontalFilteredBuf, ptr_1, srcWidthArray[p]);
|
||||||
}
|
}
|
||||||
filteredBuf[srcWidthArray[p]] = filteredBuf[srcWidthArray[p]-1];
|
filteredBuf[(srcWidthArray[p]-1)] = filteredBuf[(srcWidthArray[p]-2)];
|
||||||
|
|
||||||
// vertical filter only if necessary
|
// vertical filter only if necessary
|
||||||
if (source_dx != kFractionMax)
|
if (source_dx != kFractionMax)
|
||||||
|
Loading…
Reference in New Issue
Block a user