|
WebM Codec SDK
|
Describes the vpx image descriptor and associated operations. More...
Go to the source code of this file.
Data Structures | |
| struct | vpx_image |
| Image Descriptor. More... | |
| struct | vpx_image_rect |
| Representation of a rectangle on a surface. More... | |
Macros | |
| #define | VPX_IMAGE_ABI_VERSION |
| Current ABI version number. | |
| #define | VPX_IMG_FMT_PLANAR 0x100 |
| #define | VPX_IMG_FMT_UV_FLIP 0x200 |
| #define | VPX_IMG_FMT_HAS_ALPHA 0x400 |
| #define | VPX_IMG_FMT_HIGHBITDEPTH 0x800 |
| #define | VPX_PLANE_PACKED 0 |
| #define | VPX_PLANE_Y 0 |
| #define | VPX_PLANE_U 1 |
| #define | VPX_PLANE_V 2 |
| #define | VPX_PLANE_ALPHA 3 |
Typedefs | |
| typedef enum vpx_img_fmt | vpx_img_fmt_t |
| List of supported image formats. More... | |
| typedef enum vpx_color_space | vpx_color_space_t |
| List of supported color spaces. More... | |
| typedef enum vpx_color_range | vpx_color_range_t |
| List of supported color range. More... | |
| typedef struct vpx_image | vpx_image_t |
| Image Descriptor. More... | |
| typedef struct vpx_image_rect | vpx_image_rect_t |
| Representation of a rectangle on a surface. More... | |
Functions | |
| vpx_image_t * | vpx_img_alloc (vpx_image_t *img, vpx_img_fmt_t fmt, unsigned int d_w, unsigned int d_h, unsigned int align) |
| Open a descriptor, allocating storage for the underlying image. More... | |
| vpx_image_t * | vpx_img_wrap (vpx_image_t *img, vpx_img_fmt_t fmt, unsigned int d_w, unsigned int d_h, unsigned int align, unsigned char *img_data) |
| Open a descriptor, using existing storage for the underlying image. More... | |
| int | vpx_img_set_rect (vpx_image_t *img, unsigned int x, unsigned int y, unsigned int w, unsigned int h) |
| Set the rectangle identifying the displayed portion of the image. More... | |
| void | vpx_img_flip (vpx_image_t *img) |
| Flip the image vertically (top for bottom) More... | |
| void | vpx_img_free (vpx_image_t *img) |
| Close an image descriptor. More... | |
Describes the vpx image descriptor and associated operations.
| #define VPX_IMG_FMT_PLANAR 0x100 |
Image is a planar format.
| #define VPX_IMG_FMT_UV_FLIP 0x200 |
V plane precedes U in memory.
| #define VPX_IMG_FMT_HAS_ALPHA 0x400 |
Image has an alpha channel.
| #define VPX_IMG_FMT_HIGHBITDEPTH 0x800 |
Image uses 16bit framebuffer.
| #define VPX_PLANE_PACKED 0 |
To be used for all packed formats
| #define VPX_PLANE_Y 0 |
Y (Luminance) plane
| #define VPX_PLANE_U 1 |
U (Chroma) plane
| #define VPX_PLANE_V 2 |
V (Chroma) plane
| #define VPX_PLANE_ALPHA 3 |
A (Transparency) plane
| typedef enum vpx_img_fmt vpx_img_fmt_t |
List of supported image formats.
alias for enum vpx_img_fmt
| typedef enum vpx_color_space vpx_color_space_t |
List of supported color spaces.
alias for enum vpx_color_space
| typedef enum vpx_color_range vpx_color_range_t |
List of supported color range.
alias for enum vpx_color_range
| typedef struct vpx_image vpx_image_t |
Image Descriptor.
alias for struct vpx_image
| typedef struct vpx_image_rect vpx_image_rect_t |
Representation of a rectangle on a surface.
alias for struct vpx_image_rect
| enum vpx_img_fmt |
List of supported image formats.
| enum vpx_color_space |
| enum vpx_color_range |
| vpx_image_t* vpx_img_alloc | ( | vpx_image_t * | img, |
| vpx_img_fmt_t | fmt, | ||
| unsigned int | d_w, | ||
| unsigned int | d_h, | ||
| unsigned int | align | ||
| ) |
Open a descriptor, allocating storage for the underlying image.
Returns a descriptor for storing an image of the given format. The storage for the descriptor is allocated on the heap.
| [in] | img | Pointer to storage for descriptor. If this parameter is NULL, the storage for the descriptor will be allocated on the heap. |
| [in] | fmt | Format for the image |
| [in] | d_w | Width of the image |
| [in] | d_h | Height of the image |
| [in] | align | Alignment, in bytes, of the image buffer and each row in the image(stride). |
| vpx_image_t* vpx_img_wrap | ( | vpx_image_t * | img, |
| vpx_img_fmt_t | fmt, | ||
| unsigned int | d_w, | ||
| unsigned int | d_h, | ||
| unsigned int | align, | ||
| unsigned char * | img_data | ||
| ) |
Open a descriptor, using existing storage for the underlying image.
Returns a descriptor for storing an image of the given format. The storage for descriptor has been allocated elsewhere, and a descriptor is desired to "wrap" that storage.
| [in] | img | Pointer to storage for descriptor. If this parameter is NULL, the storage for the descriptor will be allocated on the heap. |
| [in] | fmt | Format for the image |
| [in] | d_w | Width of the image |
| [in] | d_h | Height of the image |
| [in] | align | Alignment, in bytes, of each row in the image. |
| [in] | img_data | Storage to use for the image |
| int vpx_img_set_rect | ( | vpx_image_t * | img, |
| unsigned int | x, | ||
| unsigned int | y, | ||
| unsigned int | w, | ||
| unsigned int | h | ||
| ) |
Set the rectangle identifying the displayed portion of the image.
Updates the displayed rectangle (aka viewport) on the image surface to match the specified coordinates and size.
| [in] | img | Image descriptor |
| [in] | x | leftmost column |
| [in] | y | topmost row |
| [in] | w | width |
| [in] | h | height |
| void vpx_img_flip | ( | vpx_image_t * | img | ) |
Flip the image vertically (top for bottom)
Adjusts the image descriptor's pointers and strides to make the image be referenced upside-down.
| [in] | img | Image descriptor |
| void vpx_img_free | ( | vpx_image_t * | img | ) |
Close an image descriptor.
Frees all allocated storage associated with an image descriptor.
| [in] | img | Image descriptor |
1.8.11