History

remove CS and RS syntaxs for issue 373

Licai Guo committed 12 years ago

Commit 4260a9b1 parent 8beb3c85 files · +10 −103Browse files

Showing the changes to codec/decoder/core/src/decoder_core.cpp (1 of 5 files). Show all

Unified · Split

codec/decoder/core/src/decoder_core.cpp+0−62
@@ -903,9 +903,6 @@ int32_t UpdateAccessUnit (PWelsDecoderContext pCtx) { · 902 unmodified lines
903903 }
904904
905905 int32_t InitialDqLayersContext (PWelsDecoderContext pCtx, const int32_t kiMaxWidth, const int32_t kiMaxHeight) {
906− const int32_t kiPicStride = ((kiMaxWidth + 15) & 0xfffff0) + (PADDING_LENGTH << 1);
907− const int32_t kiPicLines = ((kiMaxHeight + 15) & 0xfffff0);
908−
909906 int32_t i = 0;
910907
911908 WELS_VERIFY_RETURN_IF (ERR_INFO_INVALID_PARAM, (NULL == pCtx || kiMaxWidth <= 0 || kiMaxHeight <= 0))
@@ -922,35 +919,11 @@ int32_t InitialDqLayersContext (PWelsDecoderContext pCtx, const int32_t kiMaxWid · 10 unmodified lines
922919 do {
923920 PDqLayer pDq = (PDqLayer)WelsMalloc (sizeof (SDqLayer), "PDqLayer");
924921
925− int32_t iPlaneIdx = 0;
926−
927922 if (pDq == NULL)
928923 return ERR_INFO_OUT_OF_MEMORY;
929924
930925 memset (pDq, 0, sizeof (SDqLayer));
931926
932− do {
933− const int32_t kiHshift = iPlaneIdx ? 1 : 0;
934− const int32_t kiVshift = kiHshift;
935− const int32_t kiStride = WELS_ALIGN ((kiPicStride >> kiHshift), (16 << (1 - kiHshift)));
936− const int32_t kiLine = (kiPicLines + (PADDING_LENGTH << 1)) >> kiVshift;
937− const int32_t kiSize = kiStride * kiLine;
938−
939− pCtx->pCsListXchg[i][iPlaneIdx] = (uint8_t*)WelsMalloc (kiSize * sizeof (uint8_t), "pCtx->pCsListXchg[][]");
940−
941− WELS_VERIFY_RETURN_IF (ERR_INFO_OUT_OF_MEMORY, (NULL == pCtx->pCsListXchg[i][iPlaneIdx]))
942− pCtx->iCsStride[iPlaneIdx] = kiStride;
943−
944−
945− pCtx->pRsListXchg[i][iPlaneIdx] = (int16_t*)WelsMalloc (kiSize * sizeof (int16_t), "pCtx->pRsListXchg[][]");
946−
947− WELS_VERIFY_RETURN_IF (ERR_INFO_OUT_OF_MEMORY , (NULL == pCtx->pRsListXchg[i][iPlaneIdx]))
948− pCtx->iRsStride[iPlaneIdx] = kiStride;
949−
950− ++ iPlaneIdx;
951− } while (iPlaneIdx < 3);
952−
953−
954927 pCtx->sMb.pMbType[i] = (int8_t*)WelsMalloc (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (int8_t),
955928 "pCtx->sMb.pMbType[]");
956929 pCtx->sMb.pMv[i][0] = (int16_t (*)[16][2])WelsMalloc (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (
@@ -1031,34 +1004,6 @@ void UninitialDqLayersContext (PWelsDecoderContext pCtx) { · 74 unmodified lines
10311004 continue;
10321005 }
10331006
1034− if (pCtx->pCsListXchg[i]) { // cs picture
1035− j = 0;
1036− do {
1037− if (NULL != pCtx->pCsListXchg[i][j]) {
1038− WelsFree (pCtx->pCsListXchg[i][j], "pCtx->pCsListXchg[][]");
1039−
1040− pCtx->pCsListXchg[i][j] = NULL;
1041− }
1042− pCtx->iCsStride[j] = 0;
1043− ++ j;
1044− } while (j < 3);
1045−
1046− pDq->pCsData[i] = NULL; // for safe
1047− pDq->iCsStride[i] = 0;
1048− }
1049− if (pCtx->pRsListXchg[i]) {
1050− j = 0;
1051− do {
1052− if (NULL != pCtx->pRsListXchg[i][j]) {
1053− WelsFree (pCtx->pRsListXchg[i][j], "pCtx->pRsListXchg[][]");
1054−
1055− pCtx->pRsListXchg[i][j] = NULL;
1056− }
1057− pCtx->iRsStride[j] = 0;
1058− ++ j;
1059− } while (j < 3);
1060− }
1061−
10621007 if (pCtx->sMb.pMbType[i]) {
10631008 WelsFree (pCtx->sMb.pMbType[i], "pCtx->sMb.pMbType[]");
10641009
@@ -1652,13 +1597,6 @@ int32_t InitRefPicList (PWelsDecoderContext pCtx, const uint8_t kuiNRi, const bo · 587 unmodified lines
16521597
16531598 void InitCurDqLayerData (PWelsDecoderContext pCtx, PDqLayer pCurDq) {
16541599 if (NULL != pCtx && NULL != pCurDq) {
1655− pCurDq->pCsData[0] = pCtx->pCsListXchg[0][0];
1656− pCurDq->pCsData[1] = pCtx->pCsListXchg[0][1];
1657− pCurDq->pCsData[2] = pCtx->pCsListXchg[0][2];
1658− pCurDq->iCsStride[0] = pCtx->iCsStride[0];
1659− pCurDq->iCsStride[1] = pCtx->iCsStride[1];
1660− pCurDq->iCsStride[2] = pCtx->iCsStride[2];
1661−
16621600 pCurDq->pMbType = pCtx->sMb.pMbType[0];
16631601 pCurDq->pSliceIdc = pCtx->sMb.pSliceIdc[0];
16641602 pCurDq->pMv[0] = pCtx->sMb.pMv[0][0];

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t