Repository navigation
Commit 6f4d6eb
authored
Round up sub-sampled width in Compute Layout and Allocation Size (#964)
Step 9 computed sourceWidthBytes using the integer division of the rect
width by the horizontal sub-sampling factor, while step 7 rounds the
sub-sampled height up and the pixel format definitions round both
dimensions up. For a rect with an odd width, this dropped the last chroma
column: a 3x3 I420 frame got a chroma stride of 1 and an allocation size
of 13 instead of 2 and 17, as expected by
webcodecs/videoFrame-odd-size.any.js.
Round the division up, matching step 7.
Fixes #9631 parent 924a4f8 commit 6f4d6eb
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4324 | 4324 | | |
4325 | 4325 | | |
4326 | 4326 | | |
4327 | | - | |
4328 | | - | |
4329 | | - | |
| 4327 | + | |
| 4328 | + | |
| 4329 | + | |
4330 | 4330 | | |
4331 | 4331 | | |
4332 | 4332 | | |
| |||
0 commit comments