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.

v4l2 capture interlace field to frame

hi experts,

I can't merge two field to one frame. The control "IOCTL_VPS_CAPT_SET_STORAGE_FMT" return successful, but  not taking effect.

Does I miss something?

storageparams.chNum = 0;
storageparams.bufferFmt = FVID2_BUF_FMT_FRAME;
storageparams.fieldMerged = 1;
ret = (inst->captctrl->control(inst->captctrl,
IOCTL_VPS_CAPT_SET_STORAGE_FMT,
(void *)&storageparams, NULL));

my SDK version ezsdk 5.05.

thanks,

 

  • It works fine, check with the released sample application.

     

    Rgds,

    Brijesh

  • hi Brijesh,

    Is there some register to check this?

    thanks,

  • There is no register to check field drop. but we could check if the field is really received or not by checking field id.

    Can you dump four register from the address 0x48105520 and 0x48105a20? and share?

     

    Regards,

    Brijesh

  • hi Brijesh,

    Register dump:

    [root@rxchen software]$./memtool 0x48105520

    48105520:fffffffd fffffffc ffffffff ffffffff
    48105530:02d00120 00000000 00000000 00000000
    48105540:00000000 00000000 00000000 00000000
    48105550:00000000 00000000 00000000 00000000
    48105560:00000000 00000000 00000000 00000000
    48105570:00000000 00000000 00000000 00000000
    48105580:00000000 00000000 00000000 00000000
    48105590:00000000 00000000 00000000 00000000
    481055a0:00000000 00000000 00000000 00000000
    481055b0:00000000 00000000 00000000 00000000
    481055c0:00000000 00000000 00000000 00000000
    481055d0:00000000 00000000 ffffffff ffffffff
    481055e0:00000000 00000000 00000000 00000000
    481055f0:00000000 00000000 00000000 00000000
    48105600:00000002 8000a100 00000000 00000000
    48105610:00000000 00000000 00000000 00004400

    [root@rxchen software]$./memtool 0x48105620

    48105620:fffffffe fffffffc ffffffff ffffffff
    48105630:02d00120 00000000 00000000 00000000
    48105640:00000000 00000000 00000000 00000000
    48105650:00000000 00000000 00000000 00000000
    48105660:00000000 00000000 00000000 00000000
    48105670:00000000 00000000 00000000 00000000
    48105680:00000000 00000000 00000000 00000000
    48105690:00000000 00000000 00000000 00000000
    481056a0:00000000 00000000 00000000 00000000
    481056b0:00000000 00000000 00000000 00000000
    481056c0:00000000 00000000 00000000 00000000
    481056d0:00000000 00000000 ffffffff ffffffff
    481056e0:00000000 00000000 00000000 00000000
    481056f0:00000000 00000000 00000000 00000000
    48105700:00000000 00000000 00000000 00000000
    48105710:00000000 00000000 00000000 00000000

    [root@rxchen software]$./memtool 0x48105720

    48105720:00000000 00000000 00000000 00000000
    48105730:00000000 00000000 00000000 00000000
    48105740:00000000 00000000 00000000 00000000
    48105750:00000000 00000000 00000000 00000000
    48105760:00000000 00000000 00000000 00000000
    48105770:00000000 00000000 00000000 00000000
    48105780:00000000 00000000 00000000 00000000
    48105790:00000000 00000000 00000000 00000000
    481057a0:00000000 00000000 00000000 00000000
    481057b0:00000000 00000000 00000000 00000000
    481057c0:00000000 00000000 00000000 00000000
    481057d0:00000000 00000000 00000000 00000000
    481057e0:00000000 00000000 00000000 00000000
    481057f0:00000000 00000000 00000000 00000000
    48105800:00004000 00000000 00000000 00000000
    48105810:00000000 00000000 00000000 00000000

    [root@rxchen software]$./memtool 0x48105820

    48105820:00000000 00000000 00000000 00000000
    48105830:00000000 00000000 00000000 00000000
    48105840:00000000 00000000 00000000 fc000000
    48105850:0c840800 00100010 00040190 00000000
    48105860:00000000 00000000 00000000 00000000
    48105870:00000000 00000000 00000000 00000000
    48105880:00004000 00000000 00000000 00000000
    48105890:00000000 00000000 00000000 00000000
    481058a0:00000000 00000000 00000000 00000000
    481058b0:00000000 00000000 00000000 00000000
    481058c0:00000000 00000000 00000000 fc000000
    481058d0:0c840800 00100010 00040190 00000000
    481058e0:00000000 00000000 00000000 00000000
    481058f0:00000000 00000000 00000000 00000000
    48105900:00000000 00000000 00000000 00000000
    48105910:00000000 00000000 00000000 00000000

    [root@rxchen software]$./memtool 0x48105920

    48105920:00000000 00000000 00000000 00000000
    48105930:00000000 00000000 00000000 00000000
    48105940:00000000 00000000 00000000 00000000
    48105950:00000000 00000000 00000000 00000000
    48105960:00000000 00000000 00000000 00000000
    48105970:00000000 00000000 00000000 00000000
    48105980:00000000 00000000 00000000 00000000
    48105990:00000000 00000000 00000000 00000000
    481059a0:00000000 00000000 00000000 00000000
    481059b0:00000000 00000000 00000000 00000000
    481059c0:00000000 00000000 00000000 00000000
    481059d0:00000000 00000000 00000000 00000000
    481059e0:00000000 00000000 00000000 00000000
    481059f0:00000000 00000000 00000000 00000000
    48105a00:00000000 00000000 00000000 00000000
    48105a10:00000000 00000000 00000000 00000000

    [root@rxchen software]$./memtool 0x48105a20

    48105a20:ffffffff ffffffff ffffffff ffffffff
    48105a30:00000000 00000000 00000000 00000000
    48105a40:00000000 00000000 00000000 00000000
    48105a50:00000000 00000000 00000000 00000000
    48105a60:00000000 00000000 00000000 00000000
    48105a70:00000000 00000000 00000000 00000000
    48105a80:00000000 00000000 00000000 00000000
    48105a90:00000000 00000000 00000000 00000000
    48105aa0:00000000 00000000 00000000 00000000
    48105ab0:00000000 00000000 00000000 00000000
    48105ac0:00000000 00000000 00000000 00000000
    48105ad0:00000000 00000000 ffffffff ffffffff
    48105ae0:00000000 00000000 00000000 00000000
    48105af0:00000000 00000000 00000000 00000000
    48105b00:00000000 00000000 00000000 00000000
    48105b10:00000000 00000000 00000000 00000000

    thanks,

  • Ok, it looks like VIP is receiving both the fields. i see that the FID is toggling.

    Do you have V4L2 sample application, which can capture interlaced data?

     

    Rgds,

    Brijesh

  • hi Brijesh,

    I have V4L2 sample application, and can capture both the fields. I want interlace 2 fields to 1 frame.

    thanks,

     

  • You mean, you are getting two fields separated in the buffer, but want them to be stored in line interleaved.

    If this is the case, you need to just pass fieldid to FIELD_INTERLEAVED in V4L2 SET_FMT api.

     

    Rgds,

    Brijesh

  • hi Brijesh,

    It works now, thanks you help!

  • Glag to hear that it is resolved.Could you tell us what exact was the issue?
    Rgds,Brijesh
  • Hi Brijesh,

    We are also facing the same problem

    you are asking to set to "FIELD_INTERLEAVED" do you mean to set to "V4L2_FIELD_INTERLACED"

    Regards,

    Sharath

  • Hi Sharath,
    I dont remember the exact name, i think it is Interleaved. If you set fmt.format to interleaved, it would store fields in line interleaved in the buffer.
    Regards,Brijesh