PDA

View Full Version : Weird CPU Usage



CHli
May 24, 2006, 11:59:34
Hi,

I'm a bit confused about that :

http://img115.imageshack.us/img115/3350/cpu7xh.png

What I did is launch the Demo Application and start grabbing @ 640x480 RGB32 on SVideo entry of my Video-To-1394 box.

Is that normal ? And if yes why is this not constant ?

Thanks and have a nice day,

Christophe

Stefan Geissler
May 24, 2006, 12:16:05
Christophe,

This is normal, because the driver needs much CPU load in a 60Hz clock. I suggest to use an YUV video format instead of RGB32, because this needs less CPU load than RGB32.

CHli
May 24, 2006, 13:17:07
Thanks,

We are using this in an application which makes a lot of processing on the video (on RGB frames). So having the grabber consumming half of the CPU is not very a good thing :)

But the weird part is why is the cpu load not constant ?

Stefan Geissler
May 24, 2006, 13:58:20
Christophe,

It is not possible to take influence on the CPU load of the driver. The only way is to use an YUV video format, because the driver does not need to convert the YUV to RGB in this case. This conversion to RGB32 / RGB24 is done by the IAT_YUV.AX filter, which is programmed a little bit more efficient using MMX and SSE II.
The CPU Load is not constant, because the driver is not working constantly. It works only after the FireWire board has notified it about a new frame.

CHli
May 24, 2006, 14:30:55
Thanks,

I'm ok for the first part, I'll try a different approach for the video color space conversion.

About the 2nd part I am not very satisfied about the answer, you said that's because the driver does only work when a new frame is available ? So there is some kind of buffering since the CPU load is high ~ every 2 seconds.

Stefan Geissler
May 24, 2006, 14:59:36
Christophe,

The task manager shows only the CPU load at one point of time. It does not show continuous use or average use between two measurements. Thus you see the peeks. You may ask the Taskmanager to show the kernel times too, then you can see in red color the driver's CPU usage directly.

What operating system do you use?

CHli
May 24, 2006, 15:15:46
My OS is : Windows XP Pro SP2 EN

Here is a screenshot of the task manager with Kernel time :

http://img146.imageshack.us/img146/8617/cpukernel7bh.png

And here the directshow graph :

http://img59.imageshack.us/img59/6413/graph7rb.png

Configuration Capture Pin : 640x480, RGB32, 25fps,
Configuration Filter : PAL_B

Of course with YUV video format the peeks are lower but still presents.

Are you sure the images are not buffered inside the converter and then send in a "burst" way to the computer ? I'll try on another PC to see if it's firewire controller related.

Thank you,

Christophe

Stefan Geissler
May 29, 2006, 15:08:03
Christophe,

Thank you for the images. I am very sure, that the images are not buffered in the converted. There still is no memory in it.
I guess that you have a slow computer. Thus you see in the Task Manager a high CPU load. Every 20 milliseconds an image is processed by the driver of the DFG/1394-1. In my opinion the Task Manager looks at its own frequency on the CPU load. It sees the CPU load only in a very short moment. Thus a kind of resonance arises and that is, what you see.