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.

H264 Platinum Codec Platinum Mode Setup issues

Hi Anshuman,

As i informed you already the new codec is now working fine with our exisisting application.

As i was trying to verify the fps for platinum codec , i found it's not coming to appx 30fps.

after cross checking the relese document i modifed 1st  " encodingPreset = XDM_HIGH_QUALITY / XDM_HIGH_SPEED" earlier i had defined it XDM_USER_DEFINED.

then VIDENC1_create() is returnning NULL.

what can be the problem ?

also what are the parameters UMV, PRC, SM means as mentioned in Table-1.

 

H.264 High profile levels up to 5.0, UMV – ON, PRC – H264_ENC_01

OFF,T8x8Inter – OFF and T8x8Intra – OFF, SM – ON, CABAC –

ON, encoderPreset – XDM_HIGH_SPEED/XDM_HIGH_QUALITY,

IntraPeriod-30

 

  • Sujit,

    Good to know that you could make progress. I would request you that you make one summary paragraph of all the experiments we did and the results of those, followed by the final set of parameters/changes that made it work for you. This would help others on the forum too.

    Regards,

    Anshuman

    PS: Please mark this post as verified, if you think it has answered your questions. Thanks.

  • Hi Anshuman,

    As i anformed you that avg time for VIDEENC1_process() call is on an avg 40ms in Platinum codec HIGH profile. which is 25 frames

    But our target is to achieve 30 frames.

    so i need your suggestion on how to achieve 30 frames .

    for your information i am calculating time required for 1 frame in the following way.

    ----------------------------------------------------------------------------

    struct timeval tv,tv1;

    gettimeofday(&tv, NULL);

    status = VIDENC1_process(m_pHandle, &inBufDesc, &outBufDesc,(VIDENC1_InArgs *) m_pInArgs, m_pOutArgs);

    gettimeofday(&tv1,NULL);

    diff = ((tv1.tv_usec/1000)-(tv.tv_usec/1000));

    ----------------------------------------------------------------------

    i was refering to the encoding process in IPNC, and our process is same.

     

  • Sujit,

    We need more details to move further on this issue:

    1. What is the clocking of DM365 that you are using. I mean ARM and DDR clocks

    2. What is the resolution that we are talking about here.

    3. What are the exact dataflows that we are using here? Particularly the dataflow that impacts DDR

    Regards,

    Anshuman

  • Hi Anshuman,

    1. ARM clock rate : 300MHz  and DDR2 Clock Rate : 243 MHz

    2. Platinum Codec with Resolution 1280x1024, HIGH Profile, Bitrate 5124Kbps, CBR,CABAC,30 fps

    3. Codec Layer flow is attached.

     

  • Sujit,

    Not sure if i can make out much from the flow diagram. Few things i can recommend to you are :

    1. Do a chained mode continuous capture instead of doing non-chained single shot capture.

    2. Do not have extra DDR bandwidth consumption like for extra resizer outputs, if you dont intend to use it.

    3. Ensure that without streaming, you are able to see an increase in performance across VIDENC1_Process call

    4. Most important, increase the DDR clock to 270MHz. This is the spec clock for DM365 with ARM @ 300 MHz.

     

    Regards,

    Anshuman

  • Hi Anshuman,

    my mode is set to chain mode but 

    but i am getting the message from driver "  mode doesn't allow multiple instances "

    as you know our application needs multiple instances to be enabled.

    for testing i just made rsz_dev.users =0 in the imp_resizer.c file present inside kernel/linux version../drivers/char/

    it boots fine but no profiles are available and so no video for any of the codecs in my camera.

    what to be done ?

  • Sujit,

    In the chained mode, you can not have multiple instances of the resizer driver. It is connected to the capture path and is controlled by the ISIF input mode, so you cannot use it for any other operation. What exactly is your usecase? Do you need multiple instances of resizes?

    Regards,

    Anshuman

  • yes Anshuman

    i do understand that in chain mode we can not have multiple instance.

    Capture itself uses resizer in chain mode.

    as per our last discussion your one of suggestion was to verify whether we are able to get 30 fps or may be more than 25 fps comparing to One Shot Mode.

    your second suggestion was to increase the DDR clock to 270 MHz, that process is going on by the hardware team.

    But finally our requirement will be to support multiple instances, so is there any turn around where we can access multiple instance in chain mode too ?

     

  • Sujit,

    sujit mahapatro said:
    But finally our requirement will be to support multiple instances, so is there any turn around where we can access multiple instance in chain mode too ?

    In chained mode, the driver does not allow multiple instances, because the resizer hardware cannot be connected to multiple inputs. BTW, with just one instance, did you confirm that the VIDENC1_process call give you better performance?

    Regards,

    Anshuman

  • Hi Anshuman,

    in Continous mode my applications not coming from the Capture_get() call, following ioctl call in Capture.c file inside dmai_xxxx  folder.

    /* Get a frame buffer with captured data */
        if (ioctl(hCapture->fd, VIDIOC_DQBUF, &v4l2buf) < 0) {
            Dmai_err1("VIDIOC_DQBUF failed (%s)\n", strerror(errno));
            return Dmai_EFAIL;
        }

    i took the CE_DEBUG level 3 but not getting the error code. i did printf debugging and found the exact point.

    what could be the reason.

    i was busy with some other work, bcoz of that couldn't concentrate on this.