-
Notifications
You must be signed in to change notification settings - Fork 18.6k
Closed
Labels
Milestone
Description
Currently, image.YCbCr and friends require the image's planes to be aligned with the image width. That is, for a given image of size w x h, a full-size plane must be w x h bytes.
I'd like to propose adding a field Pitch to the image structs that allows the underlying data's width to be larger than w. This is common if the image is sourced from external sources, such as a hardware decoder that has memory-mapped the image and image.YCbCr serves as a nice wrapper around it.
For some prior art, OpenCV includes a step argument which does the same thing: https://docs.opencv.org/4.x/d3/d63/classcv_1_1Mat.html#a51615ebf17a64c968df0bf49b4de6a3a