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.

ccsv4, evmc6472 and compiler optimisation

Hello

I 'm trying to execute a H264 encoder on evmC6472 platform using CCS v4 and BIOS6.L1P=32k,L1D=32k;L2=256k; i used one core.

to optimise the encoder time; I used as compiler optimisations: -O3;  -ms3; --symdebug:none;optimise fully in the presence of debug directives;compile for power profiling;generate optimized source interlisted.when I debug the code on the plateform it gives me a correct result (video sequence is simular to video sequence obtained by execution on PC)but when I tried to add the compile option "optimise for speed -mf 0 1 2 3 4 5",the result isn't correct : the sequence obtained after encode on DSP is not simular to the sequence obtained by the run on PC ( a part of frame is correct and another part is wrong)..

I don't understand why this optimisation make wrong the result knowing that i didn't use any hardware component like DMA or somthing else..

I will be very thankfull if you help me

david

  • Hello Wilson,

     

    may I ask for your "out of the box" performance results for your encoder, e.g., frames per second. What is your performance benefit using the optimised compiler settings.

    How do you manage data I/O?

    We are using quite the same setup as you describe and see only about 1 fps for a 720p input sequence. 

     

    Best regards, Carsten

  • David,

    There are several helpful topics on the TI Wiki Pages if you search for C6000 Optimization. I recommend looking through some of those for potential issues with optimization. The main one that I know of is not using the "volatile" keyword for external variables or for code-based delay counters or for peripherals.

    You can try applying the -msN optimization to separate source files until you find the one that is causing your problem. It will help a lot when you have narrowed down the point where the failure occurs.

    In the large majority of cases, the problem is not a bug in the optimizer but just a familiarity with how code gets optimized and what can happen.

    From where did your H.264 code originate?

     

    Carsten,

    You imply that 1 fps is measured without using optimization. If that is the case, you will get significantly better performance when you use optimization.

    From where did your H.264 code originate?

    "Out of box" should be measured using the Release configuration. But perhaps I have this all wrong and you were only curious about the specific compiler switches David chose.

     

    Regards,
    RandyP

  • Hello Carsten

    performance results for your encoder

    concerning the performance result. :for cif sequence 11 fps

                                                                      for 720p sequence 1.3 fps

    without optimisation :For cif sequence, the performance result is 9 fps and with this optimisation ,we have 11 fps

    How do you manage data I/O?

    the sequence frame is set in the DDR2: the big buffers are in the DDR2 like the current frame and the reference frame .

     the small buffer in the LL2RAM like current MB and reconstruct MB ...etc.


    Best regards, David

  • Hi RandyP

    You can try applying the -msN optimization to separate source files until you find the one that is causing your problem

    But in the first time, I used this optimisation : -ms3 and the same problem exists.

    I think the problem is in the code. may be because it's a complicated algorithm, that's why this errors is appeared.

    From where did your H.264 code originate?

    it is a work of a group  researchers in my laboratory


    Thank you RandyP for your help.

    David

  • David,

    I am not sure I worded my idea very well. You can apply the -ms3 to just a single file or just a few source files, instead of to all the source files. In this way, you can use a process of elimination to figure out which of you complicated source files is responsible for the failure.

    Best of luck for you and your team.

    Regards,
    RandyP