mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-10 02:08:38 +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
|
|
@ -104,7 +104,7 @@ ImageClient::CreateTextureClientForImage(Image* aImage, KnowsCompositor* aForwar
|
|||
}
|
||||
texture = TextureClient::CreateForYCbCr(aForwarder,
|
||||
data->mYSize, data->mCbCrSize, data->mStereoMode,
|
||||
data->mYUVColorSpace,
|
||||
data->mYUVColorSpace, data->mColorRange,
|
||||
TextureFlags::DEFAULT);
|
||||
if (!texture) {
|
||||
return nullptr;
|
||||
|
|
|
|||
|
|
@ -1217,6 +1217,7 @@ TextureClient::CreateForYCbCr(KnowsCompositor* aAllocator,
|
|||
gfx::IntSize aCbCrSize,
|
||||
StereoMode aStereoMode,
|
||||
YUVColorSpace aYUVColorSpace,
|
||||
ColorRange aColorRange,
|
||||
TextureFlags aTextureFlags)
|
||||
{
|
||||
if (!aAllocator || !aAllocator->GetLayersIPCActor()->IPCOpen()) {
|
||||
|
|
@ -1229,7 +1230,7 @@ TextureClient::CreateForYCbCr(KnowsCompositor* aAllocator,
|
|||
|
||||
TextureData* data = BufferTextureData::CreateForYCbCr(aAllocator, aYSize, aCbCrSize,
|
||||
aStereoMode, aYUVColorSpace,
|
||||
aTextureFlags);
|
||||
aColorRange, aTextureFlags);
|
||||
if (!data) {
|
||||
return nullptr;
|
||||
}
|
||||
|
|
@ -1243,6 +1244,7 @@ already_AddRefed<TextureClient>
|
|||
TextureClient::CreateForYCbCrWithBufferSize(KnowsCompositor* aAllocator,
|
||||
size_t aSize,
|
||||
YUVColorSpace aYUVColorSpace,
|
||||
ColorRange aColorRange,
|
||||
TextureFlags aTextureFlags)
|
||||
{
|
||||
if (!aAllocator || !aAllocator->GetLayersIPCActor()->IPCOpen()) {
|
||||
|
|
@ -1251,7 +1253,7 @@ TextureClient::CreateForYCbCrWithBufferSize(KnowsCompositor* aAllocator,
|
|||
|
||||
TextureData* data =
|
||||
BufferTextureData::CreateForYCbCrWithBufferSize(aAllocator, aSize, aYUVColorSpace,
|
||||
aTextureFlags);
|
||||
aColorRange, aTextureFlags);
|
||||
if (!data) {
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -360,6 +360,7 @@ public:
|
|||
gfx::IntSize aCbCrSize,
|
||||
StereoMode aStereoMode,
|
||||
YUVColorSpace aYUVColorSpace,
|
||||
ColorRange aColorRange,
|
||||
TextureFlags aTextureFlags);
|
||||
|
||||
// Creates and allocates a TextureClient (can be accessed through raw
|
||||
|
|
@ -379,6 +380,7 @@ public:
|
|||
CreateForYCbCrWithBufferSize(KnowsCompositor* aAllocator,
|
||||
size_t aSize,
|
||||
YUVColorSpace aYUVColorSpace,
|
||||
ColorRange aColorRange,
|
||||
TextureFlags aTextureFlags);
|
||||
|
||||
// Creates and allocates a TextureClient of the same type.
|
||||
|
|
|
|||
|
|
@ -108,6 +108,8 @@ YCbCrTextureClientAllocationHelper::IsCompatible(TextureClient* aTextureClient)
|
|||
bufferData->GetCbCrSize().ref() != mData.mCbCrSize ||
|
||||
bufferData->GetYUVColorSpace().isNothing() ||
|
||||
bufferData->GetYUVColorSpace().ref() != mData.mYUVColorSpace ||
|
||||
bufferData->GetColorRange().isNothing() ||
|
||||
bufferData->GetColorRange().ref() != mData.mColorRange ||
|
||||
bufferData->GetStereoMode().isNothing() ||
|
||||
bufferData->GetStereoMode().ref() != mData.mStereoMode) {
|
||||
return false;
|
||||
|
|
@ -122,6 +124,7 @@ YCbCrTextureClientAllocationHelper::Allocate(KnowsCompositor* aAllocator)
|
|||
mData.mYSize, mData.mCbCrSize,
|
||||
mData.mStereoMode,
|
||||
mData.mYUVColorSpace,
|
||||
mData.mColorRange,
|
||||
mTextureFlags);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue