Skip to content

Commit 611dc24

Browse files
committed
ffv1: Correct corner cases in slice tiling for version 4
See Ticket5548 and #274 Signed-off-by: Michael Niedermayer <[email protected]>
1 parent 4d8456a commit 611dc24

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

ffv1.md

+10-2
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ Plane:
4646
Pixel:
4747
: The smallest addressable representation of a color in a Frame. It is composed of one or more Samples.
4848

49+
MacroPixel:
50+
: The smallest rectangle able to tile the Frame aligned to the left and top borders.
51+
For example in a 4:2:0 Frame A MacroPixel contains 2x2 luma samples 1 Cb and 1 Cr sample.
52+
4953
MSB:
5054
: Most Significant Bit, the bit that can cause the largest change in magnitude of the symbol.
5155

@@ -1623,7 +1627,9 @@ slice_pixel_y´ is slice_pixel_y but with slice_y replaced by slice_y + slice_he
16231627
`slice_pixel_y` is the Slice vertical position in pixels. It is defined as the following:
16241628

16251629
```
1626-
floor( slice_y * frame_pixel_height / num_v_slices )
1630+
floor( slice_y * frame_pixel_height / num_v_slices ) {V3}
1631+
floor( slice_y * frame_macropixel_height / num_v_slices + 0.5 ) * macropixel_height {V4}
1632+
the value is limited by frame_pixel_height {V4}
16271633
```
16281634

16291635
## Line
@@ -1670,7 +1676,9 @@ slice_pixel_x´ is slice_pixel_x but with slice_x replaced by slice_x + slice_wi
16701676
`slice_pixel_x` is the Slice horizontal position in pixels. It is defined as the following:
16711677
16721678
```
1673-
floor( slice_x * frame_pixel_width / num_h_slices )
1679+
floor( slice_x * frame_pixel_width / num_h_slices ) {V3}
1680+
floor( slice_x * frame_macropixel_width / num_h_slices + 0.5 ) * macropixel_width {V4}
1681+
the value is limited by frame_pixel_width {V4}
16741682
```
16751683
16761684
### `sample_difference`

0 commit comments

Comments
 (0)