<div dir="ltr">Hello Matt,<br><div><div id="__tbSetup"></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 6, 2013 at 7:54 PM, Matt Johnson <span dir="ltr"><<a href="mailto:johnso87@illinois.edu" target="_blank">johnso87@illinois.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
The following code is in Encoder::configure():<br>
<br>
//======== set pad size if width is not multiple of the minimum CU size<br>
uint32_t maxCUDepth = (uint32_t)g_convertToBit[_<u></u>param->maxCUSize];<br>
uint32_t minCUDepth = (_param->maxCUSize >> (maxCUDepth - 1));<br>
if ((_param->sourceWidth % minCUDepth) != 0)<br>
{<br>
//pad width to multiple of minCUDepth<br>
}<br>
...<br>
if ((_param->sourceHeight % minCUDepth) != 0)<br>
{<br>
//pad height to multiple of minCUDepth<br>
}<br>
<br>
I had a couple of questions:<br>
* Should minCUDepth be renamed minCUSize?<br></blockquote><div>Yes, you have a point. It's size, not depth. <br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
* Aren't the first two lines a convoluted way of always computing "8"? x >> ((log2(x) - 2) - 1) = x / 2^(log2(x) - 3) = 8<br></blockquote><div><br></div><div>Yes, the minCUSize will always be 8, no matter what the maxCUSize is. Calls for a macro MIN_CU_SIZE.<br>
</div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
* Is there any reason for maxCUDepth or minCUSize to be set via command line or some other way instead of being implicitly computed here?<br></blockquote><div><br></div><div>The maxCUSize needs to be accessible via commandline, because it can have values 64/32/16 - thus varying maxCUDepth. Lowering the CUsize improves performance (the larger and more expensive CU sizes do not need to be analyzed, increases no. of CTURows for wpp etc). Predictably, it also lowers compression efficiency. Our fastest presets set the maximum CU size to 32 (instead of 64). minCUSize - yes, like you said earlier, it's always 8. <br>
</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Thanks,<br>
Matt<br>
______________________________<u></u>_________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org" target="_blank">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" target="_blank">https://mailman.videolan.org/<u></u>listinfo/x265-devel</a><br>
</blockquote></div><br></div></div>