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;
struct PelStorage : public PelUnitBuf
{
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();
void swap( PelStorage& other );
......
......@@ -103,6 +103,8 @@ private:
// clang-format on
{
}
};
IntraPredParam m_ipaParam;
......@@ -116,7 +118,7 @@ protected:
int m_topRefLength;
int m_leftRefLength;
ScanElement* m_scanOrder;
ScanElement* m_scanOrder = nullptr;
bool m_bestScanRotationMode;
// prediction
void xPredIntraPlanar ( const CPelBuf &pSrc, PelBuf &pDst );
......@@ -145,6 +147,56 @@ protected:
public:
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();
void init (ChromaFormat chromaFormatIDC, const unsigned bitDepthY);
......
......@@ -6148,12 +6148,11 @@ EncCu EncCu::copy(EncCu& original)
*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;
//IntraSearch* m_pcIntraSearchCopy = new IntraSearch(*original.m_pcIntraSearch);
//copy.m_pcIntraSearch = m_pcIntraSearchCopy;
copy.m_pcEncCfg = new EncCfg(*original.m_pcEncCfg);
copy.m_pcIntraSearch = new IntraSearch(*original.m_pcIntraSearch); //<-CONTINUAR CON EL RESTO DE ATRIBUTOS Y HACER UN CONSTRUCTOR DE COPIA DE INTRAPREDICTION
bool debbug_stop = true;
//InterSearch* m_pcInterSearchCopy = new InterSearch(*original.m_pcInterSearch);
//copy.m_pcInterSearch = m_pcInterSearchCopy;
......
......@@ -911,7 +911,6 @@ class EncModeCtrlMTnoRQT : public EncModeCtrl, public CacheBlkInfoCtrl
#endif
public:
virtual void create ( const EncCfg& cfg );
virtual void destroy ();
virtual void initCTUEncoding ( const Slice &slice );
......
......@@ -48,6 +48,9 @@
#include "CommonLib/Unit.h"
#include "CommonLib/RdCost.h"
#include "EncReshape.h"
//ALBERTO
#include "EncModeCtrl.h"
//END ALBERTO
//! \ingroup EncoderLib
//! \{
......@@ -195,13 +198,13 @@ private:
XuPool m_unitPool;
CodingStructure ****m_pSplitCS;
CodingStructure ****m_pFullCS;
CodingStructure ****m_pSplitCS = nullptr;
CodingStructure ****m_pFullCS = nullptr;
CodingStructure ***m_pTempCS;
CodingStructure ***m_pBestCS;
CodingStructure ***m_pTempCS = nullptr;
CodingStructure ***m_pBestCS = nullptr;
CodingStructure **m_pSaveCS;
CodingStructure **m_pSaveCS = nullptr;
bool m_saveCuCostInSCIPU;
uint8_t m_numCuInSCIPU;
......@@ -410,6 +413,18 @@ protected:
public:
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();
void init(EncCfg *pcEncCfg, TrQuant *pcTrQuant, RdCost *pcRdCost, CABACWriter *CABACEstimator, CtxPool *ctxPool,
......@@ -423,7 +438,11 @@ public:
CodingStructure **getSaveCSBuf () { return m_pSaveCS; }
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; }
void setSaveCuCostInSCIPU ( bool b ) { m_saveCuCostInSCIPU = b; }
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