<div dir="ltr"><div># HG changeset patch</div><div># User Deepthi Nandakumar <<a href="mailto:deepthi@multicorewareinc.com">deepthi@multicorewareinc.com</a>></div><div># Date 1458548414 -19800</div><div>#      Mon Mar 21 13:50:14 2016 +0530</div><div># Node ID 2de6cb99313a03c3577934ac5e2e116f7ba6cd10</div><div># Parent  9799175f714e23c53607715c1d41b4cc7b1a9876</div><div>level: correct logging of warning and error messages</div><div><br></div><div>diff -r 9799175f714e -r 2de6cb99313a source/encoder/level.cpp</div><div>--- a/source/encoder/level.cpp<span class="" style="white-space:pre">      </span>Mon Mar 21 12:03:33 2016 +0530</div><div>+++ b/source/encoder/level.cpp<span class="" style="white-space:pre">       </span>Mon Mar 21 13:50:14 2016 +0530</div><div>@@ -290,7 +290,7 @@</div><div>         level++;</div><div>     if (levels[level].levelIdc != param.levelIdc)</div><div>     {</div><div>-        x265_log(&param, X265_LOG_WARNING, "specified level %d does not exist\n", param.levelIdc);</div><div>+        x265_log(&param, X265_LOG_ERROR, "specified level %d does not exist\n", param.levelIdc);</div><div>         return false;</div><div>     }</div><div> </div><div>@@ -313,24 +313,24 @@</div><div>         ok = false;</div><div>     if (!ok)</div><div>     {</div><div>-        x265_log(&param, X265_LOG_WARNING, "picture dimensions are out of range for specified level\n");</div><div>+        x265_log(&param, X265_LOG_ERROR, "picture dimensions are out of range for specified level\n");</div><div>         return false;</div><div>     }</div><div>     else if (samplesPerSec > l.maxLumaSamplesPerSecond)</div><div>     {</div><div>-        x265_log(&param, X265_LOG_WARNING, "frame rate is out of range for specified level\n");</div><div>+        x265_log(&param, X265_LOG_ERROR, "frame rate is out of range for specified level\n");</div><div>         return false;</div><div>     }</div><div> </div><div>     if ((uint32_t)param.rc.vbvMaxBitrate > (highTier ? l.maxBitrateHigh : l.maxBitrateMain))</div><div>     {</div><div>         param.rc.vbvMaxBitrate = highTier ? l.maxBitrateHigh : l.maxBitrateMain;</div><div>-        x265_log(&param, X265_LOG_INFO, "lowering VBV max bitrate to %dKbps\n", param.rc.vbvMaxBitrate);</div><div>+        x265_log(&param, X265_LOG_WARNING, "lowering VBV max bitrate to %dKbps\n", param.rc.vbvMaxBitrate);</div><div>     }</div><div>     if ((uint32_t)param.rc.vbvBufferSize > (highTier ? l.maxCpbSizeHigh : l.maxCpbSizeMain))</div><div>     {</div><div>         param.rc.vbvBufferSize = highTier ? l.maxCpbSizeHigh : l.maxCpbSizeMain;</div><div>-        x265_log(&param, X265_LOG_INFO, "lowering VBV buffer size to %dKb\n", param.rc.vbvBufferSize);</div><div>+        x265_log(&param, X265_LOG_WARNING, "lowering VBV buffer size to %dKb\n", param.rc.vbvBufferSize);</div><div>     }</div><div> </div><div>     switch (param.rc.rateControlMode)</div><div>@@ -339,12 +339,12 @@</div><div>         if ((uint32_t)param.rc.bitrate > (highTier ? l.maxBitrateHigh : l.maxBitrateMain))</div><div>         {</div><div>             param.rc.bitrate = l.maxBitrateHigh;</div><div>-            x265_log(&param, X265_LOG_INFO, "lowering target bitrate to High tier limit of %dKbps\n", param.rc.bitrate);</div><div>+            x265_log(&param, X265_LOG_WARNING, "lowering target bitrate to High tier limit of %dKbps\n", param.rc.bitrate);</div><div>         }</div><div>         break;</div><div> </div><div>     case X265_RC_CQP:</div><div>-        x265_log(&param, X265_LOG_WARNING, "Constant QP is inconsistent with specifying a decoder level, no bitrate guarantee is possible.\n");</div><div>+        x265_log(&param, X265_LOG_ERROR, "Constant QP is inconsistent with specifying a decoder level, no bitrate guarantee is possible.\n");</div><div>         return false;</div><div> </div><div>     case X265_RC_CRF:</div><div>@@ -382,13 +382,13 @@</div><div>         vps.maxDecPicBuffering = X265_MIN(MAX_NUM_REF, X265_MAX(vps.numReorderPics + 1, (uint32_t)param.maxNumReferences) + 1);</div><div>     }</div><div>     if (param.maxNumReferences != savedRefCount)</div><div>-        x265_log(&param, X265_LOG_INFO, "Lowering max references to %d to meet level requirement\n", param.maxNumReferences);</div><div>+        x265_log(&param, X265_LOG_WARNING, "Lowering max references to %d to meet level requirement\n", param.maxNumReferences);</div><div> </div><div>     /* For level 5 and higher levels, the value of CtbSizeY shall be equal to 32 or 64 */</div><div>     if (param.levelIdc >= 50 && param.maxCUSize < 32)</div><div>     {</div><div>         param.maxCUSize = 32;</div><div>-        x265_log(&param, X265_LOG_INFO, "Levels 5.0 and above require a maximum CTU size of at least 32, using --ctu 32\n");</div><div>+        x265_log(&param, X265_LOG_WARNING, "Levels 5.0 and above require a maximum CTU size of at least 32, using --ctu 32\n");</div><div>     }</div><div> </div><div>     /* The value of NumPocTotalCurr shall be less than or equal to 8 */</div><div>@@ -396,7 +396,7 @@</div><div>     if (numPocTotalCurr > 8)</div><div>     {</div><div>         param.maxNumReferences = 8 - !!param.bframes;</div><div>-        x265_log(&param, X265_LOG_INFO, "Lowering max references to %d to meet numPocTotalCurr requirement\n", param.maxNumReferences);</div><div>+        x265_log(&param, X265_LOG_WARNING, "Lowering max references to %d to meet numPocTotalCurr requirement\n", param.maxNumReferences);</div><div>     }</div><div> </div><div>     return true;</div><div><br></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div>Deepthi Nandakumar<br></div>Engineering Manager, x265<br></div>Multicoreware, Inc<br></div></div>
</div>