[x265] [PATCH 4 of 4] improve motionEstimate() by bypass reduce MV Candidate

Steve Borho steve at borho.org
Tue Aug 25 16:55:10 CEST 2015


On 08/24, Min Chen wrote:
> # HG changeset patch
> # User Min Chen <chenm003 at 163.com>
> # Date 1440460166 25200
> # Node ID d3884d55fb6caedcd751db7b289dac470d139d1d
> # Parent  63f16fa65e3f4963863f31bc3802d7958410ff09
> improve motionEstimate() by bypass reduce MV Candidate
> ---
>  source/encoder/motion.cpp |   10 +++++++++-
>  1 files changed, 9 insertions(+), 1 deletions(-)
> 
> diff -r 63f16fa65e3f -r d3884d55fb6c source/encoder/motion.cpp
> --- a/source/encoder/motion.cpp	Mon Aug 24 16:26:14 2015 -0700
> +++ b/source/encoder/motion.cpp	Mon Aug 24 16:49:26 2015 -0700
> @@ -621,10 +621,18 @@
>          }
>      }
>  
> -    X265_CHECK(!(ref->isLowres && numCandidates), "lowres motion candidates not allowed\n")
> +    X265_CHECK(!(ref->isLowres && numCandidates), "lowres motion candidates not allowed\n");
> +
>      // measure SAD cost at each QPEL motion vector candidate
> +    MV prevMV(0x7EEDDEAD);
> +    X265_CHECK((numCandidates == 0) || (mvc[0] != prevMV), "Magic MV 0x7EEDDEAD check failure!\n");

not sure I understand the point of this check

>      for (int i = 0; i < numCandidates; i++)
>      {
> +        // Bypass duplicated mvc, it isn't a good way but simplest. Prepare to sort input mvc list will give us less candidate
> +        if (prevMV == mvc[i])
> +            continue;
> +        prevMV = mvc[i];
> +
>          MV m = mvc[i].clipped(qmvmin, qmvmax);
>          if (m.notZero() & (m != pmv ? 1 : 0) & (m != bestpre ? 1 : 0)) // check already measured
>          {
> 
> _______________________________________________
> 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