Commit 21940d83 authored by Alberto Gonzalez's avatar Alberto Gonzalez

Commit 4

```-------------------------------------------------------------
EncSlice se ha llamado al constructor de EncCu para crear un nuevo objeto antes y después de llamar a compressCtu (líneas 1897-1903)
```

---------------------------------------------------------------
Secundariamente:
- Añadido atributo InstraSearch
- Definido constructor de copia de ModeInfo
- Definido constructor de copia de ISPTestedModeInfo
- Definido constructor de copia de EncModeCtrlMTnoRQT
- Definido constructor de copia de IntraSearch
- Continuar definición constructor de copia de InterSearch
------------------------------------------------------------
CONTINUAR CON ATRIBUTOS DE EncCU en la línea marcada con el comentario ///////////CONTINUAR////////////
REVISAR CONSTRUCTOR DE INTRASEARCH PARA ASEGURAR EXCLUSIÓN ENTRE LOS ATRIBUTOS
---------------------------------------------------------------
Hasta este punto el encoder funciona con una media de 115 segundos por cada ejecucción
---------------------------------------------------------------
IMPORTANTE: IntraSearch/InterSearch hace uso del mismo atributo EncModeCtrl (Se ha comprobado que la dirección en el objeto original y los atributos es la misma). Para ello se han creado nuevos constructores de copia que reciben como argumento ese puntero también.
parent 8a1114b7
......@@ -69,7 +69,8 @@ const MergeIdxPair EncCu::m_geoModeTest[GEO_MAX_NUM_CANDS] = {
EncCu::EncCu() {}
// ALBERTO
EncCu::EncCu(const EncCu& other) : DecCu(other), m_ibcHashMap(other.m_ibcHashMap), m_geoCostList(other.m_geoCostList), m_comboList(other.m_comboList)
EncCu::EncCu(const EncCu& other) : DecCu(other), m_unitPool(other.m_unitPool), m_pelUnitBufPool(other.m_pelUnitBufPool), m_ibcHashMap(other.m_ibcHashMap), m_geoCostList(other.m_geoCostList), m_comboList(other.m_comboList)
//ATENCION : M_MODE_CRTL SE CREA MUCHAS VECES, PERO EN EL OBJETO ORIGINAL SE CREA UNA VEZ Y SE COMPARTE LA DIRECCIN
#if JVET_AC0139_UNIFIED_MERGE
,m_mergeItemList(m_mergeItemList)
///////////CONTINUAR////////////
......@@ -80,8 +81,6 @@ EncCu::EncCu(const EncCu& other) : DecCu(other), m_ibcHashMap(other.m_ibcHashMap
m_CurrCtx = other.m_CurrCtx ? new CtxPair(*other.m_CurrCtx) : nullptr;
m_ctxPool = other.m_ctxPool ? new CtxPool(*other.m_ctxPool) : nullptr;
m_cuChromaQpOffsetIdxPlus1 = other.m_cuChromaQpOffsetIdxPlus1;
m_unitPool = XuPool(other.m_unitPool);
m_pelUnitBufPool = PelUnitBufPool(other.m_pelUnitBufPool);
m_pTempCS = new CodingStructure**(*other.m_pTempCS);
*m_pTempCS = new CodingStructure*();
......@@ -101,9 +100,11 @@ EncCu::EncCu(const EncCu& other) : DecCu(other), m_ibcHashMap(other.m_ibcHashMap
m_pcEncCfg = other.m_pcEncCfg ? new EncCfg(*other.m_pcEncCfg) : nullptr;
m_pcIntraSearch = other.m_pcIntraSearch ? new IntraSearch(*other.m_pcIntraSearch) : nullptr;
m_modeCtrl = other.m_modeCtrl ? new EncModeCtrlMTnoRQT(*(dynamic_cast<EncModeCtrlMTnoRQT*>(other.m_modeCtrl))) : nullptr; //REVISAR M_MODE_CTRL COMPLETO ANTES DE CONTINUAR/////////////////////////////////////////////////////////////////
m_pcIntraSearch = other.m_pcIntraSearch && other.m_modeCtrl ? new IntraSearch(*other.m_pcIntraSearch,other.m_modeCtrl) : nullptr;
m_pcInterSearch = other.m_pcInterSearch ? new InterSearch(*other.m_pcInterSearch) : nullptr;
m_pcInterSearch = other.m_pcInterSearch && other.m_modeCtrl ? new InterSearch(*other.m_pcInterSearch,other.m_modeCtrl) : nullptr;
m_pcTrQuant = other.m_pcTrQuant ? new TrQuant(*other.m_pcTrQuant) : nullptr;
......@@ -117,7 +118,7 @@ EncCu::EncCu(const EncCu& other) : DecCu(other), m_ibcHashMap(other.m_ibcHashMap
m_pcRateCtrl = other.m_pcRateCtrl ? new RateCtrl(*other.m_pcRateCtrl) : nullptr;
m_modeCtrl = other.m_modeCtrl ? new EncModeCtrlMTnoRQT(*(dynamic_cast<EncModeCtrlMTnoRQT*>(other.m_modeCtrl))) : nullptr; //REVISAR M_MODE_CTRL COMPLETO ANTES DE CONTINUAR/////////////////////////////////////////////////////////////////
#if !JVET_AC0139_UNIFIED_MERGE
std::array<PelStorage, GEO_MAX_TRY_WEIGHTED_SAD> m_geoWeightedBuffers; // weighted prediction pixels
for (int i = 0; i < m_geoWeightedBuffers.size(); i++)
......
......@@ -120,48 +120,9 @@ InterSearch::InterSearch()
m_histBestMtsIdx = MtsType::NONE;
}
InterSearch::InterSearch(const InterSearch& other) : InterPrediction(other), AffineGradientSearch(other)
InterSearch::InterSearch(const InterSearch& other, EncModeCtrl* otherModeCtrl) : InterPrediction(other), AffineGradientSearch(other)
{
if (other.m_modeCtrl && other.m_modeCtrl->getEncCfg())
{
m_modeCtrl = new EncModeCtrlMTnoRQT();
m_modeCtrl->create(*other.m_modeCtrl->getEncCfg());
/*EncModeCtrl(const EncModeCtrl& other)
{
m_pcEncCfg = other.m_pcEncCfg ? new EncCfg(*other.m_pcEncCfg) : nullptr;
m_pcRateCtrl = other.m_pcRateCtrl ? new class RateCtrl(*other.m_pcRateCtrl) : nullptr;
m_pcRdCost = other.m_pcRdCost ? new RdCost(*other.m_pcRdCost) : nullptr;
m_slice = other.m_slice ? new Slice(*other.m_slice) : nullptr;
for (int i = 0; i < LUMA_LEVEL_TO_DQP_LUT_MAXSIZE; i++)
{
m_lumaLevelToDeltaQPLUT[i] = other.m_lumaLevelToDeltaQPLUT[i];
}
m_lumaQPOffset = other.m_lumaQPOffset;
m_bimQPMap = new std::map<int, int*>;
*m_bimQPMap = *other.m_bimQPMap;
for (auto& pair: *m_bimQPMap)
{
int* value = pair.second;
int* copy = new int(*value);
pair.second = copy;
}
m_fastDeltaQP = other.m_fastDeltaQP;
m_ComprCUCtxList = other.m_ComprCUCtxList;
m_pcInterSearch = other.m_pcInterSearch ? new InterSearch(*other.m_pcInterSearch) : nullptr;
m_doPlt = other.m_doPlt;
}*/
}
else
{
m_modeCtrl = nullptr;
}
//? new EncModeCtrlMTnoRQT(*static_cast<EncModeCtrlMTnoRQT*>(other.m_modeCtrl)) : nullptr; // CONTINUAR/////////////////////////////////////////////////////////////////
m_modeCtrl = otherModeCtrl;// CONTINUAR/////////////////////////////////////////////////////////////////
for (int i = 0; i < NUM_REF_PIC_LIST_01; i++)
{
m_tmpPredStorage[i].createFromBuf(other.m_tmpPredStorage[i]);
......
......@@ -195,7 +195,7 @@ protected:
public:
InterSearch();
//ALBERTO
InterSearch(const InterSearch& other);
InterSearch(const InterSearch& other, EncModeCtrl* otherModeCtrl);
//END ALBERTO
virtual ~InterSearch();
......
......@@ -416,10 +416,9 @@ protected:
double m_stateCostRDOQ [2][NUM_TRELLIS_STATE];
public:
//ALBERTO
IntraSearch(const IntraSearch& other) : IntraPrediction(other)
IntraSearch(const IntraSearch& other, EncModeCtrl* otherModeCtrl) : IntraPrediction(other)
{
EncModeCtrlMTnoRQT* pointer = (dynamic_cast<EncModeCtrlMTnoRQT*>(other.m_modeCtrl));
m_modeCtrl = other.m_modeCtrl ? new EncModeCtrlMTnoRQT(*pointer) : nullptr; //REVISAR M_MODE_CTRL COMPLETO ANTES DE CONTINUAR/////////////////////////////////////////////////////////////////
m_modeCtrl = otherModeCtrl; // REVISAR M_MODE_CTRL COMPLETO ANTES DE CONTINUAR/////////////////////////////////////////////////////////////////
for (int i = 0; i < MAX_NUM_TBLOCKS; i++)
{
m_pSharedPredTransformSkip[i] = other.m_pSharedPredTransformSkip[i] ? new Pel(*other.m_pSharedPredTransformSkip[i]) : nullptr;
......
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