Add utils_average_bayer func.