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.

AM5728: how can use ducati decoder apis on AM5728 EVM board

Part Number: AM5728

Hello,

        Actually i have tested gstreamer application on AM5728 EVM board. But because of some issue i want to use my own application.

So,Is it possible to use apis of "ducati-decoder" in my aaplication?

Can you provide me apis to use in my application?

Regards,

Kishan Patel.

  • Hello,

    Please refer viddec3test.c demo.
    MACHINE=am57xx-evm bitbake omapdrmtest

    Hope this helps.

    BR
    Margarita
  • Hello Margarita,
    Okay. So, i can find "ducati-apis" in "viddec3test.c" file after bitabake "omapdrmtest". Right?
    Regards,
    Kishan Patel.
  • Hello,

    You could check the code here also:
    git.ti.com/.../viddec3test.c
    This demo is decode->display.

    BR
    Margarita
  • Hello,

    Here ,
    git.ti.com/.../codecs
    you could find the codecs user guides. It is under /doc folder.

    Hope this helps.

    BR
    Margarita
  • Hello Margarita,
    After bitbake process, how can i test that demo?
    Regards,
    Kishan Patel.
  • Hello,

    You already have this demo in the filesystem under /usr/bin folder.

    Here is example
    ./viddec3test -s 35:800x480 /usr/share/ti/video/test.264 --fps 30

    Where 35 is the connector ID you must check this with modetest.
    test.264 is the input file. You must stop weston.

    BR
    Margarita
  • 6116.modetest.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    root@am57xx-evm:/usr/bin# modetest
    trying to open device 'i915'...failed
    trying to open device 'amdgpu'...failed
    trying to open device 'radeon'...failed
    trying to open device 'nouveau'...failed
    trying to open device 'vmwgfx'...failed
    trying to open device 'omapdrm'...done
    Encoders:
    id crtc type possible crtcs possible clones
    34 0 TMDS 0x00000001 0x00000000
    40 47 TMDS 0x00000002 0x00000000
    Connectors:
    id encoder status name size (mm) modes encoders
    35 0 disconnected HDMI-A-1 0x0 0 34
    props:
    1 EDID:
    flags: immutable blob
    blobs:
    value:
    2 DPMS:
    flags: enum
    enums: On=0 Standby=1 Suspend=2 Off=3
    value: 0
    5 link-status:
    flags: enum
    enums: Good=0 Bad=1
    value: 0
    41 40 connected DPI-1 0x0 1 40
    modes:
    name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot)
    800x480 60 800 1010 1040 1056 480 502 515 525 33000 flags: nhsync, nvsync; type: preferred, driver
    props:
    1 EDID:
    flags: immutable blob
    blobs:
    value:
    2 DPMS:
    flags: enum
    enums: On=0 Standby=1 Suspend=2 Off=3
    value: 0
    5 link-status:
    flags: enum
    enums: Good=0 Bad=1
    value: 0
    CRTCs:
    id fb pos size
    39 0 (0,0) (0x0)
    0 0 0 0 0 0 0 0 0 0 flags: ; type:
    props:
    23 CTM:
    flags: blob
    blobs:
    value:
    24 GAMMA_LUT:
    flags: blob
    blobs:
    value:
    25 GAMMA_LUT_SIZE:
    flags: immutable range
    values: 0 4294967295
    value: 256
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    Hello Margarita,

               I have try to test above demo. But got some error. Please check as below:

    error:

    -------

    root@am57xx-evm:/usr/bin# ./viddec3test -s 41:800x480 /home/root/video_test.avi

    0x2f008: Opening Display..

    using 1 connectors, 800x480 display, multiplanar: 1

    Setting mode 800x480 on connector 41, crtc 47

    ERROR:post_buffer:298: Could not post buffer on crtc 47: Permission denied (-13)

    0x2f008: Opening Demuxer..

    [h264 @ 0x31680] error while decoding MB 57 26, bytestream -22

    [h264 @ 0x31680] concealing 1512 DC, 1512 AC, 1512 MV errors in I frame

    Input #0, h264, from '/home/root/video_test.avi':

     Duration: N/A, bitrate: N/A

       Stream #0:0: Video: h264 (High), yuvj420p(pc, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 1200k tbn, 60 tbc

    0x2f008: infile=/home/root/video_test.avi, width=1280, height=720

    0x2f008: padded_width=1408, padded_height=816, num_buffers=12

    ERROR:post_buffer:298: Could not post buffer on crtc 47: Permission denied (-13)

    ^Croot@am57xx-evm:/usr/bin#

    I am also sharing you file which shows details of connectors by executing "modetest" command.

    Regards,

    Kishan Patel.

  • viddec3test_error.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    root@am57xx-evm:/usr/bin# ./viddec3test -s 47:800x480 /usr/share/ti/video/HistoryOfTI-480p.264 --fps 30
    0x2f008: Opening Display..
    Forcing playback rate at 30 fps.
    ERROR:connector_find_mode:492: failed to find mode "800x480"
    using 1 connectors, 0x0 display, multiplanar: 1
    ERROR:alloc_buffer:182: drmModeAddFB2 failed: Invalid argument (-22)
    ERROR:alloc_buffers:226: allocation failed
    Segmentation fault (core dumped)
    root@am57xx-evm:/usr/bin# ./viddec3test -s 41:800x480 /usr/share/ti/video/HistoryOfTI-480p.264 --fps 30
    0x2f008: Opening Display..
    Forcing playback rate at 30 fps.
    using 1 connectors, 800x480 display, multiplanar: 1
    Setting mode 800x480 on connector 41, crtc 47
    0x2f008: Opening Demuxer..
    Input #0, h264, from '/usr/share/ti/video/HistoryOfTI-480p.264':
    Duration: N/A, bitrate: N/A
    Stream #0:0: Video: h264 (Main), yuv420p(progressive), 720x406 [SAR 406:405 DAR 16:9], 29.92 fps, 29.97 tbr, 1200k tbn, 59.94 tbc
    0x2f008: infile=/usr/share/ti/video/HistoryOfTI-480p.264, width=720, height=406
    0x2f008: padded_width=896, padded_height=512, num_buffers=19
    Page flip: frame=115870, sec=8192, usec=867208, remaining=0
    0x2f008: Opening Engine..
    displayBufsMode: 1
    ^Croot@am57xx-evm:/usr/bin#
    ====================================================================
    root@am57xx-evm:/usr/bin# ./viddec3test -s 41:800x480 /home/root/video_test.avi --fps 3030
    0x2f008: Opening Display..
    Forcing playback rate at 30 fps.
    using 1 connectors, 800x480 display, multiplanar: 1
    Setting mode 800x480 on connector 41, crtc 47
    0x2f008: Opening Demuxer..
    [h264 @ 0x31680] error while decoding MB 57 26, bytestream -22
    [h264 @ 0x31680] concealing 1512 DC, 1512 AC, 1512 MV errors in I frame
    Input #0, h264, from '/home/root/video_test.avi':
    Duration: N/A, bitrate: N/A
    Stream #0:0: Video: h264 (High), yuvj420p(pc, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 1200k tbn, 60 tbc
    0x2f008: infile=/home/root/video_test.avi, width=1280, height=720
    0x2f008: padded_width=1408, padded_height=816, num_buffers=12
    Page flip: frame=116256, sec=8239, usec=747979, remaining=0
    0x2f008: Opening Engine..
    displayBufsMode: 1
    ERROR:decoder_process:427: 0x2f008: process returned error: -1
    ERROR:decoder_process:428: 0x2f008: extendedError: 02000a00
    ERROR:decoder_process:427: 0x2f008: process returned error: -1
    ERROR:decoder_process:428: 0x2f008: extendedError: 02000a00
    ERROR:decoder_process:427: 0x2f008: process returned error: -1
    ERROR:decoder_process:428: 0x2f008: extendedError: 02000a00
    ^C^[[Aroot@am57xx-evm:/usr/bin#
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    Hello Margarita,

               Now, i can test demo. Since, i got some errors but video can play.

    Please check the errors in attached file.

  • Hello Kishan,

    Actually you are searching for the way to use ducati decoder in your own OpenCV demo right?

    BR
    Margarita
  • Hello Margarita,
    Yes, you are right.
    Regards,
    Kishan Patel.