Add the following code in EncCU.cpp at the end of compressCTU function
string filename = to_string(ctuindex);
ofstream myfile;
myfile.open("./CTU_" + filename + ".txt");
for (auto &currCU : cs.traverseCUs(area, CH_L))
{
const CompArea& lumaArea = currCU.block(COMPONENT_Y);
int cuX = lumaArea.x;
int cuY = lumaArea.y;
int cuH = lumaArea.height;
int cuW = lumaArea.width;
string info = "";
info = to_string(cuX) + " " + to_string(cuY) + " " + to_string(cuH) +" "+ to_string(cuW) +"\n";
myfile << info;
}
myfile.close();
ofstream TUmyfile;
TUmyfile.open("./TU_" + filename + ".txt");
for (auto &currCU : cs.traverseCUs(area, CH_L))
{
for (auto &currTU : CU::traverseTUs(currCU))
{
const CompArea& lumaArea = currTU.block(COMPONENT_Y);
int cuX = lumaArea.x;
int cuY = lumaArea.y;
int cuH = lumaArea.height;
int cuW = lumaArea.width;
int mtsidx = currTU.mtsIdx;
string info = "";
info = to_string(cuX) + " " + to_string(cuY) + " " + to_string(cuH) + " " + to_string(cuW) + " " + to_string(mtsidx) + "\n";
TUmyfile << info;
}
}
TUmyfile.close();