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.

RSZ and H264ENCODE in two different threads can caused some problems (on dm368)

 

Hi, everyone

    Now, I want to implement RSZ and h264ENCODE in two different threads, but there is some problems as follows:

1. one thread and two threads comparison chart

                                                                                                         the same one thread                                                  two different  threads

(1) ioctl(hResize->fd, RSZ_RESIZE, &rsz) excute time                      22ms                                                                                  50ms

(2)VIDENC1_process   excute time                                                       25ms                                                                                  38ms

(3)cpu loading                                                                                            40-45%                                                                            85%-90%

I doubt that there is edma resoure competition between RSZ and h264encode?


2. My codec.cfg setting as follow:

  The below is codec.cfg.

var EDMA3 = xdc.useModule('ti.sdo.fc.edma3.Settings');
EDMA3.maxRequests = 128;

 

var myEngine = Engine.create("codecs", [

   // {name: "mpeg4enc", mod: MPEG4ENC, local: true, groupId: 1},
    {name: "h264enc",  mod: H264ENC, local: true, groupId: 1},
    {name: "h264dec",  mod: H264DEC, local: true, groupId: 1},
//    {name: "g711enc",  mod: G711ENC, local: true},
    {name: "jpgenc",   mod: JPEGENC, local: true, groupId: 1},
    {name: "jpgdec",   mod: JPEGDEC, local: true, groupId: 1},
]);

 

The dvsdk version is dvsdk_2_10_01_18 (dm365_h264dec_02_00_00_11 + dm365_h264dec_02_00_00_11) .

Can you give me some help?

Thank you!Give my best wishes to you!

  • Hi,

    Can you please confirm that the resizer performance that you are seeing is only with encoder or is it independent of encoder operation? I would expect that you are getting that resizer performance irrespective of whether you run encoder or not. The reason being that RSZ does not really have any EDMA channels being shared with the encoder. Ofcourse the DDR bandwidth is shared but that should not show a big impact.

    The next thing i would try is checking the clock multiplier and divider in the IPIPEIF which controls the RSZ clock. Can you tell me the CLKDIV registers M and N value from IPIPEIF module? I assume you are using RSZ in single shot mode.

    Regards,

    Anshuman

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

  • Hi, Anshuman:

          Thank you very much! I am using RSZ in single shot mode.Write CLKDIV registers M=5 N=0.Our DDR2 frequency is 340MHZ, DM368 frequency is 432MHZ.

    Could you give me some suggestion?

     

    Thank you!Give my best wishes to you!

  • Hi,

    This does not seem to be correct. If you refer to the VPFE Programmers guide, you can see that there is a constraint that M/N cannot be greater than 1/2. I think either your values are wrongly programmed or you have got the values read wrongly.

    Can you set M=9 and N=59 and then try running the resizer again. It should show you good performance on RSZ.

    Regards,

    Anshuman

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

  • Hi, Anshuman:

    Thank you for your attention!I have check it  again and  found that wrote CLKDIV registers  M=0 N=5.  I think  it has the same effect  as your  supplied parameters(M=9 N=59).

    Could you give me some suggestion?

     

    Thank you!Give my best wishes to you!

  • Hi,

    Can you remove the encoder from the picture?

    Also, tell me the LPFR and PPLN that you are setting? Is changing N making a difference?

    Regards,

    Anshuman

  • Hi, Anshuman:

              Thank you for your attention!

    The LPFR and PPLN define as follows:

    #define PPLN                    0x10
    #define LPFR                    0x14

    I will try to a different N and test it!

    Thank you!Give my best wishes to you!