[x265] [PATCH REVIEW Only ] Chroma function, partion based call

Steve Borho steve at borho.org
Wed Oct 9 20:20:52 CEST 2013


On Wed, Oct 9, 2013 at 9:12 AM, Praveen Tiwari <praveen at multicorewareinc.com
> wrote:

> 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,
> [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
>
> 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?
>

Not a template parameter, but the coeffIdx function argument

In HEVC, 8bpp motion compensation works essentially like this for both luma
and chroma:

int xFrac = mv.x & 3;
int yFrac = mv.y & 3;
if (weighted)
{
   if (xFrac == 0 && yFrac == 0)
       weight pixels from 8bpp to 8bpp
   else if (xFrac == 0)
       filter V 8bpp to 16bpp intermediate
       weight 16bpp, round+shift to 8bpp
   else if (yFrac == 0)
       filter H 8bpp to 16bpp intermediate
       weight 16bpp, round+shift to 8bpp
   else
       filter H 8bpp to 16bppA
       filter V 16bppA to 16bppB
       weight 16bppB, round+shift to 8bpp
   end
}
else
{
   if (xFrac == 0 && yFrac == 0)
       fpel - nothing to do
   else if (xFrac == 0)
       filter V 8bpp to 8bpp
   else if (yFrac == 0)
       filter H 8bpp to 8bpp  *
   else
       filter H 8bpp to 16bpp
       filter V 16bpp to 8bpp
   end
}

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.

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)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20131009/ed191916/attachment.html>


More information about the x265-devel mailing list