Commit ff10c667 authored by Alberto Gonzalez's avatar Alberto Gonzalez

Commit concept fork

```--------------------------------------------------------------
Código funcionando para 4 threads
```

--------------------------------------------------------------
parent b8cc94aa
This diff is collapsed.
......@@ -320,23 +320,21 @@ private:
#endif
public:
/// copy parameters from encoder class
void init ( EncLib* pcEncLib, const SPS& sps );
//ALBERTO CONCEPT FORK
void createSharedVector();
void repartLevel();
/*void repartLevel();
int repartStart();
int repartEnd();
void initStructVectorBeforeRepartStart(int repartStartNode);
int thread1NumberOfChild(int numberOfNodesPerThread);
int thread1NumberOfChild(int numberOfNodesPerThread);*/
void initStructVector();
void updateFatherAndThreadNumbersLevel0(int posPadreActual,int thread1ChildNumber,int numberOfNodesPerThread);
void updateFatherAndThreadNumbers(int LevelLowIndex, int LevelUpIndex, int posPadreActual, int i,int LevelActualIndex,int& childCounter,int thread1ChildNumber,int& threadNumber,int numberOfNodesPerThread);
void cleanCostModeVector();
void updateFatherAndThreadNumbersLevel0(int posPadreActual);//,int thread1ChildNumber,int numberOfNodesPerThread);
void updateFatherAndThreadNumbers(int LevelLowIndex, int LevelUpIndex, int posPadreActual, int i);//,int LevelActualIndex,int& childCounter,int thread1ChildNumber,int& threadNumber,int numberOfNodesPerThread);
// END ALBERTO CONCEPT FORK
/// copy parameters from encoder class
void init ( EncLib* pcEncLib, const SPS& sps );
void setDecCuReshaperInEncCU(EncReshape* pcReshape, ChromaFormat chromaFormatIdc)
{
initDecCuReshaper((Reshape*) pcReshape, chromaFormatIdc);
......@@ -347,9 +345,10 @@ public:
/// destroy internal buffers
void destroy ();
//ALBERTO CONCEPT FORK
void compressCtuForks(CodingStructure *&tempCS, CodingStructure *&bestCS, Partitioner &partitioner);
void compressCtuForks(CodingStructure *&tempCS, CodingStructure *&bestCS, Partitioner &partitioner);
void reduceVector();
void cleanCostModeVector();
//END ALBERTO CONCEPT FORK
/// CTU analysis function
......@@ -382,12 +381,7 @@ protected:
xCheckBestMode ( CodingStructure *&tempCS, CodingStructure *&bestCS, Partitioner &pm, const EncTestMode& encTestmode );
//ALBERTO CONCEPT FORK
bool digits_below_or_equal(std::string a, std::string b);
int determinePosNodeInVectorRec(std::string posNode, std::string posSearch, int index, int counter);
int determinePosNodeInVector(std::string posNode);
int searchFirstChildEmpty(int posFather);
int searchFirstChild(int posFather);
void reduceVector();
// END ALBERTO CONCEPT FORK
void xCheckModeSplit(CodingStructure *&tempCS, CodingStructure *&bestCS, Partitioner &pm, const EncTestMode &encTestMode, const ModeType modeTypeParent, bool &skipInterPass, double *splitRdCostBest);
......
......@@ -104,10 +104,25 @@ bool EncModeCtrl::nextMode( const CodingStructure &cs, Partitioner &partitioner
}
//ALBERTO CONCEPT FORK
bool EncModeCtrl::lastModeAvailable( const CodingStructure &cs, Partitioner &partitioner )
bool EncModeCtrl::lastModeAvailable() const
{
return !m_ComprCUCtxList.empty() && !m_ComprCUCtxList.back().testModes.empty() && m_ComprCUCtxList.back().testModes.size()==1;
}
bool EncModeCtrl::vectorModeAvailable(int objetiveModeType) const
{
bool vectorModeAvailable = false;
const auto& lastElem = m_ComprCUCtxList.back();
const auto& testModes = lastElem.testModes;
for (const auto& actualMode : testModes)
{
if(actualMode.type == objetiveModeType)
{
vectorModeAvailable = true;
}
}
return vectorModeAvailable;
}
//END ALBERTO CONCEPT FORK
EncTestMode EncModeCtrl::currTestMode() const
......
......@@ -327,7 +327,8 @@ public:
bool tryModeMaster ( const EncTestMode& encTestmode, const CodingStructure &cs, Partitioner& partitioner );
bool nextMode ( const CodingStructure &cs, Partitioner &partitioner );
//ALBERTO CONCEPT FORK
bool lastModeAvailable(const CodingStructure &cs, Partitioner &partitioner);
bool lastModeAvailable() const;
bool vectorModeAvailable(int modeType) const;
//END ALBERTO CONCEPT FORK
EncTestMode currTestMode() const;
EncTestMode lastTestMode () const;
......
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