[x265] Custom LowRes scale

Steve Borho steve at borho.org
Tue Jul 22 16:51:52 CEST 2014


On 07/22, Nicolas Morey-Chaisemartin wrote:
> 
> On 07/22/2014 10:08 AM, Steve Borho wrote:
> >On 07/22, Nicolas Morey-Chaisemartin wrote:
> >>I'll have a look at it. It doesn't semm as straight forward as the
> >>other files though.
> >it is slightly more complicated; you'll want to scale up the block sizes
> >used for motion-compensated weight analysis - up to 32x32 or 64x64 based
> >on how much further you downscale the lowres in lookahead.
> 
> Is there a clean way to get a LUMA_NNxNN value from a block size ?
> Should I handle block larger than 64x64 by looping on the 64x64 blocks? or simply add a check at lowres init that the fullres CU size is <= 64 ?

inline int partitionFromLog2Size(int log2Size);

It's cleaner to not allow the lowres to downscale too much; 4k is only
roughly twice as wide/high as HD anyway. 8k would be 4x, which would map
nicely to 64x64 blocks.

Now that I think about this; the 16x16 block size of lowres is assumed
in a few rate control routines for adaptive quant and row cost
estimation.

> >>While we're talking about lowres MV: from what I could gather they are
> >>not used during the motionSearch on the full res picture.  As a lot of
> >>time is spent finding those, whouldn't it be useful to add them as
> >>candidate in the fullres search?
> >This has been on my TODO list for ages; a couple of people have claimed
> >they've tried it and it hasn't helped as much as you might think.  But I
> >haven't had a working patch in hand to verify it.
> >
> >The AMVP fixup after motion search, where we get to go shopping for a
> >better MVP after the search, often makes extra motion candidates
> >superfluous.
> >
> I started working on this yesterday for our accelerator but I got carried away on lowres scaling.
> I haven't any results yet but I'll post them as soon as I have some.
> By the way, lowres MV are in lowres luma pixels right? So I'll need to scale the vector by 2 to get the full MV?

Yes, you would need to shift them up as many bits as you downscaled
lowres (today it is one bit)

-- 
Steve Borho


More information about the x265-devel mailing list