[x265] [PATCH] motion: remove mvc's sad cost calc for lowres, already measured in slicetype

Steve Borho steve at borho.org
Thu Jun 25 17:54:28 CEST 2015


On 06/25, gopu at multicorewareinc.com wrote:
> # HG changeset patch
> # User Gopu Govindaswamy <gopu at multicorewareinc.com>
> # Date 1435231671 -19800
> #      Thu Jun 25 16:57:51 2015 +0530
> # Node ID 01d54ec4cbeaa7e9685b0df6ae874104e8ca5943
> # Parent  58a40cd36ed9aa5c5ab94bb8ab2cda8c36a12b05
> motion: remove mvc's sad cost calc for lowres, already measured in slicetype
> 
> diff -r 58a40cd36ed9 -r 01d54ec4cbea source/encoder/motion.cpp
> --- a/source/encoder/motion.cpp	Thu Jun 25 13:01:42 2015 +0530
> +++ b/source/encoder/motion.cpp	Thu Jun 25 16:57:51 2015 +0530
> @@ -643,19 +643,7 @@
>      // measure SAD cost at each QPEL motion vector candidate
>      if (ref->isLowres)
>      {
> -        for (int i = 0; i < numCandidates; i++)
> -        {
> -            MV m = mvc[i].clipped(qmvmin, qmvmax);
> -            if (m.notZero() && m != pmv && m != bestpre) // check already measured
> -            {
> -                int cost = ref->lowresQPelCost(fenc, blockOffset, m, sad) + mvcost(m);
> -                if (cost < bprecost)
> -                {
> -                    mvcCost = bprecost = cost;
> -                    bestpre = m;
> -                }
> -            }
> -        }
> +        X265_CHECK(!numCandidates, "SAD cost at each QPEL mvc for lowres already measured in slicetype \n");

white-space nit before the carriage return

Since you're removing this code, it would be best to remove the
if()else() entirely for non-checked builds. Something like:

X265_CHECK(!(ref->isLowres && numCandidates), "lowres motion candidates\n")
.. non-lowres MC check logic ..

>      }
>      else
>      {
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel

-- 
Steve Borho


More information about the x265-devel mailing list