libswscale has unreasonable alignment constraints
|Reported by:||gjdfgh||Owned by:|
|Blocking:||Reproduced by developer:||no|
|Analyzed by developer:||no|
First of, there's a difference between alignment of single pixels, and alignment of the image start pointer. It's reasonable to demand strict alignment constraints on single pixels, e.g. that a pixels of size 4 should be aligned to 4.
But having a 16 byte alignment on a pixel start pointer is not reasonable. For example, this doesn't allow passing cropped images to libswscale. (Unless the images are cropped in a way they satisfy the alignment constraints again.)
Rather than fully reverting to the slow path in this case, libswscale should use the slow path only for the first N unaligned pixels, until an aligned pixel is reached, and then continue with an accelerated SIMD code path.