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 IPIPE 420 Semiplaner to 422 UYVY conversion

Hi All,

I wan to convert 420 Semiplaner to UYVY 422  video data in my application.

But I am getting error from kernel like " rsz_validate_out_pix_formatspix format not supported".

It seems that IPIPE is not supporting input format YUV 420SP.

Is there any other way to convert 420SP to UYVY422 conversion ?

Is there any patch available for 420SP to UYVY422 converiosn for linux 2.18.

Thanks

Hitesh

  • hi Hitesh,

    DM36x resizer supports ONLY below format conversions (along with resizing)

    YUV422 UYVY to YUV422 UYVY

    YUV422 UYVY to YUV420 SP

    YUV420SP to YUV420SP

    The below format conversion is not supported by the DM36x resizer

    YUV420SP to YUV422 UYVY

    Whats the application scenario where you want to do a YUV420SP to YUV422 UYVY conversion.
    Maybe I could suggest a different approach if I knew the application scenario.

    regards
    Kedar

  • Thanks  Kedar for reply...

    My Application is decoding H264 video and display it to video window 1(/dev/video0) with blending with OSD1 bitmap(/dev/fb0).

    H264 decoder supports only YUV420SP output. So H264 decoder is giving YUV420 semi planner output.

     OSD supports only UYVY422. My bitmap is UYVY422 format. So I want to configure /dev/video0 with UYVY422 format.

    So my entire video display part should be UYVY422 format.

    It required to convert YUV420 semiplanner data to UYVY422 format.

    Thanks

    Hitesh Patel

     

  • hi Hitesh,

    /dev/video0 supports YUV420SP mode.

    So output from H264 decoder can be given directly to the /dev/video0, at most you may need to do a EDMA copy to adjust for line offset, starting position

    Does the OSD1 (/dev/fb0) bitmap video need to have YUV422 data format from application point of view.

    It supports 8-bit CLUT format or 16-bit RGB565 format as well.

    regards
    Kedar

     

  • Thanks Kedar for suggestion..

    In our current software we set the RGB565 format for OSD0 window and YUV420 for Video 0 window but still we are seeing an issue. It seems that OSD data is in RGB565(16bit per pixel) data  while video 0 window is in YUV420(12 bit per pixel) and internally when it blends creates an issue.

    As per our understanding, whenever we set RGB565 in OSD0 window, internally it converts into YUV422 and blends with Video 0 window data and then it sends to VENC for display. Now as Video 0 window supports YUV420 does it converts RGB565 into YUV420 inorder to blend it with video ? Can you please explain how internally in hardware OSD 0 and Video 0 window blends data in case of YUV420 selected on Video 0 window ?.

    Your response is really appreciated.

    Regards,

    Hitesh

     

     

     

     

  • hi Hitesh,

    Blending between YUV420 video window and RGB565 OSD window should work.

    We have tested this mode.
    Internally OSD converts both the data formats to YUV422 and then blends it.

    Can you send the code snippet which configures the OSD and video window using FBDev/V4L2 ?

    Also send us a snapshot of the issue that you are seeing with respect to blending.

    regards
    Kedar

     

  • Thanks Kedar for help..

    Now first we are testing display video window0  with 420SP planer format using Frame buffer.

    I can see the video on my LCD but it is not proper.  I think there is some missing in my setting,

    I set the bootargs as "setenv bootargs console=ttyS1,115200n8 noinitrd rw ip=dhcp root=/dev/nfs nfsroot=10.100.4.179:/opt/DM365/workdir/filesys,nolock mem=102M video=davincifb:vid0=1024x768x8,3600K:vid1=1024x768x8,3600K:osd0=1024x768x16,1600K dm365_imp.oper_mode=1 davinci_capture.device_type=5"Here I attaching

    three jpg file of video display output on LCD. Below is my original video that should be display on LCD.

    Here is the image that display on LCD.

     

    It is mentioned in Video Processing Back End (SPRUFG9).pdf

    For YUV420, the following parameters need to have same value :
    VIDWIN0XP = VIDWIN1XP
    VIDWIN0XL = VIDWIN1XL
    VIDWIN0YP = VIDWIN1YP
    VIDWIN0YL = VIDWIN1YL
    VIDWIN0OFST = VIDWIN1OFST
    VIDWINMD[9:8] = VIDWINMD[1:0]

    VIDWINMD[9:8] and VIDWINMD[1:0] value was not same so I read that value so i found  VIDWINMD[1:0] 1so I set the value of VIDWINMD[9:8] as 1. So I get the video on display is as below.

     

    Can you explain what should be the problem? Is there is configuration missing? What are exact configuration to display on video window 0 for 420 mode?

    Thanks & Regards

    Hitesh Patel

     

     

  • Are you using FBDev for video ?

    I dont know if FBDev has been tested with YUV420 SP mode.

    I know V4L2 supports YUV420SP mode

    Can you look at DVSDK decode demo and see how display is setup in that demo. The decode demo sets up display in YUV420SP mode.

    ~Kedar

  • Hi Kedar,

    I am using FBDev for video display.

    As above mail I can able to see video on LCD but it is not proper.

    Even I see the linux PSP example  and dvsdk decode demo , it seem that v4l2 is support  420 display.

    My display resolution is 1024x768.

    Will v4l2 will display 1024x768 (XGA) std on LCD?

     

    Thanks

    Hitesh

     

  • Hi Kedar,

    Thanks for your guide and suggestions . Now I am able to display 420 on video windo0 using v4l2 driver's calls.

    But I want to continue display my last from of my video on LCD . For that I have to do continously  get/pu(QUE/DQUE).

    Is there any way where I do not want to do get/put and last frame will remain on my LCD ?

    It is in FB driver where last frame remain on LCD up to we do not display another video frames.

     

    Thanks & Regards

    Hitesh

  • hi Hitesh,

    Good to know YUV420 works for you.
    If you dont do any "put"'s then then the last frame that was "put" will remain displayed.

    I think in V4L2 you need to "put" 2-3 buffer initially and after that above should work.

    regards
    Kedar

     

  • Hi Kedar,

    Now I am able to see my last frame on  LCD but my process get block in get(DQUE) function.

    If I do not want to block my process and want to display my last frame then Is there any way?

    Thanks

    Hitesh

  • I think if you do only que for first few frames and then dont do deque then it will keep displaying the last queued frame.

    ~Kedar

  • Thanks Kedar,

    Now we are able to display YUV 420 video on LCD using V4L2 driver.

    We can also see last frame on LCD.

    We appreciate your help. Thanks once again..

    -Hitesh

  • I have some questions to ask u,can u help me ?

    okxuchen@163.com

  • Hi,

    I am using DM368EVM with DVSDK4. I want to convert Mpeg4dec output (YUV420 semi planer and YUV422 interleaved) to RGB565, to display over LCD. DM368 supports FBdev, but unable to find Ccv converting YUV420 semi and YUV422 interleaved to RGB565. Is there any other way to display Mpeg4dec output (YUV420 semi planer and YUV422 interleaved) on OSD?

  • Hi ,

    vipul  mahajan

    I have the same problem with you ,so have you solved the problem now?how to solve it?

  • No holy, I have not yet got any solution.