VDPAU: VdpOutputSurface; Output Surface object

VDPAU

Macros | Typedefs
VdpOutputSurface; Output Surface object
Core API
Collaboration diagram for VdpOutputSurface; Output Surface object:

## Macros
#define | VDP_COLOR_TABLE_FORMAT_B8G8R8X8
| 8-bit per component packed into 32-bits

## Typedefs
typedef uint32_t | VdpColorTableFormat
| The set of all known color table formats, for use with VdpOutputSurfacePutBitsIndexed.
typedef VdpStatus | VdpOutputSurfaceQueryCapabilities(VdpDevice device, VdpRGBAFormat surface_rgba_format, VdpBool *is_supported, uint32_t *max_width, uint32_t *max_height)
| Query the implementation's VdpOutputSurface capabilities.
typedef VdpStatus | VdpOutputSurfaceQueryGetPutBitsNativeCapabilities(VdpDevice device, VdpRGBAFormat surface_rgba_format, VdpBool *is_supported)
| Query the implementation's capability to perform a PutBits operation using application data matching the surface's format.
typedef VdpStatus | VdpOutputSurfaceQueryPutBitsIndexedCapabilities(VdpDevice device, VdpRGBAFormat surface_rgba_format, VdpIndexedFormat bits_indexed_format, VdpColorTableFormat color_table_format, VdpBool *is_supported)
| Query the implementation's capability to perform a PutBits operation using application data in a specific indexed format.
typedef VdpStatus | VdpOutputSurfaceQueryPutBitsYCbCrCapabilities(VdpDevice device, VdpRGBAFormat surface_rgba_format, VdpYCbCrFormat bits_ycbcr_format, VdpBool *is_supported)
| Query the implementation's capability to perform a PutBits operation using application data in a specific YCbCr/YUB format.
typedef uint32_t | VdpOutputSurface
| An opaque handle representing a VdpOutputSurface object.
typedef VdpStatus | VdpOutputSurfaceCreate(VdpDevice device, VdpRGBAFormat rgba_format, uint32_t width, uint32_t height, VdpOutputSurface *surface)
| Create a VdpOutputSurface.
typedef VdpStatus | VdpOutputSurfaceDestroy(VdpOutputSurface surface)
| Destroy a VdpOutputSurface.
typedef VdpStatus | VdpOutputSurfaceGetParameters(VdpOutputSurface surface, VdpRGBAFormat *rgba_format, uint32_t *width, uint32_t *height)
| Retrieve the parameters used to create a VdpOutputSurface.
typedef VdpStatus | VdpOutputSurfaceGetBitsNative(VdpOutputSurface surface, VdpRect const *source_rect, void *const *destination_data, uint32_t const *destination_pitches)
| Copy image data from a VdpOutputSurface to application memory in the surface's native format.
typedef VdpStatus | VdpOutputSurfacePutBitsNative(VdpOutputSurface surface, void const *const *source_data, uint32_t const *source_pitches, VdpRect const *destination_rect)
| Copy image data from application memory in the surface's native format to a VdpOutputSurface.
typedef VdpStatus | VdpOutputSurfacePutBitsIndexed(VdpOutputSurface surface, VdpIndexedFormat source_indexed_format, void const *const *source_data, uint32_t const *source_pitch, VdpRect const *destination_rect, VdpColorTableFormat color_table_format, void const *color_table)
| Copy image data from application memory in a specific indexed format to a VdpOutputSurface.
typedef VdpStatus | VdpOutputSurfacePutBitsYCbCr(VdpOutputSurface surface, VdpYCbCrFormat source_ycbcr_format, void const *const *source_data, uint32_t const *source_pitches, VdpRect const *destination_rect, VdpCSCMatrix const *csc_matrix)
| Copy image data from application memory in a specific YCbCr format to a VdpOutputSurface.

## Detailed Description

A VdpOutputSurface stores RGBA data in a defined format.

A VdpOutputSurface may be filled with:

- Data provided by the CPU via the various VdpOutputSurfacePutBits functions.
- Using the VdpOutputSurface rendering functionality.
- Using a VdpVideoMixer object.

VdpOutputSurface content may be accessed by:

- The application via the various VdpOutputSurfaceGetBits functions.
- The Hardware that implements VdpOutputSurface rendering functionality.
- The Hardware the implements VdpVideoMixer functionality.
- The Hardware that implements VdpPresentationQueue functionality,

VdpOutputSurfaces are directly displayable using a VdpPresentationQueue object.

## Macro Definition Documentation

## ◆ VDP_COLOR_TABLE_FORMAT_B8G8R8X8

#define VDP_COLOR_TABLE_FORMAT_B8G8R8X8

8-bit per component packed into 32-bits

This format is an array of packed 32-bit RGB color values. Bits [31:24] are unused, bits [23:16] contain R, bits [15:8] contain G, and bits [7:0] contain B. Note: The format is physically an array of uint32_t values, and should be accessed as such by the application in order to avoid endianness issues.

## Typedef Documentation

## ◆ VdpColorTableFormat

typedef uint32_t VdpColorTableFormat

The set of all known color table formats, for use with VdpOutputSurfacePutBitsIndexed.

## ◆ VdpOutputSurface

typedef uint32_t VdpOutputSurface

An opaque handle representing a VdpOutputSurface object.

## ◆ VdpOutputSurfaceCreate

typedef VdpStatus VdpOutputSurfaceCreate(VdpDevice device, VdpRGBAFormat rgba_format, uint32_t width, uint32_t height, VdpOutputSurface *surface)

Create a VdpOutputSurface.

Parameters

  [in] | device | The device that will contain the surface.
  [in] | rgba_format | The format of the new surface.
  [in] | width | The width of the new surface.
  [in] | height | The height of the new surface.
  [out] | surface | The new surface's handle.

Returns
  VdpStatus The completion status of the operation.

The memory backing the surface will be initialized to 0 color and 0 alpha (i.e. black.)

## ◆ VdpOutputSurfaceDestroy

typedef VdpStatus VdpOutputSurfaceDestroy(VdpOutputSurface surface)

Destroy a VdpOutputSurface.

Parameters

  [in] | surface | The surface's handle.

Returns
  VdpStatus The completion status of the operation.

## ◆ VdpOutputSurfaceGetBitsNative

typedef VdpStatus VdpOutputSurfaceGetBitsNative(VdpOutputSurface surface, VdpRect const *source_rect, void *const *destination_data, uint32_t const *destination_pitches)

Copy image data from a VdpOutputSurface to application memory in the surface's native format.

Parameters

  [in] | surface | The surface's handle.
  [in] | source_rect | The sub-rectangle of the source surface to copy. If NULL, the entire surface will be retrieved.
  [in] | destination_data | Pointers to the application data buffers into which the image data will be written. Note that this is an array of pointers, one per plane. The destination_format parameter will define how many planes are required.
  [in] | destination_pitches | Pointers to the pitch values for the application data buffers. Note that this is an array of pointers, one per plane. The destination_format parameter will define how many planes are required.

Returns
  VdpStatus The completion status of the operation.

## ◆ VdpOutputSurfaceGetParameters

typedef VdpStatus VdpOutputSurfaceGetParameters(VdpOutputSurface surface, VdpRGBAFormat *rgba_format, uint32_t *width, uint32_t *height)

Retrieve the parameters used to create a VdpOutputSurface.

Parameters

  [in] | surface | The surface's handle.
  [out] | rgba_format | The format of the surface.
  [out] | width | The width of the surface.
  [out] | height | The height of the surface.

Returns
  VdpStatus The completion status of the operation.

## ◆ VdpOutputSurfacePutBitsIndexed

typedef VdpStatus VdpOutputSurfacePutBitsIndexed(VdpOutputSurface surface, VdpIndexedFormat source_indexed_format, void const *const *source_data, uint32_t const *source_pitch, VdpRect const *destination_rect, VdpColorTableFormat color_table_format, void const *color_table)

Copy image data from application memory in a specific indexed format to a VdpOutputSurface.

Parameters

  [in] | surface | The surface's handle.
  [in] | source_indexed_format | The format of the application's data buffers.
  [in] | source_data | Pointers to the application data buffers from which the image data will be copied. Note that this is an array of pointers, one per plane. The source_indexed_format parameter will define how many planes are required.
  [in] | source_pitches | Pointers to the pitch values for the application data buffers. Note that this is an array of pointers, one per plane. The source_indexed_format parameter will define how many planes are required.
  [in] | destination_rect | The sub-rectangle of the surface to fill with application data. If NULL, the entire surface will be updated.
  [in] | color_table_format | The format of the color_table.
  [in] | color_table | A table that maps between source index and target color data. See VdpColorTableFormat for details regarding the memory layout.

Returns
  VdpStatus The completion status of the operation.

## ◆ VdpOutputSurfacePutBitsNative

typedef VdpStatus VdpOutputSurfacePutBitsNative(VdpOutputSurface surface, void const *const *source_data, uint32_t const *source_pitches, VdpRect const *destination_rect)

Copy image data from application memory in the surface's native format to a VdpOutputSurface.

Parameters

  [in] | surface | The surface's handle.
  [in] | source_data | Pointers to the application data buffers from which the image data will be copied. Note that this is an array of pointers, one per plane. The source_format parameter will define how many planes are required.
  [in] | source_pitches | Pointers to the pitch values for the application data buffers. Note that this is an array of pointers, one per plane. The source_format parameter will define how many planes are required.
  [in] | destination_rect | The sub-rectangle of the surface to fill with application data. If NULL, the entire surface will be updated.

Returns
  VdpStatus The completion status of the operation.

## ◆ VdpOutputSurfacePutBitsYCbCr

typedef VdpStatus VdpOutputSurfacePutBitsYCbCr(VdpOutputSurface surface, VdpYCbCrFormat source_ycbcr_format, void const *const *source_data, uint32_t const *source_pitches, VdpRect const *destination_rect, VdpCSCMatrix const *csc_matrix)

Copy image data from application memory in a specific YCbCr format to a VdpOutputSurface.

Parameters

  [in] | surface | The surface's handle.
  [in] | source_ycbcr_format | The format of the application's data buffers.
  [in] | source_data | Pointers to the application data buffers from which the image data will be copied. Note that this is an array of pointers, one per plane. The source_ycbcr_format parameter will define how many planes are required.
  [in] | source_pitches | Pointers to the pitch values for the application data buffers. Note that this is an array of pointers, one per plane. The source_ycbcr_format parameter will define how many planes are required.
  [in] | destination_rect | The sub-rectangle of the surface to fill with application data. If NULL, the entire surface will be updated.
  [in] | csc_matrix | The color space conversion matrix used by the copy operation. If NULL, a default matrix will be used internally. Th default matrix is equivalent to ITU-R BT.601 with no procamp changes.

Returns
  VdpStatus The completion status of the operation.

## ◆ VdpOutputSurfaceQueryCapabilities

typedef VdpStatus VdpOutputSurfaceQueryCapabilities(VdpDevice device, VdpRGBAFormat surface_rgba_format, VdpBool *is_supported, uint32_t *max_width, uint32_t *max_height)

Query the implementation's VdpOutputSurface capabilities.

Parameters

  [in] | device | The device to query.
  [in] | surface_rgba_format | The surface format for which information is requested.
  [out] | is_supported | Is this surface format supported?
  [out] | max_width | The maximum supported surface width for this chroma type.
  [out] | max_height | The maximum supported surface height for this chroma type.

Returns
  VdpStatus The completion status of the operation.

## ◆ VdpOutputSurfaceQueryGetPutBitsNativeCapabilities

typedef VdpStatus VdpOutputSurfaceQueryGetPutBitsNativeCapabilities(VdpDevice device, VdpRGBAFormat surface_rgba_format, VdpBool *is_supported)

Query the implementation's capability to perform a PutBits operation using application data matching the surface's format.

Parameters

  [in] | device | The device to query.
  [in] | surface_rgba_format | The surface format for which information is requested.
  [out] | is_supported | Is this surface format supported?

Returns
  VdpStatus The completion status of the operation.

## ◆ VdpOutputSurfaceQueryPutBitsIndexedCapabilities

typedef VdpStatus VdpOutputSurfaceQueryPutBitsIndexedCapabilities(VdpDevice device, VdpRGBAFormat surface_rgba_format, VdpIndexedFormat bits_indexed_format, VdpColorTableFormat color_table_format, VdpBool *is_supported)

Query the implementation's capability to perform a PutBits operation using application data in a specific indexed format.

Parameters

  [in] | device | The device to query.
  [in] | surface_rgba_format | The surface format for which information is requested.
  [in] | bits_indexed_format | The format of the application data buffer.
  [in] | color_table_format | The format of the color lookup table.
  [out] | is_supported | Is this surface format supported?

Returns
  VdpStatus The completion status of the operation.

## ◆ VdpOutputSurfaceQueryPutBitsYCbCrCapabilities

typedef VdpStatus VdpOutputSurfaceQueryPutBitsYCbCrCapabilities(VdpDevice device, VdpRGBAFormat surface_rgba_format, VdpYCbCrFormat bits_ycbcr_format, VdpBool *is_supported)

Query the implementation's capability to perform a PutBits operation using application data in a specific YCbCr/YUB format.

Parameters

  [in] | device | The device to query.
  [in] | surface_rgba_format | The surface format for which information is requested.
  [in] | bits_ycbcr_format | The format of the application data buffer.
  [out] | is_supported | Is this surface format supported?

Returns
  VdpStatus The completion status of the operation.