Bug 1344591 - Ensure BlankVideoCreate doesn't round down Cb and Cr strides. r=gerald

MozReview-Commit-ID: Jjvzo7WfrFE

--HG--
extra : rebase_source : d9e7984a8894e3ac9fd6a697a01b035bf0db408d
This commit is contained in:
Chris Pearce 2017-03-06 13:52:45 +13:00
parent 7f43d3d621
commit 5a53afdba0

View File

@ -146,17 +146,17 @@ public:
// Cb plane.
buffer.mPlanes[1].mData = frame.get() + sizeY;
buffer.mPlanes[1].mStride = mFrameWidth / 2;
buffer.mPlanes[1].mHeight = mFrameHeight / 2;
buffer.mPlanes[1].mWidth = mFrameWidth / 2;
buffer.mPlanes[1].mStride = (mFrameWidth + 1) / 2;
buffer.mPlanes[1].mHeight = (mFrameHeight + 1) / 2;
buffer.mPlanes[1].mWidth = (mFrameWidth + 1) / 2;
buffer.mPlanes[1].mOffset = 0;
buffer.mPlanes[1].mSkip = 0;
// Cr plane.
buffer.mPlanes[2].mData = frame.get() + sizeY;
buffer.mPlanes[2].mStride = mFrameWidth / 2;
buffer.mPlanes[2].mHeight = mFrameHeight / 2;
buffer.mPlanes[2].mWidth = mFrameWidth / 2;
buffer.mPlanes[2].mStride = (mFrameWidth + 1) / 2;
buffer.mPlanes[2].mHeight = (mFrameHeight + 1) / 2;
buffer.mPlanes[2].mWidth = (mFrameWidth + 1) / 2;
buffer.mPlanes[2].mOffset = 0;
buffer.mPlanes[2].mSkip = 0;