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.

Processors forum

Hi Processors Team:

I am using PSDKRA j7 06.00.00.00 to run ldc on emulation mode and target mode.

input and output image format is VX_DF_IMAGE_U8 , 256*128 luma pic.

I use a full remap table, size is 256*128,  the mesh_img format is VX_DF_IMAGE_U32  256*128.

input pic and input mesh_img are same.

source code of graph is one file.

however, result are different.

below is emulation mode result:

below is  target mode result:

below is part of my code:

obj->ldc_params.luma_interpolation_type = 1; //BILINEAR
obj->ldc_params.init_x = 0;
obj->ldc_params.init_y = 0;
obj->ldc_params.yc_mode= 0;

obj->ldc_region_params.enable = 1;
obj->ldc_region_params.out_block_width = 8;
obj->ldc_region_params.out_block_height = 8;
obj->ldc_region_params.pixel_pad = 0;

obj->ldc_mesh_params.mesh_frame_width = 256;
obj->ldc_mesh_params.mesh_frame_height = 128;
obj->ldc_mesh_params.subsample_factor = 0;

obj->ldc_mesh_image = vxCreateImage(obj->context,
obj->ldc_mesh_params.mesh_frame_width,
obj->ldc_mesh_params.mesh_frame_height,
VX_DF_IMAGE_U32);

obj->affine_matrix = vxCreateMatrix(obj->context, VX_TYPE_INT16,2,3);
APP_ASSERT_VALID_REF(obj->affine_matrix);
obj->matrix[0] = 4096;
obj->matrix[1] = 0;
obj->matrix[4] = 0;
obj->matrix[2] = 0;
obj->matrix[3] =4096 ;
obj->matrix[5] = 0;


obj->node_ldc = tivxVpacLdcNode(obj->graph,
obj->ldc_config,
obj->affine_matrix, 
obj->ldc_region, 
obj->ldc_mesh,
obj->ldc_mesh_image, 
NULL, // dcc_db,
obj->input_img,
obj->ldc_img,
NULL //out1_img
);

Q1 Whether there is something of ldc config should different between emulation and target mode?
Q2 Is there something wrong in my code?

Thanks!

7041.app_ldc.7z

  • Hello Zhao,

    Can you please try memseting LDC mesh table to 0x0 and check the output? 

    If the LDC mesh table has some contents, it can give wrong output.

    Rgds,

    Brijesh

  • Hello Brijesh :

    I set mesh table to 0x0 ,and run on PC and target .

    below is input image:

    below is PC output and SOC output,they are same:

    My propose is to distort input image according to mesh table, so set mesh table to 0x0 can not work.

    Q1 what do you think of difference between emulation and target mode result

    Q2 In tivxVpacLdcNode , should param warp_matrix and mesh_img work at same time , or one is enable another must set NULL?

    Thanks!

  • Hello Zhao,

    There is no difference between emulation mode and target mode, both internally exercises LDC ip. 

    If we set mesh table to 0x0, it will just one to one mapping. If you require any other mapping, we need to fill up mesh table accordingly. 

    Yes, warp and mesh table can be enabled simultaneously.

    Rgds,

    Brijesh