<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Oct 9, 2013 at 9:12 AM, Praveen Tiwari <span dir="ltr"><<a href="mailto:praveen@multicorewareinc.com" target="_blank">praveen@multicorewareinc.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Steve,  I have added partition based call for all size s of chroma function can you tell whether it is right direction, if it so I will replace the luma functions similarly. I have few question about approach about combining functions as you said,<div>

<div>[12:29:36 PM] Steve Borho: if YFrac is 0, it would just do lumaH_pp.  If XFrac is 0, it would just do lumaV_pp.  else it does src -> lumaH_ps -> temp -> lumaV_sp -> dst </div><div><br></div><div>Does YFrac and XFrac are template parameters? I think we need to combine both functions C codes in a single function and pass an extra buffer temp as an argument, further we have to modify intrinsic and asm code too?</div>
</div></div></blockquote><div><br></div><div>Not a template parameter, but the coeffIdx function argument </div><div><br></div><div>In HEVC, 8bpp motion compensation works essentially like this for both luma and chroma:</div>
<div><br></div><div><font face="courier new, monospace">int xFrac = mv.x & 3;</font></div><div><font face="courier new, monospace">int yFrac = mv.y & 3;</font></div><div><font face="courier new, monospace">if (weighted)</font></div>
<div><font face="courier new, monospace">{</font></div><div><font face="courier new, monospace">   if (xFrac == 0 && yFrac == 0)</font></div><div><font face="courier new, monospace">       weight pixels from 8bpp to 8bpp</font></div>
<div><font face="courier new, monospace">   else if (xFrac == 0)</font></div><div><font face="courier new, monospace">       filter V 8bpp to </font><span style="font-family:'courier new',monospace">16bpp</span><font face="courier new, monospace"> intermediate</font></div>
<div><font face="courier new, monospace">       weight </font><span style="font-family:'courier new',monospace">16bpp</span><font face="courier new, monospace">, round+shift to 8bpp</font></div><div><font face="courier new, monospace">   else if (yFrac == 0)</font></div>
<div><div><font face="courier new, monospace">       filter H 8bpp to </font><span style="font-family:'courier new',monospace">16bpp</span><font face="courier new, monospace"> intermediate</font></div><div><font face="courier new, monospace">       weight </font><span style="font-family:'courier new',monospace">16bpp</span><font face="courier new, monospace">, round+shift to 8bpp</font></div>
</div><div><font face="courier new, monospace">   else</font></div><div><div><font face="courier new, monospace">       filter H 8bpp to </font><span style="font-family:'courier new',monospace">16bpp</span><font face="courier new, monospace">A</font></div>
</div><div><div><font face="courier new, monospace">       filter V 16bppA to </font><span style="font-family:'courier new',monospace">16bpp</span><font face="courier new, monospace">B</font></div></div><div><div>
<font face="courier new, monospace">       weight </font><span style="font-family:'courier new',monospace">16bpp</span><font face="courier new, monospace">B, round+shift to 8bpp</font></div></div><div><font face="courier new, monospace">   end</font></div>
<div><font face="courier new, monospace">}</font></div><div><font face="courier new, monospace">else</font></div><div><font face="courier new, monospace">{</font></div><div><div><font face="courier new, monospace">   if (xFrac == 0 && yFrac == 0)</font></div>
<div><font face="courier new, monospace">       fpel - nothing to do</font></div><div><font face="courier new, monospace">   else if (xFrac == 0)</font></div><div><font face="courier new, monospace">       filter V 8bpp to 8bpp</font></div>
<div><font face="courier new, monospace">   else if (yFrac == 0)<br></font></div><div><div><font face="courier new, monospace">       filter H 8bpp to 8bpp  *</font></div><div><font face="courier new, monospace">   else<br>
</font></div></div><div><font face="courier new, monospace">       filter H 8bpp to 16bpp</font></div><div><font face="courier new, monospace">       filter V 16bpp to 8bpp</font></div><div><font face="courier new, monospace">   end</font></div>
</div><div><font face="courier new, monospace">}</font></div><div><br></div><div>The one with the * is the function you're working on now.  Seeing that we need a primitive which interpolates from 8bpp to int16 for weighted prediction also, I think we should implement them as separate functions first.</div>
<div><br></div><div>You should keep the above in mind when writing these assembly routines, there should be gobs of re-use possible if you parameterize the macros the right way (are inputs 8bpp or 16bpp; are outputs 8bpp or 16bpp)</div>
</div></div></div>