本文整理汇总了C++中TComPicYuv::getCbAddr方法的典型用法代码示例。如果您正苦于以下问题:C++ TComPicYuv::getCbAddr方法的具体用法?C++ TComPicYuv::getCbAddr怎么用?C++ TComPicYuv::getCbAddr使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TComPicYuv
的用法示例。
在下文中一共展示了TComPicYuv::getCbAddr方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: calcMD5
/**
* Calculate the MD5sum of pic, storing the result in digest.
* MD5 calculation is performed on Y' then Cb, then Cr; each in raster order.
* Pel data is inserted into the MD5 function in little-endian byte order,
* using sufficient bytes to represent the picture bitdepth. Eg, 10bit data
* uses little-endian two byte words; 8bit data uses single byte words.
*/
void calcMD5(TComPicYuv& pic, unsigned char digest[16])
{
unsigned bitdepth = g_uiBitDepth + g_uiBitIncrement;
/* choose an md5_plane packing function based on the system bitdepth */
typedef void (*MD5PlaneFunc)(MD5&, const Pel*, unsigned, unsigned, unsigned);
MD5PlaneFunc md5_plane_func;
md5_plane_func = bitdepth <= 8 ? (MD5PlaneFunc)md5_plane<1> : (MD5PlaneFunc)md5_plane<2>;
MD5 md5;
unsigned width = pic.getWidth();
unsigned height = pic.getHeight();
unsigned stride = pic.getStride();
md5_plane_func(md5, pic.getLumaAddr(), width, height, stride);
width >>= 1;
height >>= 1;
stride >>= 1;
md5_plane_func(md5, pic.getCbAddr(), width, height, stride);
md5_plane_func(md5, pic.getCrAddr(), width, height, stride);
md5.finalize(digest);
}