[x265] [PATCH] Tcompridiction: Block Interpolation calculation
gopu at multicorewareinc.com
gopu at multicorewareinc.com
Thu Aug 29 09:34:36 CEST 2013
# HG changeset patch
# User ggopu
# Date 1377761657 -19800
# Node ID 3325574049fe495c59488fe3ca83f7aeddcc917c
# Parent 77d92ca1d18332da920f399b5ccc3902a91d4198
Tcompridiction: Block Interpolation calculation
diff -r 77d92ca1d183 -r 3325574049fe source/Lib/TLibCommon/TComPrediction.cpp
--- a/source/Lib/TLibCommon/TComPrediction.cpp Thu Aug 29 02:01:23 2013 -0500
+++ b/source/Lib/TLibCommon/TComPrediction.cpp Thu Aug 29 13:04:17 2013 +0530
@@ -477,7 +477,34 @@
Pel* src = ref->lumaPlane[xFrac][yFrac] + blkOffset + refOffset;
Int srcStride = refStride;
- x265::primitives.blockcpy_pp(width, height, dst, dstStride, src, srcStride);
+ if (yFrac == 0)
+ {
+ if (xFrac != 0)
+ {
+ x265::primitives.ipfilter_pp[FILTER_H_P_P_8]((pixel*)src, refStride, (pixel*)dst, dstStride, width, height, g_lumaFilter[xFrac]);
+ }
+ else
+ {
+ x265::primitives.blockcpy_pp(width, height, dst, dstStride, src, srcStride);
+ }
+ }
+ else if (xFrac == 0)
+ {
+ x265::primitives.ipfilter_pp[FILTER_H_P_P_8]((pixel*)src, refStride, (pixel*)dst, dstStride, width, height, g_lumaFilter[yFrac]);
+ }
+ else
+ {
+ Int tmpStride = width;
+ Int filterSize = NTAPS_LUMA;
+ Int halfFilterSize = (filterSize >> 1);
+
+ Short *tmp = (Short*)malloc(width * (height + filterSize - 1) * sizeof(Short));
+
+ primitives.ipfilter_ps[FILTER_H_P_S_8]((pixel*)src - (halfFilterSize - 1) * refStride, refStride, tmp, tmpStride, width, height + filterSize - 1, g_lumaFilter[xFrac]);
+ primitives.ipfilter_sp[FILTER_V_S_P_8](tmp + (halfFilterSize - 1) * tmpStride, tmpStride, (pixel*)dst, dstStride, width, height, g_lumaFilter[yFrac]);
+
+ free(tmp);
+ }
}
//Motion compensated block for biprediction
More information about the x265-devel
mailing list