Bug 1215089 - P3: Add mBitDepth member to YCbCr data structure. r=kamidphish,mattwoodrow
authorJean-Yves Avenard <jyavenard@mozilla.com>
Thu, 29 Jun 2017 23:09:20 +0200
changeset 384616 bcfc414429b64c64c9e7932250b82c1369352f11
parent 384615 9dc83d91c3364d36053b7ad9860271f4e67d0ddd
child 384617 6a76cec689e24232e0f99695e76a3629f9e1df62
push id32631
push userarchaeopteryx@coole-files.de
push dateThu, 05 Oct 2017 08:51:33 +0000
treeherdermozilla-central@66042a706980 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskamidphish, mattwoodrow
bugs1215089
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1215089 - P3: Add mBitDepth member to YCbCr data structure. r=kamidphish,mattwoodrow MozReview-Commit-ID: BNLawJOfj3w
dom/media/MediaData.cpp
dom/media/MediaData.h
gfx/layers/ImageContainer.h
--- a/dom/media/MediaData.cpp
+++ b/dom/media/MediaData.cpp
@@ -248,16 +248,17 @@ ConstructPlanarYCbCrData(const VideoInfo
   data.mCbCrStride = Cb.mStride;
   data.mCbSkip = Cb.mSkip;
   data.mCrSkip = Cr.mSkip;
   data.mPicX = aPicture.x;
   data.mPicY = aPicture.y;
   data.mPicSize = aPicture.Size();
   data.mStereoMode = aInfo.mStereoMode;
   data.mYUVColorSpace = aBuffer.mYUVColorSpace;
+  data.mBitDepth = aBuffer.mBitDepth;
   return data;
 }
 
 /* static */ bool
 VideoData::SetVideoDataToImage(PlanarYCbCrImage* aVideoImage,
                                const VideoInfo& aInfo,
                                const YCbCrBuffer &aBuffer,
                                const IntRect& aPicture,
--- a/dom/media/MediaData.h
+++ b/dom/media/MediaData.h
@@ -461,16 +461,17 @@ public:
       uint32_t mHeight;
       uint32_t mStride;
       uint32_t mOffset;
       uint32_t mSkip;
     };
 
     Plane mPlanes[3];
     YUVColorSpace mYUVColorSpace = YUVColorSpace::BT601;
+    uint32_t mBitDepth = 8;
   };
 
   class Listener
   {
   public:
     virtual void OnSentToCompositor() = 0;
     virtual ~Listener() { }
   };
--- a/gfx/layers/ImageContainer.h
+++ b/gfx/layers/ImageContainer.h
@@ -739,29 +739,31 @@ struct PlanarYCbCrData {
   int32_t mCbSkip;
   int32_t mCrSkip;
   // Picture region
   uint32_t mPicX;
   uint32_t mPicY;
   gfx::IntSize mPicSize;
   StereoMode mStereoMode;
   YUVColorSpace mYUVColorSpace;
+  uint32_t mBitDepth;
 
   gfx::IntRect GetPictureRect() const {
     return gfx::IntRect(mPicX, mPicY,
                      mPicSize.width,
                      mPicSize.height);
   }
 
   PlanarYCbCrData()
     : mYChannel(nullptr), mYStride(0), mYSize(0, 0), mYSkip(0)
     , mCbChannel(nullptr), mCrChannel(nullptr)
     , mCbCrStride(0), mCbCrSize(0, 0) , mCbSkip(0), mCrSkip(0)
     , mPicX(0), mPicY(0), mPicSize(0, 0), mStereoMode(StereoMode::MONO)
     , mYUVColorSpace(YUVColorSpace::BT601)
+    , mBitDepth(8)
   {}
 };
 
 /****** Image subtypes for the different formats ******/
 
 /**
  * We assume that the image data is in the REC 470M color space (see
  * Theora specification, section 4.3.1).