mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-20 23:37:33 +09:00
Issue #2101 - Part 6: Plumbing of ColorRange between video decoders and YUV convert
This commit is contained in:
parent
e59e8c3b2c
commit
2b88f2c9ac
13 changed files with 52 additions and 7 deletions
|
|
@ -7,6 +7,7 @@ using nsIntRegion from "nsRegion.h";
|
|||
using struct mozilla::layers::SurfaceDescriptorX11 from "gfxipc/ShadowLayerUtils.h";
|
||||
using mozilla::StereoMode from "ImageTypes.h";
|
||||
using mozilla::YUVColorSpace from "ImageTypes.h";
|
||||
using mozilla::ColorRange from "ImageTypes.h";
|
||||
using struct mozilla::null_t from "ipc/IPCMessageUtils.h";
|
||||
using mozilla::WindowsHandle from "ipc/IPCMessageUtils.h";
|
||||
using mozilla::gfx::SurfaceFormat from "mozilla/gfx/Types.h";
|
||||
|
|
@ -104,6 +105,7 @@ struct YCbCrDescriptor {
|
|||
uint32_t crOffset;
|
||||
StereoMode stereoMode;
|
||||
YUVColorSpace yUVColorSpace;
|
||||
ColorRange colorRange;
|
||||
bool hasIntermediateBuffer;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -120,6 +120,7 @@ SharedPlanarYCbCrImage::AllocateAndGetNewBuffer(uint32_t aSize)
|
|||
mTextureClient = TextureClient::CreateForYCbCrWithBufferSize(mCompositable->GetForwarder(),
|
||||
size,
|
||||
YUVColorSpace::BT601,
|
||||
ColorRange::LIMITED,
|
||||
mCompositable->GetTextureFlags());
|
||||
|
||||
// get new buffer _without_ setting mBuffer.
|
||||
|
|
@ -165,7 +166,8 @@ SharedPlanarYCbCrImage::AdoptData(const Data &aData)
|
|||
|
||||
static_cast<BufferTextureData*>(mTextureClient->GetInternalData())->SetDesciptor(
|
||||
YCbCrDescriptor(aData.mYSize, aData.mCbCrSize, yOffset, cbOffset, crOffset,
|
||||
aData.mStereoMode, aData.mYUVColorSpace, hasIntermediateBuffer)
|
||||
aData.mStereoMode, aData.mYUVColorSpace, aData.mColorRange,
|
||||
hasIntermediateBuffer)
|
||||
);
|
||||
|
||||
return true;
|
||||
|
|
@ -222,6 +224,7 @@ SharedPlanarYCbCrImage::Allocate(PlanarYCbCrData& aData)
|
|||
mData.mPicSize = aData.mPicSize;
|
||||
mData.mStereoMode = aData.mStereoMode;
|
||||
mData.mYUVColorSpace = aData.mYUVColorSpace;
|
||||
mData.mColorRange = aData.mColorRange;
|
||||
// those members are not always equal to aData's, due to potentially different
|
||||
// packing.
|
||||
mData.mYSkip = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue