unable to capture image using dm365 + LI-5m03 camera [ failed to create video encoder: jpegenc ]

unable to capture image using dm365 + LI-5m03 camera [ failed to create video encoder: jpegenc ]

  • command:
    ---------------
    gst-launch -e v4l2src always-copy=false num-buffers=1 chain-ipipe=true ! video/x-raw-yuv,format=\(fourcc\)UYVY, width=1280, height=720 ! \
    ffmpegcolorspace ! dmaienc_jpeg ! filesink location=test.jpeg

    /data # gst-launch -e v4l2src always-copy=false num-buffers=1 chain-ipipe=true !
    video/x-raw-yuv,format=\(fourcc\)UYVY, width=1280,height=720 ! ffmpegcolorspace
    ! dmaienc_jpeg ! filesink location=test.jpg
    CMEMK Error: Failed to find a pool which fits 28672
    CMEM Error: getPCMEMK Error: get_phys: Unable to find phys addr for 0x00000000
    ool: Failed to gCMEMK Error: get_phys: get_user_pages() failed: -14
    et a pool fittinCMEMK Error: GETPHYS: Failed to convert virtual 0x0 to physical.
    g a size 28672
    CMEMK Error: get_phys: Unable to find phys addr for 0x00000000
    CMEM Error: getPCMEMK Error: get_phys: get_user_pages() failed: -14
    hys: Failed to gCMEMK Error: FREE: Failed to convert virtual 0x0 to physical
    et physical address of 0
    CMEM Error: free: failed to free 0
    Setting pipeline to PAUSED ...
    davinci_resizer davinci_resizer.2: RSZ_G_CONFIG:0:1:124
    vpfe-capture vpfe-capture: IPIPE Chained
    vpfe-capture vpfe-capture: Resizer present
    vpfe-capture vpfe-capture: standard not supported
    Pipeline is live and does not need PREROLL ...
    WARNING: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Failed to set.
    Additional debug info:
    ../../../src/sys/v4l2/v4l2_calls.c(743): gst_v4l2_set_norm (): /GstPipeline:pip:
    system error: Invalid argument
    WARNING: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Video input d.
    Additional debug info:
    ../../../src/sys/v4l2/v4l2src_calls.c(342): gst_v4l2src_set_capture (): /GstPip:
    system error: Invalid argument
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    ERROR: from element /GstPipeline:pipeline0/dmaienc_jpeg:dmaienc_jpeg0: Could no.
    Additional debug info:
    ../../src/src/gsttiimgenc1.c(199): gstti_imgenc1_create (): /GstPipeline:pipeli:
    failed to create video encoder: jpegenc

    Execution ended after 238950084 ns.
    Setting pipeline to PAUSED ...
    Setting pipeline to READY ...
    Setting pipeline to NULL ...
    Freeing pipeline .


    Its unable to create video encoder jpegnc.

    /data # cat /proc/cmem

    Block 0: Pool 0: 20 bufs size 4096 (4096 requested)

    Pool 0 busy bufs:

    Pool 0 free bufs:
    id 3: phys addr 0x877fc000
    id 2: phys addr 0x877fd000
    id 0: phys addr 0x877ff000
    id 1: phys addr 0x877fe000
    id 4: phys addr 0x877fb000
    id 5: phys addr 0x877fa000
    id 6: phys addr 0x877f9000
    id 7: phys addr 0x877f8000
    id 8: phys addr 0x877f7000
    id 9: phys addr 0x877f6000
    id 10: phys addr 0x877f5000
    id 11: phys addr 0x877f4000
    id 12: phys addr 0x877f3000
    id 13: phys addr 0x877f2000
    id 14: phys addr 0x877f1000
    id 15: phys addr 0x877f0000
    id 16: phys addr 0x877ef000
    id 17: phys addr 0x877ee000
    id 18: phys addr 0x877ed000
    id 19: phys addr 0x877ec000

    Block 0: Pool 1: 10 bufs size 131072 (131072 requested)

    Pool 1 busy bufs:

    Pool 1 free bufs:
    id 2: phys addr 0x8778c000
    id 1: phys addr 0x877ac000
    id 0: phys addr 0x877cc000
    id 3: phys addr 0x8776c000
    id 4: phys addr 0x8774c000
    id 5: phys addr 0x8772c000
    id 6: phys addr 0x8770c000
    id 7: phys addr 0x876ec000
    id 8: phys addr 0x876cc000
    id 9: phys addr 0x876ac000

    Block 0: Pool 2: 2 bufs size 1048576 (1048576 requested)

    Pool 2 busy bufs:

    Pool 2 free bufs:
    id 0: phys addr 0x875ac000
    id 1: phys addr 0x874ac000

    cmem has enough pools but dont understand what is the error i am getting.
  • Hi,

    I have a similar problem. My cmemk is loaded correctly. I start with mem=65M and I launch :

    $> modprobe cmemk phys_start=0x84a00000 phys_end=0x88000000 pools=3x16538976,3x2097152,2x262144,5x28672,5x8192

    CMEMK module: built on Jul  7 2011 at 13:45:44
      Reference Linux version 2.6.32
      File /home/caguero/ti-dvsdk_dm365-evm_4_02_00_06/linuxutils_2_26_01_02/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
    allocated heap buffer 0xc8000000 of size 0x1000
    cmemk initialized

    $> cat /proc/cmem

    Block 0: Pool 0: 3 bufs size 16539648 (16538976 requested)

    Pool 0 busy bufs:

    Pool 0 free bufs:
    id 0: phys addr 0x8703a000
    id 1: phys addr 0x86074000
    id 2: phys addr 0x850ae000

    Block 0: Pool 1: 3 bufs size 2097152 (2097152 requested)

    Pool 1 busy bufs:

    Pool 1 free bufs:
    id 0: phys addr 0x84eae000
    id 1: phys addr 0x84cae000
    id 2: phys addr 0x84aae000

    Block 0: Pool 2: 2 bufs size 262144 (262144 requested)

    Pool 2 busy bufs:

    Pool 2 free bufs:
    id 0: phys addr 0x84a6e000
    id 1: phys addr 0x84a2e000

    Block 0: Pool 3: 5 bufs size 28672 (28672 requested)

    Pool 3 busy bufs:

    Pool 3 free bufs:
    id 0: phys addr 0x84a27000
    id 1: phys addr 0x84a20000
    id 2: phys addr 0x84a19000
    id 3: phys addr 0x84a12000
    id 4: phys addr 0x84a0b000

    Block 0: Pool 4: 5 bufs size 8192 (8192 requested)

    Pool 4 busy bufs:

    Pool 4 free bufs:
    id 0: phys addr 0x84a09000
    id 1: phys addr 0x84a07000
    id 2: phys addr 0x84a05000
    id 3: phys addr 0x84a03000
    id 4: phys addr 0x84a01000

    $> gst-launch filesrc location=/tmp/testh264.mp4 ! qtdemux name=demux demux.aud
    io_00 ! queue max-size-buffers=8000 max-size-time=0 max-size-bytes=0 ! dmaidec_a
    ac ! alsasink demux.video_00 ! queue ! dmaidec_h264 ! queue ! filesink location=
    /tmp/testyuv.raw --gst-debug-level 1

    CMEMK Error: Failed to find a pool which fits 28672
    CMEM Error: getPool: Failed to get a pool fitting a size 28672

    CMEMK Error: get_phys: Unable to find phys addr for 0x00000000
    CMEMK Error: get_phys: get_user_pages() failed: -14
    CMEMK Error: GETPHYS: Failed to convert virtual 0x0 to physical.
    CMEMK Error: get_phys: Unable to find phys addr for 0x00000000
    CMEM Error: getPhys: Failed to get physical address of 0

    CMEMK Error: get_phys: get_user_pages() failed: -14
    CMEMK Error: FREE: Failed to convert virtual 0x0 to physical
    CMEM Error: free: failed to free 0

     

    What is annoying according to me is that it can't find the pool even if I have 5 of them !

    And the physical adress 0 which is not normal...

    JM