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.

AM57x custom video codec integration

Other Parts Discussed in Thread: SYSBIOS

We are trying to integrate as customer H264 encoder codec in SDK.

There is a default H264 encoder codec that is part of the SDK(and is part of ipumm fw).

Location of library file and interface header file within SDK :
tisdk/build/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/ipumm-fw/3.00.10.00-r1/git/extrel/ti/ivahd_codecs/packages/ti/sdo/codecs/h264enc/lib/h264enc_ti_host.lib
tisdk/build/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/ipumm-fw/3.00.10.00-r1/git/extrel/ti/ivahd_codecs/packages/ti/sdo/codecs/h264enc/ih264enc.h

We also have a custom codec library file (.lib) and a interface header file.
We hope to replace the above .lib & .h files with our custom files.

Need to find where all these lib and header files is referenced so we can edit them.


Modification we did to integrate our library :
1. Copied our library within "tisdk/build/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/ipumm-fw/3.00.10.00-r1/git/extrel/ti/ivahd_codecs/packages/ti/sdo/codecs/h264enc/lib/"
2. Copied our interface header file within "tisdk/build/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/ipumm-fw/3.00.10.00-r1/git/extrel/ti/ivahd_codecs/packages/ti/sdo/codecs/h264enc/"
3. Edited
   ./arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/ipumm-fw/3.00.10.00-r1/git/extrel/ti/ivahd_codecs/packages/ti/sdo/codecs/h264enc/ce/H264ENC.xdc
   Changed "ialgFxns" param
4. Edited    
   ./arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/ipumm-fw/3.00.10.00-r1/git/extrel/ti/ivahd_codecs/packages/ti/sdo/codecs/h264enc/package.xs
   Changed "lib" parameter in getLibs() function so point of our library.


Compiling the ipumm-fw :
MACHINE=am57xx-evm bitbake ipumm-fw
MACHINE=am57xx-evm bitbake -c clean ipumm-fw
MACHINE=am57xx-evm bitbake -c fetch ipumm-fw
MACHINE=am57xx-evm bitbake -c unpack ipumm-fw
Then did modifications steps 1,2,3 and 4
MACHINE=am57xx-evm bitbake -c compile ipumm-fw

   
We see compile errors(below is a snippet):
/---------------------------xx-----------------------------------/
| making package/cfg/out/ipu/release/ipu_pem4.src/ipc.aem4 ...
| making package/cfg/out/ipu/release/ipu_pem4.src/utils.aem4 ...
| making package/cfg/out/ipu/release/ipu_pem4.src/sysbios/sysbios.aem4 ...
| making package/cfg/out/ipu/release/qnx_ipu_pem4.src/ipc.aem4 ...
| making package/cfg/out/ipu/release/qnx_ipu_pem4.src/utils.aem4 ...
| making package/cfg/out/ipu/release/qnx_ipu_pem4.src/sysbios/sysbios.aem4 ...
| lnkem4 out/ipu/release/ipu.xem4 ...
|
|  undefined           first referenced
|   symbol                 in file
|  ---------           ----------------
|  H264ENC_TI_IH264ENC package/cfg/out/ipu/release/ipu_pem4.oem4
|  H264ENC_TI_IRES     package/cfg/out/ipu/release/ipu_pem4.oem4

/---------------------------xxxxx-----------------------------------/   

So there are some more places that we need to edit to integrate our codec library.
Any pointers on which other files we need to edit ?

Regards,

Snehal

  • I will forward this to the software team.
  • Hello,

    What you mean by customer codec? A TI h264 codec but different version?
    If yes it seem that step 1. and 2. are sufficient.
    1. cp h264enc_ti_host.lib to ipumm/extrel/ti/ivahd_codecs/packages/ti/sdo/codecs/h264enc/lib/
    2. cp ih264enc.h in extrel/ti/ivahd_codecs/packages/ti/sdo/codecs/h264enc/



    BR
    Margarita
  • No, non TI codec .. its a 3rd party codec.
  • Could you also issue cleansstate command before compiling.

    MACHINE=am57xx-evm bitbake -c cleansstate ipumm-fw

    As per the error, seems you need to merge, import or link more files to suppress this undefined reference error.
  • cleansstate did not help.

    Yes more files need to be modified any ideas which files it could be ?

  • Rather replacing the TI provided H.264 codec, add your own custom codec to the package in the build recipe. 

  • Refer to top level makefile and browse through the configuration file to underdstand how you can integrate/replace your custom codec. Look at this -
    git.ti.com/.../Makefile
    git.ti.com/.../dce_ipu.cfg.

    There is a line on loadCodec inside that dec_ipu.cfg file -
    loadCodec('ti.sdo.codecs.h264enc.ce.H264ENC', 'ivahd_h264enc');

    If you are thinking to replace the TI provided IVA code with yours, then this is also one place you need to take care. There may be more places that you will have to review the makefile and find it.
  • Log data follows:
    | DEBUG: Executing shell function do_compile
    | NOTE: make -j 4 -e MAKEFLAGS=
    | export XDCARGS="profile=release trace_level=0 hw_type=VAYU hw_version=ES10 BIOS_type=SMP prof_type=DISABLE"; \
    | /home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/sysroots/am57xx-evm/usr/share/ti/ti-xdctools-tree/xdc --jobs=1 -PD /home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/ipumm-fw/3.00.10.00-r1/git/platform/ti/dce/baseimage/.
    | making all: Mon Aug 1 19:10:15 IST 2016 ...
    | ======== .interfaces [/home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/ipumm-fw/3.00.10.00-r1/git/src/ti/framework/dce] ========
    | making package.mak (because of package.bld) ...
    | Selected Vayu for ES10
    | generating interfaces for package ti.framework.dce (because package/package.xdc.inc is older than package.xdc) ...
    | ======== .interfaces [/home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/ipumm-fw/3.00.10.00-r1/git/src/ti/utils] ========
    | making package.mak (because of package.bld) ...
    | Selected Vayu for ES10
    | generating interfaces for package src.ti.utils (because package/package.xdc.inc is older than package.xdc) ...
    | ======== .interfaces [/home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/ipumm-fw/3.00.10.00-r1/git/platform/ti/dce/baseimage] ========
    | making package.mak (because of package.bld) ...
    | Selected Vayu for ES10
    | config file: dce_ipu.cfg
    |
    | profile: release
    |
    | -D_DM270 -D_DM290_IMX_MCFIX_ -DDRIVERCOMPONENTS=1 -DISSCOMPONENTS=1 -DVIDEOCOMPONENTS=1 -DTESTCOMPONENTS=1
    |
    | HwType = 2
    | HwVer = 1
    | generating interfaces for package platform.ti.dce.baseimage (because package/package.xdc.inc is older than package.xdc) ...
    | .interfaces files complete: Mon Aug 1 19:10:29 IST 2016.
    | ======== .libraries [/home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/ipumm-fw/3.00.10.00-r1/git/src/ti/framework/dce] ========
    | clem4 package/package_ti.framework.dce.c ...
    | clem4 dce.c ...
    | clem4 ivahd.c ...
    | archiving package/lib/lib/ipu/release/ti.framework.dce/package/package_ti.framework.dce.oem4 package/lib/lib/ipu/release/ti.framework.dce/dce.oem4 package/lib/lib/ipu/release/ti.framework.dce/ivahd.oem4 into lib/ipu/release/ti.framework.dce.aem4 ...
    | ======== .libraries [/home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/ipumm-fw/3.00.10.00-r1/git/src/ti/utils] ========
    | clem4 package/package_src.ti.utils.c ...
    | clem4 profile.c ...
    | archiving package/lib/lib/ipu/release/src.ti.utils/package/package_src.ti.utils.oem4 package/lib/lib/ipu/release/src.ti.utils/profile.oem4 into lib/ipu/release/src.ti.utils.aem4 ...
    | ======== .libraries [/home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/ipumm-fw/3.00.10.00-r1/git/platform/ti/dce/baseimage] ========
    | .libraries files complete: Mon Aug 1 19:10:35 IST 2016.
    | ======== .dlls [/home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/ipumm-fw/3.00.10.00-r1/git/src/ti/framework/dce] ========
    | ======== .dlls [/home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/ipumm-fw/3.00.10.00-r1/git/src/ti/utils] ========
    | ======== .dlls [/home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/ipumm-fw/3.00.10.00-r1/git/platform/ti/dce/baseimage] ========
    | configuring out/ipu/release/ipu.xem4 from package/cfg/out/ipu/release/ipu_pem4.cfg ...
    | HwType = 2
    | HwVer = 1
    | gittag3.00.10.00MMIP 3.00.10.00 IPC 3_42_00_02
    | Benelli Vayu: Setting PRCM Addresses ES1.0
    | loading: ivahd_mpeg4dec
    | loading: ivahd_h264dec
    | loading: ivahd_jpegvdec
    | loading: ivahd_vc1vdec
    | loading: ivahd_mpeg2vdec
    | loading: ivahd_h264enc
    | loading: ivahd_mpeg4enc
    | SMP Enabled BIOS
    | generating custom ti.sysbios library makefile ...
    | generating custom ti.sdo.utils library makefile ...
    | generating custom ti.sdo.ipc library makefile ...
    | Auto-registering resource manager for HDVICP2
    | manageIpc = true
    | Heap: ti.sysbios.heaps.HeapMem
    | will link with ti.sdo.codecs.mpeg4enc:lib/mpeg4venc_ti_host.lib
    | will link with ti.sdo.codecs.h264enc:lib/custom_h264bpenc_lib.lib
    | will link with ti.sdo.codecs.mpeg2vdec:lib/mpeg2vdec_ti_host.lib;lib/ivahd_ti_api_vM3.lib
    | will link with ti.sdo.codecs.vc1vdec:lib/vc1vdec_ti_host_M3.lib
    | will link with ti.sdo.codecs.jpegvdec:lib/jpegvdec_ti_host.lib
    | will link with ti.sdo.codecs.h264vdec:lib/h264vdec_ti.lib
    | will link with ti.sdo.codecs.mpeg4vdec:lib/mpeg4vdec_ti_host.lib
    | will link with ti.sdo.codecs.hdvicp20api:lib/ivahd_ti_api_vM3.lib
    | Starting build of library sources ...
    | making /home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/ipumm-fw/3.00.10.00-r1/git/platform/ti/dce/baseimage/package/cfg/out/ipu/release/ipu_pem4.src/ipc.aem4 ...
    | make[1]: Entering directory `/home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/ipumm-fw/3.00.10.00-r1/git/platform/ti/dce/baseimage/package/cfg/out/ipu/release/ipu_pem4.src/ipc'
    | clem4 /home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/sysroots/am57xx-evm/usr/share/ti/ti-ipc-tree/packages/ti/sdo/utils/NameServerRemoteNull.c ...
    | arem4 Ipc.obj ...
    | make[1]: Leaving directory `/home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/ipumm-fw/3.00.10.00-r1/git/platform/ti/dce/baseimage/package/cfg/out/ipu/release/ipu_pem4.src/ipc'
    | making /home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/ipumm-fw/3.00.10.00-r1/git/platform/ti/dce/baseimage/package/cfg/out/ipu/release/ipu_pem4.src/utils.aem4 ...
    | make[1]: Entering directory `/home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/ipumm-fw/3.00.10.00-r1/git/platform/ti/dce/baseimage/package/cfg/out/ipu/release/ipu_pem4.src/utils'
    | clem4 /home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/sysroots/am57xx-evm/usr/share/ti/ti-ipc-tree/packages/ti/sdo/utils/UTILS.c ...
    | arem4 UTILS.obj ...
    | make[1]: Leaving directory `/home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/ipumm-fw/3.00.10.00-r1/git/platform/ti/dce/baseimage/package/cfg/out/ipu/release/ipu_pem4.src/utils'
    | making /home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/ipumm-fw/3.00.10.00-r1/git/platform/ti/dce/baseimage/package/cfg/out/ipu/release/ipu_pem4.src/sysbios/sysbios.aem4 ...
    | make[1]: Entering directory `/home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/ipumm-fw/3.00.10.00-r1/git/platform/ti/dce/baseimage/package/cfg/out/ipu/release/ipu_pem4.src/sysbios'
    | clem4 /home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/sysroots/am57xx-evm/usr/share/ti/ti-sysbios-tree/packages/ti/sysbios/BIOS.c ...
    | asmem4 /home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/sysroots/am57xx-evm/usr/share/ti/ti-sysbios-tree/packages/ti/sysbios/family/arm/m3/Hwi_asm.sv7M ...
    | asmem4 /home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/sysroots/am57xx-evm/usr/share/ti/ti-sysbios-tree/packages/ti/sysbios/family/arm/m3/Hwi_asm_switch.sv7M ...
    | asmem4 /home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/sysroots/am57xx-evm/usr/share/ti/ti-sysbios-tree/packages/ti/sysbios/family/arm/m3/IntrinsicsSupport_asm.sv7M ...
    | asmem4 /home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/sysroots/am57xx-evm/usr/share/ti/ti-sysbios-tree/packages/ti/sysbios/family/arm/m3/TaskSupport_asm.sv7M ...
    | asmem4 /home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/sysroots/am57xx-evm/usr/share/ti/ti-sysbios-tree/packages/ti/sysbios/timers/dmtimer/Timer_asm.sv7M ...
    | asmem4 /home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/sysroots/am57xx-evm/usr/share/ti/ti-sysbios-tree/packages/ti/sysbios/family/arm/ducati/Core_smp_asm.sv7M ...
    | asmem4 /home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/sysroots/am57xx-evm/usr/share/ti/ti-sysbios-tree/packages/ti/sysbios/family/arm/ducati/smp/Power_resumeCpu.sv7M ...
    | asmem4 /home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/sysroots/am57xx-evm/usr/share/ti/ti-sysbios-tree/packages/ti/sysbios/family/arm/ducati/smp/Power_saveCpu.sv7M ...
    | arem4 BIOS.obj m3_Hwi_asm.obj m3_Hwi_asm_switch.obj m3_IntrinsicsSupport_asm.obj m3_TaskSupport_asm.obj dmtimer_Timer_asm.obj ducati_Core_smp_asm.obj smp_Power_resumeCpu.obj smp_Power_saveCpu.obj ...
    | make[1]: Leaving directory `/home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/ipumm-fw/3.00.10.00-r1/git/platform/ti/dce/baseimage/package/cfg/out/ipu/release/ipu_pem4.src/sysbios'
    | Build of libraries done.
    | clem4 package/cfg/out/ipu/release/ipu_pem4.c ...
    | configuring out/ipu/release/qnx_ipu.xem4 from package/cfg/out/ipu/release/qnx_ipu_pem4.cfg ...
    | HwType = 2
    | HwVer = 1
    | gittag3.00.10.00MMIP 3.00.10.00 IPC 3_42_00_02
    | Benelli Vayu: Setting PRCM Addresses ES1.0
    | loading: ivahd_mpeg4dec
    | loading: ivahd_h264dec
    | loading: ivahd_jpegvdec
    | loading: ivahd_vc1vdec
    | loading: ivahd_mpeg2vdec
    | loading: ivahd_h264enc
    | loading: ivahd_mpeg4enc
    | SMP Enabled BIOS
    | generating custom ti.sysbios library makefile ...
    | generating custom ti.sdo.utils library makefile ...
    | generating custom ti.sdo.ipc library makefile ...
    | Auto-registering resource manager for HDVICP2
    | manageIpc = true
    | Heap: ti.sysbios.heaps.HeapMem
    | will link with ti.sdo.codecs.mpeg4enc:lib/mpeg4venc_ti_host.lib
    | will link with ti.sdo.codecs.h264enc:lib/custom_h264bpenc_lib.lib
    | will link with ti.sdo.codecs.mpeg2vdec:lib/mpeg2vdec_ti_host.lib;lib/ivahd_ti_api_vM3.lib
    | will link with ti.sdo.codecs.vc1vdec:lib/vc1vdec_ti_host_M3.lib
    | will link with ti.sdo.codecs.jpegvdec:lib/jpegvdec_ti_host.lib
    | will link with ti.sdo.codecs.h264vdec:lib/h264vdec_ti.lib
    | will link with ti.sdo.codecs.mpeg4vdec:lib/mpeg4vdec_ti_host.lib
    | will link with ti.sdo.codecs.hdvicp20api:lib/ivahd_ti_api_vM3.lib
    | Starting build of library sources ...
    | making /home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/ipumm-fw/3.00.10.00-r1/git/platform/ti/dce/baseimage/package/cfg/out/ipu/release/qnx_ipu_pem4.src/ipc.aem4 ...
    | make[1]: Entering directory `/home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/ipumm-fw/3.00.10.00-r1/git/platform/ti/dce/baseimage/package/cfg/out/ipu/release/qnx_ipu_pem4.src/ipc'
    | clem4 /home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/sysroots/am57xx-evm/usr/share/ti/ti-ipc-tree/packages/ti/sdo/utils/NameServerRemoteNull.c ...
    | arem4 Ipc.obj ...
    | make[1]: Leaving directory `/home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/ipumm-fw/3.00.10.00-r1/git/platform/ti/dce/baseimage/package/cfg/out/ipu/release/qnx_ipu_pem4.src/ipc'
    | making /home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/ipumm-fw/3.00.10.00-r1/git/platform/ti/dce/baseimage/package/cfg/out/ipu/release/qnx_ipu_pem4.src/utils.aem4 ...
    | make[1]: Entering directory `/home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/ipumm-fw/3.00.10.00-r1/git/platform/ti/dce/baseimage/package/cfg/out/ipu/release/qnx_ipu_pem4.src/utils'
    | clem4 /home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/sysroots/am57xx-evm/usr/share/ti/ti-ipc-tree/packages/ti/sdo/utils/UTILS.c ...
    | arem4 UTILS.obj ...
    | make[1]: Leaving directory `/home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/ipumm-fw/3.00.10.00-r1/git/platform/ti/dce/baseimage/package/cfg/out/ipu/release/qnx_ipu_pem4.src/utils'
    | making /home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/ipumm-fw/3.00.10.00-r1/git/platform/ti/dce/baseimage/package/cfg/out/ipu/release/qnx_ipu_pem4.src/sysbios/sysbios.aem4 ...
    | make[1]: Entering directory `/home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/ipumm-fw/3.00.10.00-r1/git/platform/ti/dce/baseimage/package/cfg/out/ipu/release/qnx_ipu_pem4.src/sysbios'
    | clem4 /home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/sysroots/am57xx-evm/usr/share/ti/ti-sysbios-tree/packages/ti/sysbios/BIOS.c ...
    | asmem4 /home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/sysroots/am57xx-evm/usr/share/ti/ti-sysbios-tree/packages/ti/sysbios/family/arm/m3/Hwi_asm.sv7M ...
    | asmem4 /home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/sysroots/am57xx-evm/usr/share/ti/ti-sysbios-tree/packages/ti/sysbios/family/arm/m3/Hwi_asm_switch.sv7M ...
    | asmem4 /home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/sysroots/am57xx-evm/usr/share/ti/ti-sysbios-tree/packages/ti/sysbios/family/arm/m3/IntrinsicsSupport_asm.sv7M ...
    | asmem4 /home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/sysroots/am57xx-evm/usr/share/ti/ti-sysbios-tree/packages/ti/sysbios/family/arm/m3/TaskSupport_asm.sv7M ...
    | asmem4 /home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/sysroots/am57xx-evm/usr/share/ti/ti-sysbios-tree/packages/ti/sysbios/timers/dmtimer/Timer_asm.sv7M ...
    | asmem4 /home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/sysroots/am57xx-evm/usr/share/ti/ti-sysbios-tree/packages/ti/sysbios/family/arm/ducati/Core_smp_asm.sv7M ...
    | asmem4 /home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/sysroots/am57xx-evm/usr/share/ti/ti-sysbios-tree/packages/ti/sysbios/family/arm/ducati/smp/Power_resumeCpu.sv7M ...
    | asmem4 /home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/sysroots/am57xx-evm/usr/share/ti/ti-sysbios-tree/packages/ti/sysbios/family/arm/ducati/smp/Power_saveCpu.sv7M ...
    | arem4 BIOS.obj m3_Hwi_asm.obj m3_Hwi_asm_switch.obj m3_IntrinsicsSupport_asm.obj m3_TaskSupport_asm.obj dmtimer_Timer_asm.obj ducati_Core_smp_asm.obj smp_Power_resumeCpu.obj smp_Power_saveCpu.obj ...
    | make[1]: Leaving directory `/home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/ipumm-fw/3.00.10.00-r1/git/platform/ti/dce/baseimage/package/cfg/out/ipu/release/qnx_ipu_pem4.src/sysbios'
    | Build of libraries done.
    | clem4 package/cfg/out/ipu/release/qnx_ipu_pem4.c ...
    | .dlls files complete: Mon Aug 1 19:11:57 IST 2016.
    | ======== .executables [/home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/ipumm-fw/3.00.10.00-r1/git/src/ti/framework/dce] ========
    | ======== .executables [/home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/ipumm-fw/3.00.10.00-r1/git/src/ti/utils] ========
    | ======== .executables [/home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/ipumm-fw/3.00.10.00-r1/git/platform/ti/dce/baseimage] ========
    | making package/cfg/out/ipu/release/ipu_pem4.src/ipc.aem4 ...
    | making package/cfg/out/ipu/release/ipu_pem4.src/utils.aem4 ...
    | making package/cfg/out/ipu/release/ipu_pem4.src/sysbios/sysbios.aem4 ...
    | making package/cfg/out/ipu/release/qnx_ipu_pem4.src/ipc.aem4 ...
    | making package/cfg/out/ipu/release/qnx_ipu_pem4.src/utils.aem4 ...
    | making package/cfg/out/ipu/release/qnx_ipu_pem4.src/sysbios/sysbios.aem4 ...
    | clem4 main.c ...
    | clem4 ping_tasks.c ...
    | clem4 load_task.c ...
    | clem4 iresman_tiledmemory.c ...
    | lnkem4 out/ipu/release/ipu.xem4 ...
    |
    | undefined first referenced
    | symbol in file
    | --------- ----------------
    | H264ENC_TI_IH264ENC package/cfg/out/ipu/release/ipu_pem4.oem4
    | H264ENC_TI_IRES package/cfg/out/ipu/release/ipu_pem4.oem4
    |
    | error: unresolved symbols remain
    | error: errors encountered during linking; "out/ipu/release/ipu.xem4" not built
    |
    | >> Compilation failure
    | make[1]: *** [out/ipu/release/ipu.xem4] Error 1
    | gmake: *** [/home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/ipumm-fw/3.00.10.00-r1/git/platform/ti/dce/baseimage,.executables] Error 2
    | make: *** [build] Error 2
    | ERROR: oe_runmake failed
    | WARNING: /home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/ipumm-fw/3.00.10.00-r1/temp/run.do_compile.23158:1 exit 1 from
    | exit 1
    | ERROR: Function failed: do_compile (log file is located at /home/einfochips/Krinali/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/ipumm-fw/3.00.10.00-r1/temp/log.do_compile.23158)
    ERROR: Task 5 (/home/einfochips/Krinali/AM57xx/tisdk/sources/meta-ti/recipes-bsp/ipumm-fw/ipumm-fw_git.bb, do_compile) failed with exit code '1'
    NOTE: Tasks Summary: Attempted 304 tasks of which 300 didn't need to be rerun and 1 failed.

    Summary: 1 task failed:
    /home/einfochips/Krinali/AM57xx/tisdk/sources/meta-ti/recipes-bsp/ipumm-fw/ipumm-fw_git.bb, do_compile
    Summary: There was 1 ERROR message shown, returning a non-zero exit code.
  • Hello,

    Snehal Parmar1 said:
    | undefined first referenced
    | symbol in file
    | --------- ----------------
    | H264ENC_TI_IH264ENC package/cfg/out/ipu/release/ipu_pem4.oem4
    | H264ENC_TI_IRES package/cfg/out/ipu/release/ipu_pem4.oem4

    This error is observed when you tried to add a "new" codec?

    If yes, please check platform/ti/dce/baseimage/dce_ipu.cfg file it seems that you should add loadCodec(...) and cp the codec package to extrel directory.


    BR
    Margarita

  • Hello,

    I tried to remove TI h264encoder from the firmware.
    I followed the guide for IPUMM rebuild
    processors.wiki.ti.com/.../Processor_Training:_Multimedia

    export HWVERSION=ES10
    cd ipumm
    make unconfig
    make vayu_smp_config
    make clean

    open dce_ipu.cfg comment the h264enc:
    ....
    loadCodec('ti.sdo.codecs.mpeg2vdec.ce.MPEG2VDEC', 'ivahd_mpeg2vdec');
    //loadCodec('ti.sdo.codecs.h264enc.ce.H264ENC', 'ivahd_h264enc');
    loadCodec('ti.sdo.codecs.mpeg4enc.ce.MPEG4ENC', 'ivahd_mpeg4enc');

    make ducatibin

    Here is part of the log:
    Heap: ti.sysbios.heaps.HeapMem
    will link with ti.sdo.codecs.mpeg4enc:lib/mpeg4venc_ti_host.lib
    will link with ti.sdo.codecs.mpeg2vdec:lib/mpeg2vdec_ti_host.lib;lib/ivahd_ti_api_vM3.lib
    will link with ti.sdo.codecs.vc1vdec:lib/vc1vdec_ti_host_M3.lib
    will link with ti.sdo.codecs.jpegvdec:lib/jpegvdec_ti_host.lib
    will link with ti.sdo.codecs.h264vdec:lib/h264vdec_ti.lib
    will link with ti.sdo.codecs.mpeg4vdec:lib/mpeg4vdec_ti_host.lib
    will link with ti.sdo.codecs.hdvicp20api:lib/ivahd_ti_api_vM3.lib
    Starting build of library sources ...
    ....
    all files complete: Wed Aug 3 09:13:55 EEST 2016.
    /home/mms/tisdk/build/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/share/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/bin/armstrip -p /home/mms//ipumm/platform/ti/dce/baseimage/out/ipu/release/ipu.xem4 -o=dra7-ipu2-fw.xem4
    /home/mms/tisdk/build/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/share/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/bin/armstrip -p /home/mms//ipumm/platform/ti/dce/baseimage/out/ipu/release/qnx_ipu.xem4 -o=dra7xx-m4-ipu2.xem4


    It seems that there is no other place H.264 encoder is getting referred from M4.
    I would recommend you to check how other codecs are integrated by looking into dce_ipu.cfg file.
    I would recommend you to follow the steps in the guide above for IPUMM rebuild.

    BR
    Margarita
  • Hi Margarita,

    We are trying to create a package(we only had a .h and a .lib file) for new codec by taking reference of existing codecs. And then we will add entry to "dce_ipu.cfg" for new codec.
    Will send results shortly.

    Regards,
    Snehal
  • Hi Margarita,

    We are trying to care a package for new codec(we only had a .h file and a .lib file) by taking reference of other codecs. And then we will add the entry for new codec in dce_ipu.cfg file. Will send results shortly.

    Regards,
    Snehal
  • Hi Margarita,

    We were able to compile ipumm-fw with new codec added . Now working to add gst plugin so we can test the codec using gst-launch.

    Any quick start points on adding gst-plugin for custom h264 encoder will help.

    Regards,
    Snehal
  • Hello,

    Please take a look in this demo videnc2test. It is allocated in:
    git.ti.com/.../master

    It will requires modification of encoder's parameters.
    I hope it will be in help for you.

    Regarding a gstreamer plugin you could check this link:
    gstreamer.freedesktop.org/.../chapter-building-boiler.html



    BR
    Margarita
  • Hi Margarita,

    We are trying to run "videnc2test" binary on the EVM.

    But we are getting error in encoder_init.

    root@am57xx-evm:/usr/bin# ./videnc2test 352 288 30 /usr/share/ti/videos/airshow_p352x288.yuv /home/out.h264 5 218 h264 baseline 10 OMAPDRM
    /home/gtbldadm/processor-sdk-linux-fido-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/omapdrmtest/1.0.0-r9/git/videnc2test.c:833: init_h264_dyn_params error: Codec_control returned err=-1, extendedError=00000001
    /home/gtbldadm/processor-sdk-linux-fido-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/omapdrmtest/1.0.0-r9/git/videnc2test.c:944: encoder_init error: H264 encoder static parameter error
    root@am57xx-evm:/usr/bin#

    Please do the needful.

    Thanks & Regards,
    -- Ronak
  • Hello,

    I would recommend you to check the custom encoder static params and dynamic params.
    You could check what the extended error means.

    For example:
    0x00000001 means that bit 0 is set.
    In the custom codec guide(if you have) you could search for extended errors when bit 0 is set.

    BR
    Margarita
  • Hello,

    We are trying to execute "only Default videnc2test" binary on the EVM.
    Encoder static params and dynamic params is same as in SDK.

    Please do the needful.

    Regards,
    -- Ronak
  • Hello,

    Please check this thread the error is the same as yours.

    e2e.ti.com/.../481913

    BR
    Margarita
  • Hi Margarita,

    with updated codec name I cannot run videnc2test on AM57XX EVM.

    Steps what I did:-
    ----------------------------------------------------------------------------------------------------------------------------------------------------------
    1). In the existing path ./arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/ipumm-fw/3.00.10.00-r1/git/extrel/ti/ivahd_codecs/packages/ti/sdo/codecs/

    There are different types of coded folders like h264enc, h264vdec, hdvicp20api, jpegvdec etc..

    I changed name of the folder "h264enc" to "h264testenc", other than that all the name and content are as it is.

    2). Than for compiling ipumm-fw I updated "dce_ipu.cfg" and add
    "loadCodec('ti.sdo.codecs.h264testenc.ce.H264ENC', 'ivahd_h264testenc');" in-place of
    "loadCodec('ti.sdo.codecs.h264enc.ce.H264ENC', 'ivahd_h264enc');"

    3). compilation is done and "dra7-ipu2-fw.xem4" is generated.

    4). Now compiling omapdrmtest (we needed videnc2test binary)

         I updated videnc2test.c file as " #include <ti/sdo/codecs/h264testenc/ih264enc.h>" (because now codec folder name is h264testenc)

         First I got the error as
         videnc2test.c:51:48: fatal error: ti/sdo/codecs/h264testenc/ih264enc.h: No such file or directory
         #include <ti/sdo/codecs/h264testenc/ih264enc.h>

         so, I put "ih264enc.h" in the same folder and update "#include "ih264enc.h""

         and change  "enc->codec = VIDENC2_create(enc->engine, (char*) "ivahd_h264testenc", (VIDENC2_Params *)h264enc_params);" in place of

         " enc->codec = VIDENC2_create(enc->engine, (char*) "ivahd_h264enc", (VIDENC2_Params *)h264enc_params);"


         compilation is done and "videnc2test" is generated.

    5). Put "dra7-ipu2-fw.xem4" on the EVM (/lib/firmware) reboot it, than put "videnc2test" on the EVM (/usr/bin) and run with this command (This command is working fine for default)

          "./videnc2test 352 288 10 ../share/ti/video/airshow_p352x288.yuv /home/root/2.h264 15 2000 h264 baseline 41 OMAPDRM"

          but here I am facing Error like coded is not created,
          videnc2test.c:559: init_h264_static_params error: Codec could not be created (nil)
          videnc2test.c:939: encoder_init error: H264 encoder static parameter error
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------

    I need to update any configuration apart form this, to solve this error.
    Please do the needful.

    Regards,
    -- Ronak

  • Hello,

    It seems like error in encoder static params.
    You could try enc->params->size = sizeof(IVIDENC2_Params);


    BR
    Margarita

  • Hi Margarita,

    I tried with enc->params->size=sizeof(IVIDENC2_Params); but it seems not working.

    I am getting error while creating VIDENC2_create(enc->engine, (char*) "ivahd_h264bpenc", (IVIDENC2_Params *)h264enc_params); 

    where support of  "ivahd_h264bpenc"  is already added in "dra7-ipu2-fw.xem4". (custom codec)

    My Static parameters are

    static void init_common_static_params(encoder *enc)
    {  

        IVIDENC2_Params *params = enc->params;
        params->size = sizeof(IVIDENC2_Params);
        params->encodingPreset = 3;
        params->rateControlPreset = 2;
        params->maxHeight = 768;
        params->maxWidth = 1024;
        params->dataEndianness = 1;
        params->maxInterFrameInterval = 1;
        params->maxBitRate = -1;
        params->minBitRate = 0;
        params->inputChromaFormat = 9;
        params->inputContentType = 0;
        params->operatingMode = 1;
        params->profile = 66;
        params->level = 31;
        params->inputDataMode = 3;
        params->outputDataMode = 3;
        params->numInputDataUnits = 1;
        params->numOutputDataUnits = 1;
        params->metadataType[0] = -1;
        params->metadataType[1] = -1;
        params->metadataType[2] = -1;
        return;
    }
    h264enc_params->streamWidth = 352;
    h264enc_params->streamHeight = 288;
    h264enc_params->frameCaptureRate = 30000;
    h264enc_params->useDeblocking = 1;

    with this parameter I compile the omapdrmtest and use "videnc2test" binary on EVM.

    My command line is  "./videnc2test 352 288 10 ../share/ti/video/airshow_p352x288.yuv /home/root/2.h264 15 2000 h264 baseline 41 OMAPDRM"

    And I am getting this error, Here I am attaching error log for reference

    *** parse_command is done ***
    Engine_open successful engine=0x8020fb38enc->width = 352
    enc->height = 288
    *** Allocating input buffers from omapdrm ***
    *** Init H264 static Param ***
    *** Common Static Param Done ***
    *** H.264 Encoding with profile_value 66 level 10 ***
    *** All the parameters are set ***
    *** dce_alloc IVIDENC2_Params successful h264bpenc_params = 0xb6fb4020
     ***MmRpc_call: Error: read failed
    /home/gtbldadm/processor-sdk-linux-fido-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/libdce/3.00.08.02-r0/git/libdce.c:415: create    Error: ERROR: Failed eError == DCE_EOK error val -5** CODEC CREATED
     ***/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/omapdrmtest/1.0.0-r9/git/videnc2test.c:701: init_h264_static_params  error: Codec could not be created (nil)
    MmRpc_call: Error: write failed
    /home/gtbldadm/processor-sdk-linux-fido-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/libdce/3.00.08.02-r0/git/libdce.c:352: Engine_close      Error: ERROR: Failed eError == DCE_EOK error val -5/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/omapdrmtest/1.0.0-r9/git/videnc2test.c:1151: encoder_init    error: H264 encoder static parameter error

    Please do the needful

    Regards,

    -- Ronak

  • Hi,

    Before I was trying on 2.00.02.11 SDK version, After reading this thread I tried with 3.00.00.04 SDK.

    e2e.ti.com/.../1926597

    but still I am getting the same error.

    ***MmRpc_call: Error: read failed
    ../git/libdce.c:415: create Error: ERROR: Failed eError == DCE_EOK error val -5/home/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/omapdrmtest/1.0.0-r9/git/videnc2test.c:735: init_h264_static_params error: Codec could not be created (nil)

    Codec could not be created (nil)
    Codec could not be created : No such device or address

    MmRpc_call: Error: write failed
    ../git/libdce.c:352: Engine_close Error: ERROR: Failed eError == DCE_EOK error val -5/home/AM57xx/tisdk/build/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/omapdrmtest/1.0.0-r9/git/videnc2test.c:1189: encoder_init error: H264 encoder static parameter error.

    Please do the needful.

    Regards,
    -- Ronak
  • Hello Ronak,

    I would recommend you to check the static params settings are correct.
    Since you could compile IPUMM firmware you could try to add prints in dce.c of IPUMM for codec create call and then if the codec create is happening.

    BR
    Margarita
  • Hi Margarita,


    We are able to do create a custom codec by using "VIDENC2_create", but now we are facing problem in "VIDENC2_process".

    In "videnc2test.c" file

    we are able to do encoder_init, read_NV12frame but we are struck in "VIDENC2_process".

    LINE    -   "err = VIDENC2_process(encObj.codec, encObj.inBufs, encObj.outBufs, (IVIDENC2_InArgs *) h264enc_inArgs, (IVIDENC2_OutArgs *) h264enc_outArgs);"

    It goes in infinite loop with no logs and no error occurs.

    but after terminating the process with (CTL+ C), we are getting "remoteproc1: crash detected in 55020000.ipu"

    Here I am attaching logs for more information

    =============================================================================================

    *** TEST inArgs->inputID 1 h264enc_inArgs->videnc2InArgs.inputID 1  
    *** BEFORE PROCESS ***
     
     
     
     
    ^C
    root@am57xx-evm:/usr/bin# [  106.572585]  remoteproc1: crash detected in 55020000.ipu: type watchdog
    [  106.579336]  remoteproc1: handling crash #1 in 55020000.ipu
    [  106.584957]  remoteproc1: recovering 55020000.ipu
    [  106.608589] omap_hwmod: mmu_ipu2: _wait_target_disable failed
    [  106.614516]  remoteproc1: stopped remote processor 55020000.ipu
    [  106.630509]  remoteproc1: powering up 55020000.ipu
    [  106.635342]  remoteproc1: Booting fw image dra7-ipu2-fw.xem4, size 3870076
    [  106.642508] omap-iommu 55082000.mmu: 55082000.mmu: version 2.1
    [  106.701152]  remoteproc1: remote processor 55020000.ipu is now up
    [  106.707632] virtio_rpmsg_bus virtio0: rpmsg host is online
    [  106.713316]  remoteproc1: registered virtio0 (type 7)
    [  106.718886] virtio_rpmsg_bus virtio0: creating channel rpmsg-rpc addr 0x65
    [  106.726843] rpmsg_rpc rpmsg12: probing service dce-callback with src 1024 dst 101
    [  106.734735] virtio_rpmsg_bus virtio0: creating channel rpmsg-rpc addr 0x66
    [  106.741930] rpmsg_rpc rpmsg13: probing service rpmsg-dce with src 1025 dst 102
    [  106.749397] rpmsg_rpc rpmsg12: published functions = 4
    [  106.754780] rpmsg_rpc rpmsg13: published functions = 8
     
    root@am57xx-evm:/usr/bin#


    ================================================================================================

    Please do the needful.

    Regards,

    -- Ronak

  • Hi Margarita,


    Kindly note that the query which we mentioned previously isn’t yet solved and we do need your support to solve it as soon as possible.

    Regards,

    -- Ronak

  • Hello,

    I am so sorry for delay I was OoO.

    You could try to confirm that VIDENC2_process is returning or not.
    You could add prints in dce.c and then check remoteproc logs
    /sys/kernel/debug/remoteproc/remoteproc1/trace0

    If it is not returning means the codec has issues.

    BR
    Margarita