mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 08:48:39 +09:00
Issue #2118 - Part 2: Add support for Identity YUVColorSpace
https://hg.mozilla.org/mozilla-central/rev/be342c90755d11551623362f2058c0326f63bbb3
This commit is contained in:
parent
beef437602
commit
3e62b1fc9f
6 changed files with 97 additions and 7 deletions
|
|
@ -158,6 +158,22 @@ VPXDecoder::DoDecode(MediaRawData* aSample)
|
|||
RESULT_DETAIL("VPX Unknown image format"));
|
||||
}
|
||||
|
||||
b.mYUVColorSpace = [&]() {
|
||||
switch (img->cs) {
|
||||
case VPX_CS_BT_601:
|
||||
case VPX_CS_SMPTE_170:
|
||||
case VPX_CS_SMPTE_240:
|
||||
return YUVColorSpace::BT601;
|
||||
case VPX_CS_BT_709:
|
||||
return YUVColorSpace::BT709;
|
||||
case VPX_CS_SRGB:
|
||||
return YUVColorSpace::IDENTITY;
|
||||
default:
|
||||
LOG("Unhandled colorspace %d", img->cs);
|
||||
return YUVColorSpace::BT601;
|
||||
}
|
||||
}();
|
||||
|
||||
RefPtr<VideoData> v =
|
||||
VideoData::CreateAndCopyData(mInfo,
|
||||
mImageContainer,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue