* WelsInitStaticMemory * Memory request for new introduced data * Especially for: * rbsp_au_buffer, cur_dq_layer_ptr and ref_dq_layer_ptr in MB info cache. * return: * 0 - success; otherwise returned error_no defined in error_no.h. */
| 756 | * 0 - success; otherwise returned error_no defined in error_no.h. |
| 757 | */ |
| 758 | int32_t WelsInitStaticMemory (PWelsDecoderContext pCtx) { |
| 759 | if (pCtx == NULL) { |
| 760 | return ERR_INFO_INVALID_PTR; |
| 761 | } |
| 762 | |
| 763 | if (MemInitNalList (&pCtx->pAccessUnitList, MAX_NAL_UNIT_NUM_IN_AU, pCtx->pMemAlign) != 0) |
| 764 | return ERR_INFO_OUT_OF_MEMORY; |
| 765 | |
| 766 | if (InitBsBuffer (pCtx) != 0) |
| 767 | return ERR_INFO_OUT_OF_MEMORY; |
| 768 | |
| 769 | pCtx->uiTargetDqId = (uint8_t) - 1; |
| 770 | pCtx->bEndOfStreamFlag = false; |
| 771 | |
| 772 | return ERR_NONE; |
| 773 | } |
| 774 | |
| 775 | /* |
| 776 | * WelsFreeStaticMemory |
no test coverage detected