Deprecate ImageQt align8to32() in favour of raw encoder stride - #9940
Conversation
|
Hi. You're removing a public method. The preference would be to deprecate it instead. |
|
@radarhere Sure. Adjusted to a deprecation. |
|
For the record, here's a link - https://doc.qt.io/qt-6/qimage.html
|
|
I'm guessing this improves performance? |
It does! +68% to +442% OPS for an image that wasn't correctly aligned on my box, ±10% (so measurement noise) for others. More than that, less memory allocations (as #9938 in general) since there isn't a temporary un-strided copy, temporary strided rows in a list, and finally a strided byte buffer, before the temporaries can be dropped. |
|
I've created akx#23 with some suggestions. |
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
|
Rebased to fix conflicts in the .rst files and folded in the changes from review + suggestion PR. |
Fell out of #9938 (namely 64507dc): the raw encoder had supported strides all along, but no one knew because it wasn't really documented in any way. For that reason, presumably, #1430 added a Python-side realigner.
This shows the old and new impls matching for a 113-pixel-wide Hopper, and what would happen if we don't align things: