本文整理汇总了C++中BitstreamReader::AlignReader方法的典型用法代码示例。如果您正苦于以下问题:C++ BitstreamReader::AlignReader方法的具体用法?C++ BitstreamReader::AlignReader怎么用?C++ BitstreamReader::AlignReader使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BitstreamReader
的用法示例。
在下文中一共展示了BitstreamReader::AlignReader方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
static Status parseAPP0(DataReader *pReader, JPEGAPP0Header *pHeader)
{
BitstreamReader bs;
Ipp8u iMarker[5];
size_t iSize = 5;
pReader->Get16uSwap(&pHeader->iLength);
pReader->CacheData(&iMarker[0], iSize);
if(iMarker[0] == 'J' && iMarker[1] == 'F' && iMarker[2] == 'I' && iMarker[3] == 'F' && iMarker[4] == 0)
{
pReader->MovePosition(5);
bs.Init(pReader);
pHeader->bJfifDetected = true;
pHeader->iJfifVerMajor = bs.GetBits(8);
pHeader->iJfifVerMinor = bs.GetBits(8);
pHeader->iJfifUnits = bs.GetBits(8);
pHeader->iJfifXDensity = bs.GetBits(16);
pHeader->iJfifYDensity = bs.GetBits(16);
pHeader->iJfifThumbWidth = bs.GetBits(8);
pHeader->iJfifThumbHeight = bs.GetBits(8);
bs.AlignReader();
}
pReader->CacheData(&iMarker[0], iSize);
if(iMarker[0] == 'J' && iMarker[1] == 'F' && iMarker[2] == 'X' && iMarker[3] == 'X' && iMarker[4] == 0)
{
pReader->MovePosition(5);
bs.Init(pReader);
pHeader->bJfxxDetected = true;
pHeader->iJfxxThumbnailsType = bs.GetBits(8);
bs.AlignReader();
}
pReader->CacheData(&iMarker[0], iSize);
if(iMarker[0] == 'A' && iMarker[1] == 'V' && iMarker[2] == 'I' && iMarker[3] == '1')
{
pReader->MovePosition(4);
bs.Init(pReader);
pHeader->bAvi1Detected = true;
pHeader->iAvi1Polarity = bs.GetBits(8);
pHeader->iAvi1Reserved = bs.GetBits(8);
pHeader->iAvi1FiledSize1 = bs.GetBits(32);
pHeader->iAvi1FiledSize2 = bs.GetBits(32);
bs.AlignReader();
}
return UMC_OK;
}
示例2: parseSOF
static Status parseSOF(DataReader *pReader, JPEGSOFHeader *pHeader)
{
BitstreamReader bs;
bs.Init(pReader);
pHeader->iLength = bs.GetBits(16);
pHeader->iPrecision = bs.GetBits(8);
pHeader->iHeight = bs.GetBits(16);
pHeader->iWidth = bs.GetBits(16);
pHeader->iComonents = bs.GetBits(8);
for(Ipp32u i = 0; i < pHeader->iComonents; i++)
{
pHeader->comonent[i].iID = bs.GetBits(8);
pHeader->comonent[i].iHSampling = bs.GetBits(4);
pHeader->comonent[i].iVSampling = bs.GetBits(4);
pHeader->comonent[i].iQSelector = bs.GetBits(8);
}
bs.AlignReader();
return UMC_OK;
}