[cvs] / xvidcore / src / bitstream / bitstream.c Repository:
ViewVC logotype

Diff of /xvidcore/src/bitstream/bitstream.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.19, Tue Jun 25 09:41:54 2002 UTC revision 1.21, Fri Jun 28 15:14:40 2002 UTC
# Line 119  Line 119 
119          }          }
120  }  }
121    
122    
123    
124    // for PVOP addbits == fcode - 1
125    // for BVOP addbits == max(fcode,bcode) - 1
126    // returns mbpos
127    int
128    read_video_packet_header(Bitstream *bs, int addbits)
129    {
130            int nbits;
131            int mbnum;
132            int quant;
133            int hec;
134    
135            nbits = NUMBITS_VP_RESYNC_MARKER;
136    
137            BitstreamSkip(bs, BitstreamNumBitsToByteAlign(bs));
138            BitstreamSkip(bs, nbits);
139    
140            // if (dec->shape != VIDOBJLAY_SHAPE_RECTANGULAR) {
141                    // hec
142                    // vop_width
143                    // marker_bit
144                    // vop_height
145                    // marker_bit
146    
147            //}
148    
149            mbnum = BitstreamGetBits(bs, 9);
150            //printf("mbnum %i    [%i,%i]\n", mbnum, mbnum % dec->mb_width, mbnum / dec->mb_width);
151    
152            // if (dec->shape != VIDOBJLAY_SHAPE_BINARYONLY)
153            quant = BitstreamGetBits(bs, 5);
154    
155            // if (dec->shape != VIDOBJLAY_SHAPE_RECTANGULAR)
156            hec = BitstreamGetBit(bs);
157            // if (hec)
158            //   .. decoder hec-header ...
159    
160            return mbnum;
161    }
162    
163    
164    
165  /*  /*
166  decode headers  decode headers
167  returns coding_type, or -1 if error  returns coding_type, or -1 if error
# Line 652  Line 695 
695    
696          WRITE_MARKER();          WRITE_MARKER();
697    
698          // fixed_vop_rate  #ifdef BFRAMES
699          BitstreamPutBit(bs, 0);          BitstreamPutBit(bs, 1);         // fixed_vop_rate = 1
700            BitstreamPutBits(bs, pParam->fincr, log2bin(pParam->fbase));    // fixed_vop_time_increment
701          // fixed_time_increment: value=nth_of_sec, nbits = log2(resolution)  #else
702          // BitstreamPutBits(bs, 0, 15);          BitstreamPutBit(bs, 0);         // fixed_vop_rate = 0
703    #endif
704    
705          WRITE_MARKER();          WRITE_MARKER();
706          BitstreamPutBits(bs, pParam->width, 13);        // width          BitstreamPutBits(bs, pParam->width, 13);        // width

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.21

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4