[x265] [PATCH 2 of 3] cleanup: remove unused 64x64 functions

Min Chen chenm003 at 163.com
Fri Nov 15 06:18:47 CET 2013


# HG changeset patch
# User Min Chen <chenm003 at 163.com>
# Date 1384492656 -28800
# Node ID 7dfb9ffae73536c0c71bcab71dfb1f1779248e69
# Parent  9592525e376f4b41d4fde000ae77814a00b06822
cleanup: remove unused 64x64 functions

diff -r 9592525e376f -r 7dfb9ffae735 source/common/pixel.cpp
--- a/source/common/pixel.cpp	Fri Nov 15 13:17:16 2013 +0800
+++ b/source/common/pixel.cpp	Fri Nov 15 13:17:36 2013 +0800
@@ -955,12 +955,12 @@
     p.calcresidual[BLOCK_8x8] = getResidual<8>;
     p.calcresidual[BLOCK_16x16] = getResidual<16>;
     p.calcresidual[BLOCK_32x32] = getResidual<32>;
-    p.calcresidual[BLOCK_64x64] = getResidual<64>;
+    p.calcresidual[BLOCK_64x64] = NULL;
     p.calcrecon[BLOCK_4x4] = calcRecons<4>;
     p.calcrecon[BLOCK_8x8] = calcRecons<8>;
     p.calcrecon[BLOCK_16x16] = calcRecons<16>;
     p.calcrecon[BLOCK_32x32] = calcRecons<32>;
-    p.calcrecon[BLOCK_64x64] = calcRecons<64>;
+    p.calcrecon[BLOCK_64x64] = NULL;
 
     p.transpose[0] = transpose<4>;
     p.transpose[1] = transpose<8>;
diff -r 9592525e376f -r 7dfb9ffae735 source/common/vec/pixel-sse3.cpp
--- a/source/common/vec/pixel-sse3.cpp	Fri Nov 15 13:17:16 2013 +0800
+++ b/source/common/vec/pixel-sse3.cpp	Fri Nov 15 13:17:36 2013 +0800
@@ -484,19 +484,6 @@
     }
 }
 
-void getResidual64(pixel *fenc, pixel *pred, int16_t *resi, int stride)
-{
-    __m128i T00, T01, T02, T03, T04;
-
-    for (int i = 0; i < 64; i += 2)
-    {
-        RESIDUAL_2x16(i, 0);
-        RESIDUAL_2x16(i, 16);
-        RESIDUAL_2x16(i, 32);
-        RESIDUAL_2x16(i, 48);
-    }
-}
-
 void calcRecons4(pixel* pred, int16_t* resi, pixel* reco, int16_t* recQt, pixel* recIPred, int stride, int recstride, int predstride)
 {
     for (int y = 0; y < 4; y++)
@@ -628,12 +615,12 @@
     p.calcresidual[BLOCK_8x8] = getResidual8;
     p.calcresidual[BLOCK_16x16] = getResidual16;
     p.calcresidual[BLOCK_32x32] = getResidual32;
-    p.calcresidual[BLOCK_64x64] = getResidual64;
+    p.calcresidual[BLOCK_64x64] = NULL;
     p.calcrecon[BLOCK_4x4] = calcRecons4;
     p.calcrecon[BLOCK_8x8] = calcRecons8;
     p.calcrecon[BLOCK_16x16] = calcRecons<16>;
     p.calcrecon[BLOCK_32x32] = calcRecons<32>;
-    p.calcrecon[BLOCK_64x64] = calcRecons<64>;
+    p.calcrecon[BLOCK_64x64] = NULL;
     p.blockfill_s[BLOCK_4x4]   = blockfill_s_4;
     p.blockfill_s[BLOCK_8x8]   = blockfill_s_8;
     p.blockfill_s[BLOCK_16x16] = blockfill_s_16;
diff -r 9592525e376f -r 7dfb9ffae735 source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp	Fri Nov 15 13:17:16 2013 +0800
+++ b/source/common/x86/asm-primitives.cpp	Fri Nov 15 13:17:36 2013 +0800
@@ -3,6 +3,7 @@
  *
  * Authors: Steve Borho <steve at borho.org>
  *          Praveen Kumar Tiwari <praveen at multicorewareinc.com>
+ *          Min Chen <chenm003 at 163.com> <min.chen at multicorewareinc.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -534,7 +535,6 @@
 
         p.calcrecon[BLOCK_16x16] = x265_calcRecons16_sse4;
         p.calcrecon[BLOCK_32x32] = x265_calcRecons32_sse4;
-        p.calcrecon[BLOCK_64x64] = x265_calcRecons64_sse4;
     }
     if (cpuMask & X265_CPU_AVX)
     {
diff -r 9592525e376f -r 7dfb9ffae735 source/common/x86/pixel-util.asm
--- a/source/common/x86/pixel-util.asm	Fri Nov 15 13:17:16 2013 +0800
+++ b/source/common/x86/pixel-util.asm	Fri Nov 15 13:17:36 2013 +0800
@@ -357,113 +357,3 @@
     dec         t8d
     jnz        .loop
     RET
-
-
-INIT_XMM sse4
-cglobal calcRecons64
-%if ARCH_X86_64 == 1
-    DECLARE_REG_TMP 0,1,2,3,4,5,6,7,8
-    PROLOGUE 6,9,7
-%else
-    DECLARE_REG_TMP 0,1,2,3,4,5
-    PROLOGUE 6,7,7
-    %define t6      r6m
-    %define t6d     r6d
-    %define t7      r7m
-    %define t8d     r6d
-%endif
-
-    mov         t6d, r6m
-%if ARCH_X86_64 == 0
-    add         t6d, t6d
-    mov         r6m, t6d
-%else
-    mov         r5d, r5m
-    mov         r7d, r7m
-    add         t6d, t6d
-%endif
-
-    pxor        m0, m0
-    mov         t8d, 64
-.loop:
-    ; left 32 pixel
-    movu        m2, [t0 + 0 * 16]
-    movu        m4, [t0 + 1 * 16]
-    pmovzxbw    m1, m2
-    punpckhbw   m2, m0
-    pmovzxbw    m3, m4
-    punpckhbw   m4, m0
-
-    movu        m5, [t1 + 0 * 16]
-    movu        m6, [t1 + 1 * 16]
-    paddw       m1, m5
-    paddw       m2, m6
-    packuswb    m1, m2
-
-    movu        m5, [t1 + 2 * 16]
-    movu        m6, [t1 + 3 * 16]
-    paddw       m3, m5
-    paddw       m4, m6
-    packuswb    m3, m4
-
-    ; store recon[] and recipred[]
-    movu        [t2 + 0 * 16], m1
-    movu        [t2 + 1 * 16], m3
-    movu        [t4 + 0 * 16], m1
-    movu        [t4 + 1 * 16], m3
-
-    ; store recqt[]
-    pmovzxbw    m2, m1
-    punpckhbw   m1, m0
-    movu        [t3 + 0 * 16], m2
-    movu        [t3 + 1 * 16], m1
-    pmovzxbw    m4, m3
-    punpckhbw   m3, m0
-    movu        [t3 + 2 * 16], m4
-    movu        [t3 + 3 * 16], m3
-
-    ; right 32 pixel
-    movu        m2, [t0 + 2 * 16]
-    movu        m4, [t0 + 3 * 16]
-    pmovzxbw    m1, m2
-    punpckhbw   m2, m0
-    pmovzxbw    m3, m4
-    punpckhbw   m4, m0
-
-    movu        m5, [t1 + 4 * 16]
-    movu        m6, [t1 + 5 * 16]
-    paddw       m1, m5
-    paddw       m2, m6
-    packuswb    m1, m2
-
-    movu        m5, [t1 + 6 * 16]
-    movu        m6, [t1 + 7 * 16]
-    paddw       m3, m5
-    paddw       m4, m6
-    packuswb    m3, m4
-
-    ; store recon[] and recipred[]
-    movu        [t2 + 2 * 16], m1
-    movu        [t2 + 3 * 16], m3
-    movu        [t4 + 2 * 16], m1
-    movu        [t4 + 3 * 16], m3
-
-    ; store recqt[]
-    pmovzxbw    m2, m1
-    punpckhbw   m1, m0
-    movu        [t3 + 4 * 16], m2
-    movu        [t3 + 5 * 16], m1
-    pmovzxbw    m4, m3
-    punpckhbw   m3, m0
-    movu        [t3 + 6 * 16], m4
-    movu        [t3 + 7 * 16], m3
-
-    add         t3, t6
-    add         t4, t7
-    add         t0, t5
-    lea         t1, [t1 + t5 * 2]
-    add         t2, t5
-
-    dec         t8d
-    jnz        .loop
-    RET
diff -r 9592525e376f -r 7dfb9ffae735 source/common/x86/pixel.h
--- a/source/common/x86/pixel.h	Fri Nov 15 13:17:16 2013 +0800
+++ b/source/common/x86/pixel.h	Fri Nov 15 13:17:36 2013 +0800
@@ -360,6 +360,5 @@
 void x265_calcRecons8_sse2(pixel* pred, int16_t* residual, pixel* recon, int16_t* reconqt, pixel *reconipred, int stride, int strideqt, int strideipred);
 void x265_calcRecons16_sse4(pixel* pred, int16_t* residual, pixel* recon, int16_t* reconqt, pixel *reconipred, int stride, int strideqt, int strideipred);
 void x265_calcRecons32_sse4(pixel* pred, int16_t* residual, pixel* recon, int16_t* reconqt, pixel *reconipred, int stride, int strideqt, int strideipred);
-void x265_calcRecons64_sse4(pixel* pred, int16_t* residual, pixel* recon, int16_t* reconqt, pixel *reconipred, int stride, int strideqt, int strideipred);
 
 #endif // ifndef X265_I386_PIXEL_H



More information about the x265-devel mailing list