<div dir="ltr">pls ignore this patch. unnecessary files sent in the commit by mistake. Apologize. <div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Oct 23, 2013 at 3:57 PM, Aarthi Thirumalai <span dir="ltr"><<a href="mailto:aarthi@multicorewareinc.com" target="_blank">aarthi@multicorewareinc.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"># HG changeset patch<br>
# User Aarthi Thirumalai<br>
# Date 1382524030 -19800<br>
# Wed Oct 23 15:57:10 2013 +0530<br>
# Node ID a38471f17740ba5bd09edc8f9157a1a4e493d960<br>
# Parent 6d96d64c4e9a2c526b57274760a7147241328cb3<br>
slicetype: bug fix for estimated frame costs.<br>
<br>
diff -r 6d96d64c4e9a -r a38471f17740 source/encoder/ratecontrol.cpp<br>
--- a/source/encoder/ratecontrol.cpp Tue Oct 22 23:36:36 2013 +0530<br>
+++ b/source/encoder/ratecontrol.cpp Wed Oct 23 15:57:10 2013 +0530<br>
@@ -27,7 +27,7 @@<br>
#include "ratecontrol.h"<br>
#include "TLibEncoder/TEncCfg.h"<br>
#include <math.h><br>
-<br>
+extern FILE* fp, *fp1;<br>
using namespace x265;<br>
<br>
#define BASE_FRAME_DURATION 0.04<br>
@@ -121,6 +121,7 @@<br>
int cu_xy = maxCols * cu_y + cu_x;<br>
qp_adj = acEnergyCu(pic, cu_xy);<br>
pic->m_lowres.m_qpAqOffset[cu_xy] = qp_adj;<br>
+ fprintf(fp1,"\n cuxy: %d , qp : %f",cu_xy,qp_adj);<br>
}<br>
}<br>
}<br>
@@ -177,12 +178,14 @@<br>
{<br>
curSlice = pic->getSlice();<br>
sliceType = curSlice->getSliceType();<br>
-<br>
+ int actualSatdCost = 0;<br>
switch (cfg->param.rc.rateControlMode)<br>
{<br>
case X265_RC_ABR:<br>
{<br>
- lastSatd = l->getEstimatedPictureCost(pic);<br>
+ actualSatdCost = l->getEstimatedPictureCost(pic);<br>
+ lastSatd = pic->m_lowres.satdCost;<br>
+ fprintf(fp,"\n poc : %d , satdCost : %d ", curSlice->getPOC() , actualSatdCost);<br>
double q = qScale2qp(rateEstimateQscale(rce));<br>
qp = Clip3(MIN_QP, MAX_QP, (int)(q + 0.5));<br>
rce->qpaRc = q;<br>
diff -r 6d96d64c4e9a -r a38471f17740 source/encoder/slicetype.cpp<br>
--- a/source/encoder/slicetype.cpp Tue Oct 22 23:36:36 2013 +0530<br>
+++ b/source/encoder/slicetype.cpp Wed Oct 23 15:57:10 2013 +0530<br>
@@ -150,7 +150,7 @@<br>
break;<br>
case P_SLICE:<br>
d0 = poc - l0poc;<br>
- frames[0] = lastNonB;<br>
+ frames[0] = &pic->getSlice()->getRefPic(REF_PIC_LIST_0, 0)->m_lowres;<br>
frames[d0] = &pic->m_lowres;<br>
p0 = 0;<br>
p1 = d0;<br>
@@ -162,7 +162,7 @@<br>
{<br>
// L1 reference is truly in the future<br>
d1 = l1poc - poc;<br>
- frames[0] = lastNonB;<br>
+ frames[0] = &pic->getSlice()->getRefPic(REF_PIC_LIST_0, 0)->m_lowres;<br>
frames[d0] = &pic->m_lowres;<br>
frames[d0 + d1] = &pic->getSlice()->getRefPic(REF_PIC_LIST_1, 0)->m_lowres;<br>
p0 = 0;<br>
@@ -171,7 +171,7 @@<br>
}<br>
else<br>
{<br>
- frames[0] = lastNonB;<br>
+ frames[0] = &pic->getSlice()->getRefPic(REF_PIC_LIST_0, 0)->m_lowres;<br>
frames[d0] = &pic->m_lowres;<br>
p0 = 0;<br>
p1 = d0;<br>
diff -r 6d96d64c4e9a -r a38471f17740 source/x265.cpp<br>
--- a/source/x265.cpp Tue Oct 22 23:36:36 2013 +0530<br>
+++ b/source/x265.cpp Wed Oct 23 15:57:10 2013 +0530<br>
@@ -160,7 +160,7 @@<br>
FILE* fp = NULL;<br>
FILE * fp1 = NULL;<br>
#endif<br>
-<br>
+FILE* fp, *fp1 , *fp2;<br>
/* Ctrl-C handler */<br>
static volatile sig_atomic_t b_ctrl_c /* = 0 */;<br>
static void sigint_handler(int)<br>
@@ -636,7 +636,9 @@<br>
fp = fopen("Log_CU_stats.txt", "w");<br>
fp1 = fopen("LOG_CU_COST.txt", "w");<br>
#endif<br>
-<br>
+ fp = fopen("SatdCosts.txt","w");<br>
+ fp1 = fopen ("qpAqOffsets.txt","w");<br>
+ fp2 = fopen("qpCheck.txt","w");<br>
x265_param_t param;<br>
CLIOptions cliopt;<br>
<br>
</blockquote></div><br></div>