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

Function ConstructAccessUnit

codec/decoder/core/src/decoder_core.cpp:2352–2376  ·  view source on GitHub ↗

* ConstructAccessUnit * construct an access unit for given input bitstream, maybe partial NAL Unit, one or more Units are involved to * joint a collective access unit. * parameter\ * buf: bitstream data buffer * bit_len: size in bit length of data * buf_len: size in byte length of data * coded_au: mark an Access Unit decoding finished * return: * 0 - success; otherwise

Source from the content-addressed store, hash-verified

2350 * 0 - success; otherwise returned error_no defined in error_no.h
2351 */
2352int32_t ConstructAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBufferInfo* pDstInfo) {
2353 int32_t iErr = ERR_NONE;
2354 if (GetThreadCount (pCtx) <= 1) {
2355 iErr = InitConstructAccessUnit (pCtx, pDstInfo);
2356 if (ERR_NONE != iErr) {
2357 return iErr;
2358 }
2359 }
2360 if (pCtx->pCabacDecEngine == NULL) {
2361 pCtx->pCabacDecEngine = (SWelsCabacDecEngine*)pCtx->pMemAlign->WelsMallocz (sizeof (SWelsCabacDecEngine),
2362 "pCtx->pCabacDecEngine");
2363 WELS_VERIFY_RETURN_IF (ERR_INFO_OUT_OF_MEMORY, (NULL == pCtx->pCabacDecEngine))
2364 }
2365
2366 iErr = DecodeCurrentAccessUnit (pCtx, ppDst, pDstInfo);
2367
2368 WelsDecodeAccessUnitEnd (pCtx);
2369
2370 if (ERR_NONE != iErr) {
2371 WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG, "returned error from decoding:[0x%x]", iErr);
2372 return iErr;
2373 }
2374
2375 return ERR_NONE;
2376}
2377
2378static inline void InitDqLayerInfo (PDqLayer pDqLayer, PLayerInfo pLayerInfo, PNalUnit pNalUnit, PPicture pPicDec) {
2379 PNalUnitHeaderExt pNalHdrExt = &pNalUnit->sNalHeaderExt;

Callers 2

WelsDecodeBsFunction · 0.70
CheckAndFinishLastPicFunction · 0.70

Calls 6

GetThreadCountFunction · 0.85
InitConstructAccessUnitFunction · 0.85
DecodeCurrentAccessUnitFunction · 0.85
WelsDecodeAccessUnitEndFunction · 0.85
WelsLogFunction · 0.85
WelsMalloczMethod · 0.80

Tested by

no test coverage detected