Framecopy

Copies a frame buffer from source to destination, either accelerated (resizer on DM6446 or DMA) or using the CPU. Typical usage (no error checking):. More...

Data Structures

struct  Framecopy_Attrs
 Attributes used to create a Framecopy job. More...

Typedefs

typedef struct Framecopy_Object * Framecopy_Handle
 Handle through which to reference a Framecopy job.

Functions

Framecopy_Handle Framecopy_create (Framecopy_Attrs *attrs)
 Creates a Framecopy job.
Int Framecopy_config (Framecopy_Handle hFramecopy, Buffer_Handle hSrcBuf, Buffer_Handle hDstBuf)
 Configure a Framecopy job.
Int Framecopy_execute (Framecopy_Handle hFramecopy, Buffer_Handle hSrcBuf, Buffer_Handle hDstBuf)
 Execute a Framecopy job.
Int Framecopy_delete (Framecopy_Handle hFramecopy)
 Deletes a Framecopy job.

Variables

const Framecopy_Attrs Framecopy_Attrs_DEFAULT
 Default attributes for a Framecopy job.

Detailed Description

Copies a frame buffer from source to destination, either accelerated (resizer on DM6446 or DMA) or using the CPU. Typical usage (no error checking):.

   #include <xdc/std.h>
   #include <ti/sdo/dmai/Dmai.h>
   #include <ti/sdo/dmai/Capture.h>
   #include <ti/sdo/dmai/Display.h>
   #include <ti/sdo/dmai/Framecopy.h>

   Capture_Attrs cAttrs = Capture_Attrs_DM6467_DEFAULT;
   Display_Attrs dAttrs = Display_Attrs_DM6467_VID_DEFAULT;
   Framecopy_Attrs fcAttrs = Framecopy_Attrs_DEFAULT;

   Dmai_init();
   Capture_Handle hCap = Capture_create(NULL, &cAttrs);
   dAttrs.videoStd = Capture_getVideoStd(hCap);
   Display_Handle hDis = Display_create(NULL, &dAttrs);
   Framecopy_Handle hFc = Framecopy_create(&fcAttrs);
   Framecopy_config(BufTab_getBuf(Capture_getBufTab(hCap), 0),
                    BufTab_getBuf(Display_getBufTab(hDis), 0));

   while (1) {
       Capture_get(hCap, &cBuf);
       Display_get(hDis, &dBuf);
       Framecopy_execute(hFc, cBuf, 0, hBuf, 0);
       Capture_put(hCap, cBuf);
       Display_put(hDis, dBuf);
   }

   Framecopy_delete(hFc);
   Capture_delete(hCap);
   Display_delete(hDis);

Typedef Documentation

typedef struct Framecopy_Object* Framecopy_Handle

Handle through which to reference a Framecopy job.


Function Documentation

Framecopy_Handle Framecopy_create ( Framecopy_Attrs attrs  ) 

Creates a Framecopy job.

Parameters:
[in] attrs Framecopy_Attrs to use for creating the Framecopy job.
Return values:
Handle for use in subsequent operations (see Framecopy_Handle).
NULL for failure.

Int Framecopy_config ( Framecopy_Handle  hFramecopy,
Buffer_Handle  hSrcBuf,
Buffer_Handle  hDstBuf 
)

Configure a Framecopy job.

Parameters:
[in] hFramecopy The Framecopy_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.
Return values:
Dmai_EOK for success.
Negative value for failure, see Dmai.h.
Remarks:
Framecopy_create must be called before this function.

Int Framecopy_execute ( Framecopy_Handle  hFramecopy,
Buffer_Handle  hSrcBuf,
Buffer_Handle  hDstBuf 
)

Execute a Framecopy job.

Parameters:
[in] hFramecopy The Framecopy_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.
Return values:
Dmai_EOK for success.
Negative value for failure, see Dmai.h.
Remarks:
Framecopy_create must be called before this function.

Framecopy_config must be called before this function.

Int Framecopy_delete ( Framecopy_Handle  hFramecopy  ) 

Deletes a Framecopy job.

Parameters:
[in] hFramecopy The Framecopy_Handle of the job to delete.
Return values:
Dmai_EOK for success.
Negative value for failure, see Dmai.h.
Remarks:
Framecopy_create must be called before this function.


Variable Documentation

Default attributes for a Framecopy job.

     accel    = FALSE,
     rszRate  = 0xe,
     sdma     = FALSE


Copyright 2011, Texas Instruments Incorporated