Commit a066ba64 authored by Alberto Gonzalez's avatar Alberto Gonzalez

Commit nº 7 (08-03-2023)

-----------------------------------------------------
Continuar con el constructor de copia de IntraSearch
parent 02f25974
...@@ -1000,6 +1000,15 @@ struct CompArea; ...@@ -1000,6 +1000,15 @@ struct CompArea;
struct PelStorage : public PelUnitBuf struct PelStorage : public PelUnitBuf
{ {
PelStorage(); PelStorage();
//ALBERTO
PelStorage(const PelStorage& other) : PelUnitBuf(other)
{
for (int i = 0; i < MAX_NUM_COMPONENT; i++)
{
m_origin[i] = other.m_origin[i];
}
}
//END ALBERTO
~PelStorage(); ~PelStorage();
void swap( PelStorage& other ); void swap( PelStorage& other );
......
...@@ -103,6 +103,8 @@ private: ...@@ -103,6 +103,8 @@ private:
// clang-format on // clang-format on
{ {
} }
}; };
IntraPredParam m_ipaParam; IntraPredParam m_ipaParam;
...@@ -116,7 +118,7 @@ protected: ...@@ -116,7 +118,7 @@ protected:
int m_topRefLength; int m_topRefLength;
int m_leftRefLength; int m_leftRefLength;
ScanElement* m_scanOrder; ScanElement* m_scanOrder = nullptr;
bool m_bestScanRotationMode; bool m_bestScanRotationMode;
// prediction // prediction
void xPredIntraPlanar ( const CPelBuf &pSrc, PelBuf &pDst ); void xPredIntraPlanar ( const CPelBuf &pSrc, PelBuf &pDst );
...@@ -145,6 +147,56 @@ protected: ...@@ -145,6 +147,56 @@ protected:
public: public:
IntraPrediction(); IntraPrediction();
//ALBERTO
IntraPrediction::IntraPrediction(IntraPrediction& other)
{
// Copiar los datos miembro de other a this
m_yuvExtSize2 = other.m_yuvExtSize2;
m_ipaParam = other.m_ipaParam;
m_matrixIntraPred = other.m_matrixIntraPred;
m_currChromaFormat = other.m_currChromaFormat;
m_topRefLength = other.m_topRefLength;
m_leftRefLength = other.m_leftRefLength;
m_bestScanRotationMode = other.m_bestScanRotationMode;
for (int comp = 0; comp < MAX_NUM_COMPONENT; comp++)
{
for (int buf = 0; buf < NUM_PRED_BUF; buf++)
{
for (int i = 0; i < (MAX_CU_SIZE * 2 + 1 + MAX_REF_LINE_IDX) * 2; i++)
{
m_refBuffer[comp][buf][i] = other.m_refBuffer[comp][buf][i];
}
}
}
for (int i = 0; i < MAX_NUM_COMPONENT; i++)
{
m_refBufferStride[i] = other.m_refBufferStride[i];
}
for (int comp = 0; comp < MAX_NUM_COMPONENT; comp++)
{
for (int i = 0; i < 4; i++)
{
if (other.m_yuvExt2[comp][i] != nullptr)
{
m_yuvExt2[comp][i] = new Pel[(MAX_CU_SIZE + 16) * (MAX_CU_SIZE + 1) + 16];
memcpy(m_yuvExt2[comp][i], other.m_yuvExt2[comp][i],
sizeof(Pel) * ((MAX_CU_SIZE + 16) * (MAX_CU_SIZE + 1) + 16));
}
else
{
m_yuvExt2[comp][i] = nullptr;
}
}
}
m_pMdlmTemp = new Pel(*other.m_pMdlmTemp);
m_piTemp = new Pel(*other.m_piTemp);
if (other.m_scanOrder!=nullptr)
{
m_scanOrder = new ScanElement(*other.m_scanOrder);
}
}
//END ALBERTO
virtual ~IntraPrediction(); virtual ~IntraPrediction();
void init (ChromaFormat chromaFormatIDC, const unsigned bitDepthY); void init (ChromaFormat chromaFormatIDC, const unsigned bitDepthY);
......
...@@ -6149,11 +6149,10 @@ EncCu EncCu::copy(EncCu& original) ...@@ -6149,11 +6149,10 @@ EncCu EncCu::copy(EncCu& original)
**m_pBestCS2Copy = **original.m_pBestCS2; // Copia los datos del objeto apuntado por m_pBestCS2 en la nueva variable **m_pBestCS2Copy = **original.m_pBestCS2; // Copia los datos del objeto apuntado por m_pBestCS2 en la nueva variable
copy.m_pBestCS2 = m_pBestCS2Copy; copy.m_pBestCS2 = m_pBestCS2Copy;
//EncCfg* m_pcEncCfgCopy = new EncCfg(*original.m_pcEncCfg); copy.m_pcEncCfg = new EncCfg(*original.m_pcEncCfg);
//copy.m_pcEncCfg = m_pcEncCfgCopy;
//IntraSearch* m_pcIntraSearchCopy = new IntraSearch(*original.m_pcIntraSearch); copy.m_pcIntraSearch = new IntraSearch(*original.m_pcIntraSearch); //<-CONTINUAR CON EL RESTO DE ATRIBUTOS Y HACER UN CONSTRUCTOR DE COPIA DE INTRAPREDICTION
//copy.m_pcIntraSearch = m_pcIntraSearchCopy; bool debbug_stop = true;
//InterSearch* m_pcInterSearchCopy = new InterSearch(*original.m_pcInterSearch); //InterSearch* m_pcInterSearchCopy = new InterSearch(*original.m_pcInterSearch);
//copy.m_pcInterSearch = m_pcInterSearchCopy; //copy.m_pcInterSearch = m_pcInterSearchCopy;
......
...@@ -911,7 +911,6 @@ class EncModeCtrlMTnoRQT : public EncModeCtrl, public CacheBlkInfoCtrl ...@@ -911,7 +911,6 @@ class EncModeCtrlMTnoRQT : public EncModeCtrl, public CacheBlkInfoCtrl
#endif #endif
public: public:
virtual void create ( const EncCfg& cfg ); virtual void create ( const EncCfg& cfg );
virtual void destroy (); virtual void destroy ();
virtual void initCTUEncoding ( const Slice &slice ); virtual void initCTUEncoding ( const Slice &slice );
......
...@@ -48,6 +48,9 @@ ...@@ -48,6 +48,9 @@
#include "CommonLib/Unit.h" #include "CommonLib/Unit.h"
#include "CommonLib/RdCost.h" #include "CommonLib/RdCost.h"
#include "EncReshape.h" #include "EncReshape.h"
//ALBERTO
#include "EncModeCtrl.h"
//END ALBERTO
//! \ingroup EncoderLib //! \ingroup EncoderLib
//! \{ //! \{
...@@ -195,13 +198,13 @@ private: ...@@ -195,13 +198,13 @@ private:
XuPool m_unitPool; XuPool m_unitPool;
CodingStructure ****m_pSplitCS; CodingStructure ****m_pSplitCS = nullptr;
CodingStructure ****m_pFullCS; CodingStructure ****m_pFullCS = nullptr;
CodingStructure ***m_pTempCS; CodingStructure ***m_pTempCS = nullptr;
CodingStructure ***m_pBestCS; CodingStructure ***m_pBestCS = nullptr;
CodingStructure **m_pSaveCS; CodingStructure **m_pSaveCS = nullptr;
bool m_saveCuCostInSCIPU; bool m_saveCuCostInSCIPU;
uint8_t m_numCuInSCIPU; uint8_t m_numCuInSCIPU;
...@@ -410,6 +413,18 @@ protected: ...@@ -410,6 +413,18 @@ protected:
public: public:
IntraSearch(); IntraSearch();
//ALBERTO
IntraSearch(IntraSearch& other)
{
m_modeCtrl = new EncModeCtrlMTnoRQT();
m_modeCtrl->create(*other.m_pcEncCfg);
for (int i = 0; i < MAX_NUM_TBLOCKS; i++)
{
m_pSharedPredTransformSkip[i] = new Pel(*other.m_pSharedPredTransformSkip[i]);
//CONTINUAR CON EL RESTO DE ATRIBUTOS
}
}
//END ALBERTO
~IntraSearch(); ~IntraSearch();
void init(EncCfg *pcEncCfg, TrQuant *pcTrQuant, RdCost *pcRdCost, CABACWriter *CABACEstimator, CtxPool *ctxPool, void init(EncCfg *pcEncCfg, TrQuant *pcTrQuant, RdCost *pcRdCost, CABACWriter *CABACEstimator, CtxPool *ctxPool,
...@@ -424,6 +439,10 @@ public: ...@@ -424,6 +439,10 @@ public:
void setModeCtrl ( EncModeCtrl *modeCtrl ) { m_modeCtrl = modeCtrl; } void setModeCtrl ( EncModeCtrl *modeCtrl ) { m_modeCtrl = modeCtrl; }
//ALBERTO
EncModeCtrl* getModeCtrl () { return m_modeCtrl; }
EncCfg* getm_pcEncCfg () { return m_pcEncCfg; }
//END ALBERTO
bool getSaveCuCostInSCIPU () { return m_saveCuCostInSCIPU; } bool getSaveCuCostInSCIPU () { return m_saveCuCostInSCIPU; }
void setSaveCuCostInSCIPU ( bool b ) { m_saveCuCostInSCIPU = b; } void setSaveCuCostInSCIPU ( bool b ) { m_saveCuCostInSCIPU = b; }
void setNumCuInSCIPU ( uint8_t i ) { m_numCuInSCIPU = i; } void setNumCuInSCIPU ( uint8_t i ) { m_numCuInSCIPU = i; }
......
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