зеркало из https://github.com/mozilla/gecko-dev.git
Bug 789075 - Handle odd sized WebM video frames correctly. r=derf a=lsblakk
This commit is contained in:
Родитель
2e6e3cca7b
Коммит
346fb02e46
|
@ -0,0 +1,8 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="reftest-wait">
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<video src="789075.webm" onloadedmetadata="document.documentElement.className=undefined"></video>
|
||||
</body>
|
||||
</html>
|
Двоичный файл не отображается.
|
@ -11,3 +11,4 @@ load 576612-1.html
|
|||
skip-if(Android) load 691096-1.html # Android sound API can't handle playing large number of sounds at once.
|
||||
load 752784-1.html
|
||||
HTTP load 795892-1.html
|
||||
load 789075-1.html
|
||||
|
|
|
@ -705,14 +705,14 @@ bool nsWebMReader::DecodeVideoFrame(bool &aKeyframeSkip,
|
|||
|
||||
b.mPlanes[1].mData = img->planes[1];
|
||||
b.mPlanes[1].mStride = img->stride[1];
|
||||
b.mPlanes[1].mHeight = img->d_h >> img->y_chroma_shift;
|
||||
b.mPlanes[1].mWidth = img->d_w >> img->x_chroma_shift;
|
||||
b.mPlanes[1].mHeight = (img->d_h + 1) >> img->y_chroma_shift;
|
||||
b.mPlanes[1].mWidth = (img->d_w + 1) >> img->x_chroma_shift;
|
||||
b.mPlanes[1].mOffset = b.mPlanes[1].mSkip = 0;
|
||||
|
||||
b.mPlanes[2].mData = img->planes[2];
|
||||
b.mPlanes[2].mStride = img->stride[2];
|
||||
b.mPlanes[2].mHeight = img->d_h >> img->y_chroma_shift;
|
||||
b.mPlanes[2].mWidth = img->d_w >> img->x_chroma_shift;
|
||||
b.mPlanes[2].mHeight = (img->d_h + 1) >> img->y_chroma_shift;
|
||||
b.mPlanes[2].mWidth = (img->d_w + 1) >> img->x_chroma_shift;
|
||||
b.mPlanes[2].mOffset = b.mPlanes[2].mSkip = 0;
|
||||
|
||||
nsIntRect picture = mPicture;
|
||||
|
|
|
@ -689,6 +689,12 @@ gfxUtils::ConvertYCbCrToRGB(const PlanarYCbCrImage::Data& aData,
|
|||
unsigned char* aDestBuffer,
|
||||
int32_t aStride)
|
||||
{
|
||||
// ConvertYCbCrToRGB et al. assume the chroma planes are rounded up if the
|
||||
// luma plane is odd sized.
|
||||
MOZ_ASSERT((aData.mCbCrSize.width == aData.mYSize.width ||
|
||||
aData.mCbCrSize.width == (aData.mYSize.width + 1) >> 1) &&
|
||||
(aData.mCbCrSize.height == aData.mYSize.height ||
|
||||
aData.mCbCrSize.height == (aData.mYSize.height + 1) >> 1));
|
||||
gfx::YUVType yuvtype =
|
||||
gfx::TypeFromSize(aData.mYSize.width,
|
||||
aData.mYSize.height,
|
||||
|
|
Загрузка…
Ссылка в новой задаче