[gegl] buffer: add 5 component version of bilinear blit



commit 3d24aec5626067258a38dfa2e4df70d36d214f13
Author: Øyvind Kolås <pippin gimp org>
Date:   Wed Nov 28 02:54:57 2018 +0100

    buffer: add 5 component version of bilinear blit

 gegl/buffer/gegl-algorithms-bilinear.inc | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
---
diff --git a/gegl/buffer/gegl-algorithms-bilinear.inc b/gegl/buffer/gegl-algorithms-bilinear.inc
index d5bf3ae41..36486fcaf 100644
--- a/gegl/buffer/gegl-algorithms-bilinear.inc
+++ b/gegl/buffer/gegl-algorithms-bilinear.inc
@@ -105,6 +105,25 @@ BILINEAR_FUNCNAME (guchar                    *dest_buf,
                (src[2][3] * (rdx) + src[3][3] * (ldx)) * (dy));
            );
        break;
+     case 5:
+       IMPL(
+         dst[0] = BILINEAR_ROUND(
+               (src[0][0] * (rdx) + src[1][0] * (ldx)) * (rdy) +
+               (src[2][0] * (rdx) + src[3][0] * (ldx)) * (dy));
+         dst[1] = BILINEAR_ROUND(
+               (src[0][1] * (rdx) + src[1][1] * (ldx)) * (rdy) +
+               (src[2][1] * (rdx) + src[3][1] * (ldx)) * (dy));
+         dst[2] = BILINEAR_ROUND(
+               (src[0][2] * (rdx) + src[1][2] * (ldx)) * (rdy) +
+               (src[2][2] * (rdx) + src[3][2] * (ldx)) * (dy));
+         dst[3] = BILINEAR_ROUND(
+               (src[0][3] * (rdx) + src[1][3] * (ldx)) * (rdy) +
+               (src[2][3] * (rdx) + src[3][3] * (ldx)) * (dy));
+         dst[4] = BILINEAR_ROUND(
+               (src[0][4] * (rdx) + src[1][4] * (ldx)) * (rdy) +
+               (src[2][4] * (rdx) + src[3][4] * (ldx)) * (dy));
+           );
+       break;
    }
 #undef IMPL
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]