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.

About dm8127 ISS ISP IPIPE 2D Edge Enhancer

Genius 3400 points
About dm8127 ISS ISP IPIPE 2D Edge Enhancer,I have two question.
Q1:
IPIPE 2D Edge Enhancer register can be read,but can not be written.

To read and write the iss registers,modify the code as follows.
1、Modify the *ipnc_rdk\ipnc_mcfw\demos\mcfw_api_demos\itt_capture.c to add write command. 
The modified code as follows:
#define CMD_REGS_WRITE (20) //define cmd_wirte
Int32 ittServer_run()
{
....
else if (recvData[0] == CMD_REGS_READ)
{
...
break;
}
 //add write command
else if (recvData[0] == CMD_REGS_WRITE)

{
cmd = recvData[0];
ittMsg->arg1 = recvData[1];
ittMsg->arg2 = recvData[2];
MessageQ_setMsgId(msg, cmd);
MessageQ_setReplyQueue(hIttMsgQ, msg);
status = MessageQ_put(remoteQ, msg);
ITT_ASSERT(status == MessageQ_S_SUCCESS);

status = MessageQ_get(hIttMsgQ, &msg, MessageQ_FOREVER);
ITT_ASSERT(status == MessageQ_S_SUCCESS);

printf("Response from M3 is : %d\n", ittMsg->response);
recvData[0] = ittMsg->response;
recvData[1] = 0;
recvData[2] = 0;
recvData[3] = 0;
recvData[4] = 0;
status =ittServer_SendData(connectedSocketId, (unsigned char *)recvData, dataSize);
break;
}
//add write command end
......
}
2、Modify the ipnc_rdk/ipnc_mcfw/mcfw/src_bios6/links_m3vpss/camera/alg_itk_link_tsk_tsk.c->Alg_ITK_Link_tskMain 
function to add write command.
The modified code as follows:
Void Alg_ITK_Link_tskMain(struct Utils_TskHndl * pTsk, Utils_MsgHndl * pMsg)
{
.....
else if (cmd == CMD_REGS_READ) // ISP reg data
{
''''
}
//add write command
else if (cmd == CMD_REGS_WRITE) // Write reg
{
if ((ittMsg->arg1 >= 0x55050400) &&
((ittMsg->arg1) <= 0x55051480))
{
*(int *) (ittMsg->arg1) = ittMsg->arg2;
ittMsg->response = 1;
}
else
{
ittMsg->response = 0;
}
if(msg != NULL)
{
status = MessageQ_put(sender, (MessageQ_Msg) msg);
UTILS_assert(status == MessageQ_S_SUCCESS);
}
}
////add write command
......
}
3、We use ./tcp_client_x86 to read and write iss registers. 
For example:
./tcp_client_x86 192.168.42.84 -r 0x55050ad4 0x1 //read IPIPE_YEE_EN register
./tcp_client_x86 192.168.42.84 -w 0x55050ad4 0x1 //set IPIPE_YEE_EN register to 0x1

We can read all iss registers and write some registers,such as IPIPE_SRC_VSZ、IPIPE_SRC_HSZ etc,
but can not change the 2D Edge Enhancer registers value,
Why? 
When the system_server and ipnc_rdk_mcfw.out are running,the 2D Edge Enhancer registers value can not be modified?

Q2:
When set IPIPE_YEE_EN[0] to 0, the camera can not output normal h.264.

Modify the iss_02_00_00_00/packages/ti/psp/iss/hal/iss/isp/ipipe/src/ipipc.c-->ipipe_config_edge_enhancement 
function as follows:
ISP_RETURN ipipe_config_edge_enhancement(ipipe_ee_cfg_t * cfg)
{
....
ISP_WRITE32(ipipe_reg->YEE_EN, 0);
return ISP_SUCCESS;
}
The video Image flicker,The camera output H.264 as follows:

 

or 

Anybody have good idea? or give us some advice?

  • About Q1,

    I know the answer.
    If 2A Engine(web->Settings->Camera) is not set NONE,the IPIPE 2D Edge Enhancer registers can not be modified.

    The Iss_capt2AUpdate() function call ipipe_config_edge_enhancement() function to modify the IPIPE 2D Edge Enhancer registers.

    Now,I have another qusetion:
    In Iss_capt2AUpdate() function(in iss_02_00_00_00/packages/ti/psp/iss/drivers/capture/src/issdrv_captureApi.c file),
    there have the codes as follow:

    Int32 Iss_capt2AUpdate(Iss_CaptObj * pObj)
    {
        ......
        extern ipipe_ee_cfg_t edge_enhance_iss_appro_params;
        ....
        ipipe_config_edge_enhancement(&edge_enhance_iss_appro_params);
        ....

    where defined edge_enhance_iss_appro_params? Anybody know or give us some advice?

    Thanks a lot!

    About Q2,
    If modified the Iss_capt2AUpdate() function as follows:
    Int32 Iss_capt2AUpdate(Iss_CaptObj * pObj)
    {
        ....
        //ipipe_config_edge_enhancement(&edge_enhance_iss_appro_params);
        ....
    }
    And 2A Engine(web->Settings->Camera) is APPRO,2A Mode (web->Settings->Camera)is Auto Exposure+Auto White Balance.

    The result is the same as above:The video Image flicker.
    Do not known why.

  • Hi Gomo,

    Are you trying to modify the Edge Enhancement (EE) registers from the image tuning tool? OR do you want to program the registers in the capture driver create stage?

    Regards

    Rajat

  • Thanks a lot,

    We updated to IPNC 2.8, and got the Image Tuning tool.