![]() |
![]() |
Data Structures | |
struct | Smooth_Attrs |
Attributes used to create a Smooth job. More... | |
Typedefs | |
typedef struct Smooth_Object * | Smooth_Handle |
Handle through which to reference a Smooth job. | |
Functions | |
Smooth_Handle | Smooth_create (Smooth_Attrs *attrs) |
Creates a Smooth job. | |
Int | Smooth_config (Smooth_Handle hSmooth, Buffer_Handle hSrcBuf, Buffer_Handle hDstBuf) |
Configure a Smooth job. | |
Int | Smooth_execute (Smooth_Handle hSmooth, Buffer_Handle hSrcBuf, Buffer_Handle hDstBuf) |
Execute a Smooth job. | |
Int | Smooth_delete (Smooth_Handle hSmooth) |
Deletes a Smooth job. | |
Variables | |
const Smooth_Attrs | Smooth_Attrs_DEFAULT |
Default attributes for a Smooth job. |
#include <xdc/std.h> #include <ti/sdo/dmai/Dmai.h> #include <ti/sdo/dmai/Smooth.h> #include <ti/sdo/dmai/Buffer.h> #include <ti/sdo/dmai/Capture.h> Capture_Attrs cAttrs = Capture_Attrs_DM6446_DM355_DEFAULT; Smooth_Attrs smAttrs = Smooth_Attrs_DEFAULT; Buffer_Attrs bAttrs = Buffer_Attrs_DEFAULT; Dmai_init(); Capture_Handle hCap = Capture_create(NULL, &cAttrs); hBuf = Buffer_clone(BufTab_getBuf(Capture_getBufTab(hCap), 0)); Smooth_Handle hSmooth = Smooth_create(&smAttrs); Smooth_config(BufTab_getBuf(Capture_getBufTab(hCap), 0), hBuf); while (1) { Capture_get(hCap, &cBuf); Smooth_execute(cBuf, 0, hBuf, 0); // Further process the capture buffer, now smoothed in "hBuf".. Capture_put(hCap, cBuf); } Buffer_delete(hBuf); Smooth_delete(hSmooth); Capture_delete(hCap);
typedef struct Smooth_Object* Smooth_Handle |
Handle through which to reference a Smooth job.
Smooth_Handle Smooth_create | ( | Smooth_Attrs * | attrs | ) |
Creates a Smooth job.
[in] | attrs | Smooth_Attrs to use for creating the Smooth job. |
Handle | for use in subsequent operations (see Smooth_Handle). | |
NULL | for failure. |
Int Smooth_config | ( | Smooth_Handle | hSmooth, | |
Buffer_Handle | hSrcBuf, | |||
Buffer_Handle | hDstBuf | |||
) |
Configure a Smooth job.
[in] | hSmooth | The Smooth_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 Smooth_execute | ( | Smooth_Handle | hSmooth, | |
Buffer_Handle | hSrcBuf, | |||
Buffer_Handle | hDstBuf | |||
) |
Execute a Smooth job.
[in] | hSmooth | The Smooth_Handle of the job to execute. |
[in] | hSrcBuf | The Buffer_Handle of the source buffer to copy from. |
[in] | hDstBuf | The Buffer_Handle of the destination buffer to copy to. |
Dmai_EOK | for success. | |
Negative value | for failure, see Dmai.h. |
Int Smooth_delete | ( | Smooth_Handle | hSmooth | ) |
Deletes a Smooth job.
[in] | hSmooth | The Smooth_Handle of the job to delete. |
Dmai_EOK | for success. | |
Negative value | for failure, see Dmai.h. |
Default attributes for a Smooth job.
rszRate = 0xe