[x265] [PATCH 3 of 4] lowres: Add states to store weighted Aq costs per frame
aarthi at multicorewareinc.com
aarthi at multicorewareinc.com
Mon Oct 21 19:35:54 CEST 2013
# HG changeset patch
# User Aarthi Thirumalai<aarthi at multicorewareinc.com>
# Date 1382375915 -19800
# Mon Oct 21 22:48:35 2013 +0530
# Node ID 40c3771b3b15a68cda4f59f7f9a36f41d0733520
# Parent c7c0e7e85437aca8595dbc53432fd66ae85ac4a8
lowres: Add states to store weighted Aq costs per frame.
diff -r c7c0e7e85437 -r 40c3771b3b15 source/common/lowres.cpp
--- a/source/common/lowres.cpp Mon Oct 21 22:36:03 2013 +0530
+++ b/source/common/lowres.cpp Mon Oct 21 22:48:35 2013 +0530
@@ -122,7 +122,12 @@
sliceType = type;
frameNum = poc;
leadingBframes = 0;
+ satdCost = 0;
memset(costEst, -1, sizeof(costEst));
+
+ if (m_qpAqOffset)
+ memset(costEstAq, -1, sizeof(costEstAq));
+
for (int y = 0; y < bframes + 2; y++)
{
for (int x = 0; x < bframes + 2; x++)
diff -r c7c0e7e85437 -r 40c3771b3b15 source/common/lowres.h
--- a/source/common/lowres.h Mon Oct 21 22:36:03 2013 +0530
+++ b/source/common/lowres.h Mon Oct 21 22:48:35 2013 +0530
@@ -50,9 +50,11 @@
/* lookahead output data */
int costEst[X265_BFRAME_MAX + 2][X265_BFRAME_MAX + 2];
+ int costEstAq[X265_BFRAME_MAX + 2][X265_BFRAME_MAX + 2];
int *rowSatds[X265_BFRAME_MAX + 2][X265_BFRAME_MAX + 2];
int intraMbs[X265_BFRAME_MAX + 2];
int *intraCost;
+ int satdCost;
uint16_t(*lowresCosts[X265_BFRAME_MAX + 2][X265_BFRAME_MAX + 2]);
int *lowresMvCosts[2][X265_BFRAME_MAX + 1];
MV *lowresMvs[2][X265_BFRAME_MAX + 1];
diff -r c7c0e7e85437 -r 40c3771b3b15 source/encoder/slicetype.cpp
--- a/source/encoder/slicetype.cpp Mon Oct 21 22:36:03 2013 +0530
+++ b/source/encoder/slicetype.cpp Mon Oct 21 22:48:35 2013 +0530
@@ -257,7 +257,9 @@
void LookaheadRow::init()
{
costEst = 0;
+ costEstAq = 0;
costIntra = 0;
+ costIntraAq = 0;
intraMbs = 0;
active = false;
completed = 0;
diff -r c7c0e7e85437 -r 40c3771b3b15 source/encoder/slicetype.h
--- a/source/encoder/slicetype.h Mon Oct 21 22:36:03 2013 +0530
+++ b/source/encoder/slicetype.h Mon Oct 21 22:48:35 2013 +0530
@@ -43,7 +43,9 @@
pixel* predictions; // buffer for 35 intra predictions
MotionEstimate me;
int costEst; // Estimated cost for all CUs in a row
+ int costEstAq; // Estimated weight Aq cost for all CUs in a row
int costIntra; // Estimated Intra cost for all CUs in a row
+ int costIntraAq; // Estimated weighted Aq Intra cost for all CUs in a row
int intraMbs; // Number of Intra CUs
Lowres** frames;
More information about the x265-devel
mailing list