bug fixing for sao_edge_filter_wpp functions