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.

question about the *.cfg file of JPEG2K Encoder on C66x

Hi, Sir

Excuse me, when I use the encoder lib : C66x_j2e_01_00_00_01_ELF, I have some question about the *.cfg file in the App.

After import the project in App, build completely. There build a *_pe66.c file from the *.cfg file. I find the following codes in *_pe66.c.

"

#define TCI6608
#include <ti/sdo/fc/edma3/edma3lld_cfg.h>


/* Configuration defined in edma3lld_cfg.h */
extern __FAR__ EDMA3_GblConfigParams
ti_sdo_fc_edma3_lld_globalConfigParams[GLOBAL_EDMA3_INSTANCES];

/* Set globalConfig to array declared above */
EDMA3_GblConfigParams * ti_sdo_fc_edma3_Settings_globalConfig =
(Void *)&ti_sdo_fc_edma3_lld_globalConfigParams;

/* Configuration defined in edma3lld_cfg.h */
extern __FAR__ EDMA3_InstanceInitConfig
ti_sdo_fc_edma3_lld_instInitConfig[GLOBAL_EDMA3_INSTANCES][NUM_REGION];

/* Set regionConfig to array declared above */
EDMA3_InstanceInitConfig * ti_sdo_fc_edma3_Settings_regionConfig =
&ti_sdo_fc_edma3_lld_instInitConfig[0][0];

"

When I rewrite the content in the cfg file of my new project(I make the new cfg file according to the *.cfg file in App), but my *_pe66.c only have:

"

EDMA3_GblConfigParams * ti_sdo_fc_edma3_Settings_globalConfig = NULL;
EDMA3_InstanceInitConfig * ti_sdo_fc_edma3_Settings_regionConfig = NULL;

"

Could you please tell me, how can I make my the *_pe66.c has the same content like the one from the App lib?

what's the key point in the *.cfg file?

  • Hi Wang, as I can see the EDMA global configuration params is defined on Frame Components edma3lld_cfg.h file (C:\Program Files\Texas Instruments\framework_components_3_22_03_09\packages\ti\sdo\fc\edma3\edma3lld_cfg.h) . Could you please share the modifications you have done to the project?

    Thank you,

    Paula

  • hi, Paula, thank you for answering my question.

    The words with underline is source code from project.

    The EDMA global configuration params below is defined in edma3lld_cfg.h.

    /* Configuration defined in edma3lld_cfg.h */
    extern __FAR__ EDMA3_InstanceInitConfig
    ti_sdo_fc_edma3_lld_instInitConfig[GLOBAL_EDMA3_INSTANCES][NUM_REGION];


    But, here is a point(showing below) is defined in the generated file *_pe66.c, which is generated from file *.cfg.

    EDMA3_GblConfigParams * ti_sdo_fc_edma3_Settings_globalConfig =
    (Void *)&ti_sdo_fc_edma3_lld_globalConfigParams;

    The above code is from the app in C66x_j2e_01_00_00_01_ELF lib.

    In my project, the generated file code is :

    EDMA3_GblConfigParams * ti_sdo_fc_edma3_Settings_globalConfig = NULL;

    My question is what is key point in the *.cfg, that can generated file *_pe66.c with code like:

    EDMA3_GblConfigParams * ti_sdo_fc_edma3_Settings_globalConfig =
    (Void *)&ti_sdo_fc_edma3_lld_globalConfigParams;

  • hi, Paula。

    I also have another question.

    I see the following wrodes in alg_malloc.c file from C66x_j2e_01_00_00_01_ELF:

    /* !!! These data are hard coded sizes relative to algorithm values.
    Before starting to test Encoder, it is important to make sure that
    these values match with values defined in j2e_ti_def.h !!! */

    what is j2e_ti_def.h? where can I find it ?

     

  • Hi Wang, j2e_ti_def.h is part of the the Library project, however, C66x_j2e_01_00_00_01_ELF published on the web doesn't include the source files for the codec library only the prebuild library (..\C6678_J2E_001\Lib\j2e_ti_c66.ae66). Quick question, what do you need to change in alg_malloc.c? also did you get resolved previous issue with .cfg? if not could you please share with us your project?

    thank you,

    Paula

  • Hi, Paula.

    1\ what do you need to change in alg_malloc.c?

    When using the lib app, I fond the memory section of J2Ememtab1 must be placed in L2SRAM. If not, the process function will return error code 0x8031.
    Now I am using the lib on C6671, but the generated size of photo in different tests are different.

    Eg, I test a photo of 3296*2160 with format YUV_422P.

    First time the generated size is 5345318 byte, then I turned off. And after a while, I test again, but the generated size is 5345227 byte.
    I didn't know why they are different.

    Eg, I test a photo of 640*480 with format YUV_422P.

    The generated size of photo in different tests are the same, which is 53114 byte.

    so I doubt if I need to change the size of the buffers of J2Ememtab0~J2Ememtab5 in alg_malloc.c file.


    2\ the previous issue with .cfg?

    my .cfg file is like this.2045.rmva590prj.cfg

    But in the generated file, I see codes like:

    EDMA3_GblConfigParams * ti_sdo_fc_edma3_Settings_globalConfig = NULL;

    How can I get the code like:

    EDMA3_GblConfigParams * ti_sdo_fc_edma3_Settings_globalConfig =
    (Void *)&ti_sdo_fc_edma3_lld_globalConfigParams;

  • Hi Wang,

    I was pointed out that EDMA3LLD doesn't support C6671 platform (http://software-dl.ti.com/dsps/dsps_public_sw/psp/edma3_lld/edma3-lld-bios6/02_11_11_13/exports/release_notes_edma3_lld.html)

    However, EDMA Resourse manager has a generic lib which can be used for any platform if the application supplies the EDMS "global configuration" and "region configuration" for the platform/application. An example of C6678 "global configuration" can be found at edma3_lld_02_11_05_02\packages\ti\sdo\edma3\rm\src\configs\edma3_c6678_cfg.c: EDMA3_RM_GblConfigParams edma3GblCfgParams [NUM_EDMA3_INSTANCES]. Similar array needs to be defined for C6671 according to C6671 spec, and then passed to FC along with region config before calling RMAN_init():

    EDMA3_PARAMS.globalConfig = (EDMA3_GblConfigParams *)&global_config[edmaInstanceId];

    EDMA3_PARAMS.regionConfig = (EDMA3_InstanceInitConfig *)&region_config[edmaInstanceId][coreId];

    >>>Inside Current J2E Testapplication>>>

    EDMA3_PARAMS.regionConfig = &C6608_config[1][DNUM];

    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

    About your buffer question, I checked j2e_ti_def.h, below max image values:

    #define MAX_IMAGE_X 6600

    #define MAX_IMAGE_Y 4400

    #define MAX_DIM max(MAX_IMAGE_X,MAX_IMAGE_Y)

    so your image should fit. Quick question when you decode the image both/neither/one decode ok?

    thank you,

    Paula