Page MenuHome

Fix for T94496 with unaligned image widths
AbandonedPublic

Authored by Michael (michael64) on Jan 20 2022, 4:10 PM.

Details

Summary

376e425c02ae fixed vertical image flipping for images where 4*anim->x equals the internal stride value of the image.
This works for the example video in T93588 (width=720, 16-byte aligned) but not for the example blender_logo_854x480.mp4 in T94496 (width=854, 2-byte aligned).
In this diff after each row is copied (without alignment region), the alignment region is skipped over and the horizontal shearing and wrapping around no longer happens.

Diff Detail

Repository
rB Blender

Event Timeline

Michael (michael64) requested review of this revision.Jan 20 2022, 4:10 PM
Michael (michael64) created this revision.
This revision is now accepted and ready to land.Jan 20 2022, 5:01 PM

I was thinking whether it would be good idea to keep "Scale and flip image over Y axis in one go" version for images where buffers are aligned, since performance is about 35% faster. but it seems this is causing quite a bit of trouble...

A better way of handling everything correctly is in D13908.