 
                         for(int y = 0; y < len; ++y)
                         {
-                            val += DataCostPerPixel<channels>::compute(lle, lri);
+                            val += pixeldiff<channels>(lle, lri);
 
                             lle += cimg_step;
                             lri += cimg_step;

                                const uchar* left_x = cleft + yi * cimg_step + xi * channels;
                                const uchar* right_x = cright + yi * cimg_step + xr * channels;

                                val += DataCostPerPixel<channels>::compute(left_x, right_x);
                            }
                        }
                    }

                                const uchar* lle = cleft + yi * cimg_step + xi * channels;
                                const uchar* lri = cright + yi * cimg_step + xr * channels;

                                val += pixeldiff<channels>(lle, lri);
                            }
                        }
                    }
