<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jul 1, 2013 at 7:07 AM, <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 praveentiwari<br>
# Date 1372680448 -19800<br>
# Node ID 5766e704039448240efce7c633b1f5fd4b2d0b2e<br>
# Parent 30c0e5591120904f989953e9c74038253d607e45<br>
Removed hungarian notation and code cleanup for xDeQuant vector code<br>
<br>
diff -r 30c0e5591120 -r 5766e7040394 source/common/vec/dct.inc<br>
--- a/source/common/vec/dct.inc Sun Jun 30 00:03:01 2013 -0500<br>
+++ b/source/common/vec/dct.inc Mon Jul 01 17:37:28 2013 +0530<br>
@@ -44,72 +44,72 @@<br>
#define IF_FILTER_PREC 6 ///< Log2 of sum of filter taps<br>
#define IF_INTERNAL_OFFS (1 << (IF_INTERNAL_PREC - 1)) ///< Offset used internally<br>
<br>
-void xDeQuant(int bitDepth, const int* pSrc, int* pDes, int iWidth, int iHeight, int iPer, int iRem, bool useScalingList, unsigned int uiLog2TrSize, int *piDequantCoefOrig)<br>
+void xDeQuant(int bitDepth, const int* src, int* dst, int width, int height, int per, int rem, bool useScalingList, unsigned int log2TrSize, int *deQuantCoefOrig)<br></blockquote><div><br></div><div style>would prefer simpler "dequant" function name</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
{<br>
- const int* piQCoef = pSrc;<br>
- int* piCoef = pDes;<br>
+ const int* qCoef = src;<br>
+ int* coef = dst;<br>
<br>
int g_invQuantScales[6] = { 40, 45, 51, 57, 64, 72 };<br>
<br>
- if (iWidth > 32)<br>
+ if (width > 32)<br>
{<br>
- iWidth = 32;<br>
- iHeight = 32;<br>
+ width = 32;<br>
+ height = 32;<br>
}<br>
<br>
- int iShift, iAdd;<br>
-<br>
- int iTransformShift = 15 - bitDepth - uiLog2TrSize;<br>
-<br>
- iShift = 6 - iTransformShift;<br>
+ int shift, valueToAdd;<br>
+<br>
+ int transformShift = 15 - bitDepth - log2TrSize;<br>
+<br>
+ shift = 6 - transformShift;<br>
<br>
if (useScalingList)<br>
{<br>
- iShift += 4;<br>
- int *piDequantCoef = piDequantCoefOrig;<br>
-<br>
- if (iShift > iPer)<br>
+ shift += 4;<br>
+ int *deQuantCoef = deQuantCoefOrig;<br>
+<br>
+ if (shift > per)<br>
{<br>
- iAdd = 1 << (iShift - iPer - 1);<br>
- Vec4i IAdd(iAdd);<br>
-<br>
- for (int n = 0; n < iWidth * iHeight; n = n + 8)<br>
+ valueToAdd = 1 << (shift - per - 1);<br>
+ Vec4i IAdd(valueToAdd);<br>
+<br>
+ for (int n = 0; n < width * height; n = n + 8)<br>
{<br>
Vec4i qCoef1, qCoef2, deQuantCoef1, deQuantCoef2;<br>
<br>
- qCoef1.load(piQCoef + n);<br>
- qCoef2.load(piQCoef + n + 4);<br>
-<br>
- deQuantCoef1.load(piDequantCoef + n);<br>
- deQuantCoef2.load(piDequantCoef + n + 4);<br>
+ qCoef1.load(qCoef + n);<br>
+ qCoef2.load(qCoef + n + 4);<br>
+<br>
+ deQuantCoef1.load(deQuantCoef + n);<br>
+ deQuantCoef2.load(deQuantCoef + n + 4);<br>
<br>
Vec8s qCoef12 = compress_saturated(qCoef1, qCoef2);<br>
<br>
qCoef1 = extend_low(qCoef12);<br>
qCoef2 = extend_high(qCoef12);<br>
<br>
- qCoef1 = (qCoef1 * deQuantCoef1 + IAdd) >> (iShift - iPer);<br>
- qCoef2 = (qCoef2 * deQuantCoef2 + IAdd) >> (iShift - iPer);<br>
+ qCoef1 = (qCoef1 * deQuantCoef1 + IAdd) >> (shift - per);<br>
+ qCoef2 = (qCoef2 * deQuantCoef2 + IAdd) >> (shift - per);<br>
<br>
qCoef12 = compress_saturated(qCoef1, qCoef2);<br>
<br>
qCoef1 = extend_low(qCoef12);<br>
- qCoef1.store(piCoef + n);<br>
+ qCoef1.store(coef + n);<br>
qCoef2 = extend_high(qCoef12);<br>
- qCoef2.store(piCoef + n + 4);<br>
+ qCoef2.store(coef + n + 4);<br>
}<br>
}<br>
else<br>
{<br>
- for (int n = 0; n < iWidth * iHeight; n = n + 8)<br>
+ for (int n = 0; n < width * height; n = n + 8)<br>
{<br>
Vec4i qCoef1, qCoef2, deQuantCoef1, deQuantCoef2;<br>
<br>
- qCoef1.load(piQCoef + n);<br>
- qCoef2.load(piQCoef + n + 4);<br>
-<br>
- deQuantCoef1.load(piDequantCoef + n);<br>
- deQuantCoef2.load(piDequantCoef + n + 4);<br>
+ qCoef1.load(qCoef + n);<br>
+ qCoef2.load(qCoef + n + 4);<br>
+<br>
+ deQuantCoef1.load(deQuantCoef + n);<br>
+ deQuantCoef2.load(deQuantCoef + n + 4);<br>
<br>
Vec8s qCoef12 = compress_saturated(qCoef1, qCoef2);<br>
<br>
@@ -124,46 +124,46 @@<br>
qCoef1 = extend_low(qCoef12);<br>
qCoef2 = extend_high(qCoef12);<br>
<br>
- qCoef1 = qCoef1 << (iPer - iShift);<br>
- qCoef2 = qCoef2 << (iPer - iShift);<br>
+ qCoef1 = qCoef1 << (per - shift);<br>
+ qCoef2 = qCoef2 << (per - shift);<br>
<br>
qCoef12 = compress_saturated(qCoef1, qCoef2);<br>
<br>
qCoef1 = extend_low(qCoef12);<br>
- qCoef1.store(piCoef + n);<br>
+ qCoef1.store(coef + n);<br>
qCoef2 = extend_high(qCoef12);<br>
- qCoef2.store(piCoef + n + 4);<br>
+ qCoef2.store(coef + n + 4);<br>
}<br>
}<br>
}<br>
else<br>
{<br>
- iAdd = 1 << (iShift - 1);<br>
- int scale = g_invQuantScales[iRem] << iPer;<br>
+ valueToAdd = 1 << (shift - 1);<br>
+ int scale = g_invQuantScales[rem] << per;<br>
<br>
Vec4i Scale(scale);<br>
- Vec4i IAdd(iAdd);<br>
-<br>
- for (int n = 0; n < iWidth * iHeight; n = n + 8)<br>
+ Vec4i IAdd(valueToAdd);<br>
+<br>
+ for (int n = 0; n < width * height; n = n + 8)<br>
{<br>
Vec4i qCoef1, qCoef2;<br>
- qCoef1.load(piQCoef + n);<br>
- qCoef2.load(piQCoef + n + 4);<br>
+ qCoef1.load(qCoef + n);<br>
+ qCoef2.load(qCoef + n + 4);<br>
<br>
Vec8s qCoef12 = compress_saturated(qCoef1, qCoef2);<br>
<br>
qCoef1 = extend_low(qCoef12);<br>
qCoef2 = extend_high(qCoef12);<br>
<br>
- qCoef1 = (qCoef1 * Scale + IAdd) >> iShift;<br>
- qCoef2 = (qCoef2 * Scale + IAdd) >> iShift;<br>
+ qCoef1 = (qCoef1 * Scale + IAdd) >> shift;<br>
+ qCoef2 = (qCoef2 * Scale + IAdd) >> shift;<br>
<br>
qCoef12 = compress_saturated(qCoef1, qCoef2);<br>
<br>
qCoef1 = extend_low(qCoef12);<br>
- qCoef1.store(piCoef + n);<br>
+ qCoef1.store(coef + n);<br>
qCoef2 = extend_high(qCoef12);<br>
- qCoef2.store(piCoef + n + 4);<br>
+ qCoef2.store(coef + n + 4);<br>
}<br>
}<br>
}<br>
_______________________________________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org">x265-devel@videolan.org</a><br>
<a href="http://mailman.videolan.org/listinfo/x265-devel" target="_blank">http://mailman.videolan.org/listinfo/x265-devel</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Steve Borho
</div></div>