[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.30, Thu Sep 12 19:06:37 2002 UTC revision 1.31, Thu Sep 19 19:25:06 2002 UTC
# Line 688  Line 688 
688          BitstreamPutBit(bs, 1); // vol_control_parameters          BitstreamPutBit(bs, 1); // vol_control_parameters
689          BitstreamPutBits(bs, 1, 2);     // chroma_format 1="4:2:0"          BitstreamPutBits(bs, 1, 2);     // chroma_format 1="4:2:0"
690    
 #ifdef BFRAMES  
         if (pParam->max_bframes > 0) {  
                 BitstreamPutBit(bs, 0); // low_delay  
         } else  
 #endif  
         {  
691                  BitstreamPutBit(bs, 1); // low_delay                  BitstreamPutBit(bs, 1); // low_delay
692          }  
693          BitstreamPutBit(bs, 0); // vbv_parameters (0=not given)          BitstreamPutBit(bs, 0); // vbv_parameters (0=not given)
694    
695          BitstreamPutBits(bs, 0, 2);     // video_object_layer_shape (0=rectangular)          BitstreamPutBits(bs, 0, 2);     // video_object_layer_shape (0=rectangular)
696    
697          WRITE_MARKER();          WRITE_MARKER();
698    
699          /* time_increment_resolution; ignored by current decore versions          /*
700             eg. 2fps     res=2       inc=1           * time_increment_resolution; ignored by current decore versions
701             25fps        res=25      inc=1           *  eg. 2fps     res=2       inc=1
702             29.97fps res=30000   inc=1001           *      25fps    res=25      inc=1
703             *      29.97fps res=30000   inc=1001
704           */           */
 #ifdef BFRAMES  
705          BitstreamPutBits(bs, pParam->fbase, 16);          BitstreamPutBits(bs, pParam->fbase, 16);
706  #else  
         BitstreamPutBits(bs, pParam->fbase, 16);  
 #endif  
707    
708          WRITE_MARKER();          WRITE_MARKER();
709    
 #ifdef BFRAMES  
710          BitstreamPutBit(bs, 1);         // fixed_vop_rate = 1          BitstreamPutBit(bs, 1);         // fixed_vop_rate = 1
711          BitstreamPutBits(bs, pParam->fincr, log2bin(pParam->fbase));    // fixed_vop_time_increment          BitstreamPutBits(bs, pParam->fincr, log2bin(pParam->fbase));    // fixed_vop_time_increment
 #else  
         BitstreamPutBit(bs, 1);         // fixed_vop_rate = 1  
         BitstreamPutBits(bs, pParam->fincr, log2bin(pParam->fbase));    // fixed_vop_time_increment  
 #endif  
712    
713          WRITE_MARKER();          WRITE_MARKER();
714          BitstreamPutBits(bs, pParam->width, 13);        // width          BitstreamPutBits(bs, pParam->width, 13);        // width
# Line 779  Line 766 
766          BitstreamPutBits(bs, frame->coding_type, 2);          BitstreamPutBits(bs, frame->coding_type, 2);
767    
768          // time_base = 0  write n x PutBit(1), PutBit(0)          // time_base = 0  write n x PutBit(1), PutBit(0)
 #ifdef BFRAMES  
         for (i = 0; i < frame->seconds; i++) {  
                 BitstreamPutBit(bs, 1);  
         }  
         BitstreamPutBit(bs, 0);  
 #else  
769          for (i = 0; i < frame->seconds; i++) {          for (i = 0; i < frame->seconds; i++) {
770                  BitstreamPutBit(bs, 1);                  BitstreamPutBit(bs, 1);
771          }          }
772          BitstreamPutBit(bs, 0);          BitstreamPutBit(bs, 0);
 //      BitstreamPutBits(bs, 0, 1);  
 #endif  
773    
774          WRITE_MARKER();          WRITE_MARKER();
775    
776          // time_increment: value=nth_of_sec, nbits = log2(resolution)          // time_increment: value=nth_of_sec, nbits = log2(resolution)
 #ifdef BFRAMES  
         BitstreamPutBits(bs, frame->ticks, log2bin(pParam->fbase));  
         /*DPRINTF("[%i:%i] %c\n", frame->seconds, frame->ticks,  
                         frame->coding_type == I_VOP ? 'I' : frame->coding_type ==  
                         P_VOP ? 'P' : 'B');*/  
 #else  
777          BitstreamPutBits(bs, frame->ticks, log2bin(pParam->fbase));          BitstreamPutBits(bs, frame->ticks, log2bin(pParam->fbase));
 //      BitstreamPutBits(bs, 1, 1);  
 #endif  
778    
779          WRITE_MARKER();          WRITE_MARKER();
780    

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.31

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