avfilter/xbr: refactor xbr[234]x into a single function