I dislike it, because if for some undefined reason IPP resize fails and the flag ok is false, then plain version of algo will be run. That is we have "two invocations of resize" in one call. But may be it is a common practise when IPP optimizations take place