<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 28, 2017 at 3:36 PM, <span dir="ltr"><<a href="mailto:praveen@multicorewareinc.com" target="_blank">praveen@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 Praveen Tiwari <<a href="mailto:praveen@multicorewareinc.com">praveen@multicorewareinc.com</a>><br>
# Date 1511851222 -19800<br>
# Tue Nov 28 12:10:22 2017 +0530<br>
# Node ID d732ca2095defdbf42748327006083<wbr>befb30a89e<br>
# Parent 4d242c555d14ca8214d9da89cef41c<wbr>4418af4dca<br>
quant.cpp: use 'rdoQuant_c' primitive to optimize rdoQuant path<br>
<br>
diff -r 4d242c555d14 -r d732ca2095de source/common/quant.cpp<br>
--- a/source/common/quant.cpp Tue Nov 28 11:43:00 2017 +0530<br>
+++ b/source/common/quant.cpp Tue Nov 28 12:10:22 2017 +0530<br>
@@ -803,20 +803,14 @@<br>
<br>
if (usePsyMask)<br>
{<br>
- // TODO: we can't SIMD optimize because PSYVALUE need 64-bits multiplication, convert to Double can work faster by FMA<br>
+ // Expected to work faster by FMA SIMD<br>
+ primitives.rdoQuant(m_<wbr>resiDctCoeff, m_fencDctCoeff, costUncoded, &totalUncodedCost, &totalRdCost, psyScale, blkPos, log2TrSize);<br>
+ blkPos = codeParams.scan[scanPosBase];<br>
+<br>
for (int y = 0; y < MLS_CG_SIZE; y++)<br>
{<br>
for (int x = 0; x < MLS_CG_SIZE; x++)<br>
{<br>
- int signCoef = m_resiDctCoeff[blkPos + x]; /* pre-quantization DCT coeff */<br>
- int predictedCoef = m_fencDctCoeff[blkPos + x] - signCoef; /* predicted DCT = source DCT - residual DCT*/<br>
- costUncoded[blkPos + x] = static_cast<double>(((int64_t)<wbr>signCoef * signCoef) << scaleBits);<br>
- /* when no residual coefficient is coded, predicted coef == recon coef */<br>
- costUncoded[blkPos + x] -= PSYVALUE(predictedCoef);<br>
-<br>
- totalUncodedCost += costUncoded[blkPos + x];<br>
- totalRdCost += costUncoded[blkPos + x];<br>
-<br></blockquote><div>Is it not possible to insert the following code in primitive, so that it can be written in assembly? </div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
const uint32_t scanPosOffset = y * MLS_CG_SIZE + x;<br>
const uint32_t ctxSig = table_cnt[patternSigCtx][g_<wbr>scan4x4[codeParams.scanType][<wbr>scanPosOffset]] + ctxSigOffset;<br>
X265_CHECK(trSize > 4, "trSize check failure\n");<br>
______________________________<wbr>_________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" rel="noreferrer" target="_blank">https://mailman.videolan.org/<wbr>listinfo/x265-devel</a><br>
</blockquote></div><br></div></div>