class ImageFormatConstraints

Defined at line 2269 of file fidling/gen/sdk/fidl/fuchsia.sysmem/fuchsia.sysmem/cpp/fidl/fuchsia.sysmem/cpp/natural_types.h

Describes constraints on layout of image data in buffers.

This type is deprecated for new code, but is still used by some camera code.

Public Methods

void ImageFormatConstraints ()

Default constructs a |ImageFormatConstraints| only if all of its members are default constructible.

Defined at line 2279 of file fidling/gen/sdk/fidl/fuchsia.sysmem/fuchsia.sysmem/cpp/fidl/fuchsia.sysmem/cpp/natural_types.h

void ImageFormatConstraints (ImageFormatConstraints && )

Defined at line 2282 of file fidling/gen/sdk/fidl/fuchsia.sysmem/fuchsia.sysmem/cpp/fidl/fuchsia.sysmem/cpp/natural_types.h

void ImageFormatConstraints (Storage_ storage)
void ImageFormatConstraints (::fuchsia_sysmem::PixelFormat pixel_format, uint32_t color_spaces_count, ::std::array< ::fuchsia_sysmem::ColorSpace, 32> color_space, uint32_t min_coded_width, uint32_t max_coded_width, uint32_t min_coded_height, uint32_t max_coded_height, uint32_t min_bytes_per_row, uint32_t max_bytes_per_row, uint32_t max_coded_width_times_coded_height, uint32_t layers, uint32_t coded_width_divisor, uint32_t coded_height_divisor, uint32_t bytes_per_row_divisor, uint32_t start_offset_divisor, uint32_t display_width_divisor, uint32_t display_height_divisor, uint32_t required_min_coded_width, uint32_t required_max_coded_width, uint32_t required_min_coded_height, uint32_t required_max_coded_height, uint32_t required_min_bytes_per_row, uint32_t required_max_bytes_per_row)
void ImageFormatConstraints (const ImageFormatConstraints & other)
ImageFormatConstraints & operator= (const ImageFormatConstraints & other)
bool operator== (const ImageFormatConstraints & other)
bool operator!= (const ImageFormatConstraints & other)
const ::fuchsia_sysmem::PixelFormat & pixel_format ()

The PixelFormat for which the following constraints apply. A

participant may have more than one PixelFormat that's supported, in

which case that participant can use a list of ImageFormatConstraints

with an entry per PixelFormat. It's not uncommon for the other fields

of ImageFormatConstraints to vary by PixelFormat - for example for a

linear format to support smaller max size than a tiled format.

::fuchsia_sysmem::PixelFormat & pixel_format ()

The PixelFormat for which the following constraints apply. A

participant may have more than one PixelFormat that's supported, in

which case that participant can use a list of ImageFormatConstraints

with an entry per PixelFormat. It's not uncommon for the other fields

of ImageFormatConstraints to vary by PixelFormat - for example for a

linear format to support smaller max size than a tiled format.

ImageFormatConstraints & pixel_format (::fuchsia_sysmem::PixelFormat value)

The PixelFormat for which the following constraints apply. A

participant may have more than one PixelFormat that's supported, in

which case that participant can use a list of ImageFormatConstraints

with an entry per PixelFormat. It's not uncommon for the other fields

of ImageFormatConstraints to vary by PixelFormat - for example for a

linear format to support smaller max size than a tiled format.

uint32_t color_spaces_count ()

Empty is an error. Redundant entries are an error. Arbitrary ordering

is not an error.

uint32_t & color_spaces_count ()

Empty is an error. Redundant entries are an error. Arbitrary ordering

is not an error.

ImageFormatConstraints & color_spaces_count (uint32_t value)

Empty is an error. Redundant entries are an error. Arbitrary ordering

is not an error.

const ::std::array< ::fuchsia_sysmem::ColorSpace, 32> & color_space ()
::std::array< ::fuchsia_sysmem::ColorSpace, 32> & color_space ()
ImageFormatConstraints & color_space (::std::array< ::fuchsia_sysmem::ColorSpace, 32> value)

Setter for color_space.

uint32_t min_coded_width ()

Minimum permitted width in pixels.

For example a video decoder participant may set this field to the

minimum coded_width that might potentially be specified by a stream. In

contrast, required_min_coded_width would be set to the current

coded_width specified by the stream. While min_coded_width aggregates

by taking the max, required_min_coded_width aggregates by taking the

min.

See also required_min_coded_width.

uint32_t & min_coded_width ()

Minimum permitted width in pixels.

For example a video decoder participant may set this field to the

minimum coded_width that might potentially be specified by a stream. In

contrast, required_min_coded_width would be set to the current

coded_width specified by the stream. While min_coded_width aggregates

by taking the max, required_min_coded_width aggregates by taking the

min.

See also required_min_coded_width.

ImageFormatConstraints & min_coded_width (uint32_t value)

Minimum permitted width in pixels.

For example a video decoder participant may set this field to the

minimum coded_width that might potentially be specified by a stream. In

contrast, required_min_coded_width would be set to the current

coded_width specified by the stream. While min_coded_width aggregates

by taking the max, required_min_coded_width aggregates by taking the

min.

See also required_min_coded_width.

uint32_t max_coded_width ()

Maximum width in pixels. For example Scenic may set this field

(directly or via sub-participants) to the maximum width that can be

composited.

0 is treated as 0xFFFFFFFF.

uint32_t & max_coded_width ()

Maximum width in pixels. For example Scenic may set this field

(directly or via sub-participants) to the maximum width that can be

composited.

0 is treated as 0xFFFFFFFF.

ImageFormatConstraints & max_coded_width (uint32_t value)

Maximum width in pixels. For example Scenic may set this field

(directly or via sub-participants) to the maximum width that can be

composited.

0 is treated as 0xFFFFFFFF.

uint32_t min_coded_height ()

Minimum height in pixels. For example a video decoder participant may

set this field to the coded_height specified by a stream.

uint32_t & min_coded_height ()

Minimum height in pixels. For example a video decoder participant may

set this field to the coded_height specified by a stream.

ImageFormatConstraints & min_coded_height (uint32_t value)

Minimum height in pixels. For example a video decoder participant may

set this field to the coded_height specified by a stream.

uint32_t max_coded_height ()

Maximum height in pixels. For example Scenic may set this field

(directly or via sub-participants) to the maximum height that can be

composited.

0 is treated as 0xFFFFFFFF.

uint32_t & max_coded_height ()

Maximum height in pixels. For example Scenic may set this field

(directly or via sub-participants) to the maximum height that can be

composited.

0 is treated as 0xFFFFFFFF.

ImageFormatConstraints & max_coded_height (uint32_t value)

Maximum height in pixels. For example Scenic may set this field

(directly or via sub-participants) to the maximum height that can be

composited.

0 is treated as 0xFFFFFFFF.

uint32_t min_bytes_per_row ()

Must be >= the value implied by min_coded_width for plane 0.

uint32_t & min_bytes_per_row ()

Must be >= the value implied by min_coded_width for plane 0.

ImageFormatConstraints & min_bytes_per_row (uint32_t value)

Must be >= the value implied by min_coded_width for plane 0.

uint32_t max_bytes_per_row ()

Must be >= the value implied by max_coded_width for plane 0.

0 is treated as 0xFFFFFFFF.

uint32_t & max_bytes_per_row ()

Must be >= the value implied by max_coded_width for plane 0.

0 is treated as 0xFFFFFFFF.

ImageFormatConstraints & max_bytes_per_row (uint32_t value)

Must be >= the value implied by max_coded_width for plane 0.

0 is treated as 0xFFFFFFFF.

uint32_t max_coded_width_times_coded_height ()

The max image area in pixels is limited indirectly via

BufferSettings.size_bytes, and can also be enforced directly via this

field.

0 is treated as 0xFFFFFFFF.

uint32_t & max_coded_width_times_coded_height ()

The max image area in pixels is limited indirectly via

BufferSettings.size_bytes, and can also be enforced directly via this

field.

0 is treated as 0xFFFFFFFF.

ImageFormatConstraints & max_coded_width_times_coded_height (uint32_t value)

The max image area in pixels is limited indirectly via

BufferSettings.size_bytes, and can also be enforced directly via this

field.

0 is treated as 0xFFFFFFFF.

uint32_t layers ()

Number of layers within a multi-layered image.

0 is treated as 1.

uint32_t & layers ()

Number of layers within a multi-layered image.

0 is treated as 1.

ImageFormatConstraints & layers (uint32_t value)

Number of layers within a multi-layered image.

0 is treated as 1.

uint32_t coded_width_divisor ()

coded_width % width_divisor must be 0.

0 is treated as 1.

uint32_t & coded_width_divisor ()

coded_width % width_divisor must be 0.

0 is treated as 1.

ImageFormatConstraints & coded_width_divisor (uint32_t value)

coded_width % width_divisor must be 0.

0 is treated as 1.

uint32_t coded_height_divisor ()

coded_height % height_divisor must be 0.

0 is treated as 1.

uint32_t & coded_height_divisor ()

coded_height % height_divisor must be 0.

0 is treated as 1.

ImageFormatConstraints & coded_height_divisor (uint32_t value)

coded_height % height_divisor must be 0.

0 is treated as 1.

uint32_t bytes_per_row_divisor ()

bytes_per_row % bytes_per_row_divisor must be 0.

0 is treated as 1.

uint32_t & bytes_per_row_divisor ()

bytes_per_row % bytes_per_row_divisor must be 0.

0 is treated as 1.

ImageFormatConstraints & bytes_per_row_divisor (uint32_t value)

bytes_per_row % bytes_per_row_divisor must be 0.

0 is treated as 1.

uint32_t start_offset_divisor ()

vmo_usable_start % start_offset_divisor must be 0.

0 is treated as 1.

uint32_t & start_offset_divisor ()

vmo_usable_start % start_offset_divisor must be 0.

0 is treated as 1.

ImageFormatConstraints & start_offset_divisor (uint32_t value)

vmo_usable_start % start_offset_divisor must be 0.

0 is treated as 1.

uint32_t display_width_divisor ()

display_width % display_width_divisor must be 0.

0 is treated as 1.

uint32_t & display_width_divisor ()

display_width % display_width_divisor must be 0.

0 is treated as 1.

ImageFormatConstraints & display_width_divisor (uint32_t value)

display_width % display_width_divisor must be 0.

0 is treated as 1.

uint32_t display_height_divisor ()

display_height % display_height_divisor must be 0.

0 is treated as 1.

uint32_t & display_height_divisor ()

display_height % display_height_divisor must be 0.

0 is treated as 1.

ImageFormatConstraints & display_height_divisor (uint32_t value)

display_height % display_height_divisor must be 0.

0 is treated as 1.

uint32_t required_min_coded_width ()

required_ dimension bounds.

In contrast to the corresponding fields without "required_" at the

start, these fields (when set to non-zero values) express a requirement

that the resulting aggregated non-required_ fields specify a space that

fully contain the space expressed by each participant's required_

fields.

For example, a producer video decoder is perfectly happy for the

consumer to be willing to accept anything, and the video decoder doesn't

really want to constrain the potential space of dimensions that might be

seen in a stream and may be acceptable to the consumer, but the video

decoder needs to ensure that the resulting dimension ranges contain

at least the current dimensions decoded from the stream.

Similarly, an initiator with a particular dynamic-dimension scenario in

mind may wish to require up front that participants agree to handle at

least the range of dimensions expected by the initiator in that

scenario (else fail earlier rather than later, maybe trying again with

smaller required_ space).

It's much more common for a producer or initiator to set these fields

than for a consumer to set these fields.

While the non-required_ fields aggregate by taking the intersection, the

required_ fields aggregate by taking the union.

If set, the required_max_coded_width and required_max_coded_height will

cause the allocated buffers to be large enough to hold an image that is

required_max_coded_width * required_max_coded_height.

TODO(dustingreen): Make it easier to allocate buffers of minimal size

that can (optionally) also handle 90 degree rotated version of the max

dimensions / alternate required bounds for another main aspect ratio.

0 is treated as 0xFFFFFFFF.

uint32_t & required_min_coded_width ()

required_ dimension bounds.

In contrast to the corresponding fields without "required_" at the

start, these fields (when set to non-zero values) express a requirement

that the resulting aggregated non-required_ fields specify a space that

fully contain the space expressed by each participant's required_

fields.

For example, a producer video decoder is perfectly happy for the

consumer to be willing to accept anything, and the video decoder doesn't

really want to constrain the potential space of dimensions that might be

seen in a stream and may be acceptable to the consumer, but the video

decoder needs to ensure that the resulting dimension ranges contain

at least the current dimensions decoded from the stream.

Similarly, an initiator with a particular dynamic-dimension scenario in

mind may wish to require up front that participants agree to handle at

least the range of dimensions expected by the initiator in that

scenario (else fail earlier rather than later, maybe trying again with

smaller required_ space).

It's much more common for a producer or initiator to set these fields

than for a consumer to set these fields.

While the non-required_ fields aggregate by taking the intersection, the

required_ fields aggregate by taking the union.

If set, the required_max_coded_width and required_max_coded_height will

cause the allocated buffers to be large enough to hold an image that is

required_max_coded_width * required_max_coded_height.

TODO(dustingreen): Make it easier to allocate buffers of minimal size

that can (optionally) also handle 90 degree rotated version of the max

dimensions / alternate required bounds for another main aspect ratio.

0 is treated as 0xFFFFFFFF.

ImageFormatConstraints & required_min_coded_width (uint32_t value)

required_ dimension bounds.

In contrast to the corresponding fields without "required_" at the

start, these fields (when set to non-zero values) express a requirement

that the resulting aggregated non-required_ fields specify a space that

fully contain the space expressed by each participant's required_

fields.

For example, a producer video decoder is perfectly happy for the

consumer to be willing to accept anything, and the video decoder doesn't

really want to constrain the potential space of dimensions that might be

seen in a stream and may be acceptable to the consumer, but the video

decoder needs to ensure that the resulting dimension ranges contain

at least the current dimensions decoded from the stream.

Similarly, an initiator with a particular dynamic-dimension scenario in

mind may wish to require up front that participants agree to handle at

least the range of dimensions expected by the initiator in that

scenario (else fail earlier rather than later, maybe trying again with

smaller required_ space).

It's much more common for a producer or initiator to set these fields

than for a consumer to set these fields.

While the non-required_ fields aggregate by taking the intersection, the

required_ fields aggregate by taking the union.

If set, the required_max_coded_width and required_max_coded_height will

cause the allocated buffers to be large enough to hold an image that is

required_max_coded_width * required_max_coded_height.

TODO(dustingreen): Make it easier to allocate buffers of minimal size

that can (optionally) also handle 90 degree rotated version of the max

dimensions / alternate required bounds for another main aspect ratio.

0 is treated as 0xFFFFFFFF.

uint32_t required_max_coded_width ()
uint32_t & required_max_coded_width ()
ImageFormatConstraints & required_max_coded_width (uint32_t value)

Setter for required_max_coded_width.

uint32_t required_min_coded_height ()

0 is treated as 0xFFFFFFFF.

uint32_t & required_min_coded_height ()

0 is treated as 0xFFFFFFFF.

ImageFormatConstraints & required_min_coded_height (uint32_t value)

0 is treated as 0xFFFFFFFF.

uint32_t required_max_coded_height ()
uint32_t & required_max_coded_height ()
ImageFormatConstraints & required_max_coded_height (uint32_t value)

Setter for required_max_coded_height.

uint32_t required_min_bytes_per_row ()

0 is treated as 0xFFFFFFFF.

uint32_t & required_min_bytes_per_row ()

0 is treated as 0xFFFFFFFF.

ImageFormatConstraints & required_min_bytes_per_row (uint32_t value)

0 is treated as 0xFFFFFFFF.

uint32_t required_max_bytes_per_row ()
uint32_t & required_max_bytes_per_row ()
ImageFormatConstraints & required_max_bytes_per_row (uint32_t value)

Setter for required_max_bytes_per_row.

void ImageFormatConstraints (::fidl::internal::DefaultConstructPossiblyInvalidObjectTag )
ImageFormatConstraints & operator= (ImageFormatConstraints && )

Defined at line 2283 of file fidling/gen/sdk/fidl/fuchsia.sysmem/fuchsia.sysmem/cpp/fidl/fuchsia.sysmem/cpp/natural_types.h

Friends

class MemberVisitor
class NaturalStructCodingTraits