pixel value computation