![]() |
![]() |
Data Structures | |
struct | Blend_Attrs |
Attributes used to create a Blending job. More... | |
struct | Blend_Config_Params |
Configuration parameters used for configuring the Blending job. More... | |
Typedefs | |
typedef struct Blend_Object * | Blend_Handle |
Handle through which to reference a Blending job. | |
Functions | |
Blend_Handle | Blend_create (Blend_Attrs *attrs) |
Creates a Blending job. | |
Int | Blend_config (Blend_Handle hBlend, Ccv_Handle hCcv, Buffer_Handle hBmpBuf, Buffer_Handle hSrcBuf, Buffer_Handle hDstBuf, Blend_Config_Params *params) |
Configure a Blending job. | |
Int | Blend_execute (Blend_Handle hBlend, Buffer_Handle hBmpBuf, Buffer_Handle hSrcBuf, Buffer_Handle hDstBuf) |
Execute a Blending job. | |
Int | Blend_delete (Blend_Handle hBlend) |
Deletes a Blending job. | |
Variables | |
const Blend_Config_Params | Blend_Config_Params_DEFAULT |
Default configuration for a Blending job. | |
const Blend_Attrs | Blend_Attrs_DEFAULT |
Default attributes for a Blending job. |
#include <xdc/std.h> #include <ti/sdo/dmai/Dmai.h> #include <ti/sdo/dmai/Blend.h> #include <ti/sdo/dmai/BufferGfx.h> BufferGfx_Attrs gfxAttrs; Blend_Attrs blAttrs = Blend_Attrs_DEFAULT; Blend_Config_Params bConfigParams = Blend_Config_Params_DEFAULT; Buffer_Handle hBmpBuf, hBuf; Blend_Handle hBlend; Int32 bufSize; Dmai_init(); gfxAttrs = BufferGfx_Attrs_DEFAULT; gfxAttrs.colorSpace = ColorSpace_2BIT; gfxAttrs.dim.width = 120; gfxAttrs.dim.height = 240; gfxAttrs.dim.lineLength = BufferGfx_calcLineLength(gfxAttrs.dim.width, ColorSpace_2BIT); bufSize = gfxAttrs.dim.lineLength * gfxAttrs.dim.height; hBmpBuf = Buffer_create(bufSize, BufferGfx_getBufferAttrs(&gfxAttrs)); gfxAttrs = BufferGfx_Attrs_DEFAULT; gfxAttrs.colorSpace = ColorSpace_422Psemi; gfxAttrs.dim.width = 640; gfxAttrs.dim.height = 480; gfxAttrs.dim.lineLength = BufferGfx_calcLineLength(gfxAttrs.dim.width ColorSpace_422Psemi); bufSize = gfxAttrs.dim.lineLength * gfxAttrs.dim.height; hBuf = Buffer_create(bufSize, BufferGfx_getBufferAttrs(&gfxAttrs)); hBlend = Blend_create(&blAttrs); Blend_config(hBlend, NULL, hBmpBuf, hBuf, hBuf, &bConfigParams); Blend_execute(hBlend, hBmpBuf, hBuf, 0, hBuf, 0); Blend_delete(hBlend); Buffer_delete(hBuf); Buffer_delete(hBmpBuf);
typedef struct Blend_Object* Blend_Handle |
Handle through which to reference a Blending job.
Blend_Handle Blend_create | ( | Blend_Attrs * | attrs | ) |
Creates a Blending job.
[in] | attrs | Blend_Attrs to use for creating the Blending job. |
Handle | for use in subsequent operations (see Blend_Handle). | |
NULL | for failure. |
Int Blend_config | ( | Blend_Handle | hBlend, | |
Ccv_Handle | hCcv, | |||
Buffer_Handle | hBmpBuf, | |||
Buffer_Handle | hSrcBuf, | |||
Buffer_Handle | hDstBuf, | |||
Blend_Config_Params * | params | |||
) |
Configure a Blending job.
[in] | hBlend | The Blend_Handle of the job to configure. |
[in] | hCcv | On dm6467 a Color Conversion job and a Blend job can be done with one pass of the VDCE. If you pass in a previously configured Ccv_Handle here, the Blend and Color conversion job will be done in one pass, both of which will be invoked using Blend_execute (so don't use Ccv_execute separately). If this is not required, pass in NULL and a separate VDCE pass will be used for blending. |
[in] | hBmpBuf | The Buffer_Handle of the bitmap buffer to configure for. Note that only the buffer properties are accessed, the pointers are not used. |
[in] | hSrcBuf | The Buffer_Handle of the source buffer to configure for. Note that only the buffer properties are accessed, the pointers are not used. |
[in] | hDstBuf | The Buffer_Handle of the destination buffer to configure for. Note that only the buffer properties are accessed, the pointers are not used. |
[in] | params | A pointer to the Blend_Config_Params to use while configuring this Blending job. |
Dmai_EOK | for success. | |
Negative value | for failure, see Dmai.h. |
Int Blend_execute | ( | Blend_Handle | hBlend, | |
Buffer_Handle | hBmpBuf, | |||
Buffer_Handle | hSrcBuf, | |||
Buffer_Handle | hDstBuf | |||
) |
Execute a Blending job.
[in] | hBlend | The Blend_Handle of the job to execute. |
[in] | hBmpBuf | The bitmap buffer to blend in to hSrcBuf before storing the result in hDstBuf. |
[in] | hSrcBuf | The source buffer to blend in to. |
[in] | hDstBuf | The destination buffer to store the result. |
Dmai_EOK | for success. | |
Negative value | for failure, see Dmai.h. |
Int Blend_delete | ( | Blend_Handle | hBlend | ) |
Deletes a Blending job.
[in] | hBlend | The Blend_Handle to delete. |
Dmai_EOK | for success. | |
Negative value | for failure, see Dmai.h. |
Default configuration for a Blending job.
bmpXpos = 0, bmpYpos = 0, palette = { { 0xf0, 0x5a, 0x51, 0xff, }, { 0x22, 0x36, 0x91, 0xc0, }, { 0x6e, 0xf0, 0x29, 0x80, }, { 0xde, 0xca, 0x6a, 0x40, }, }
Default attributes for a Blending job.