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 up?
Thank you
Yong
|
How to speed up profiling
Hello Yong,
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.
Amrut
Yong Yang <y...@yahoo.com> wrote:
Yahoo! India Matrimony: Find your partner online. |
Yong,
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.
mikedunn
Yong Yang <y...@yahoo.com> wrote:
|
Yong Yang- > 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? I'd be happy to help you with some advice, since we are working with DM642 EVM board also. It sounds like you are sort of stuck with basic things that need to be fixed before you can even think about video encoder performance. Could you answer my previous first? I need to know if you could get simple loopback working, without your video codec. I cannot help you unless you answer my questions. -Jeff |
|
Hi Yong, 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 Piyush --- 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 > up? > > Thank you > Yong > --------------------------------- > ===== ************************************** And---"A blind Understanding!" Heav'n replied. Piyush Kaul http://www.geocities.com/piyushkaul __________________________________ |
|
Hi, Jeff
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\.
Thanks
Yong
Jeff Brower <j...@signalogic.com> wrote: Yong Yang-
|
Hi Yong,
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.
Ganesh
|
|
Hi Yong,
Find my answers embedded in
your mail below:
|
|
Hi Yong,
Find my answers in Maroon Color.
Hope that helps.
Ganesh
|
Hi, Piyush, Ganesh and all
I used clock() function to profile my encoder.
At the start of every function, i put
//yy
clock_t start=clock(); clock_t stop; 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 //yy end At the end of every function, i put
//yy added, record is a structure
//
record[0].n= ++enter_c; stop = clock(); sum += stop-start-overhead_c; record[0].t = sum; //yy struct record_type
{
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
Yong
piyush kaul <p...@yahoo.com> wrote: Hi Yong, |
|