[x265] [PATCH] pixelsub_ps, Removed unused old code

Deepthi Nandakumar deepthi at multicorewareinc.com
Wed Nov 13 10:19:16 CET 2013


On hold until earlier patch has been fixed.


On Wed, Nov 13, 2013 at 12:46 PM, <murugan at multicorewareinc.com> wrote:

> # HG changeset patch
> # User Murugan Vairavel <murugan at multicorewareinc.com>
> # Date 1384326967 -19800
> #      Wed Nov 13 12:46:07 2013 +0530
> # Node ID 481cdfc251de0f99ef0a3c4fd53c786b79b5f182
> # Parent  69d4c1cfc8bed7c63bfdaa1073196e0874d14ebe
> pixelsub_ps, Removed unused old code
>
> diff -r 69d4c1cfc8be -r 481cdfc251de source/common/pixel.cpp
> --- a/source/common/pixel.cpp   Wed Nov 13 12:31:12 2013 +0530
> +++ b/source/common/pixel.cpp   Wed Nov 13 12:46:07 2013 +0530
> @@ -971,7 +971,6 @@
>      p.weightpUniPixel = weightUnidirPix;
>      p.weightpUni = weightUnidir;
>
> -    p.pixelsub_ps = pixelsub_ps_c;
>      p.pixeladd_ss = pixeladd_ss_c;
>
>      p.scale1D_128to64 = scale1D_128to64;
> diff -r 69d4c1cfc8be -r 481cdfc251de source/common/primitives.h
> --- a/source/common/primitives.h        Wed Nov 13 12:31:12 2013 +0530
> +++ b/source/common/primitives.h        Wed Nov 13 12:46:07 2013 +0530
> @@ -162,7 +162,6 @@
>  typedef void (*blockcpy_sp_t)(int bx, int by, int16_t *dst, intptr_t
> dstride, pixel *src, intptr_t sstride); // dst is aligned
>  typedef void (*blockcpy_ps_t)(int bx, int by, pixel *dst, intptr_t
> dstride, int16_t *src, intptr_t sstride); // dst is aligned
>  typedef void (*blockcpy_sc_t)(int bx, int by, int16_t *dst, intptr_t
> dstride, uint8_t *src, intptr_t sstride); // dst is aligned
> -typedef void (*pixelsub_ps_t)(int bx, int by, int16_t *dst, intptr_t
> dstride, pixel *src0, pixel *src1, intptr_t sstride0, intptr_t sstride1);
>  typedef void (*pixeladd_ss_t)(int bx, int by, int16_t *dst, intptr_t
> dstride, int16_t *src0, int16_t *src1, intptr_t sstride0, intptr_t
> sstride1);
>  typedef void (*pixelavg_pp_t)(pixel *dst, intptr_t dstride, pixel *src0,
> intptr_t sstride0, pixel *src1, intptr_t sstride1, int weight);
>  typedef void (*blockfill_s_t)(int16_t *dst, intptr_t dstride, int16_t
> val);
> @@ -277,7 +276,6 @@
>
>      weightpUni_t    weightpUni;
>      weightpUniPixel_t weightpUniPixel;
> -    pixelsub_ps_t   pixelsub_ps;
>      pixeladd_ss_t   pixeladd_ss;
>      pixelavg_pp_t   pixelavg_pp[NUM_LUMA_PARTITIONS];
>
> diff -r 69d4c1cfc8be -r 481cdfc251de source/common/vec/blockcopy-sse3.cpp
> --- a/source/common/vec/blockcopy-sse3.cpp      Wed Nov 13 12:31:12 2013
> +0530
> +++ b/source/common/vec/blockcopy-sse3.cpp      Wed Nov 13 12:46:07 2013
> +0530
> @@ -170,55 +170,6 @@
>      }
>  }
>
> -void pixelsub_ps(int bx, int by, int16_t *dst, intptr_t dstride, uint8_t
> *src0, uint8_t *src1, intptr_t sstride0, intptr_t sstride1)
> -{
> -    size_t aligncheck = (size_t)dst | (size_t)src0 | bx | sstride0 |
> sstride1 | dstride;
> -
> -    if (!(aligncheck & 15))
> -    {
> -        // fast path, multiples of 16 pixel wide blocks
> -        for (int y = 0; y < by; y++)
> -        {
> -            for (int x = 0; x < bx; x += 16)
> -            {
> -                __m128i word0, word1;
> -                __m128i word3, word4;
> -                __m128i mask = _mm_setzero_si128();
> -
> -                word0 = _mm_load_si128((__m128i const*)(src0 + x));    //
> load 16 bytes from src1
> -                word1 = _mm_load_si128((__m128i const*)(src1 + x));    //
> load 16 bytes from src2
> -
> -                word3 = _mm_unpacklo_epi8(word0, mask);    // interleave
> with zero extensions
> -                word4 = _mm_unpacklo_epi8(word1, mask);
> -                _mm_store_si128((__m128i*)&dst[x], _mm_subs_epi16(word3,
> word4));    // store block into dst
> -
> -                word3 = _mm_unpackhi_epi8(word0, mask);    // interleave
> with zero extensions
> -                word4 = _mm_unpackhi_epi8(word1, mask);
> -                _mm_store_si128((__m128i*)&dst[x + 8],
> _mm_subs_epi16(word3, word4));    // store block into dst
> -            }
> -
> -            src0 += sstride0;
> -            src1 += sstride1;
> -            dst += dstride;
> -        }
> -    }
> -    else
> -    {
> -        // slow path, irregular memory alignments or sizes
> -        for (int y = 0; y < by; y++)
> -        {
> -            for (int x = 0; x < bx; x++)
> -            {
> -                dst[x] = (int16_t)(src0[x] - src1[x]);
> -            }
> -
> -            src0 += sstride0;
> -            src1 += sstride1;
> -            dst += dstride;
> -        }
> -    }
> -}
> -
>  void pixeladd_ss(int bx, int by, int16_t *dst, intptr_t dstride, int16_t
> *src0, int16_t *src1, intptr_t sstride0, intptr_t sstride1)
>  {
>      size_t aligncheck = (size_t)dst | (size_t)src0 | sstride0 | sstride1
> | dstride;
> @@ -315,7 +266,6 @@
>      p.blockcpy_pp = blockcopy_pp;
>      p.blockcpy_ps = blockcopy_ps;
>      p.blockcpy_sp = blockcopy_sp;
> -    p.pixelsub_ps = pixelsub_ps;
>      p.pixeladd_ss = pixeladd_ss;
>  #endif // if HIGH_BIT_DEPTH
>  }
> diff -r 69d4c1cfc8be -r 481cdfc251de source/test/pixelharness.cpp
> --- a/source/test/pixelharness.cpp      Wed Nov 13 12:31:12 2013 +0530
> +++ b/source/test/pixelharness.cpp      Wed Nov 13 12:46:07 2013 +0530
> @@ -358,29 +358,6 @@
>      return true;
>  }
>
> -bool PixelHarness::check_pixelsub_sp(pixelsub_ps_t ref, pixelsub_ps_t opt)
> -{
> -    ALIGN_VAR_16(int16_t, ref_dest[64 * 64]);
> -    ALIGN_VAR_16(int16_t, opt_dest[64 * 64]);
> -    int bx = 64;
> -    int by = 64;
> -    int j = 0;
> -    for (int i = 0; i < ITERS; i++)
> -    {
> -        opt(bx, by, opt_dest, 64, pbuf2 + j, pbuf1 + j, STRIDE, STRIDE);
> -        ref(bx, by, ref_dest, 64, pbuf2 + j, pbuf1 + j, STRIDE, STRIDE);
> -
> -        if (memcmp(ref_dest, opt_dest, 64 * 64 * sizeof(int16_t)))
> -            return false;
> -
> -        j += INCR;
> -        bx = 4 * ((rand() & 15) + 1);
> -        by = 4 * ((rand() & 15) + 1);
> -    }
> -
> -    return true;
> -}
> -
>  bool PixelHarness::check_pixeladd_ss(pixeladd_ss_t ref, pixeladd_ss_t opt)
>  {
>      ALIGN_VAR_16(int16_t, ref_dest[64 * 64]);
> @@ -886,15 +863,6 @@
>          }
>      }
>
> -    if (opt.pixelsub_ps)
> -    {
> -        if (!check_pixelsub_sp(ref.pixelsub_ps, opt.pixelsub_ps))
> -        {
> -            printf("Luma Substract failed!\n");
> -            return false;
> -        }
> -    }
> -
>      if (opt.pixeladd_ss)
>      {
>          if (!check_pixeladd_ss(ref.pixeladd_ss, opt.pixeladd_ss))
> @@ -1114,12 +1082,6 @@
>          REPORT_SPEEDUP(opt.weightpUni, ref.weightpUni, (int16_t*)sbuf1,
> pbuf1, 64, 64, 32, 32, 128, 1 << 9, 10, 100);
>      }
>
> -    if (opt.pixelsub_ps)
> -    {
> -        printf("Pixel Sub");
> -        REPORT_SPEEDUP(opt.pixelsub_ps, ref.pixelsub_ps, 64, 64,
> (int16_t*)pbuf1, FENC_STRIDE, pbuf2, pbuf1, STRIDE, STRIDE);
> -    }
> -
>      if (opt.pixeladd_ss)
>      {
>          printf("pixel_ss add");
> diff -r 69d4c1cfc8be -r 481cdfc251de source/test/pixelharness.h
> --- a/source/test/pixelharness.h        Wed Nov 13 12:31:12 2013 +0530
> +++ b/source/test/pixelharness.h        Wed Nov 13 12:46:07 2013 +0530
> @@ -49,7 +49,6 @@
>      bool check_calcrecon(calcrecon_t ref, calcrecon_t opt);
>      bool check_weightpUni(weightpUniPixel_t ref, weightpUniPixel_t opt);
>      bool check_weightpUni(weightpUni_t ref, weightpUni_t opt);
> -    bool check_pixelsub_sp(pixelsub_ps_t ref, pixelsub_ps_t opt);
>      bool check_pixeladd_ss(pixeladd_ss_t ref, pixeladd_ss_t opt);
>      bool check_downscale_t(downscale_t ref, downscale_t opt);
>      bool check_cvt32to16_shr_t(cvt32to16_shr_t ref, cvt32to16_shr_t opt);
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20131113/e56c9180/attachment-0001.html>


More information about the x265-devel mailing list