| 1635 | |
| 1636 | |
| 1637 | void UninitialDqLayersContext (PWelsDecoderContext pCtx) { |
| 1638 | int32_t i = 0; |
| 1639 | CMemoryAlign* pMa = pCtx->pMemAlign; |
| 1640 | |
| 1641 | do { |
| 1642 | PDqLayer pDq = pCtx->pDqLayersList[i]; |
| 1643 | if (pDq == NULL) { |
| 1644 | ++ i; |
| 1645 | continue; |
| 1646 | } |
| 1647 | |
| 1648 | if (pCtx->sMb.pMbType[i]) { |
| 1649 | pMa->WelsFree (pCtx->sMb.pMbType[i], "pCtx->sMb.pMbType[]"); |
| 1650 | |
| 1651 | pCtx->sMb.pMbType[i] = NULL; |
| 1652 | } |
| 1653 | |
| 1654 | for (int32_t listIdx = LIST_0; listIdx < LIST_A; ++listIdx) { |
| 1655 | if (pCtx->sMb.pMv[i][listIdx]) { |
| 1656 | pMa->WelsFree (pCtx->sMb.pMv[i][listIdx], "pCtx->sMb.pMv[][]"); |
| 1657 | pCtx->sMb.pMv[i][listIdx] = NULL; |
| 1658 | } |
| 1659 | |
| 1660 | if (pCtx->sMb.pRefIndex[i][listIdx]) { |
| 1661 | pMa->WelsFree (pCtx->sMb.pRefIndex[i][listIdx], "pCtx->sMb.pRefIndex[][]"); |
| 1662 | pCtx->sMb.pRefIndex[i][listIdx] = NULL; |
| 1663 | } |
| 1664 | |
| 1665 | if (pCtx->sMb.pDirect[i]) { |
| 1666 | pMa->WelsFree (pCtx->sMb.pDirect[i], "pCtx->sMb.pDirect[]"); |
| 1667 | pCtx->sMb.pDirect[i] = NULL; |
| 1668 | } |
| 1669 | |
| 1670 | if (pCtx->sMb.pMvd[i][listIdx]) { |
| 1671 | pMa->WelsFree (pCtx->sMb.pMvd[i][listIdx], "pCtx->sMb.pMvd[][]"); |
| 1672 | pCtx->sMb.pMvd[i][listIdx] = NULL; |
| 1673 | } |
| 1674 | } |
| 1675 | |
| 1676 | if (pCtx->sMb.pNoSubMbPartSizeLessThan8x8Flag[i]) { |
| 1677 | pMa->WelsFree (pCtx->sMb.pNoSubMbPartSizeLessThan8x8Flag[i], "pCtx->sMb.pNoSubMbPartSizeLessThan8x8Flag[]"); |
| 1678 | |
| 1679 | pCtx->sMb.pNoSubMbPartSizeLessThan8x8Flag[i] = NULL; |
| 1680 | } |
| 1681 | |
| 1682 | if (pCtx->sMb.pTransformSize8x8Flag[i]) { |
| 1683 | pMa->WelsFree (pCtx->sMb.pTransformSize8x8Flag[i], "pCtx->sMb.pTransformSize8x8Flag[]"); |
| 1684 | |
| 1685 | pCtx->sMb.pTransformSize8x8Flag[i] = NULL; |
| 1686 | } |
| 1687 | |
| 1688 | if (pCtx->sMb.pLumaQp[i]) { |
| 1689 | pMa->WelsFree (pCtx->sMb.pLumaQp[i], "pCtx->sMb.pLumaQp[]"); |
| 1690 | |
| 1691 | pCtx->sMb.pLumaQp[i] = NULL; |
| 1692 | } |
| 1693 | |
| 1694 | if (pCtx->sMb.pChromaQp[i]) { |
no test coverage detected