Commit 9ecea4bd authored by Alberto Gonzalez's avatar Alberto Gonzalez

Commit nº 2 (03-03-2023)

```------------------------------------------------------------
Comienzo del método copia de EncCu para EncSlice.cpp. Se han copiado los atributos:

- m_bestModeUpdated
- m_ctxBuffer
- m_CurrCtx
- m_ctxPool
- m_cuChromaQpOffsetIdxPlus1
- m_unitPool
```

------------------------------------------------------------
Queda continuar en la línea 6120 de EncCu.cpp con el resto de atributos de EncCu.
parent 23bfaf12
...@@ -6099,13 +6099,25 @@ EncCu EncCu::copy(EncCu& original) ...@@ -6099,13 +6099,25 @@ EncCu EncCu::copy(EncCu& original)
{ {
EncCu copy = *(new EncCu); EncCu copy = *(new EncCu);
copy.m_bestModeUpdated = original.m_bestModeUpdated; copy.m_bestModeUpdated = original.m_bestModeUpdated;
std::vector<CtxPair> m_ctxBufferCopia(original.m_ctxBuffer); std::vector<CtxPair> m_ctxBufferCopy(original.m_ctxBuffer);
copy.m_ctxBuffer = m_ctxBufferCopia; copy.m_ctxBuffer = m_ctxBufferCopy;
if (original.m_CurrCtx != NULL) /*Puede ser nulo*/ if (original.m_CurrCtx != NULL) /*Puede ser nulo*/
{ {
copy.m_CurrCtx = new CtxPair(*original.m_CurrCtx); CtxPair m_CurrCtxCopy(*original.m_CurrCtx);
copy.m_CurrCtx = &m_CurrCtxCopy;
} }
copy.m_ctxPool = new CtxPool(*original.m_ctxPool); else {
copy.m_CurrCtx = NULL;
}
CtxPool m_ctxPoolCopy(*original.m_ctxPool);
copy.m_ctxPool = &m_ctxPoolCopy;
copy.m_cuChromaQpOffsetIdxPlus1 = original.m_cuChromaQpOffsetIdxPlus1;
XuPool m_unitPoolCopy(original.m_unitPool);
copy.m_unitPool = m_unitPoolCopy;
//@TODO
return copy; return copy;
} }
......
...@@ -235,12 +235,12 @@ public: ...@@ -235,12 +235,12 @@ public:
std::vector<CtxPair> m_ctxBuffer; //copy checked std::vector<CtxPair> m_ctxBuffer; //copy checked
CtxPair* m_CurrCtx; //copy not checked because null CtxPair* m_CurrCtx; //copy not checked because null
CtxPool *m_ctxPool; CtxPool *m_ctxPool; //copy checked
// Data : encoder control // 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. 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
XuPool m_unitPool; XuPool m_unitPool; //copy not
PelUnitBufPool m_pelUnitBufPool; PelUnitBufPool m_pelUnitBufPool;
CodingStructure ***m_pTempCS; CodingStructure ***m_pTempCS;
......
...@@ -1897,6 +1897,8 @@ void EncSlice::encodeCtus( Picture* pcPic, const bool bCompressEntireSlice, cons ...@@ -1897,6 +1897,8 @@ void EncSlice::encodeCtus( Picture* pcPic, const bool bCompressEntireSlice, cons
EncCu m_pcCuEncoder_copy = m_pcCuEncoder->copy(*m_pcCuEncoder); EncCu m_pcCuEncoder_copy = m_pcCuEncoder->copy(*m_pcCuEncoder);
//END ALBERTO //END ALBERTO
m_pcCuEncoder->compressCtu(cs, ctuArea, ctuRsAddr, prevQP, currQP); m_pcCuEncoder->compressCtu(cs, ctuArea, ctuRsAddr, prevQP, currQP);
bool stopDebugger = true;
#if GREEN_METADATA_SEI_ENABLED #if GREEN_METADATA_SEI_ENABLED
FeatureCounterStruct m_featureCounter = pcPic->getFeatureCounter(); FeatureCounterStruct m_featureCounter = pcPic->getFeatureCounter();
countFeatures(m_featureCounter, cs,ctuArea); countFeatures(m_featureCounter, cs,ctuArea);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment