MCPcopy Create free account
hub / github.com/cisco/openh264 / RBSP2EBSP

Function RBSP2EBSP

codec/decoder/core/src/bit_stream.cpp:88–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88void RBSP2EBSP (uint8_t* pDstBuf, uint8_t* pSrcBuf, const int32_t kiSize) {
89 uint8_t* pSrcPointer = pSrcBuf;
90 uint8_t* pDstPointer = pDstBuf;
91 uint8_t* pSrcEnd = pSrcBuf + kiSize;
92 int32_t iZeroCount = 0;
93
94 while (pSrcPointer < pSrcEnd) {
95 if (iZeroCount == 2 && *pSrcPointer <= 3) {
96 //add the code 0x03
97 *pDstPointer++ = 3;
98 iZeroCount = 0;
99 }
100 if (*pSrcPointer == 0) {
101 ++ iZeroCount;
102 } else {
103 iZeroCount = 0;
104 }
105 *pDstPointer++ = *pSrcPointer++;
106 }
107}
108
109} // namespace WelsDec
110

Callers 1

ParseSpsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected