swscale: process horizontal lines in batches