Commit 7b7d6698 authored by Jean-Yves Avenard's avatar Jean-Yves Avenard
Browse files

Bug 1230641: P1. Use UYVY (YUV422) format in decoders. r=mattwoodrow

MozReview-Commit-ID: I6KZLi2bHk0

--HG--
extra : rebase_source : b233233878ed386c9635614d70e79b0d16071d92
parent 57bca06b
Loading
Loading
Loading
Loading
+13 −7
Original line number Diff line number Diff line
@@ -595,14 +595,14 @@ AppleVDADecoder::CreateDecoderSpecification()
CFDictionaryRef
AppleVDADecoder::CreateOutputConfiguration()
{
  if (mUseSoftwareImages) {
    // Output format type:
  SInt32 PixelFormatTypeValue = kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange;
    SInt32 PixelFormatTypeValue =
      kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange;
    AutoCFRelease<CFNumberRef> PixelFormatTypeNumber =
      CFNumberCreate(kCFAllocatorDefault,
                     kCFNumberSInt32Type,
                     &PixelFormatTypeValue);

  if (mUseSoftwareImages) {
    const void* outputKeys[] = { kCVPixelBufferPixelFormatTypeKey };
    const void* outputValues[] = { PixelFormatTypeNumber };
    static_assert(ArrayLength(outputKeys) == ArrayLength(outputValues),
@@ -617,6 +617,12 @@ AppleVDADecoder::CreateOutputConfiguration()
  }

#ifndef MOZ_WIDGET_UIKIT
  // Output format type:
  SInt32 PixelFormatTypeValue = kCVPixelFormatType_422YpCbCr8;
  AutoCFRelease<CFNumberRef> PixelFormatTypeNumber =
    CFNumberCreate(kCFAllocatorDefault,
                   kCFNumberSInt32Type,
                   &PixelFormatTypeValue);
  // Construct IOSurface Properties
  const void* IOSurfaceKeys[] = { MacIOSurfaceLib::kPropIsGlobal };
  const void* IOSurfaceValues[] = { kCFBooleanTrue };