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.

DM365: Red and blue swap for horizontal flip

I am using the DM365 with DVSDK 3.10.00.12.  I am capturing video in raw Bayer format and I am displaying in YUV4:2:2 format.  The VPFE is running in Continuous mode.  We recently discovered we need to horizontally flip the image before display.  I accomplished this by setting rsz_cont_config.output1.h_flip=1 in my application just before the ioctl call to RSZ_S_CONFIG.  The image is flipped horizontally, but now red is blue and blue is red.  I've been looking at what else to modify to flip the colors, but I'm at a loss.  Anyone know what other parameter I need to set in the resizer to flip the colors? I believe there is a way to tell the VPBE the new color order, but since images are being stored off to the side for later viewing, I'd really prefer to keep all data in the same order whether the image is flipped or not.

  • Bryan,

    In addition to  rsz_cont_config.output1.h_flip=1, there is  a need to set appropriate start address of capture buffer in HW(Resizer). [Please refer to section 4.3.11.8 of VPFE user guide, concept of flipping explained in detail with the help of diagrams]. Driver does the necessary address offset calculation during flipping[dm365_ipipe.c]. You can check whether that is properly handled.

  • This was the issue.  In continuous mode, the IPIPE driver did not call calculate_sdram_offsets, so the SDRAM offsets were never recalcuated after horizontally flipping the image.  I added this call and now the colors are correct.  Thank you for the help.