Open
Description
I added the SizeMultiple
struct, because some formats (e.g. NV12) can only create images where the width and height are even numbers. The idea was to give users an API to see whether a specific size is supported for encoding ahead of time.
Ideas to resolve this:
- Remove
SizeMultiple
and replace it with aEncodingSupport::supports_size(Size) -> bool
function. This shrinks the API surface, but it also obscures what the size multiples are. - Remove
SizeMultiple
and use a tuple instead. - Make the entire size multiple API private. Do users need to know this anyway?
- Move this information into
PixelInfo
. The size multiples derive from subsampling, so we also store whether the size needs to be a multiple of the subsampling.
Some notes:
- IIRC, there are only a total of 6 formats with such requirements. Each of which rarely used.
- Size multiples cannot be represented by a single number. IIRC, NV11 requires a width divisible by 4 but works for any height.
Metadata
Metadata
Assignees
Labels
No labels