pixel replication padding works! it seems that region 7 logic is incorrect