Streaked/garbled images with Kodicom 4400r and epia

Post here to ask any questions about hardware suitability, configuration in ZoneMinder, or experiences. If you just want to know if something works with ZoneMinder or not, please check the Hardware Compatibility sections in the forum, and the Wiki first. Also search this topic as well.
Post Reply
maclellan
Posts: 44
Joined: Fri Feb 25, 2005 10:57 pm

Streaked/garbled images with Kodicom 4400r and epia

Post by maclellan »

This is similar to problems I was having previously on pentium system see

http://www.zoneminder.com/forums/viewto ... ightlight=


The artifacts occur anytime on record or live view using 640X480 mode and seen only with a moving object. I have only two monitors active and limit the image to 10 fps.


This shows that frames are captured into memory but are incomplete. Part of the previous frame show in the current one. Sometimes in live view parts of the previous images alternate repeatedly for a second then fade when the object is still. One or more capture buffers are also incomplete are not cleared for a new frame.

Could this be an issue with interrupts or threading?

I believe this is the same problem I had on a faster p4 system but the epia is slower and the artifacts show up all the time. The card works perfectly in windows 2000.

Can anyone offer a clue?



Image

-scott
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

is it a via chipset?
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
maclellan
Posts: 44
Joined: Fri Feb 25, 2005 10:57 pm

Post by maclellan »

Yes,

The board is an m10000 using Via VT8235 and CLE 266 with Nehemiah 1G processor and 512M dram.

I used v4lctl to see if each device was detected, configured and talking with V4L. So far everything looks just fine.


Looking at error messages I just noticed I'm getting the message:

[ZMU] ERR [Shared memory not initialised by the capture daemon.]
[ZMS] ERR [Shared memory not initialized by the capture daemon.]
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

not sure that the error is related but i have seen this on via chepsets when the proc pushed i had to drop the framerate. I dont know if its a linux/ via thing or a via thing but i havnt found a way round it yet. I used one of the little via onboard cpu's on a micro atx and it did this
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
maclellan
Posts: 44
Joined: Fri Feb 25, 2005 10:57 pm

Post by maclellan »

Well things are really close so it seems that the VIA chipset is compatible especially with the results of v4lctl. However I'm now thinking the issue is within the bttv driver. In particular it may involve interrupts and loss of data with simultanous interrupts. My tests show prove that the more monitors I activate - the worse the problem gets.

My theory is that since the BT 878 chip only stores a single line of data inernally and not a whole field (or frame for that matter), then receiving a complete frame depends on receiving all the interrupts correctly as they occur with each hsync. But when there are several chips sending interrupts there is a chance that a line of data for any frame may be missed.

In the driver's internal buffer, if a line is missed then the data from a previous frame might not be over written. This explain why artifacts from former frames actually remain in the current one.
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

fair play then but if you take that card and put it inot another linux machine does the problem go away? Thats why i thought it was a via/linux problem. I hope you resolve it, especailly if its a bttv driver problem!
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
User avatar
lazyleopard
Posts: 403
Joined: Tue Mar 02, 2004 6:12 pm
Location: Gloucestershire, UK

Post by lazyleopard »

Could it be an issue with the frame buffer being too small?
Rick Hewett
maclellan
Posts: 44
Joined: Fri Feb 25, 2005 10:57 pm

Post by maclellan »

Yes on my p4 Intel chipset system the problem largely dissappears, but not 100 percent. (see the link at the beginning of this thread.)

On the EPIA it happens all the time - probably due to differences in the chipsets as well as a much less powerful machine. Less power means more time in the interrupt handlers and more likeliness that other interrupts will cause the data loss.

So I think it is really a driver issue and may be out of the scope of this forum. ZM simply poles each monitor and requests a frame of data. It assumes the frame is complete from the driver but occasionly it is not. Interestingly when reviewing the file bttv_driver.c I found absolutely no provision for keeping the frame data intact and complete. I think a change is needed in the driver to collect an entire frame from any given device even at the expense of slower frame rate.

Any "C" coders out there who can help??

-Scott
maclellan
Posts: 44
Joined: Fri Feb 25, 2005 10:57 pm

Post by maclellan »

BTW..

Yes I tried varying just about everything ...

-shared mem address,
-Frame server,
-net.core.wmem_max,
-frame rate in zm
-bios settings,
-pnp settings,
-gbuffer
-kernel.shmmax
-monitor resolution - (improves things but doesnt entirely solve. I prefer 640x480 anyway)
-number of active monitors - (even on one there is the occasional artifact).

My goal is for 4 monitors at 5 fps in 640x480 mode, with flawless pictures.

I am currently recompiling gentoo with a faster setting -c2 from -cs, but this will likely take a few days! - I'll post my results later this week!

-Scott
User avatar
lazyleopard
Posts: 403
Joined: Tue Mar 02, 2004 6:12 pm
Location: Gloucestershire, UK

Post by lazyleopard »

recompiling gentoo
Good Luck!

The CPUs with relatively small on-chip caches may do better with the size optimisations than the speed ones. I'd be tempted to experiment with just re-compiling the kernel to begin with, to see how small I could get the kernel, and whether that made it run faster...
Rick Hewett
Post Reply