mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-15 11:13:29 +00:00
Bug 1543359 - P4. Add YUV Full Range info to AppleVTDecoder. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D27212 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
aec72edb84
commit
216eed81e9
@ -36,6 +36,7 @@ AppleVTDecoder::AppleVTDecoder(const VideoInfo& aConfig, TaskQueue* aTaskQueue,
|
||||
mDisplayWidth(aConfig.mDisplay.width),
|
||||
mDisplayHeight(aConfig.mDisplay.height),
|
||||
mColorSpace(aConfig.mColorSpace),
|
||||
mColorRange(aConfig.mColorRange),
|
||||
mTaskQueue(aTaskQueue),
|
||||
mMaxRefFrames(aOptions.contains(CreateDecoderParams::Option::LowLatency)
|
||||
? 0
|
||||
@ -375,6 +376,7 @@ void AppleVTDecoder::OutputFrame(CVPixelBufferRef aImage,
|
||||
buffer.mPlanes[2].mSkip = 0;
|
||||
|
||||
buffer.mYUVColorSpace = mColorSpace;
|
||||
buffer.mColorRange = mColorRange;
|
||||
|
||||
gfx::IntRect visible = gfx::IntRect(0, 0, mPictureWidth, mPictureHeight);
|
||||
|
||||
@ -546,7 +548,10 @@ CFDictionaryRef AppleVTDecoder::CreateOutputConfiguration() {
|
||||
|
||||
#ifndef MOZ_WIDGET_UIKIT
|
||||
// Output format type:
|
||||
SInt32 PixelFormatTypeValue = kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange;
|
||||
SInt32 PixelFormatTypeValue =
|
||||
mColorRange == gfx::ColorRange::FULL
|
||||
? kCVPixelFormatType_420YpCbCr8BiPlanarFullRange
|
||||
: kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange;
|
||||
AutoCFRelease<CFNumberRef> PixelFormatTypeNumber = CFNumberCreate(
|
||||
kCFAllocatorDefault, kCFNumberSInt32Type, &PixelFormatTypeValue);
|
||||
// Construct IOSurface Properties
|
||||
|
@ -89,6 +89,7 @@ class AppleVTDecoder : public MediaDataDecoder,
|
||||
const uint32_t mDisplayWidth;
|
||||
const uint32_t mDisplayHeight;
|
||||
const gfx::YUVColorSpace mColorSpace;
|
||||
const gfx::ColorRange mColorRange;
|
||||
|
||||
// Method to set up the decompression session.
|
||||
MediaResult InitializeSession();
|
||||
|
Loading…
Reference in New Issue
Block a user