filter_rescale.c: if input width or height are zero, infer them from the profile