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.

DVRRDK OSD

Hi  all,

          I am using DVRRDK3.0 with DM8168EVM. I have developed an object detection algorithm in DSP sides(ALG0 link). Now I want to mark the location of

object in LCD display. The location is like this:x = 100,y =100. How I mark this in LCD?I think I need OSD,but how to do this?Please give me some

suggestions.

Thanks.

            Junqing  Zhao

  • You can use EDMA to draw grid lines at the required coordinates. This can be done on the c674 DSP. You can refer the /dvr_rdk/mcfw/src_bios6/links_m3vpss/swMs/swMsLink_drv.c file .Check for code under enableLayoutGridDraw flag. The utilsDMA APIs are not available on c674 so you will have to use the EDMA APIs directly similar to what is done in SWOSD algorithm.

    SWOSD algorithm is used for blending video with graphics. If you want to use SWOSD , you will have to export the info on the object coordinates to A8 application which will have to use the coordinate info to generate the required graphics buffer containing the grid. This is useful if you want to encode the frame after drawing the grid around the object.

    If you want to display the frame you can also use FBDEV to generate the grid lines.This is what is done in the /dvr_rdk/demos/mcfw_api_demos/mcfw_demo/demo_scd_bits_wr.c file that is part of DVR RDK release.

  • Thanks for your reply.  I just want to add a string text like "Distance = 15km" in LCD display. The video display in LCD  that I want  is like following:

    The red string on top of the walking woman is I want,so how can achieve the target?Please give me more suggestions?Thanks.

    Junqing  Zhao

  • Pls refer the  analytics demo in DVR RDK 4.0 release which does something similar to your requirement. Once you have the RDK 4.0 package you should be able to follow the sample code and implement in a similar fashion.

    THe high level data flow is:

     DSP algorithm detects trip zone / object boundary -> Sends info to thread on A8 about location of the object. --> A8 thread then uses the coordinate info and uses fbdev to render fonts and grid around the object.

  • Thanks for your reply. I am sorry for that I am using DVRRDK 3.5 packages. In this packages, I have found a demo named "demo_vcap_venc_vdis",it seems this demo using OSD to display logo、time、data、channel name. It seems useful for my application,but I have some doubt.

    (1) In Demo_osdInit()function, Demo_text_draw() API is used to onvert the ascii text into bitmap, and return the bitmap memory.
    However, I do not understand how the bitmap Memory address passed to SWOSD algorithm on DSP? A global variable or not?

    (2)The Demo_osdInit()function only run once,but my appliction demand the Coordinate information can update many times,so how can this achieve? The Coordinate information is produced by the algorithm running on DSP.

    (3) Can I achieve my application by modified the codes located in dvr_rdk\mcfw\src_bios6\links_c6xdsp\alg_link\swosd? That  is to say,can I add  Coordinate information in SWOSD files?

    My Regards,

    Junqing Zhao

  • Hi.

    In SWOSD font is white or yellow color. How do You made font in red color?

    Thanks for your reply.

  • In DVR RDK, we fix the Y, UV in side the bitmap, that means in

    Demo_text_draw(Bitmap_Info font, AlgLink_OsdWindowPrm* winPrm, char* text, UInt16 textLen, char* osdMem,UInt32* padingColor)

    the Bitmap_info font, the color is already fixed.

    you can change it by give the 1 and 0 information and then replace it to the color you want.

  • Hi,

        Currently I am using DVRRDK_04.00.00.03 with the DM8168. I am interested on getting the frame once the video and graphics layer have been merged, so I can encode it to H264 for instance, this is the approach suggested by Bradi

    "SWOSD algorithm is used for blending video with graphics. If you want to use SWOSD , you will have to export the info on the object coordinates to A8 application which will have to use the coordinate info to generate the required graphics buffer containing the grid. This is useful if you want to encode the frame after drawing the grid around the object."

    I Know that this would be possible just in the DVO1 and DVO2 outputs, which is fine in my case

     Furthermore, I looked into the Proxy server and I know that I can select between VPS_DC_COMP_OUT_VIDEO_ALPHA_BLENDING and VPS_DC_COMP_OUT_FINAL_ALPHA_BLENDING in order to configure the source of the feedback path, however is still not clear how I can grab that frame in order to encode it, could you provide some comments about how I can do using the RDK? 

    Thanks in advance,

  • You can use captureWriteBack driver and get the video+graphics composed output from HDMI back in memory for encoding. Refer the /dvr_rdk/mcfw/src_linux/mcfw_api/usecases/ti816x/multich_hd_sdi_dvr.c usecase for example code. You can run the usecase using DVR RDK demo option "d" (d: 5CH SD+HD (Interlaced<->Progressive switch) usecase).

  • Hi Badri,

       Thanks very much for your help with the captureWriteBack driver, I was able to get it working. However, I am having some problems encoding the stream coming from the writeback, mainly because the H264 would need NV12 in the input and the writeback path is giving me YUY2. Could you suggest about how to get NV12 from the writeback directly?


       Another problem is that in our design we are using SC5 to convert color spaces and scale in other parts of application, when we try running both at the same time we get a lot of errors from the kernel, it seems that they cannot be running at the same time, is this true?


    Thanks a lot for your help,

    -David

  • Writeback scaler uses SC5 and it can output only YUV422I format. You will have to use NSF link to convert to YUV420SP.

    SC5 cannot be used in both M2M and in WriteBack path. You will have to use some other scaler for M2M operation if you are using CaptureWriteBack

  • Hi,



    > "CaptureWriteBack is supported only on onchip HDMI display."



    When using DVO2 tied to HDMI, does it mean the CaptureWriteBack is supported ?



    Thank you,

    Ran
  • Yes, if they are tied, ie contents getting displayed is same, you could get the displayed frame back in the memory, but again from HDMI.

     

    Rgds,

    Brijesh

  • Thank you very much, Brijesh