# HG changeset patch # User ivo # Date 1164385908 0 # Node ID 3cdb95ea504d3814d118e29de6d8b53d6590d26b # Parent 364075c5bc6c9386007078840b1a54dd90929011 specify, where possible, the type of the tags in the tag description section diff -r 364075c5bc6c -r 3cdb95ea504d DOCS/tech/nut.txt --- a/DOCS/tech/nut.txt Fri Nov 24 15:06:18 2006 +0000 +++ b/DOCS/tech/nut.txt Fri Nov 24 16:31:48 2006 +0000 @@ -410,42 +410,42 @@ the very first thing in every nut file, useful for identifying nut files -*_startcode +*_startcode (f(64)) all startcodes start with 'N' -main_startcode +main_startcode (f(64)) 0x7A561F5F04ADULL + (((uint64_t)('N'<<8) + 'M')<<48) -stream_startcode +stream_startcode (f(64)) 0x11405BF2F9DBULL + (((uint64_t)('N'<<8) + 'S')<<48) -syncpoint_startcode +syncpoint_startcode (f(64)) 0xE4ADEECA4569ULL + (((uint64_t)('N'<<8) + 'K')<<48) -index_startcode +index_startcode (f(64)) 0xDD672F23E64EULL + (((uint64_t)('N'<<8) + 'X')<<48) -info_startcode +info_startcode (f(64)) 0xAB68B596BA78ULL + (((uint64_t)('N'<<8) + 'I')<<48) -version +version (v) NUT version. The current value is 3. All lower values are pre-freeze -stream_count +stream_count (v) number of streams in this file -time_base_count +time_base_count (v) number of different time bases in this file this MUST NOT be 0 -forward_ptr +forward_ptr (v) size of the packet data (exactly the distance from the first byte after the packet_header to the first byte of the next packet) every nut packet contains a forward_ptr immediately after its startcode with the exception of frame_code based packets, the forward pointer can be used to skip over the packet without decoding its contents -max_distance +max_distance (v) max distance between startcodes. If p1 and p2 are the byte positions of the first byte of two consecutive startcodes, then p2-p1 MUST be less than or equal to max_distance unless the entire @@ -466,7 +466,7 @@ frameheader. -max_pts_distance +max_pts_distance (v) max absolute difference of pts of new frame from last_pts in the timebase of the stream, without a checksum after the frameheader. A frame header MUST include a checksum if abs(pts-last_pts) is @@ -475,11 +475,11 @@ on the same stream, as it is altered by syncpoint timestamps. SHOULD NOT be higher than 1/timebase -stream_id +stream_id (v) Stream identifier stream_id MUST be < stream_count -stream_class +stream_class (v) 0 video 1 audio 2 subtitles @@ -487,7 +487,7 @@ Note: the remaining values are reserved and MUST NOT be used a demuxer MUST ignore streams with reserved classes -fourcc +fourcc (vb) identification for the codec example: "H264" MUST contain 2 or 4 bytes, note, this might be increased in the future @@ -495,7 +495,7 @@ the id values used are the same as in avi, so if a codec uses a specific fourcc in avi then the same fourcc MUST be used here -time_base_nom / time_base_denom = time_base +time_base_nom (v) / time_base_denom (v) = time_base the length of a timer tick in seconds, this MUST be equal to the 1/fps if FLAG_FIXED_FPS is set time_base_nom and time_base_denom MUST NOT be 0 @@ -509,7 +509,7 @@ There MUST NOT be 2 identical timebases in a file. There SHOULD NOT be more timebases than streams. -time_base_id +time_base_id (v) index into the time_base table MUST be < time_base_count @@ -543,11 +543,11 @@ if (convert_ts(b, b_timebase, a_timebase) < a) return 1; return 0; -msb_pts_shift +msb_pts_shift (v) amount of bits in lsb_pts MUST be <16 -decode_delay +decode_delay (v) size of the reordering buffer used to convert pts to dts codecs which don't support b frames normally use 0 mpeg1/mpeg2 style codecs with b frames use 1 @@ -557,11 +557,11 @@ but its theoretically possible that one exists which needs it >0) decode_delay MUST NOT be set higher than necessary for a codec. -stream_flags +stream_flags (v) Bit Name Description 1 FLAG_FIXED_FPS indicates that the fps is fixed -codec_specific_data +codec_specific_data (vb) private global data for a codec (could be huffman tables or ...) if a codec has a global header it SHOULD be placed in here instead of at the start of every keyframe @@ -576,7 +576,7 @@ the encoder name and version, shall be considered essential as it is very usefull to workaround possible encoder bugs -frame_code +frame_code (f(8)) frame_code is an 8-bit field which exists before every frame, it can store part of the size of the frame, the stream number, the timestamp and some flags amongst other things, what is not directly stored @@ -587,7 +587,7 @@ a muxer SHOULD mark 0x00 and 0xFF as invalid to improve error detection -flags[frame_code], frame_flags +flags[frame_code], frame_flags (v) Bit Name Description 1 FLAG_KEY if set, frame is keyframe 2 FLAG_EOR if set, stream has no relevance on @@ -616,39 +616,39 @@ if there is no such frame between the last syncpoint and the current frame then the syncpoint timestamp is used, see global_key_pts -stream_id[frame_code] +stream_id[frame_code] (v) if FLAG_STREAM_ID is not set then this is the stream number for the frame following this frame_code if FLAG_STREAM_ID is set then this value has no meaning MUST be <250 -data_size_mul[frame_code] +data_size_mul[frame_code] (v) if FLAG_SIZE_MSB is set then data_size_msb which is stored after the frame code is multiplied with it and forms the more significant part of the size of the following frame if FLAG_SIZE_MSB is not set then this field has no meaning MUST be <16384 -data_size_lsb[frame_code] +data_size_lsb[frame_code] (v) the less significant part of the size of the following frame this added together with data_size_mul*data_size_msb is the size of the following frame MUST be <16384 -pts_delta[frame_code] +pts_delta[frame_code] (s) MUST be <16384 and >-16384 if FLAG_CODED_PTS is set in the flags of the current frame then this value MUST be ignored, if FLAG_CODED_PTS is not set then pts_delta is the difference between the current pts and last_pts -reserved_count[frame_code] +reserved_count[frame_code] (v) MUST be <256 data_size the size of the following frame data_size= data_size_lsb + data_size_msb*data_size_mul; -coded_pts +coded_pts (v) if coded_pts < (1<