[x265] [PATCH 2 of 4] C primitive changes for luma_hps and chroma_hps
nabajit at multicorewareinc.com
nabajit at multicorewareinc.com
Wed Dec 4 13:49:49 CET 2013
# HG changeset patch
# User Nabajit Deka
# Date 1386160675 -19800
# Wed Dec 04 18:07:55 2013 +0530
# Node ID 8b045312625b2ffe16dd555b6958647f105b906d
# Parent 9440e424c637a46e15a96c03739d645e1dbf8b56
C primitive changes for luma_hps and chroma_hps.
diff -r 9440e424c637 -r 8b045312625b source/common/ipfilter.cpp
--- a/source/common/ipfilter.cpp Wed Dec 04 17:54:14 2013 +0530
+++ b/source/common/ipfilter.cpp Wed Dec 04 18:07:55 2013 +0530
@@ -270,17 +270,24 @@
}
template<int N, int width, int height>
-void interp_horiz_ps_c(pixel *src, intptr_t srcStride, int16_t *dst, intptr_t dstStride, int coeffIdx)
+void interp_horiz_ps_c(pixel *src, intptr_t srcStride, int16_t *dst, intptr_t dstStride, int coeffIdx, int isRowExt)
{
int16_t const * coeff = (N == 4) ? g_chromaFilter[coeffIdx] : g_lumaFilter[coeffIdx];
int headRoom = IF_INTERNAL_PREC - X265_DEPTH;
int shift = IF_FILTER_PREC - headRoom;
int offset = -IF_INTERNAL_OFFS << shift;
+ int blkheight = height;
src -= N / 2 - 1;
+ if (isRowExt)
+ {
+ src -= (N / 2 - 1) * srcStride;
+ blkheight += N - 1;
+ }
+
int row, col;
- for (row = 0; row < height; row++)
+ for (row = 0; row < blkheight; row++)
{
for (col = 0; col < width; col++)
{
More information about the x265-devel
mailing list