[NUT-devel] Suggestions [PATCH]

Rich Felker dalias at aerifal.cx
Tue Feb 28 23:51:31 CET 2006


On Tue, Feb 28, 2006 at 10:34:22PM +0100, Michael Niedermayer wrote:
> Hi
> 
> the Attached patch does the following:
> 
> 1. cleanup packets so all have forward_ptr
> significantly improves extendability and simplifies stuff
> slightly larger overhead (~0.006% which is negligible)

I thought we came up with some reason why it didn't work or didn't
make sense for syncpoints (with the following frame header included..)

> 2. split checksum into frame and syncpoint checksum
> simplification
> overhead changes by + 4byte for every packet >64kb (<0.006% worst case)
> overhead changes by - syncpoint size + 4 for every packet with dts_diff > 1sec
> overall this could even reduce the overhead, the worst case increase is also
> negligible

Oh, I guess this would be it... But I don't see immediately from the
patch how your change works. Can you explain?

> 3. split index
> simplification for lavf muxer
>     currently we just write the data out seek back and update the forward
>     pointer, this is safe as long as the packet is < the io buffer size in
>     lavf, if its larger we need to alloc&realloc a buffer and work within that
>     or do 2 passes to find the forward ptr value, both are more messy
> index_ptr becomes unneccesary by this
> improves error resistance

> +Each index packet SHOULD be <4kb, that way a demuxer can simply:
> +for(x=fileend-8192; ; x-=8192){
> +    search index startcode
> +    if(failure)
> +        break;
> +    read_index
> +}

Not acceptable. This requires numerous media seeks to read the index!
There must be a way to find the offset for the beginning of the index
after just one seek (the minimum number possible for streamable
writing).

> 4. always store chapter_start/len
> simplification

Not entirely sure what you mean but my impression is that this is ok.

> 5. change file structure definion so extendability is restored

OK in theory; I haven't checked closely.

> 6. drop info streams
> i see no sense in them ...

>_<
Can the semantics I wanted be duplicated exactly with info packets
only? Without storing a redundant irrelevant info packet?

> 7. dissalow width or height == 0

:)

> 8. add leading coeff to the crc polynom

No objection.

Rich




More information about the NUT-devel mailing list