<div dir="ltr">Thanks, pushed.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 24, 2014 at 12:53 PM, <span dir="ltr"><<a href="mailto:ashok@multicorewareinc.com" target="_blank">ashok@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 Ashok Kumar Mishra<<a href="mailto:ashok@multicorewareinc.com">ashok@multicorewareinc.com</a>><br>
# Date 1419404487 -19800<br>
# Wed Dec 24 12:31:27 2014 +0530<br>
# Node ID 1bf769c6953d7c4f660d26a8618083ac1c0885e5<br>
# Parent 5f9f7194267b76f733e9ffb0f9e8b474dfe89a71<br>
entropy: inline codeTransformSkipFlags()<br>
<br>
diff -r 5f9f7194267b -r 1bf769c6953d source/encoder/entropy.cpp<br>
--- a/source/encoder/entropy.cpp Tue Dec 23 17:40:53 2014 +0900<br>
+++ b/source/encoder/entropy.cpp Wed Dec 24 12:31:27 2014 +0530<br>
@@ -1407,17 +1407,6 @@<br>
encodeBin(cu.getCbf(absPartIdx, ttype, lowestTUDepth), m_contextState[OFF_QT_CBF_CTX + ctx]);<br>
}<br>
<br>
-void Entropy::codeTransformSkipFlags(const CUData& cu, uint32_t absPartIdx, uint32_t trSize, TextType ttype)<br>
-{<br>
- if (cu.m_tqBypass[absPartIdx])<br>
- return;<br>
- if (trSize != 4)<br>
- return;<br>
-<br>
- uint32_t useTransformSkip = cu.m_transformSkip[ttype][absPartIdx];<br>
- encodeBin(useTransformSkip, m_contextState[OFF_TRANSFORMSKIP_FLAG_CTX + (ttype ? NUM_TRANSFORMSKIP_FLAG_CTX : 0)]);<br>
-}<br>
-<br>
/** Encode (X,Y) position of the last significant coefficient<br>
* \param posx X component of last coefficient<br>
* \param posy Y component of last coefficient<br>
@@ -1473,17 +1462,18 @@<br>
void Entropy::codeCoeffNxN(const CUData& cu, const coeff_t* coeff, uint32_t absPartIdx, uint32_t log2TrSize, TextType ttype)<br>
{<br>
uint32_t trSize = 1 << log2TrSize;<br>
+ uint32_t tqBypass = cu.m_tqBypass[absPartIdx];<br>
<br>
// compute number of significant coefficients<br>
uint32_t numSig = primitives.count_nonzero(coeff, (1 << (log2TrSize << 1)));<br>
<br>
X265_CHECK(numSig > 0, "cbf check fail\n");<br>
<br>
- bool bHideFirstSign = cu.m_slice->m_pps->bSignHideEnabled && !cu.m_tqBypass[absPartIdx];<br>
+ bool bHideFirstSign = cu.m_slice->m_pps->bSignHideEnabled && !tqBypass;<br>
<br>
- if (cu.m_slice->m_pps->bTransformSkipEnabled)<br>
- codeTransformSkipFlags(cu, absPartIdx, trSize, ttype);<br>
-<br>
+ if (cu.m_slice->m_pps->bTransformSkipEnabled && !tqBypass && (trSize == 4))<br>
+ codeTransformSkipFlags(cu.m_transformSkip[ttype][absPartIdx], ttype);<br>
+<br>
bool bIsLuma = ttype == TEXT_LUMA;<br>
<br>
// select scans<br>
diff -r 5f9f7194267b -r 1bf769c6953d source/encoder/entropy.h<br>
--- a/source/encoder/entropy.h Tue Dec 23 17:40:53 2014 +0900<br>
+++ b/source/encoder/entropy.h Wed Dec 24 12:31:27 2014 +0530<br>
@@ -179,6 +179,7 @@<br>
inline void codeQtCbfLuma(uint32_t cbf, uint32_t tuDepth) { encodeBin(cbf, m_contextState[OFF_QT_CBF_CTX + !tuDepth]); }<br>
inline void codeQtCbfChroma(uint32_t cbf, uint32_t tuDepth) { encodeBin(cbf, m_contextState[OFF_QT_CBF_CTX + 2 + tuDepth]); }<br>
inline void codeQtRootCbf(uint32_t cbf) { encodeBin(cbf, m_contextState[OFF_QT_ROOT_CBF_CTX]); }<br>
+ inline void codeTransformSkipFlags(uint32_t transformSkip, TextType ttype) { encodeBin(transformSkip, m_contextState[OFF_TRANSFORMSKIP_FLAG_CTX + (ttype ? NUM_TRANSFORMSKIP_FLAG_CTX : 0)]); }<br>
<br>
void codeSaoOffset(const SaoCtuParam& ctuParam, int plane);<br>
<br>
@@ -244,7 +245,6 @@<br>
<br>
void codeDeltaQP(const CUData& cu, uint32_t absPartIdx);<br>
void codeLastSignificantXY(uint32_t posx, uint32_t posy, uint32_t log2TrSize, bool bIsLuma, uint32_t scanIdx);<br>
- void codeTransformSkipFlags(const CUData& cu, uint32_t absPartIdx, uint32_t trSize, TextType ttype);<br>
<br>
void encodeTransform(const CUData& cu, uint32_t absPartIdx, uint32_t tuDepth, uint32_t log2TrSize,<br>
bool& bCodeDQP, const uint32_t depthRange[2]);<br>
_______________________________________________<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" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a><br>
</blockquote></div><br></div>