本文整理汇总了C++中BitstreamReader::GetBits方法的典型用法代码示例。如果您正苦于以下问题:C++ BitstreamReader::GetBits方法的具体用法?C++ BitstreamReader::GetBits怎么用?C++ BitstreamReader::GetBits使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BitstreamReader
的用法示例。
在下文中一共展示了BitstreamReader::GetBits方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
static Status parseAPP14(DataReader *pReader, JPEGAPP14Header *pHeader)
{
BitstreamReader bs;
Ipp8u iMarker[5];
size_t iSize = 5;
pReader->Get16uSwap(&pHeader->iLength);
pReader->CacheData(&iMarker[0], iSize);
if(iMarker[0] == 'a' && iMarker[1] == 'd' && iMarker[2] == 'o' && iMarker[3] == 'b' && iMarker[4] == 'e')
{
pReader->MovePosition(5);
bs.Init(pReader);
pHeader->bAdobeDetected = true;
pHeader->iAdobeVersion = bs.GetBits(16);
pHeader->iAdobeFlags0 = bs.GetBits(16);
pHeader->iAdobeFlags1 = bs.GetBits(16);
pHeader->iAdobeTransform = bs.GetBits(8);
bs.AlignReader();
}
return UMC_OK;
}
示例2: Status
Status Mpeg2FrameConstructor::ParsePictureHeader(Ipp8u *buf, Ipp32s iLen, Mpeg2TrackInfo *pInfo) {
BitstreamReader bs;
bs.SkipBits(32 + 4 + 4 + 4 + 4 + 4 + 2);
bs.SkipBits(1 + 1 + 1 + 1 + 1 + 1 + 1);
bs.SkipBits(5);
bs.SkipBits(3);
Ipp8u source_format;
bs.SkipBits(22);
bs.SkipBits(8);
if (7 == source_format) {
Ipp8u ufep = (Ipp8u)bs.GetBits(3);
if (0x01 == ufep) {
bs.SkipBits(10);
}
}
return Status();
}
示例3: 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;
}