libfreerdp-codec: improve planar handling of scanlines