The DM36x processor includes a hardware resizer module to perform image-scaling operations and color space conversion. There are three different ways you can use the hardware resizer with GStreamer:

+

+

+

1. '''Chain ipipe with v4l2src element:''' The v4l2src element provides the property ''chain-ipipe'', that indicates if the element must chain (use) the ipipe preview and resizer hardware modules. When chained, you capture from the image sensor(e.g MT9P031) or YUV decoder(e.g TVP7002) with the ipipe preview and resizer modules configured for continuous mode of operation. This means the previewer and resizer are included in the video frame data path, processing each captured frame to do image tuning and resizing. Due to vpfe driver limitations, the image scaling is only available for use with video frames from a YUV decoder. If you use a raw image sensor the driver only allows you change the color space. The following is a pipeline that resizes the input video frames to a 640x480 resolution. You simply specify the capabilities filter setting to the desired width and height.

2. '''Use dmairesizer element:''' The dmairesizer element configures the DM36x hardware resizer and use it to scale each video input frame to the desired resolution. In this case, the DM36x resizer operates in single-shot mode, meaning the ARM processor needs to pass each buffer containing a video frame to the resizer. If you use this mode with v4l2src element, you must set the property ''chain-ipipe'' to false since the resizer can't be used simultaneously in continuous and in single-shot modes. The following is an example pipeline using dmairesizer.

DM36x includes a hardware resizer module to perform image-scaling operations and color space conversion. In order to use this module with gstreamer, you have three options:

−

−

# '''Chain ipipe with v4l2src element:''' V4l2 src provides the property chain-ipipe, that indicates if the element must chain the ipipe preview and resizer modules. In this case, you capture from the image sensor or YUV decoder with the ipipe preview and resizer modules in continuous mode, that means the previewer and resizer are included in the data path from the capture and does image tuning and resizer on the fly. The image scaling is only available for a YUV decoder, if you use a raw image sensor this mode only allows you change the color space. Here is a pipeline that resize the input to a 640x480 image, to scale different resolution just need to change the pipeline capabilities width and height.

# '''Use dmairesizer:''' Dmairesizer is an element that configures dm36x hardware resizer and use it to scale the input video to the desired resolution. In this case, the dm36x resizer operates in single-shot mode, that means each buffer needs to be passed to the resizer. If you use this mode with v4l2src you must set the property chain-ipipe in false since the resizer only allows one instance. Here are a couple of example pipelines using dmairesizer.

Video playback

The previewer and resizer for video capture must be initialized by the user. You can do that in two ways:

1. Compile and install the ipiped application located in the File System Configuration->Select target's file system software section of the configuration screen (make config). This application allows to get control over some video capturing properties (for more information see Auto exposure and auto white balance library). You can initialized the previewer and resizer by running the following command:

ipipe-client run-config-script dm365_mt9p031_config

or you can run this command instead:

ipipe-client set-previewer-mode cont

NOTE: The initialization must be done before any video capture session.

2. The V4L2 source element (v4l2src) as a build in property called chain-ipipe which automatically initializes the previewer when it is set (by default it is set to true).

NOTE: when using one of the methods described above the other one must not be used since this can create a conflict when the code tries to re-initialize the previewer.

Video Resizing

The DM36x processor includes a hardware resizer module to perform image-scaling operations and color space conversion. There are three different ways you can use the hardware resizer with GStreamer:

1. Chain ipipe with v4l2src element: The v4l2src element provides the property chain-ipipe, that indicates if the element must chain (use) the ipipe preview and resizer hardware modules. When chained, you capture from the image sensor(e.g MT9P031) or YUV decoder(e.g TVP7002) with the ipipe preview and resizer modules configured for continuous mode of operation. This means the previewer and resizer are included in the video frame data path, processing each captured frame to do image tuning and resizing. Due to vpfe driver limitations, the image scaling is only available for use with video frames from a YUV decoder. If you use a raw image sensor the driver only allows you change the color space. The following is a pipeline that resizes the input video frames to a 640x480 resolution. You simply specify the capabilities filter setting to the desired width and height.

2. Use dmairesizer element: The dmairesizer element configures the DM36x hardware resizer and use it to scale each video input frame to the desired resolution. In this case, the DM36x resizer operates in single-shot mode, meaning the ARM processor needs to pass each buffer containing a video frame to the resizer. If you use this mode with v4l2src element, you must set the property chain-ipipe to false since the resizer can't be used simultaneously in continuous and in single-shot modes. The following is an example pipeline using dmairesizer.