Skip to content

Transform: any slice count with blocks of several pixels - #503

Merged
JeromeMartinez merged 1 commit into
MediaArea:mainfrom
JeromeMartinez:BlockSlices
Oct 27, 2026
Merged

JeromeMartinez merged 1 commit into
MediaArea:mainfrom
JeromeMartinez:BlockSlices

Conversation

@JeromeMartinez

Copy link
Copy Markdown
Member

DPX with blocks of several pixels and v210: a 32-bit word with the data of pixels of several slices is written by one slice, the other slices put their part of the word in their slot, merged when all slices are decoded.

  • RGB and Y 12-bit packed, Y 10-bit filled: the slot index is the slice index (wrong index with narrow slices, e.g. 600 pixels and 32 slices, or 1 pixel per slice), the merge is done for all frames (it was skipped if the first slice had no block in 2 slices) and only for slice ends inside a block (Y 10-bit merged slots not written).
  • RGBA 10-bit filled and RGBA 12-bit packed: slice beginning or ending inside a block, it was not supported.
  • v210: same with up to 2 words per slot, the chroma of a slice being from x / 2 with ceil(w / 2) samples (a chroma pair split by an odd slice boundary, e.g. FFmpeg software encoder with 720 pixels and 16 horizontal slices, is in both slices), it was not supported. A plane is reused only with the same line slice count (slots indexed by slice), or by a decoder with 1 slice.
    The slice count is no longer reduced for RGBA 10-bit, RGBA 12-bit packed and v210 (e.g. 144 slices instead of 64 for 2048-pixel RGBA 12-bit), lines ending inside a block are still rejected for them. Checked with the internal decoder: DPX block flavors and v210 encoded with -slices 1 to 1024 and ffv1_vulkan.

DPX with blocks of several pixels and v210: a 32-bit word with the data
of pixels of several slices is written by one slice, the other slices
put their part of the word in their slot, merged when all slices are
decoded.
- RGB and Y 12-bit packed, Y 10-bit filled: the slot index is the slice
  index (wrong index with narrow slices, e.g. 600 pixels and 32 slices,
  or 1 pixel per slice), the merge is done for all frames (it was
  skipped if the first slice had no block in 2 slices) and only for
  slice ends inside a block (Y 10-bit merged slots not written).
- RGBA 10-bit filled and RGBA 12-bit packed: slice beginning or ending
  inside a block, it was not supported.
- v210: same with up to 2 words per slot, the chroma of a slice being
  from x / 2 with ceil(w / 2) samples (a chroma pair split by an odd
  slice boundary, e.g. FFmpeg software encoder with 720 pixels and 16
  horizontal slices, is in both slices), it was not supported.
A plane is reused only with the same line slice count (slots indexed by
slice), or by a decoder with 1 slice.
The slice count is no longer reduced for RGBA 10-bit, RGBA 12-bit
packed and v210 (e.g. 144 slices instead of 64 for 2048-pixel RGBA
12-bit), lines ending inside a block are still rejected for them.
Checked with the internal decoder: DPX block flavors and v210 encoded
with -slices 1 to 1024 and ffv1_vulkan.
@JeromeMartinez
JeromeMartinez merged commit bc23118 into MediaArea:main Oct 27, 2026
3 checks passed
@JeromeMartinez
JeromeMartinez deleted the BlockSlices branch October 27, 2026 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant