[x265] [PATCH 1 of 3] Modified weighted IP Filter primitive to include Full Pel

deepthidevaki at multicorewareinc.com deepthidevaki at multicorewareinc.com
Tue Jul 30 13:39:49 CEST 2013


# HG changeset patch
# User Deepthi Devaki
# Date 1375183446 -19800
# Node ID 9e7928fc81d7bdf95f35f90e09349b016b8e4582
# Parent  057b9a97c920aa2402ec52efb8fdec400c591a7e
Modified weighted IP Filter primitive to include Full Pel

diff -r 057b9a97c920 -r 9e7928fc81d7 source/common/ipfilter.cpp
--- a/source/common/ipfilter.cpp	Mon Jul 29 19:29:39 2013 -0500
+++ b/source/common/ipfilter.cpp	Tue Jul 30 16:54:06 2013 +0530
@@ -490,6 +490,10 @@
 
 void weightUnidir(short *src, pixel *dst, int srcStride, int dstStride, int width, int height, int w0, int round, int shift, int offset)
 {
+    Int shiftNum = IF_INTERNAL_PREC - X265_DEPTH;
+    shift   = shift + shiftNum;
+    round   = shift ? (1 << (shift - 1)) : 0;
+
     int x, y;
     for (y = height - 1; y >= 0; y--)
     {
@@ -509,7 +513,7 @@
 
 // filterHorizontal, Multiplane, Weighted
 void filterHorizontalWeighted(pixel *src, int srcStride, short *midF, short* midA, short* midB, short* midC, int midStride,
-                              pixel *dstA, pixel *dstB, pixel *dstC, int dstStride, int block_width, int block_height,
+                              pixel *dstF, pixel *dstA, pixel *dstB, pixel *dstC, int dstStride, int block_width, int block_height,
                               int marginX, int marginY, int w, int roundw, int shiftw, int offsetw)
 {
     filterConvertPelToShort(src, srcStride, midF, midStride, block_width, block_height);
@@ -517,10 +521,12 @@
     filterHorizontal_p_s<8>(src, srcStride, midA, midStride, block_width, block_height, g_lumaFilter[1]);
     filterHorizontal_p_s<8>(src, srcStride, midC, midStride, block_width, block_height, g_lumaFilter[3]);
 
+    weightUnidir(midF, dstF, midStride, dstStride, block_width, block_height, w, roundw, shiftw, offsetw);
     weightUnidir(midA, dstA, midStride, dstStride, block_width, block_height, w, roundw, shiftw, offsetw);
     weightUnidir(midB, dstB, midStride, dstStride, block_width, block_height, w, roundw, shiftw, offsetw);
     weightUnidir(midC, dstC, midStride, dstStride, block_width, block_height, w, roundw, shiftw, offsetw);
 
+    extendPicCompBorder(dstF, dstStride, block_width, block_height, marginX, marginY);
     extendPicCompBorder(dstA, dstStride, block_width, block_height, marginX, marginY);
     extendPicCompBorder(dstB, dstStride, block_width, block_height, marginX, marginY);
     extendPicCompBorder(dstC, dstStride, block_width, block_height, marginX, marginY);
diff -r 057b9a97c920 -r 9e7928fc81d7 source/common/primitives.h
--- a/source/common/primitives.h	Mon Jul 29 19:29:39 2013 -0500
+++ b/source/common/primitives.h	Tue Jul 30 16:54:06 2013 +0530
@@ -223,7 +223,7 @@
 typedef void (*filterHmulti_t)(pixel *src, int srcStride, short *midF, short* midA, short* midB, short* midC, int midStride,
                                pixel *dstA, pixel *dstB, pixel *dstC, int dstStride, int block_width, int block_height, int marginX, int marginY);
 typedef void (*filterHwghtd_t)(pixel *src, int srcStride, short *midF, short* midA, short* midB, short* midC, int midStride,
-                               pixel *pDstA, pixel *pDstB, pixel *pDstC, int pDstStride, int block_width, int block_height,
+                               pixel *dstF, pixel *dstA, pixel *dstB, pixel *dstC, int dstStride, int block_width, int block_height,
                                int marginX, int marginY, int w, int roundw, int shiftw, int offsetw);
 typedef void (*weightpUni_t)(short *src, pixel *dst, int srcStride, int dstStride, int width, int height, int w0, int round, int shift, int offset);
 typedef void (*scale_t)(pixel *dst, pixel *src, intptr_t stride);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x265-1.patch
Type: text/x-patch
Size: 3631 bytes
Desc: not available
URL: <http://mailman.videolan.org/private/x265-devel/attachments/20130730/b193f189/attachment.bin>


More information about the x265-devel mailing list