This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[FAQ] How to flip images on TDA2x/TDA3x/TDA4x?

This article explains different ways in which images can be flipped on TDA devices. 

  • Depending on the platform, there are multiple ways to flip the images

    1. TDA3x/TDA2Px: ISP module on TDA3x and TDA2Px has resizer at the end of the ISP pipeline. Resizer supports two independent resizer outputs known as ResizerA and ResizerB outputs. Both the resizer outputs support horizontal and vertical flipping. Fliping is supported for YUV420 and YUV422 outputs formats. In the vision sdk, flipping can be enabled by setting IssIspRszParams.flipCtrl to 
      1. VPS_ISS_RSZ_STR_MODE_HFLIP to horizontally flip the image
      2. VPS_ISS_RSZ_STR_MODE_VFLIP to vertically flip the image
      3. VPS_ISS_RSZ_STR_MODE_HFLIP_VFLIP to both horizontally and vertically flip image
    2. TDA2x: TDA2x and derivative devices supports Dynamic Memort Manager (DMM) modules, which is available just before EMIF interface. DMM module contains tiler engine. Tiler engine is primarily used for efficiently handling 2D data mappped in tiles for video and graphics images. It also supports isometric transformation, such as 90, 180, 270 degree rotations with horizontal and vertical mirroring. The idea is to use isometric transformation feature of Tiler to flip the images in horizontal and/or vertical direction. Tiler uses 128MB memory from the system memory map and exposes it of memory into 8 different memory views, ie, four combinations of rotations and 2 mirroring. The image written in one memory written can be read back from another memory view providing specific isometric transformation. For example, in order to do horizontal mirroring, two memory views can be used, 0- degree memory view can be used to write the memory and horizontal mirror memory view can be used to get horizontally flipped image. Tiler memory is supported in CAL, VIP, VPE and DSS, so these modules can read and/or write from the different tiler views.  PDK driver has an example, which demonstrates how to use tiler. This can be found in the vision_sdk\ti_components\drivers\pdk_xx_xx_xx_xx\packages\ti\drv\vps\examples\vpe\m2mVpeScale\src\M2mVpeScale_main.c. In this example, tiler memory usage can be enabled by setting memory type for input and/out output buffer type to VPS_VPDMA_MT_TILEDMEM.
    3. TDA4x: DSS module in TDA4xx can on the fly flip images on horizontal as well as on vertical direction. This is supported only for the images having 8bit per component for YUV and RGB formats. In DSS drivers, fliping can be enabled by setting flipType in CSL_VidPipeCfg to
      1. FVID2_FLIP_TYPE_H to horizontally flip the image
      2. FVID2_FLIP_TYPE_V to vertically flip the image
      3. FVID2_FLIP_TYPE_HV to both horizontally and vertically flip image