I am profiling my video encoder program on TI DM642 EVM. It's extremely slow. 17 hours has passed but it even has not encoded one frame! Any way to speed it up?
How to speed up profiling
Are you having the project under "Full Symbolic Debug" option?
Making the project options "Function Profile Debug" will make it a bit faster, also compiler will do better optimization with symbols stripped.
Yong Yang <y...@yahoo.com> wrote:
Yahoo! India Matrimony: Find your partner online.
Beware of what you profile. For each 'item' [normally a function] that you profile, multiple breakpoints are set, the target is run to a breakpoint, data is collected and the process is repeated.
If you profile several 'inner loop' functions, you will slow down the actual execution to "almost stopped" - especially if you try to profile 'everything'. Instead, try to break things down and profile a few items at a time - or use the simulator if you can. This is one area that it "blows away" the hardware in execution speed.
Yong Yang <y...@yahoo.com> wrote:
> I am profiling my video encoder program on TI DM642 EVM. It's extremely slow.
> hours has passed but it even has not encoded one frame! Any way to speed it
I'd be happy to help you with some advice, since we are working with DM642 EVM
It sounds like you are sort of stuck with basic things that need to be fixed
you can even think about video encoder performance.
Could you answer my previous first? I need to know if you could get simple
working, without your video codec. I cannot help you unless you answer my
One method (suggested by TI people) which I have
started using for my video decoder is to use the timer
register and do intrusive instrumentation of the major
functions of the code. There is a slight overhead of
using the timer, but overall it is would run in the
same as without profiling. Also you will be able to
run the code without any debug option (e.g. function
profile debug), so it would be as optimized as the
final version. Regards
--- Yong Yang <> wrote:
> Hi, all
> I am profiling my video encoder program on TI DM642
> EVM. It's extremely slow. 17 hours has passed but it
> even has not encoded one frame! Any way to speed it
> Thank you
> Yong > ---------------------------------
And---"A blind Understanding!" Heav'n replied.
The simple loopback is working. Actually i got it from a TI sample program of EVM DM642, called "scaling", which gets captured video and outputs to TV. I simply changed the output to the internal buffer of my encoder. Maybe shall i remove all the code about display?
You can find this sample from C:\ti\boards\evmdm642\examples\video\driver\, if you installed CCS in C:\ti\.
Jeff Brower <j...@signalogic.com> wrote:
Mike Dunn wrote appropriately that Beware of your profiling. Kindly tell me the following to help you to profile your code better:
If you can shed some light on the above, then it would be helpful to point out your problem.
Hope this helps.
Find my answers embedded in your mail below:
Find my answers in Maroon Color.
Hope that helps.
Hi, Piyush, Ganesh and all
I used clock() function to profile my encoder.
At the start of every function, i put
static clock_t sum = 0; //to sum up total time the function costs
static int enter_c = 0; //to count the times the function is called
At the end of every function, i put
//yy added, record is a structure
stop = clock();
sum += stop-start-overhead_c;
record.t = sum;
clock_t t; //count time
int n; //count the times the function is called
At the end of main(), i write record to a file.
I find it run very slow, even if i only profile a few functions. And another question is the total time is almost 0, although the function has been called a few hundred times.
Can you tell me how you write the efficient code? Thank you
piyush kaul <p...@yahoo.com> wrote: