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.

TMS320DM8148 - Odd fields lost while capturing (VIP) ...

Other Parts Discussed in Thread: TVP5158, TMS320DM8148

Hello

This message deals with capturing video using a µP DaVinci Centaurus TMS320DM8148. We developed a board based on video digitalizer TVP5158 connected to a µP TMS320DM8148. Inputs are 4 analog PAL channels and these 4 channels are then line-muxed to the µP (digital 8-bit interface).

During the integration, we noticed that we had problems with the definition (blurred edges, stair step artifacts ...), so that it is not good enough for our product. Investigations led us to the fact that only even fields are captured.
Our test has been done with a test bench described here after :

    - The first of the 4 analog inputs is connected to a BluRay Disc player, that is also capable of displaying (lossless) pictures on the screen taken from files via a USB stick.

    - A picture with a suitable size (PAL-standard active video frame size = 720x576) has been drawn : one line out of every two is red, every other line is blue.

    - Using the OMX interface on the Cortex A8 side (Linux O.S.), a chain including only the CAPTURE module is built. The callback Fill_Buffer_Done is used to copy the content of received buffers into files in the Linux File System).

After execution, we can check the content of the files and we can see that we got only red buffers with half the initial frame's size. If colours used for fields are inverted in the reference picture, we can see that captured buffers are then all blue.

Reading the FAQs, I noticed this item that seems quite similar to my own problem :

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/p/204227/871411.aspx


A. LOG MESSAGES
First of all, I would like to know how I can also get the log messages of Cortex M3 that the integrator joined to the latter request : Tags [Cortex_M3_ISS] ?

    [Cortex_M3_ISS]  *** Capture Driver Advanced Statistics *** )


B. EXPECTED RESULTS
Secondly, reading the datasheet TI81xx-HDVPSS-UserGuide, and particularly the section dealing with the FVID2 frame format, it is still unclear to me the kind of buffers I should get. What should I expect :

   - Twice as many calls to callback FBD, each returned buffer containing just one field ?
   - As many calls to callback FBD, each returned buffer containing 2 fields of a whole frame identified by addr[x][y] ?
   - The two previous assertions are possible, it is configurable ... ?

Reading carrefully this section, sentence N.3 seems right to me, but the way to manage this remains quite obscure. Could you please confirm and point out any helpful reference.

Thanks a lot in advance for your attention and forthcoming reply. Best regards.

               Philippe

  • Hello,

    What is the software release that you are using here?

    Best Regards,

    Margarita

  • Hi Margarita,

    The version used for HDVPSS is : HDVPSS_01_00_01_33

    I hope that it is the item you expected. If I am wrong, don't hesitate to request more details.

    Best regards.

    Philippe

  • Capture driver support PRINT_ADVANCED_STATISTICS ioctl, call this ioctl to print the capture driver statistics on the console. This will also tell whether field drop is coming from the capture or not.

     

    Basically, by default, capture driver supports field based capture, so we get a field at a time, not the complete frame. and this field's buffer address will be in the addr[0][0] variable.

    Capture supports frame based capture for interlaced input, but first lets see where fields are getting dropped.

     

    Btw, any reason why you are using line-mux mode. It is recommanded to use pixel-mux mode.

     

    Regards,

    Brijesh

  • Hello Brijesh,

    First of all, I would like to thank you a lot for your last reply.

    I have checked the PRINT_ADVANCED_STATISTICS ioctl, but it doesn't appear anywhere in the code (FYI, HDVPSS version : HDVPSS_01_00_01_33).

    So, before we go one step further, I would like to confirm that we are on the same wavelength. When you say "printing on the console", do you mean that the messages should be sent to the serial link connected to the µP, i.e. the debug console of the Cortex A8 ? If yes, that's fine ; if not, which "console" are you referring to ?

    I can also see a lot of calls to Vps_printf() everywhere in the code, but nothing is displayed on my debug console.

    To summarize this point, I am interested in displaying 2 kinds of messages :


       1. The statistics we are referring to
          (according to ref. : http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/p/204227/871411.aspx)

       2. But also all the messages sent via calls to function Vps_printf()

    Does your proposal takes these 2 points into account ? ... Vps_printf() messages would be a great tool to debug.

    To come back to PRINT_ADVANCED_STATISTICS ioctl, all I can find in the code are the following items :

    1. IN HDVPSS :
      A. IN DRIVERS :

      - packages/ti/psp/vps/drivers/capture/vpsdrv_captureLm.h:
                   #define VPS_CAPT_LIST_ENABLE_ADV_STATISTICS_LOG


      B. IN EXAMPLES :

      - packages/ti/psp/examples/common/vps/capture/captureVip/src/CaptureVip_main.c:
                   CaptureApp_printStatistics(...);
                       |-->  FVID2_control(gCaptureApp_ctrl.fvidHandleVipAll,
                                           IOCTL_VPS_CAPT_PRINT_ADV_STATISTICS,
                                           (Ptr)totalTimeInMsecs,
                                           NULL);

      - packages/ti/psp/examples/common/vps/chains/src/chains_tvp5158NonMuxCapture.c:
                   System_linkControl(captureId, CAPTURE_LINK_CMD_PRINT_ADV_STATISTICS, NULL, TRUE);

    1. IN LINUX :

      - include/linux/vps_capture.h:
                   #define IOCTL_VPS_CAPT_PRINT_ADV_STATISTICS  (VPS_CAPT_IOCTL_BASE + 0x0005u)


        Any advice to make progress with debug solutions please ?


    Concerning the fact that we decided to use line-mux, I am sorry to tell you that I have no good reason to explain this choice. I can try to change the configuration to pixel-mux and re-run the test. In our case, TVP5158 is isolated on I2C2 (Centaurus), that is only reachable by Cortex M3 ... So once again, being able to use Vps_printf() to display log messages would be helpful in such a situation to print TVP5158-register values and guarantee the status of the device.

    Thanks a lot in advance for your attention and forthcoming reply. Best regards.

                   Philippe

  •     Hi,

    I have tried to get the HDVPSS logs based on calls to function Vps_printf( ) according to the procedure described here :

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/717/t/178312.aspx

    With the exception that there is no file remote_debug_client.out on my target, I have found an other file loggerSMDump.out that seems to do (almost) the same job. I used the following command line and got this failure :

    /usr/bin/loggerSMDump.out 0xcfc00000 vpss

    Opened loggerSM.bin to store encoded records

    Bus error

    I believe that I have a problem with the computation of the address of the HDVPSS Shared Memory area. Items that I have used to do my computation are listed hereafter :

    src/remote_debug_server.c:

        #pragma DATA_SECTION (gRemoteDebug_coreObj,".bss:extMemNonCache:remoteDebugCoreShm");

    HDVPSS_01_00_01_33/packages/ti/psp/platforms/utility/vpsCommonBIOS.cfg:

    Program.sectMap[".bss:extMemNonCache:remoteDebugCoreShm"]="HDVPSS_DESC_MEM";

    HDVPSS_01_00_01_33/packages/config_ti814x.bld:

            ["HDVPSS_DESC_MEM", {

                comment : "HDVPSS_DESC_MEM",

                name    : "HDVPSS_DESC_MEM",

                base    : HDVPSS_DESC_ADDR,

                len     : HDVPSS_DESC_SIZE

            }],

    DDR3_ADDR_1             = 0xC0000000;

    DDR3_SIZE               = 2048*MB;

    TILER_8BIT_SIZE         = 128*MB;

    FRAME_BUFFER_SIZE       = 123*MB;

    HDVPSS_DESC_SIZE        = 2*MB;

    HDVPSS_SHARED_SIZE      = 2*MB;

    NOTIFY_SHARED_SIZE      = 1*MB;

    TILER_8BIT_ADDR         = DDR3_ADDR_1;

    FRAME_BUFFER_ADDR       = TILER_8BIT_ADDR       + TILER_8BIT_SIZE;

    NOTIFY_SHARED_ADDR      = FRAME_BUFFER_ADDR     + FRAME_BUFFER_SIZE;

    HDVPSS_DESC_ADDR        = NOTIFY_SHARED_ADDR    + NOTIFY_SHARED_SIZE;

    HDVPSS_SHARED_ADDR      = HDVPSS_DESC_ADDR      + HDVPSS_DESC_SIZE;

    So, if I am not wrong, this should lead to the following mapping :

    TILER_8BIT_ADDR         = $C0000000

    FRAME_BUFFER_ADDR       = $C8000000

    NOTIFY_SHARED_ADDR      = $CFB00000

    HDVPSS_DESC_ADDR        = $CFC00000

    HDVPSS_SHARED_ADDR      = $CFE00000

     

        … However, I just get a « bus error » in the end. Thanks a lot in advance for your help. HDVPSS logs should be a great advantage to do better investigations about problems concerning video quality. Best regards.

            Philippe