Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: Losless Section Demux version 1.4



On Fri, 2003-12-19 at 09:36, emard@softhome.net wrote:
> adding crc_val before each memcopy would be simple but -> 
> 
> > sections before calling memcopy and b) does not restrict memcopy to the
> > size of the copied section. Unfortunately this is not documented, so it
> 
> this could be tricky to fix because memcopy is no more used
> to trasport one complete section, but is used to fill the intermediate
> buffer and from this buffer a pointer arithmetic is used to isolate
> complete sections without need of memcopy. Crc check should be done there. 

Crc check can't be done there because the crc engine cannot access
system ram but only demux ram. memcopy wasn't used to always copy a
complete section before, but it didn't copy more than one section. A
quick grep shows me, that our driver is the only one available that uses
the hardware acceleration callbacks. If we keep the current situation,
then we could just remove these callbacks because they were rendered
useless.

> The old code is broken in boundary conditions, dropping some sections
> that should have been otherwise correctly received.

Details?

> The new code reduces the number of memcopy's. Depending on TS stream,
> it could sometimes deliver many sections with a single memcopy.

And that's what broke the hardware accel callbacks. And remember you are
using those PCI cards which probably sit in a system with GHz Pentiums.
Think about embedded systems like ours with 66 MHz where doing crc32 in
software really slows things down.

> I tried to fix to the old code, but as the old code was of too
> cumbersome structure it was difficult to follow and I think I
> wasn't able to seal it 100% losless. 
> 
> I propose to keep the old code and introduce crc check in the pointer 
> arithmetic part if this is acceptable with the hardware, give me crc
> code sample and I'll add it in 

It isn't, see above.

The old section demux is a good example for how it works. ;)
Here is our driver if you're interested:
http://cvs.tuxbox.org/cgi-bin/viewcvs.cgi/*checkout*/tuxbox/driver/dvb/drivers/media/dvb/avia/avia_gt_napi.c?rev=1.195&content-type=text/plain
http://cvs.tuxbox.org/cgi-bin/viewcvs.cgi/*checkout*/tuxbox/driver/dvb/drivers/media/dvb/avia/avia_gt_accel.c?rev=1.19&content-type=text/plain

Regards,
Andreas

Attachment: signature.asc
Description: This is a digitally signed message part


Home | Main Index | Thread Index