[x265-commits] [x265] asm-primitives: addAvg, fix bug pointed out by Ashok.

Deepthi Nandakumar deepthi at multicorewareinc.com
Thu Jan 23 19:44:25 CET 2014


details:   http://hg.videolan.org/x265/rev/f1bd676fd90f
branches:  
changeset: 5865:f1bd676fd90f
user:      Deepthi Nandakumar <deepthi at multicorewareinc.com>
date:      Thu Jan 23 12:44:25 2014 +0530
description:
asm-primitives: addAvg, fix bug pointed out by Ashok.
Subject: [x265] asm : Hook up luma_vps and luma_vss with the encoder.

details:   http://hg.videolan.org/x265/rev/f5ab67ba11b7
branches:  
changeset: 5866:f5ab67ba11b7
user:      Nabajit Deka
date:      Thu Jan 23 18:41:10 2014 +0530
description:
asm : Hook up luma_vps and luma_vss with the encoder.
Subject: [x265] asm : Hook up chroma_vps and chroma_vss with the encoder.

details:   http://hg.videolan.org/x265/rev/356ec7ff8a68
branches:  
changeset: 5867:356ec7ff8a68
user:      Nabajit Deka
date:      Thu Jan 23 19:01:38 2014 +0530
description:
asm : Hook up chroma_vps and chroma_vss with the encoder.

diffstat:

 source/Lib/TLibCommon/TComPrediction.cpp |  12 ++++++------
 source/Lib/TLibCommon/TComYuv.cpp        |   4 ++--
 source/common/pixel.cpp                  |   2 +-
 source/common/primitives.h               |   4 ++--
 4 files changed, 11 insertions(+), 11 deletions(-)

diffs (91 lines):

diff -r 29c1940c8acb -r 356ec7ff8a68 source/Lib/TLibCommon/TComPrediction.cpp
--- a/source/Lib/TLibCommon/TComPrediction.cpp	Wed Jan 22 12:35:33 2014 -0600
+++ b/source/Lib/TLibCommon/TComPrediction.cpp	Thu Jan 23 19:01:38 2014 +0530
@@ -464,7 +464,7 @@ void TComPrediction::xPredInterLumaBlk(T
     }
     else if (xFrac == 0)
     {
-        primitives.ipfilter_ps[FILTER_V_P_S_8](ref, refStride, dst, dstStride, width, height, g_lumaFilter[yFrac]);
+        primitives.luma_vps[partEnum](ref, refStride, dst, dstStride, yFrac);
     }
     else
     {
@@ -472,7 +472,7 @@ void TComPrediction::xPredInterLumaBlk(T
         int filterSize = NTAPS_LUMA;
         int halfFilterSize = (filterSize >> 1);
         primitives.luma_hps[partEnum](ref, refStride, m_immedVals, tmpStride, xFrac, 1);
-        primitives.ipfilter_ss[FILTER_V_S_S_8](m_immedVals + (halfFilterSize - 1) * tmpStride, tmpStride, dst, dstStride, width, height, yFrac);
+        primitives.luma_vss[partEnum](m_immedVals + (halfFilterSize - 1) * tmpStride, tmpStride, dst, dstStride, yFrac);
     }
 }
 
@@ -572,8 +572,8 @@ void TComPrediction::xPredInterChromaBlk
     }
     else if (xFrac == 0)
     {
-        primitives.ipfilter_ps[FILTER_V_P_S_4](refCb, refStride, dstCb, dstStride, cxWidth, cxHeight, g_chromaFilter[yFrac]);
-        primitives.ipfilter_ps[FILTER_V_P_S_4](refCr, refStride, dstCr, dstStride, cxWidth, cxHeight, g_chromaFilter[yFrac]);
+        primitives.chroma[csp].filter_vps[partEnum](refCb, refStride, dstCb, dstStride, yFrac);
+        primitives.chroma[csp].filter_vps[partEnum](refCr, refStride, dstCr, dstStride, yFrac);
     }
     else
     {
@@ -581,9 +581,9 @@ void TComPrediction::xPredInterChromaBlk
         int filterSize = NTAPS_CHROMA;
         int halfFilterSize = (filterSize >> 1);
         primitives.chroma[csp].filter_hps[partEnum](refCb, refStride, m_immedVals, extStride, xFrac, 1);
-        primitives.ipfilter_ss[FILTER_V_S_S_4](m_immedVals + (halfFilterSize - 1) * extStride, extStride, dstCb, dstStride, cxWidth, cxHeight, yFrac);
+        primitives.chroma[csp].filter_vss[partEnum](m_immedVals + (halfFilterSize - 1) * extStride, extStride, dstCb, dstStride, yFrac);
         primitives.chroma[csp].filter_hps[partEnum](refCr, refStride, m_immedVals, extStride, xFrac, 1);
-        primitives.ipfilter_ss[FILTER_V_S_S_4](m_immedVals + (halfFilterSize - 1) * extStride, extStride, dstCr, dstStride, cxWidth, cxHeight, yFrac);
+        primitives.chroma[csp].filter_vss[partEnum](m_immedVals + (halfFilterSize - 1) * extStride, extStride, dstCr, dstStride, yFrac);
     }
 }
 
diff -r 29c1940c8acb -r 356ec7ff8a68 source/Lib/TLibCommon/TComYuv.cpp
--- a/source/Lib/TLibCommon/TComYuv.cpp	Wed Jan 22 12:35:33 2014 -0600
+++ b/source/Lib/TLibCommon/TComYuv.cpp	Thu Jan 23 19:01:38 2014 +0530
@@ -602,8 +602,8 @@ void TComYuv::addAvg(TShortYUV* srcYuv0,
         src1Stride = srcYuv1->m_cwidth;
         dststride  = getCStride();
 
-        primitives.chroma_addAvg[part](dstU, dststride, srcU0, src0Stride, srcU1, src1Stride);
-        primitives.chroma_addAvg[part](dstV, dststride, srcV0, src0Stride, srcV1, src1Stride);
+        primitives.chroma[m_csp].addAvg[part](dstU, dststride, srcU0, src0Stride, srcU1, src1Stride);
+        primitives.chroma[m_csp].addAvg[part](dstV, dststride, srcV0, src0Stride, srcV1, src1Stride);
     }
 }
 
diff -r 29c1940c8acb -r 356ec7ff8a68 source/common/pixel.cpp
--- a/source/common/pixel.cpp	Wed Jan 22 12:35:33 2014 -0600
+++ b/source/common/pixel.cpp	Thu Jan 23 19:01:38 2014 +0530
@@ -862,7 +862,7 @@ void Setup_C_PixelPrimitives(EncoderPrim
     p.satd[LUMA_16x64] = satd8<16, 64>;
 
 #define CHROMA(W, H) \
-    p.chroma_addAvg[CHROMA_ ## W ## x ## H]  = addAvg<W, H>; \
+    p.chroma[X265_CSP_I420].addAvg[CHROMA_ ## W ## x ## H]  = addAvg<W, H>; \
     p.chroma[X265_CSP_I420].copy_pp[CHROMA_ ## W ## x ## H] = blockcopy_pp_c<W, H>; \
     p.chroma[X265_CSP_I420].copy_sp[CHROMA_ ## W ## x ## H] = blockcopy_sp_c<W, H>; \
     p.chroma[X265_CSP_I420].copy_ps[CHROMA_ ## W ## x ## H] = blockcopy_ps_c<W, H>; \
diff -r 29c1940c8acb -r 356ec7ff8a68 source/common/primitives.h
--- a/source/common/primitives.h	Wed Jan 22 12:35:33 2014 -0600
+++ b/source/common/primitives.h	Thu Jan 23 19:01:38 2014 +0530
@@ -273,8 +273,7 @@ struct EncoderPrimitives
     extendCURowBorder_t extendRowBorder;
 
     addAvg_t        luma_addAvg[NUM_LUMA_PARTITIONS];
-    addAvg_t        chroma_addAvg[NUM_CHROMA_PARTITIONS];
-
+    
     struct
     {
         filter_pp_t     filter_vpp[NUM_LUMA_PARTITIONS];
@@ -288,6 +287,7 @@ struct EncoderPrimitives
         copy_ps_t       copy_ps[NUM_LUMA_PARTITIONS];
         pixel_sub_ps_t  sub_ps[NUM_LUMA_PARTITIONS];
         pixel_add_ps_t  add_ps[NUM_LUMA_PARTITIONS];
+        addAvg_t        addAvg[NUM_LUMA_PARTITIONS];
     } chroma[4]; // X265_CSP_COUNT - do not want to include x265.h here
 };
 


More information about the x265-commits mailing list