Bug 551277 - Implement software YCbCr conversion in layers, replacing liboggplay color conversion code - r=roc
This commit is contained in:
@@ -206,7 +206,22 @@ protected:
|
||||
/**
|
||||
* We assume that the image data is in the REC 470M color space (see
|
||||
* Theora specification, section 4.3.1).
|
||||
* XXX Eventually we should some color space parameter(s) here.
|
||||
*
|
||||
* The YCbCr format can be:
|
||||
*
|
||||
* 4:4:4 - CbCr width/height are the same as Y.
|
||||
* 4:2:2 - CbCr width is half that of Y. Height is the same.
|
||||
* 4:2:0 - CbCr width and height is half that of Y.
|
||||
*
|
||||
* The color format is detected based on the height/width ratios
|
||||
* defined above.
|
||||
*
|
||||
* The Image that is rendered is the picture region defined by
|
||||
* mPicX, mPicY and mPicSize. The size of the rendered image is
|
||||
* mPicSize, not mYSize or mCbCrSize.
|
||||
*
|
||||
* Note: The color-conversion code does not currently support 4:4:4
|
||||
* and an error is raised in this case. See bug 551378.
|
||||
*/
|
||||
class THEBES_API PlanarYCbCrImage : public Image {
|
||||
public:
|
||||
@@ -220,16 +235,12 @@ public:
|
||||
PRUint8* mCrChannel;
|
||||
PRInt32 mCbCrStride;
|
||||
gfxIntSize mCbCrSize;
|
||||
// Picture region
|
||||
PRUint32 mPicX;
|
||||
PRUint32 mPicY;
|
||||
gfxIntSize mPicSize;
|
||||
};
|
||||
|
||||
typedef void (* ToARGBHook)(const Data& aData, PRUint8* aOutput);
|
||||
/**
|
||||
* XXX this is just a hack until we can get YCbCr conversion code into
|
||||
* gfx
|
||||
* This must be called before SetData().
|
||||
*/
|
||||
virtual void SetRGBConverter(ToARGBHook aHook) {}
|
||||
|
||||
/**
|
||||
* This makes a copy of the data buffers.
|
||||
* XXX Eventually we will change this to not make a copy of the data,
|
||||
|
||||
Reference in New Issue
Block a user