Adaptive disparity computation using local and non-local cost aggregations