NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

IPIPE resizer demo

From Texas Instruments Wiki
Jump to: navigation, search

Introduction[edit]

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.

Licensing[edit]

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

Download[edit]

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.

Compiling[edit]

$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[edit]

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

   RSZ_init() 
       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;
   
   RSZ_exit()
       close the IPIPE device node;

Run the Demo[edit]

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
E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article IPIPE resizer demo here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article IPIPE resizer demo here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article IPIPE resizer demo here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article IPIPE resizer demo here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article IPIPE resizer demo here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article IPIPE resizer demo here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article IPIPE resizer demo here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article IPIPE resizer demo here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article IPIPE resizer demo here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity