diff --git a/source/Lib/EncoderLib/EncCu.cpp b/source/Lib/EncoderLib/EncCu.cpp index 29d35ed01533b2fbcb6a4097c8ed723c0e069041..4744191019dd042fe19dcac259a497961a8c6310 100644 --- a/source/Lib/EncoderLib/EncCu.cpp +++ b/source/Lib/EncoderLib/EncCu.cpp @@ -6101,62 +6101,60 @@ EncCu EncCu::copy(EncCu& original) EncCu copy = *(new EncCu); /*COPIAMOS BOOL*/ - copy.m_bestModeUpdated = original.m_bestModeUpdated; + copy.m_bestModeUpdated = original.m_bestModeUpdated; /*COPIAMOS VECTOR QUE CONTIENE CTXPAIR*/ std::vector m_ctxBufferCopy(original.m_ctxBuffer.size()); for (size_t i = 0; i < original.m_ctxBuffer.size(); i++) { CtxPair newCtxPair; - newCtxPair.start = Ctx(original.m_ctxBuffer[i].start); - newCtxPair.best = Ctx(original.m_ctxBuffer[i].best); + newCtxPair.start = Ctx(original.m_ctxBuffer[i].start); + newCtxPair.best = Ctx(original.m_ctxBuffer[i].best); m_ctxBufferCopy[i] = newCtxPair; } - copy.m_ctxBuffer = m_ctxBufferCopy; + copy.m_ctxBuffer = m_ctxBufferCopy; /*COPIAMOS PUNTERO CTXPAIR*/ if (original.m_CurrCtx != NULL) /*Puede ser nulo*/ { - CtxPair* newCtxPair = new CtxPair(); - *newCtxPair = *(original.m_CurrCtx); - copy.m_CurrCtx = newCtxPair; + copy.m_CurrCtx = new CtxPair(*original.m_CurrCtx); } else { copy.m_CurrCtx = NULL; } + /*COPIAMOS UN PUNTERO CTXPOOL*/ + copy.m_ctxPool = new CtxPool(*original.m_ctxPool); - //CtxPool* m_ctxPoolCopy = new CtxPool(*original.m_ctxPool); - //copy.m_ctxPool = m_ctxPoolCopy; + /*COPIAMOS INTEGER*/ + copy.m_cuChromaQpOffsetIdxPlus1 = original.m_cuChromaQpOffsetIdxPlus1; - //copy.m_cuChromaQpOffsetIdxPlus1 = original.m_cuChromaQpOffsetIdxPlus1; + /*COPIAMOS OBJETO XUPOOL*/ + copy.m_unitPool = *(new XuPool(original.m_unitPool)); - //XuPool m_unitPoolCopy(original.m_unitPool); - //copy.m_unitPool = m_unitPoolCopy; + /*COPIAMOS OBJETO PelUnitBufPool*/ + copy.m_pelUnitBufPool = *(new PelUnitBufPool(original.m_pelUnitBufPool)); - //PelUnitBufPool m_pelUnitBufPoolCopy(original.m_pelUnitBufPool); - //copy.m_pelUnitBufPool = m_pelUnitBufPoolCopy; + /*COPIAMOS PUNTEROS TRIPLES CODINGSTRUCTURE*/ + CodingStructure*** m_pTempCSCopy = new CodingStructure**; + *m_pTempCSCopy = new CodingStructure*; + **m_pTempCSCopy = **original.m_pTempCS; // Copia los datos del objeto apuntado por m_pTempCS en la nueva variable + copy.m_pTempCS = m_pTempCSCopy; + CodingStructure*** m_pBestCSCopy = new CodingStructure**; + *m_pBestCSCopy = new CodingStructure*; + **m_pBestCSCopy = **original.m_pBestCS; // Copia los datos del objeto apuntado por m_pBestCS en la nueva variable + copy.m_pBestCS = m_pBestCSCopy; - //CodingStructure*** m_pTempCSCopy = new CodingStructure**; - //*m_pTempCSCopy = new CodingStructure*; - //**m_pTempCSCopy = **original.m_pTempCS; // Copia los datos del objeto apuntado por m_pTempCS en la nueva variable - //copy.m_pTempCS = m_pTempCSCopy; + CodingStructure*** m_pTempCS2Copy = new CodingStructure**; + *m_pTempCS2Copy = new CodingStructure*; + **m_pTempCS2Copy = **original.m_pTempCS2; // Copia los datos del objeto apuntado por m_pTempCS2 en la nueva variable + copy.m_pTempCS2 = m_pTempCS2Copy; - //CodingStructure*** m_pBestCSCopy = new CodingStructure**; - //*m_pBestCSCopy = new CodingStructure*; - //**m_pBestCSCopy = **original.m_pBestCS; // Copia los datos del objeto apuntado por m_pBestCS en la nueva variable - //copy.m_pBestCS = m_pBestCSCopy; - - //CodingStructure*** m_pTempCS2Copy = new CodingStructure**; - //*m_pTempCS2Copy = new CodingStructure*; - //**m_pTempCS2Copy = **original.m_pTempCS2; // Copia los datos del objeto apuntado por m_pTempCS2 en la nueva variable - //copy.m_pTempCS2 = m_pTempCS2Copy; - - //CodingStructure*** m_pBestCS2Copy = new CodingStructure**; - //*m_pBestCS2Copy = new CodingStructure*; - //**m_pBestCS2Copy = **original.m_pBestCS2; // Copia los datos del objeto apuntado por m_pBestCS2 en la nueva variable - //copy.m_pBestCS2 = m_pBestCS2Copy; + CodingStructure*** m_pBestCS2Copy = new CodingStructure**; + *m_pBestCS2Copy = new CodingStructure*; + **m_pBestCS2Copy = **original.m_pBestCS2; // Copia los datos del objeto apuntado por m_pBestCS2 en la nueva variable + copy.m_pBestCS2 = m_pBestCS2Copy; //EncCfg* m_pcEncCfgCopy = new EncCfg(*original.m_pcEncCfg); //copy.m_pcEncCfg = m_pcEncCfgCopy; diff --git a/source/Lib/EncoderLib/EncCu.h b/source/Lib/EncoderLib/EncCu.h index b605b02d0892dc96c2cd7b5ad34e5b7250005916..ab32455834e8808dfce773beb2bfc189c4c177bf 100644 --- a/source/Lib/EncoderLib/EncCu.h +++ b/source/Lib/EncoderLib/EncCu.h @@ -235,7 +235,7 @@ public: std::vector m_ctxBuffer; //copy CtxPair* m_CurrCtx; //copy - CtxPool *m_ctxPool; //copy + CtxPool* m_ctxPool; //copy // Data : encoder control int m_cuChromaQpOffsetIdxPlus1; // if 0, then cu_chroma_qp_offset_flag will be 0, otherwise cu_chroma_qp_offset_flag will be 1. copy checked @@ -259,7 +259,7 @@ public: CABACWriter* m_CABACEstimator; RateCtrl* m_pcRateCtrl; IbcHashMap m_ibcHashMap; - EncModeCtrl *m_modeCtrl; + EncModeCtrl* m_modeCtrl; #if !JVET_AC0139_UNIFIED_MERGE std::array m_geoWeightedBuffers; // weighted prediction pixels #endif