[NUT-devel] [nut]: r623 - docs/nut.txt

michael subversion at mplayerhq.hu
Wed Feb 13 15:14:02 CET 2008


Author: michael
Date: Wed Feb 13 15:14:01 2008
New Revision: 623

Log:
Header elision support
Sizes of tables are limited to allow demuxers with little memory.
Headers are stored in a seprate table instead of straight in the frame
code table to avoid <max header size>*256 size problems. And to allow
elision headers to be selected through an index in the frame header.
New demuxers should be able to read old files.
Old demuxers can read new files as long as the index is not coded in the
frame header, though they will of course be missing the header in the
outputed frames if a non empty one has been used.


Modified:
   docs/nut.txt

Modified: docs/nut.txt
==============================================================================
--- docs/nut.txt	(original)
+++ docs/nut.txt	Wed Feb 13 15:14:01 2008
@@ -248,6 +248,7 @@ main_header:
     tmp_mul=1
     tmp_stream=0
     tmp_match=1-(1<<62)
+    tmp_head_idx= 0;
     for(i=0; i<256; ){
         tmp_flag                        v
         tmp_fields                      v
@@ -261,7 +262,8 @@ main_header:
         if(tmp_fields>5) count          v
         else count= tmp_mul - tmp_size
         if(tmp_fields>6) tmp_match      s
-        for(j=7; j<tmp_fields; j++){
+        if(tmp_fields>7) tmp_head_idx   v
+        for(j=8; j<tmp_fields; j++){
             tmp_reserved[i]             v
         }
         for(j=0; j<count && i<256; j++, i++){
@@ -277,8 +279,12 @@ main_header:
             pts_delta[i]= tmp_pts;
             reserved_count[i]= tmp_res;
             match_time_delta[i]= tmp_match;
+            header_idx[i]= tmp_head_idx;
         }
     }
+    header_count_minus1                  v
+    for(i=0; i<header_count_minus1; i++)
+        elision_header[i+1]             vb
     reserved_bytes
 
 stream_header:
@@ -326,6 +332,9 @@ frame:
     if(frame_flags&FLAG_MATCH_TIME){
         match_time_delta                s
     }
+    if(frame_flags&FLAG_HEADER_IDX){
+        header_idx                      v
+    }
     if(frame_flags&FLAG_RESERVED)
         frame_res                       v
     for(i=0; i<frame_res; i++)
@@ -618,6 +627,7 @@ flags[frame_code], frame_flags (v)
                            otherwise data_size_msb is 0.
        6  FLAG_CHECKSUM    If set, the frame header contains a checksum.
        7  FLAG_RESERVED    If set, reserved_count is coded in the frame header.
+      10  FLAG_HEADER_IDX  If set, header_idx is coded in the frame header.
       11  FLAG_MATCH_TIME  If set, match_time_delta is coded in the frame
                            header
       12  FLAG_CODED       If set, coded_flags are stored in the frame header.
@@ -693,6 +703,23 @@ match_time_delta[frame_code] (s)
     match_time_delta, otherwise this value is ignored.
     MUST be <32768 and >-32768 or =1-(1<<62)
 
+header_idx[frame_code] (v)
+    The index into the elision_header table.
+    MUST by <128
+
+header_count_minus1 (v)
+    The number of distinct non empty elision headers.
+    MUST be <128
+
+elision_header[header_idx] (vb)
+    For frames with a final size <= 4096 this header is prepended to the
+    frame data. That is if the stored frame is 4000 bytes and the
+    elision_header is 96 bytes then it is prepended, if it is 97 byte then it
+    is not.
+    elision_header[0] is fixed to a length 0 header
+    The length of each elision_header except header 0 MUST be < 256 and >0
+    The sum of the lengthes of all elision_headers MUST be <=1024
+
 lsb_pts
     Least significant bits of the pts in time_base precision.
         Example: IBBP display order



More information about the NUT-devel mailing list