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.

DM368 encode demo 1080i 60HZ

Other Parts Discussed in Thread: TVP7002

Hi,

i used DM368 chip  on my target board with DVSDK3_10_00_19.  i can run encode demo at  720p.

COMPONENT 1080i 60HZ input , run encode DEMO, error found.

According with http://processors.wiki.ti.com/index.php/Migration/Integration_Guide_for_DM36x_H.264_version_2.x_codecs#How_to_integrate_ver_2.0_codec_in_DVSDK_3.1_demo.3F

I modified the loadmodules_hd.sh and encode.cfg, rebuild demo application.

u-boot:

setenv bootargs mem=60M console=ttyS0,115200n8 root=/dev/nfs rw nfsroot=192.168.1.100:/opt/nfs ip=192.168.1.101:255.255.255.0:192.168.1.254
video=davincifb:vid0=OFF:vid1=OFF:osd0=720x576x16,2025K dm365_imp.oper_mode=0

loadmodules_hd.sh

insmod cmemk.ko phys_start=0x83C00000 phys_end=0x88000000
pools=1x384,2x5984,2x3133440,1x16384,1x48952,1x20480,1x60288,1x74,1x28,1x2048,1x6785280,1x146,
1x896,1x65536,1x98,1x296,29x56,2x24,1x624,4x62,1x1456,1x18321120,1x65792,5x3523584,1x4194304,1x8355840  allowOverlap=1 phys_start_1=0x00001000 phys_end_1=0x00008000 pools_1=1x28672


root@dm365-evm:/dm365# ./loadmodules_hd.sh
cmemk unregistered
irqk unregistered
CMEMK module: built on Jul 14 2010 at 17:02:50
  Reference Linux version 2.6.32
  File /sim/scratch_a0868396/arago-install/dvsdk_3_10_00_19/linuxutils_2_25_04_1
0/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
allocated heap buffer 0xc4000000 of size 0x8d5000
CMEM Range Overlaps Kernel Physical - allowing overlap
CMEM phys_start (0x1000) overlaps kernel (0x80000000 -> 0x83000000)
cmemk initialized
IRQK module: built on Jul 14 2010 at 17:03:00
  Reference Linux version 2.6.32
  File /sim/scratch_a0868396/arago-install/dvsdk_3_10_00_19/linuxutils_2_25_04_1
0/packages/ti/sdo/linuxutils/irq/src/module/irqk.c
irqk initialized
EDMAK module: built on Jul 14 2010 at 17:02:57
  Reference Linux version 2.6.32
  File /sim/scratch_a0868396/arago-install/dvsdk_3_10_00_19/linuxutils_2_25_04_1
0/packages/ti/sdo/linuxutils/edma/src/module/edmak.c
root@dm365-evm:/dm365#
root@dm365-evm:/dm365#
root@dm365-evm:/dm365#
root@dm365-evm:/dm365# ./encode -v 1.264 -y 5
Encode demo started.
EVM: switch to tvp7002 HD video input
davinci_resizer davinci_resizer.2: RSZ_G_CONFIG:0:1:124
davinci_previewer davinci_previewer.2: ipipe_set_preview_config
vpfe-capture vpfe-capture: IPIPE Chained
vpfe-capture vpfe-capture: Resizer present
EVM: switch to tvp7002 HD video input
vpfe-capture vpfe-capture: width = 1920, height = 1080, bpp = 1
vpfe-capture vpfe-capture: adjusted width = 1920, height = 1080, bpp = 1, bytesp
erline = 1920, sizeimage = 3110400
vpfe-capture vpfe-capture: width = 1920, height = 1080, bpp = 1
vpfe-capture vpfe-capture: adjusted width = 1920, height = 1080, bpp = 1, bytesp
erline = 1920, sizeimage = 3110400
CMEMK Error: Failed to find a pool which fits 3133440
CMEMK Error: Failed to find a pool which fits 3110400
CMEM Error: getPool: Failed to get a pool fitting a size 3133440
CMEM Error: getPool: Failed to get a pool fitting a size 3110400


Does anybody have related experience about 1080i? any suggestions is welcome

  • It seems that your pool geometry for CMEM is sufficient for the reported failed sizes, so I would expect that the CMEM error is due to not enough pool buffers of that size.

    Can you rerun the app with the environment variable CE_DEBUG=3 and report back with the output?:
        % export CE_DEBUG=3
        % ./encode ...

    Regards,

    - Rob

  • Thanks for u reply.

    I found CMEM failed to allocate memory ,so i modify pool buffers.

    u-boot

    setenv bootargs mem=48M console=ttyS0,115200n8 root=/dev/nfs rw nfsroot=192.168.1.100:/opt/nfs ip=192.168.1.101:255.255.255.0:192.168.1.254
    video=davincifb:vid0=OFF:vid1=OFF:osd0=720x576x16,2025K dm365_imp.oper_mode=0

    loadmodules_hd.sh

    insmod cmemk.ko phys_start=0x83000000 phys_end=0x88000000 pools=1x20480,1x60288,2x5984,1x16384,1x65536,1x384,
    6x3110400,1x6785280,1x48952,1x74,1x28,1x2048,1x146,11x3133440,1x896,1x98,1x296,29x56,2x24,1x624,4x62,1x1456,1x8321120,1x8355840,1x4194304
     allowOverlap=1 phys_start_1=0x00001000 phys_end_1=0x00008000 pools_1=1x28672

    root@dm365-evm:/dm365# ./encode -v 1.264 -y 5
    Encode demo started.
    EVM: switch to tvp7002 HD video input
    davinci_resizer davinci_resizer.2: RSZ_G_CONFIG:0:1:124
    davinci_previewer davinci_previewer.2: ipipe_set_preview_config
    vpfe-capture vpfe-capture: IPIPE Chained
    vpfe-capture vpfe-capture: Resizer present
    EVM: switch to tvp7002 HD video input
    vpfe-capture vpfe-capture: width = 1920, height = 1080, bpp = 1
    vpfe-capture vpfe-capture: adjusted width = 1920, height = 1080, bpp = 1, bytesp
    erline = 1920, sizeimage = 3110400
    vpfe-capture vpfe-capture: width = 1920, height = 1080, bpp = 1
    vpfe-capture vpfe-capture: adjusted width = 1920, height = 1080, bpp = 1, bytesp
    erline = 1920, sizeimage = 3110400
    davinci_v4l2 davinci_v4l2.1: Before finishing with S_FMT:
    layer.pix_fmt.bytesperline = 1920,
     layer.pix_fmt.width = 1920,
     layer.pix_fmt.height = 1080,
     layer.pix_fmt.sizeimage =3110400
    davinci_v4l2 davinci_v4l2.1: pixfmt->width = 1920,
     layer->layer_info.config.line_length= 1920
    Error: Failed to encode video buffer


    export CE_DEBUG=2
    ./encode -v 1.264 -y 5 >output.txt

    @1,496,591us: [+5 T:0x41cec490 S:0x41cebadc] CV - VISA_exit(visa=0xfb130): algHandle = 0xfb168
    @1,496,848us: [+0 T:0x41cec490 S:0x41cebacc] ti.sdo.ce.alg.Algorithm - Algorithm_deactivate> Enter(alg=0xfb168)
    @1,497,128us: [+0 T:0x41cec490 S:0x41cebaac] ti.sdo.ce.osal.SemMP - Entered SemMP_post> sem[0xc32c8]
    @1,497,440us: [+0 T:0x41cec490 S:0x41cebaac] ti.sdo.ce.osal.SemMP - Leaving SemMP_post> sem[0xc32c8]
    @1,497,692us: [+0 T:0x41cec490 S:0x41cebadc] ti.sdo.ce.alg.Algorithm - Algorithm_deactivate> Exit
    @1,497,898us: [+0 T:0x41cec490 S:0x41cebaf4] ti.sdo.ce.video1.VIDENC1 - VIDENC1_process> Exit (handle=0xfb130, retVal=0xffffffff)
    @1,498,104us: [+2 T:0x41cec490 S:0x41cebb44] ti.sdo.dmai - [Venc1] VIDENC1_process() ret -1 inId 0 outID 1073964184 generated 1073905568 bytes
    @1,498,334us: [+7 T:0x41cec490 S:0x41cebb44] ti.sdo.dmai - [Venc1] VIDENC1_process() failed with error (-1 ext: 0x8006)
    @2,081,347us: [+2 T:0x41cec490 S:0x41cebc94] ti.sdo.dmai - [Buffer] Free Buffer of size 3133440 at 0x42f08000 (0x8647d000 phys)
    @2,081,606us: [+0 T:0x41cec490 S:0x41cebc74] OM - Memory_free> Enter(0x42f08000, 0x2fd000)
    @2,081,809us: [+0 T:0x41cec490 S:0x41cebc3c] OM - Memory_contigFree> Enter(addr=1123057664, size=3133440)
    @2,082,000us: [+1 T:0x41cec490 S:0x41cebc14] OM - Memory__removeContigBuf> Enter(virtAddr=0x42f08000, size=3133440)
    @2,082,191us: [+1 T:0x41cec490 S:0x41cebc14] OM - Memory__removeContigBuf> removing cb->phys=0x8647d000, cb->size=0x2fd000, cb->virt=0x42f08000
    @2,082,378us: [+0 T:0x41cec490 S:0x41cebbf4] OM - Memory_free> Enter(0xfb398, 0x10)
    @2,082,573us: [+0 T:0x41cec490 S:0x41cebbf4] OM - Memory_free> return (0x1)
    @2,085,095us: [+0 T:0x41cec490 S:0x41cebc3c] OM - Memory_contigFree> return (0x1)
    @2,085,353us: [+0 T:0x41cec490 S:0x41cebc74] OM - Memory_free> return (0x1)
    @2,085,563us: [+2 T:0x41cec490 S:0x41cebc94] ti.sdo.dmai - [Buffer] Free Buffer of size 3133440 at 0x43205000 (0x86180000 phys)

    Next step,what should i do?

  • You are getting an extended error returned from the codec's process() function.  You will need to consult your codec data sheet for an explanation of the extended error code 0x8006.

    If you still have further issues/questions after consulting the codec data sheet, you might be better off posting this to a codec-releated Forum.

    Regards,

    - Rob

     

  • Rob's advice is right - here's a link which kinda says the same:

    http://processors.wiki.ti.com/index.php/XDM_FAQ#How_do_I_decode_extendedError.3F

    You're getting a XDM_FATALERROR bit set (0x8000), and codec-specific error 0x6.  If you do sort this out, would be good to post your findings.  Thanks.

    Chris