зеркало из https://github.com/mozilla/gecko-dev.git
Bug 778385 - We perform 32bpp slow video decoding on arm instead of 16bpp neon. r=joe
--HG-- extra : rebase_source : f045ae84ebb3ff07a7e59043065f396d5bd43dc0
This commit is contained in:
Родитель
bd7212f7b7
Коммит
d3ca4efc0f
|
@ -10,6 +10,7 @@
|
||||||
#include "gfxImageSurface.h"
|
#include "gfxImageSurface.h"
|
||||||
#include "gfxSharedImageSurface.h"
|
#include "gfxSharedImageSurface.h"
|
||||||
#include "yuv_convert.h"
|
#include "yuv_convert.h"
|
||||||
|
#include "gfxUtils.h"
|
||||||
#include "mozilla/layers/ImageBridgeChild.h"
|
#include "mozilla/layers/ImageBridgeChild.h"
|
||||||
#include "mozilla/layers/ImageContainerChild.h"
|
#include "mozilla/layers/ImageContainerChild.h"
|
||||||
|
|
||||||
|
@ -464,28 +465,22 @@ PlanarYCbCrImage::GetAsSurface()
|
||||||
return result.forget();
|
return result.forget();
|
||||||
}
|
}
|
||||||
|
|
||||||
nsRefPtr<gfxImageSurface> imageSurface =
|
gfxASurface::gfxImageFormat format = GetOffscreenFormat();
|
||||||
new gfxImageSurface(mSize, gfxASurface::ImageFormatRGB24);
|
|
||||||
|
|
||||||
gfx::YUVType type =
|
|
||||||
gfx::TypeFromSize(mData.mYSize.width,
|
|
||||||
mData.mYSize.height,
|
|
||||||
mData.mCbCrSize.width,
|
|
||||||
mData.mCbCrSize.height);
|
|
||||||
|
|
||||||
// Convert from YCbCr to RGB now
|
gfxIntSize size(mSize);
|
||||||
gfx::ConvertYCbCrToRGB32(mData.mYChannel,
|
gfxUtils::GetYCbCrToRGBDestFormatAndSize(mData, format, size);
|
||||||
mData.mCbChannel,
|
if (size.width > PlanarYCbCrImage::MAX_DIMENSION ||
|
||||||
mData.mCrChannel,
|
size.height > PlanarYCbCrImage::MAX_DIMENSION) {
|
||||||
imageSurface->Data(),
|
NS_ERROR("Illegal image dest width or height");
|
||||||
mData.mPicX,
|
return nullptr;
|
||||||
mData.mPicY,
|
}
|
||||||
mData.mPicSize.width,
|
|
||||||
mData.mPicSize.height,
|
nsRefPtr<gfxImageSurface> imageSurface =
|
||||||
mData.mYStride,
|
new gfxImageSurface(mSize, format);
|
||||||
mData.mCbCrStride,
|
|
||||||
imageSurface->Stride(),
|
gfxUtils::ConvertYCbCrToRGB(mData, format, mSize,
|
||||||
type);
|
imageSurface->Data(),
|
||||||
|
imageSurface->Stride());
|
||||||
|
|
||||||
mSurface = imageSurface;
|
mSurface = imageSurface;
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче