linesizes
Linesizes, often referred to as strides or pitches, describe the number of bytes between the start of one row of image data and the start of the next row in memory. They are used to navigate two-dimensional image buffers stored in a one-dimensional memory layout. The linesize value is typically provided by the graphics or video API and may differ between formats and planes.
In packed formats, where pixels are stored consecutively (for example, RGB24), the linesize usually equals the
Linesizes allow correct row-by-row access even when memory alignment introduces padding. A common usage pattern is
Notes and nuances: linesize is not necessarily equal to image width times bytes per pixel; it may
Common contexts include video decoding and encoding libraries (for example, FFmpeg) and graphics APIs, where correct