[x265] [PATCH 08 of 29] intra_pred_dc: cleanup, remove unused functions

dnyaneshwar at multicorewareinc.com dnyaneshwar at multicorewareinc.com
Tue Jan 13 08:11:16 CET 2015


# HG changeset patch
# User Dnyaneshwar G <dnyaneshwar at multicorewareinc.com>
# Date 1421047125 -19800
#      Mon Jan 12 12:48:45 2015 +0530
# Node ID c238ea33fa51521639404aeb65864a7e4492dcef
# Parent  49cb8574e8f4453f700a52dc8a47fadc966a9c0b
intra_pred_dc: cleanup, remove unused functions

diff -r 49cb8574e8f4 -r c238ea33fa51 source/common/intrapred.cpp
--- a/source/common/intrapred.cpp	Tue Dec 16 15:50:13 2014 +0530
+++ b/source/common/intrapred.cpp	Mon Jan 12 12:48:45 2015 +0530
@@ -27,22 +27,6 @@
 using namespace x265;
 
 namespace {
-pixel dcPredValue(pixel* above, pixel* left, intptr_t width)
-{
-    int w, sum = 0;
-    pixel pDcVal;
-
-    for (w = 0; w < width; w++)
-        sum += above[w];
-
-    for (w = 0; w < width; w++)
-        sum += left[w];
-
-    pDcVal = (pixel)((sum + width) / (width + width));
-
-    return pDcVal;
-}
-
 void dcPredFilter(pixel* above, pixel* left, pixel* dst, intptr_t dststride, int size)
 {
     // boundary pixels processing
@@ -60,23 +44,6 @@
 }
 
 template<int width>
-void intra_pred_dc_c(pixel* dst, intptr_t dstStride, pixel* left, pixel* above, int /*dirMode*/, int bFilter)
-{
-    int k, l;
-
-    pixel dcval = dcPredValue(above + 1, left + 1, width);
-
-    for (k = 0; k < width; k++)
-    {
-        for (l = 0; l < width; l++)
-            dst[k * dstStride + l] = dcval;
-    }
-
-    if (bFilter)
-        dcPredFilter(above + 1, left + 1, dst, dstStride, width);
-}
-
-template<int width>
 void intra_pred_dc_c_new(pixel* dst, intptr_t dstStride, pixel* srcPix, int /*dirMode*/, int bFilter)
 {
     int k, l;
@@ -438,12 +405,6 @@
     p.intra_pred_new[0][BLOCK_16x16] = planar_pred_c_new<4>;
     p.intra_pred_new[0][BLOCK_32x32] = planar_pred_c_new<5>;
 
-    // Intra Prediction DC
-    p.intra_pred[1][BLOCK_4x4] = intra_pred_dc_c<4>;
-    p.intra_pred[1][BLOCK_8x8] = intra_pred_dc_c<8>;
-    p.intra_pred[1][BLOCK_16x16] = intra_pred_dc_c<16>;
-    p.intra_pred[1][BLOCK_32x32] = intra_pred_dc_c<32>;
-
     p.intra_pred_new[1][BLOCK_4x4] = intra_pred_dc_c_new<4>;
     p.intra_pred_new[1][BLOCK_8x8] = intra_pred_dc_c_new<8>;
     p.intra_pred_new[1][BLOCK_16x16] = intra_pred_dc_c_new<16>;
diff -r 49cb8574e8f4 -r c238ea33fa51 source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp	Tue Dec 16 15:50:13 2014 +0530
+++ b/source/common/x86/asm-primitives.cpp	Mon Jan 12 12:48:45 2015 +0530
@@ -1414,11 +1414,6 @@
         p.intra_pred[0][BLOCK_16x16] = x265_intra_pred_planar16_sse4;
         p.intra_pred[0][BLOCK_32x32] = x265_intra_pred_planar32_sse4;
 
-        p.intra_pred[1][BLOCK_4x4] = x265_intra_pred_dc4_sse4;
-        p.intra_pred[1][BLOCK_8x8] = x265_intra_pred_dc8_sse4;
-        p.intra_pred[1][BLOCK_16x16] = x265_intra_pred_dc16_sse4;
-        p.intra_pred[1][BLOCK_32x32] = x265_intra_pred_dc32_sse4;
-
         p.intra_pred_new[1][BLOCK_4x4] = x265_intra_pred_dc4_new_sse4;
         p.intra_pred_new[1][BLOCK_8x8] = x265_intra_pred_dc8_new_sse4;
         p.intra_pred_new[1][BLOCK_16x16] = x265_intra_pred_dc16_new_sse4;
@@ -1706,11 +1701,6 @@
         p.intra_pred_allangs[BLOCK_16x16] = x265_all_angs_pred_16x16_sse4;
         p.intra_pred_allangs[BLOCK_32x32] = x265_all_angs_pred_32x32_sse4;
 
-        p.intra_pred[1][BLOCK_4x4] = x265_intra_pred_dc4_sse4;
-        p.intra_pred[1][BLOCK_8x8] = x265_intra_pred_dc8_sse4;
-        p.intra_pred[1][BLOCK_16x16] = x265_intra_pred_dc16_sse4;
-        p.intra_pred[1][BLOCK_32x32] = x265_intra_pred_dc32_sse4;
-
         p.intra_pred_new[1][BLOCK_4x4] = x265_intra_pred_dc4_new_sse4;
         p.intra_pred_new[1][BLOCK_8x8] = x265_intra_pred_dc8_new_sse4;
         p.intra_pred_new[1][BLOCK_16x16] = x265_intra_pred_dc16_new_sse4;
diff -r 49cb8574e8f4 -r c238ea33fa51 source/test/intrapredharness.cpp
--- a/source/test/intrapredharness.cpp	Tue Dec 16 15:50:13 2014 +0530
+++ b/source/test/intrapredharness.cpp	Mon Jan 12 12:48:45 2015 +0530
@@ -236,15 +236,6 @@
 {
     for (int i = BLOCK_4x4; i <= BLOCK_32x32; i++)
     {
-        if (opt.intra_pred[1][i])
-        {
-            const int size = (1 << (i + 2));
-            if (!check_dc_primitive(ref.intra_pred[1][i], opt.intra_pred[1][i], size))
-            {
-                printf("intra_dc %dx%d failed\n", size, size);
-                return false;
-            }
-        }
         if (opt.intra_pred[0][i])
         {
             const int size = (1 << (i + 2));
@@ -292,18 +283,6 @@
     for (int i = BLOCK_4x4; i <= BLOCK_32x32; i++)
     {
         const int size = (1 << (i + 2));
-        if (opt.intra_pred[1][i])
-        {
-            printf("intra_dc_%dx%d[f=0]", size, size);
-            REPORT_SPEEDUP(opt.intra_pred[1][i], ref.intra_pred[1][i],
-                           pixel_out_vec, FENC_STRIDE, pixel_buff + srcStride, pixel_buff, 0, 0);
-            if (size <= 16)
-            {
-                printf("intra_dc_%dx%d[f=1]", size, size);
-                REPORT_SPEEDUP(opt.intra_pred[1][i], ref.intra_pred[1][i],
-                               pixel_out_vec, FENC_STRIDE, pixel_buff + srcStride, pixel_buff, 0, 1);
-            }
-        }
         if (opt.intra_pred[0][i])
         {
             printf("intra_planar %2dx%d", size, size);


More information about the x265-devel mailing list