VideoCodec/Data/PictureInfo.h

#ifndef PICTUREINFO_H_ #define PICTUREINFO_H_ #include "../Logger.h" #include "Constants.h" namespace VideoCodec {    // Encapsulates information about a picture.    class PictureInfo    {    public:       PictureInfo();       virtual ~PictureInfo();              PictureInfo* Clone();              // Picture attributes.       void SetColourFormat(ColourFormat colourFormat);       ColourFormat GetColourFormat();       void SetPixelLayout(PixelLayout pixelLayout);       PixelLayout GetPixelLayout();              void SetPixelsX(PixelCount pixelsX);       PixelCount GetPixelsX();              void SetPixelsY(PixelCount pixelsY);       PixelCount GetPixelsY();              void SetBlockRows(BlockCount blockRows);       BlockCount GetBlockRows();              void SetBlockColumns(BlockCount blockColumns);       BlockCount GetBlockColumns();              void SetFrameType(FrameType type);       FrameType GetFrameType();              // Pixel data.       UnsignedByte* GetUnsignedByteData();       void SetUnsignedByteData(UnsignedByte* unsignedByteData, unsigned long int length);              SignedShort* GetSignedShortData();       void SetSignedShortData(SignedShort* signedShortData, unsigned long int length);              UnsignedByte* CopyUnsignedByteData();       unsigned long int GetUnsignedByteDataLength();              SignedShort* CopySignedShortData();       unsigned long int GetSignedShortDataLength();              void SetMVDisplacementsX(SignedByte* displacementsX, unsigned long int length);       SignedByte* GetMVDisplacementsX();       void SetMVDisplacementsY(SignedByte* displacementsY, unsigned long int length);       SignedByte* GetMVDisplacementsY(); private:       // The colour space used by this picture.       ColourFormat colourFormat;              // The layout of pixels (macroblock or scan order, for example).       PixelLayout pixelLayout;              // The type of frame in the GOP (inter or intra, for example).       FrameType frameType;              // Dimensions of this picture in blocks.       BlockCount blockRows;       BlockCount blockColumns;              // Dimensions of this picture in pixels.       PixelCount pixelsX;       PixelCount pixelsY;              // Arrays to store pixel data. The layout of the data is implicit based on the attributes above.       UnsignedByte* unsignedByteData;       unsigned long int unsignedByteDataLength;       SignedShort* signedShortData;       unsigned long int signedShortDataLength;              // Motion vector data.       SignedByte* displacementsX;       unsigned long int displacementsXLength;       SignedByte* displacementsY;       unsigned long int displacementsYLength;    }; } #endif /*PICTUREINFO_H_*/