[x265] [PATCH] cli: remove redundant variables from intra and inter analysis structure
gopu at multicorewareinc.com
gopu at multicorewareinc.com
Tue Nov 11 07:24:31 CET 2014
# HG changeset patch
# User Gopu Govindaswamy <gopu at multicorewareinc.com>
# Date 1415686884 -19800
# Tue Nov 11 11:51:24 2014 +0530
# Node ID 64b80aa95091ddcc95df1790dc72a4786d68e125
# Parent ae9d1d48303b3e1e7fbc1ce1fe480f318654378d
cli: remove redundant variables from intra and inter analysis structure
diff -r ae9d1d48303b -r 64b80aa95091 source/encoder/analysis.cpp
--- a/source/encoder/analysis.cpp Tue Nov 11 11:27:02 2014 +0530
+++ b/source/encoder/analysis.cpp Tue Nov 11 11:51:24 2014 +0530
@@ -142,8 +142,6 @@
memcpy(&m_frame->m_intraData->depth[ctu.m_cuAddr * numPartition], bestCU->m_cuDepth, sizeof(uint8_t) * numPartition);
memcpy(&m_frame->m_intraData->modes[ctu.m_cuAddr * numPartition], bestCU->m_lumaIntraDir, sizeof(uint8_t) * numPartition);
memcpy(&m_frame->m_intraData->partSizes[ctu.m_cuAddr * numPartition], bestCU->m_partSize, sizeof(uint8_t) * numPartition);
- m_frame->m_intraData->cuAddr[ctu.m_cuAddr] = ctu.m_cuAddr;
- m_frame->m_intraData->poc[ctu.m_cuAddr] = m_frame->m_poc;
}
}
}
diff -r ae9d1d48303b -r 64b80aa95091 source/encoder/api.cpp
--- a/source/encoder/api.cpp Tue Nov 11 11:27:02 2014 +0530
+++ b/source/encoder/api.cpp Tue Nov 11 11:51:24 2014 +0530
@@ -218,16 +218,12 @@
{
CHECKED_MALLOC(pic->analysisData.interData, x265_inter_data, pic->analysisData.numCUsInFrame * X265_MAX_PRED_MODE_PER_CU);
CHECKED_MALLOC(pic->analysisData.intraData, x265_intra_data, 1);
- pic->analysisData.intraData->cuAddr = NULL;
pic->analysisData.intraData->depth = NULL;
pic->analysisData.intraData->modes = NULL;
pic->analysisData.intraData->partSizes = NULL;
- pic->analysisData.intraData->poc = NULL;
CHECKED_MALLOC(pic->analysisData.intraData->depth, uint8_t, pic->analysisData.numPartitions * pic->analysisData.numCUsInFrame);
CHECKED_MALLOC(pic->analysisData.intraData->modes, uint8_t, pic->analysisData.numPartitions * pic->analysisData.numCUsInFrame);
CHECKED_MALLOC(pic->analysisData.intraData->partSizes, char, pic->analysisData.numPartitions * pic->analysisData.numCUsInFrame);
- CHECKED_MALLOC(pic->analysisData.intraData->cuAddr, uint32_t, pic->analysisData.numCUsInFrame);
- CHECKED_MALLOC(pic->analysisData.intraData->poc, int, pic->analysisData.numCUsInFrame);
return 0;
fail:
@@ -242,8 +238,6 @@
X265_FREE(pic->analysisData.intraData->depth);
X265_FREE(pic->analysisData.intraData->modes);
X265_FREE(pic->analysisData.intraData->partSizes);
- X265_FREE(pic->analysisData.intraData->cuAddr);
- X265_FREE(pic->analysisData.intraData->poc);
X265_FREE(pic->analysisData.intraData);
pic->analysisData.intraData = NULL;
}
diff -r ae9d1d48303b -r 64b80aa95091 source/x265.cpp
--- a/source/x265.cpp Tue Nov 11 11:27:02 2014 +0530
+++ b/source/x265.cpp Tue Nov 11 11:51:24 2014 +0530
@@ -891,10 +891,6 @@
sizeof(uint8_t), pic->analysisData.numPartitions * pic->analysisData.numCUsInFrame, this->analysisFile);
fread(pic->analysisData.intraData->partSizes,
sizeof(char), pic->analysisData.numPartitions * pic->analysisData.numCUsInFrame, this->analysisFile);
- fread(pic->analysisData.intraData->poc,
- sizeof(int), pic->analysisData.numCUsInFrame, this->analysisFile);
- fread(pic->analysisData.intraData->cuAddr,
- sizeof(uint32_t), pic->analysisData.numCUsInFrame, this->analysisFile);
fread(pic->analysisData.interData, sizeof(x265_inter_data), pic->analysisData.numCUsInFrame * (X265_MAX_PRED_MODE_PER_CU), this->analysisFile);
}
@@ -915,8 +911,6 @@
sizeof(uint8_t), pic->analysisData.numPartitions * pic->analysisData.numCUsInFrame, this->analysisFile);
fwrite(pic->analysisData.intraData->partSizes,
sizeof(char), pic->analysisData.numPartitions * pic->analysisData.numCUsInFrame, this->analysisFile);
- fwrite(pic->analysisData.intraData->poc, sizeof(int), pic->analysisData.numCUsInFrame, this->analysisFile);
- fwrite(pic->analysisData.intraData->cuAddr, sizeof(uint32_t), pic->analysisData.numCUsInFrame, this->analysisFile);
fwrite(pic->analysisData.interData, sizeof(x265_inter_data), pic->analysisData.numCUsInFrame * X265_MAX_PRED_MODE_PER_CU, this->analysisFile);
}
@@ -1031,7 +1025,7 @@
uint32_t numPart = pic_in->analysisData.numPartitions;
cliopt.analysisRecordSize = ((sizeof(int) * 4 + sizeof(uint32_t) * 2) + sizeof(x265_inter_data) * numCU * X265_MAX_PRED_MODE_PER_CU +
- sizeof(uint8_t) * 2 * numPart * numCU + sizeof(char) * numPart * numCU + sizeof(int) * numCU + sizeof(uint32_t) * numCU);
+ sizeof(uint8_t) * 2 * numPart * numCU + sizeof(char) * numPart * numCU);
fprintf(cliopt.analysisFile, "#options: %s\n", p);
cliopt.analysisHeaderSize = ftell(cliopt.analysisFile);
diff -r ae9d1d48303b -r 64b80aa95091 source/x265.h
--- a/source/x265.h Tue Nov 11 11:27:02 2014 +0530
+++ b/source/x265.h Tue Nov 11 11:51:24 2014 +0530
@@ -97,8 +97,6 @@
int16_t mvx[2];
int16_t mvy[2];
uint32_t depth;
- int poc;
- uint32_t cuAddr;
} x265_inter_data;
/* Stores intra (motion estimation) analysis data for a single frame */
@@ -107,8 +105,6 @@
uint8_t* depth;
uint8_t* modes;
char* partSizes;
- int* poc;
- uint32_t* cuAddr;
} x265_intra_data;
/* Stores all analysis data for a single frame */
More information about the x265-devel
mailing list