Backported various little edits from Pro edition.
This commit is contained in:
parent
ef9938da0c
commit
4c9c6fa7ba
78 changed files with 2334 additions and 1266 deletions
10
lib/h264.cpp
10
lib/h264.cpp
|
@ -81,6 +81,12 @@ namespace h264 {
|
|||
|
||||
sequenceParameterSet::sequenceParameterSet(const char * _data, unsigned long _dataLen) : data(_data), dataLen(_dataLen) {}
|
||||
|
||||
//DTSC Initdata is the payload for an avcc box. init[8+] is data, init[6-7] is a network-encoded length
|
||||
void sequenceParameterSet::fromDTSCInit(const std::string & dtscInit){
|
||||
data = dtscInit.data() + 8;
|
||||
dataLen = Bit::btohs(dtscInit.data() + 6);
|
||||
}
|
||||
|
||||
SPSMeta sequenceParameterSet::getCharacteristics() const {
|
||||
SPSMeta result;
|
||||
|
||||
|
@ -107,8 +113,10 @@ namespace h264 {
|
|||
}
|
||||
|
||||
char profileIdc = bs.get(8);
|
||||
result.profile = profileIdc;
|
||||
//Start skipping unused data
|
||||
bs.skip(16);
|
||||
bs.skip(8);
|
||||
result.level = bs.get(8);
|
||||
bs.getUExpGolomb();
|
||||
if (profileIdc == 100 || profileIdc == 110 || profileIdc == 122 || profileIdc == 244 || profileIdc == 44 || profileIdc == 83 || profileIdc == 86 || profileIdc == 118 || profileIdc == 128) {
|
||||
//chroma format idc
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue