[x265] [PATCH] test bench : Modify chroma_p2s test function to handle csp

Steve Borho steve at borho.org
Mon Mar 3 21:28:12 CET 2014


On Mon, Mar 3, 2014 at 5:57 AM,  <nabajit at multicorewareinc.com> wrote:
> # HG changeset patch
> # User Nabajit Deka
> # Date 1393847862 -19800
> #      Mon Mar 03 17:27:42 2014 +0530
> # Node ID 5e6e06b8ec118904ad28a2d703dc9ad7956b4d44
> # Parent  6662df480e39c83ab138d831f883d11fc5b052c5
> test bench : Modify chroma_p2s test function to handle csp.
>
> diff -r 6662df480e39 -r 5e6e06b8ec11 source/test/ipfilterharness.cpp
> --- a/source/test/ipfilterharness.cpp   Mon Mar 03 11:28:22 2014 +0530
> +++ b/source/test/ipfilterharness.cpp   Mon Mar 03 17:27:42 2014 +0530
> @@ -113,11 +113,17 @@
>      X265_FREE(short_test_buff);
>  }
>
> -bool IPFilterHarness::check_IPFilter_primitive(filter_p2s_t ref, filter_p2s_t opt, int isChroma)
> +bool IPFilterHarness::check_IPFilter_primitive(filter_p2s_t ref, filter_p2s_t opt, int isChroma, int csp)
>  {
>      intptr_t rand_srcStride;
> -    const int min_size = isChroma ? 2 : 4;
> -    const int max_size = isChroma ? (MAX_CU_SIZE >> 1) : MAX_CU_SIZE;
> +    int min_size = isChroma ? 2 : 4;
> +    int max_size = isChroma ? (MAX_CU_SIZE >> 1) : MAX_CU_SIZE;
> +
> +    if(isChroma && (csp == X265_CSP_I444))

white-space

> +    {
> +        min_size = 4;
> +        max_size = MAX_CU_SIZE;
> +    }
>
>      for (int i = 0; i < ITERS; i++)
>      {
> @@ -532,7 +538,7 @@
>  {
>      if (opt.luma_p2s)
>      {
> -        if (!check_IPFilter_primitive(ref.luma_p2s, opt.luma_p2s, 0))
> +        if (!check_IPFilter_primitive(ref.luma_p2s, opt.luma_p2s, 0, 1))   // last parameter does not matter in case of luma
>          {
>              printf("luma_p2s failed\n");
>              return false;
> @@ -603,7 +609,7 @@
>      {
>          if (opt.chroma_p2s[csp])
>          {
> -            if (!check_IPFilter_primitive(ref.chroma_p2s[csp], opt.chroma_p2s[csp], 1))
> +            if (!check_IPFilter_primitive(ref.chroma_p2s[csp], opt.chroma_p2s[csp], 1, csp))
>              {
>                  printf("chroma_p2s[%s]", x265_source_csp_names[csp]);
>                  return false;
> diff -r 6662df480e39 -r 5e6e06b8ec11 source/test/ipfilterharness.h
> --- a/source/test/ipfilterharness.h     Mon Mar 03 11:28:22 2014 +0530
> +++ b/source/test/ipfilterharness.h     Mon Mar 03 17:27:42 2014 +0530
> @@ -41,7 +41,7 @@
>
>      int ipf_t_size;
>
> -    bool check_IPFilter_primitive(filter_p2s_t ref, filter_p2s_t opt, int isChroma);
> +    bool check_IPFilter_primitive(filter_p2s_t ref, filter_p2s_t opt, int isChroma, int csp);
>      bool check_IPFilterChroma_primitive(filter_pp_t ref, filter_pp_t opt);
>      bool check_IPFilterChroma_ps_primitive(filter_ps_t ref, filter_ps_t opt);
>      bool check_IPFilterChroma_hps_primitive(filter_hps_t ref, filter_hps_t opt);
> _______________________________________________
> 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