NOTICE: The Processors Wiki will End-of-Life in December of 2020. It is recommended to download any files or other content you may need that are hosted on The site is now set to read only.

IPIPE resizer demo

From Texas Instruments Wiki
Jump to: navigation, search


The Image Pipe (IPIPE) is a programmable hardware image processing module on DM35x that generates image data in YCbCr-4:2:2 format from RAW CCD/CMOS data. The IPIPE can also be configured to operate in a resize only mode, which allows YCbCr-4:2:2 to be resized without applying the processing of every other module in the IPIPE.

The IPIPE supports resizing from x1/16 scale-down to x8 scale-up in both the horizontal and vertical directions, with the output width no more than 1344 in pixel. But applications may implement an algorithm to call IPIPE multiple times to resize an image wider than 1344 pixels.

The Linux IPIPE device driver provides a device node /dev/dm355_ipipe, which allow applications to use IPIPE module.

The IPIPE resizer demo shows how to configure IPIPE to scale a YUV image, which reads a YUV file, and writes the scaled output into a file.


The IPIPE resizer demo is TI propriety. The license agreement is included in the package.


First you need to register your board here.

The latest version is ver1.1.0, released on 07/04/2008. The package can be downloaded from the DaVinci DVSDK Miscellaneous Components section in DaVinci Software Website. NOTE: If you have not registered a board then accessing this web page will simply result in a blank screen.


$KERNEL_DIR in Makefile specifies the location of the kernel source tree. Please modify it to fit your development environment. The demo is linked with libcmem.a library, modify $LDFLAGS in Makefile if necessary.

Simply running make command will build and install the demo into ${HOME}/tgtfs/opt. To change the default install location, please modify $TARGETFS_PATH in Makefile or define it in the make command line.

Header cmem.h is needed to compile the demo. It is provided in the cmem module in DM3xxEVM DVSDK.

Resizer Interface

The IPIPE resizer demo provides a simple set of APIs to deal with IPIPE driver:

       open the IPIPE device node
       should be called during initialization in the application
   RSZ_set_dim(int i_width, int i_height, int o_width, int o_height)
       set the input and output dimensions;
   RSZ_process(struct rsz_buf *in, struct rsz_buf *out)
       resize the input buffer to the output buffer;
       close the IPIPE device node;

Run the Demo

Before run the demo, kernel module cmemk.ko, provided in DVDSK, should be loaded with proper parameters to reserve enough continuous memory to hold the input and output buffers. One cmem buffer pool is needed, which size should be no less than

   ix * iy * 2 + ox * oy * 2

The following is an example of the instruction, replace $bufsize with the needed buffer size.

   insmod ./cmemk.ko phys_start=0x87800000 phys_end=0x88000000 pools=1x$bufsize

Running the executable without parameters prints out the help message.

   Usage: resize <if> <ix> <iy> <of> <ox> <oy>
       if - input yuv file name
       ix - width of the input file in pixel, multiple of 16
       iy - height of the input file in pixel
       of - output yuv file name
       ox - width of the output file in pixel, multiple of 16, 1344 max
       oy - height of the output file in pixel