Repository navigation
Commit 924a4f8
authored
Account for interleaved samples in Compute Layout and Allocation Size (#962)
The pixel format definitions use "sample" for a single component value
(an NV12 UV element is "composed of two Chroma samples", and an RGBA
pixel is four 8-bit samples). Compute Layout and Allocation Size used the
number of bytes per sample as the size of each position in a plane, which
undercounts planes that interleave several components: sourceLeftBytes
and sourceWidthBytes were half the correct value for the NV12 UV plane
and a quarter for RGBA, RGBX, BGRA and BGRX.
Multiply the bytes per sample by the number of samples stored at each
position of the plane.1 parent 6d8e3d3 commit 924a4f8
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4303 | 4303 | | |
4304 | 4304 | | |
4305 | 4305 | | |
4306 | | - | |
| 4306 | + | |
| 4307 | + | |
| 4308 | + | |
| 4309 | + | |
4307 | 4310 | | |
4308 | 4311 | | |
4309 | 4312 | | |
| |||
0 commit comments