![]() |
![]() |
Data Structures | |
struct | Ccv_Attrs |
Attributes used to create a Color Conversion job. More... | |
Typedefs | |
typedef struct Ccv_Object * | Ccv_Handle |
Handle through which to reference a Color Conversion job. | |
Enumerations | |
enum | Ccv_Mode { Ccv_Mode_YUV420SEMI_YUV422SEMI = 0, Ccv_Mode_YUV422SEMI_YUV420SEMI, Ccv_Mode_YUV420P_RGB565, Ccv_Mode_YUV422PSEMI_RGB565, Ccv_Mode_COUNT } |
Different modes of Color Conversion. More... | |
Functions | |
Ccv_Handle | Ccv_create (Ccv_Attrs *attrs) |
Creates a Color Conversion job. | |
Int | Ccv_config (Ccv_Handle hCcv, Buffer_Handle hSrcBuf, Buffer_Handle hDstBuf) |
Configure a Color Conversion job. | |
Int | Ccv_execute (Ccv_Handle hCcv, Buffer_Handle hSrcBuf, Buffer_Handle hDstBuf) |
Execute a Color Conversion job. | |
Ccv_Mode | Ccv_getMode (Ccv_Handle hCcv) |
Gets the mode of a configured color conversion job. | |
Int | Ccv_delete (Ccv_Handle hCcv) |
Deletes a Color Conversion job. | |
Variables | |
const Ccv_Attrs | Ccv_Attrs_DEFAULT |
Default attributes for a Color Conversion job. |
#include <xdc/std.h> #include <ti/sdo/dmai/Ccv.h> #include <ti/sdo/dmai/Dmai.h> #include <ti/sdo/dmai/Capture.h> #include <ti/sdo/dmai/BufferGfx.h> Ccv_Attrs ccvAttrs = Ccv_Attrs_DEFAULT; BufferGfx_Attrs gfxAttrs = BufferGfx_Attrs_DEFAULT; Buffer_Handle hInBuf, hOutBuf; Ccv_Handle hCcv; Int32 bufSize; Dmai_init(); gfxAttrs = BufferGfx_Attrs_DEFAULT; gfxAttrs.colorSpace = ColorSpace_420Psemi; gfxAttrs.dim.width = 720; gfxAttrs.dim.height = 480; gfxAttrs.dim.lineLength = BufferGfx_calcLineLength(gfxAttrs.dim.width, ColorSpace_420Psemi); bufSize = gfxAttrs.dim.lineLength * gfxAttrs.dim.height; hInBuf = Buffer_create(bufSize, BufferGfx_getBufferAttrs(&gfxAttrs)); gfxAttrs = BufferGfx_Attrs_DEFAULT; gfxAttrs.colorSpace = ColorSpace_422Psemi; gfxAttrs.dim.width = 720; gfxAttrs.dim.height = 480; gfxAttrs.dim.lineLength = BufferGfx_calcLineLength(gfxAttrs.dim.width ColorSpace_422Psemi); bufSize = gfxAttrs.dim.lineLength * gfxAttrs.dim.height; hOutBuf = Buffer_create(bufSize, BufferGfx_getBufferAttrs(&gfxAttrs)); hCcv = Ccv_create(&ccvAttrs); Ccv_config(hCcv, hInBuf, hOutBuf); Ccv_execute(hCcv, hInBuf, 0, hOutBuf, 0); Buffer_delete(hInBuf); Buffer_delete(hOutBuf); Ccv_delete(hCcv);
typedef struct Ccv_Object* Ccv_Handle |
Handle through which to reference a Color Conversion job.
enum Ccv_Mode |
Ccv_Handle Ccv_create | ( | Ccv_Attrs * | attrs | ) |
Creates a Color Conversion job.
[in] | attrs | Ccv_Attrs to use for creating the Color Conversion job. |
Ccv_Handle | for use in subsequent operations (see Ccv_Handle). | |
NULL | for failure. |
Int Ccv_config | ( | Ccv_Handle | hCcv, | |
Buffer_Handle | hSrcBuf, | |||
Buffer_Handle | hDstBuf | |||
) |
Configure a Color Conversion job.
[in] | hCcv | The Ccv_Handle of the job to configure. |
[in] | hSrcBuf | The source buffer to configure for. Note that only the buffer properties are accessed, the pointers are not used. |
[in] | hDstBuf | The destination buffer to configure for. Note that only the buffer properties are accessed, the pointers are not used. |
Dmai_EOK | for success. | |
Negative value | for failure, see Dmai.h. |
Int Ccv_execute | ( | Ccv_Handle | hCcv, | |
Buffer_Handle | hSrcBuf, | |||
Buffer_Handle | hDstBuf | |||
) |
Execute a Color Conversion job.
[in] | hCcv | The Ccv_Handle of the job to execute. |
[in] | hSrcBuf | The source buffer to convert from. |
[in] | hDstBuf | The destination buffer to convert to. |
Dmai_EOK | for success. | |
Negative value | for failure, see Dmai.h. |
Ccv_config must be called before this function.
Ccv_Mode Ccv_getMode | ( | Ccv_Handle | hCcv | ) |
Gets the mode of a configured color conversion job.
[in] | hCcv | The Ccv_Handle to get the mode of. |
Mode | of color conversion job (see Ccv_Mode). |
Ccv_config must be called before this function.
Int Ccv_delete | ( | Ccv_Handle | hCcv | ) |
Deletes a Color Conversion job.
[in] | hCcv | The Ccv_Handle to delete. |
Dmai_EOK | for success. | |
Negative value | for failure, see Dmai.h. |
const Ccv_Attrs Ccv_Attrs_DEFAULT |
Default attributes for a Color Conversion job.
accel = FALSE