本文整理汇总了C++中VideoInfo::IsPlanarRGB方法的典型用法代码示例。如果您正苦于以下问题:C++ VideoInfo::IsPlanarRGB方法的具体用法?C++ VideoInfo::IsPlanarRGB怎么用?C++ VideoInfo::IsPlanarRGB使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VideoInfo
的用法示例。
在下文中一共展示了VideoInfo::IsPlanarRGB方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: allocSpace
bool PlanarFrame::allocSpace(VideoInfo &viInfo)
{
myalignedfree(planar_4);
myalignedfree(planar_3);
myalignedfree(planar_2);
myalignedfree(planar_1);
alloc_ok=false;
grey = viInfo.IsY();
isRGBPfamily = viInfo.IsPlanarRGB() || viInfo.IsPlanarRGBA();
isAlphaChannel = viInfo.IsYUVA() || viInfo.IsPlanarRGBA();
pixelsize = (uint8_t)viInfo.ComponentSize(); // AVS16
bits_per_pixel = (uint8_t)viInfo.BitsPerComponent();
ypitch = uvpitch = 0;
ywidth = uvwidth = 0;
yheight = uvheight = 0;
int height = viInfo.height;
int width = viInfo.width;
if ((height==0) || (width==0)) return(false);
if (viInfo.Is420())
{
ypitch = modnpf((int)pixelsize*(width+MIN_PAD),MIN_ALIGNMENT);
ywidth = width;
yheight = height;
width >>= 1;
height >>= 1;
uvpitch = modnpf((int)pixelsize*(width+MIN_PAD),MIN_ALIGNMENT);
uvwidth = width;
uvheight = height;
}