function dctfreturn = dctf(u, v, f)
  s = 0;
  for x = 0:7
    for y = 0:7
      s = s + f(x + 1,y + 1) * cosxu(x, u) * cosxu(y, v)+eps;
    end
  end
  s = (s * 0.25e0 * c(u) * c(v));
  dctfreturn = s;

