[NUT-devel] back_ptr description unclear

Rich Felker dalias at aerifal.cx
Tue Jan 23 22:39:32 CET 2007


On Tue, Jan 23, 2007 at 09:10:43AM +0100, Clemens Ladisch wrote:
> nut.txt says:
> | back_ptr_div16 (v)
> |     back_ptr = back_ptr_div16 * 16 + 15
> |     back_ptr must point to a position within 16 bytes of a syncpoint
> |     startcode. [...]
> 
> Does "within 16 bytes" mean before or after the syncpoint startcode?
> This description also doesn't mention that this value is relative.
> 
> I think the semantics were intended to be similar to syncpoint_pos_div16
> in the index, so probably that description can be copied and adapted:
> 
> | syncpoint_pos_div16 (v)
> |     offset from beginning of file to up to 15 bytes before the syncpoint
> |     referred to in this index entry. Relative to position of last
> |     syncpoint.

except back_ptr is relative to the current position, not absolute/from
beginning of file. and within 16 bytes is supposed to mean that the
startcode begins on the pointed-to byte or one of the 15 following
bytes. i suppose this could use some clarification in the spec. :)

rich



More information about the NUT-devel mailing list