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

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

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

revision 386, Mon Sep 2 21:15:37 2002 UTC revision 387, Tue Sep 3 17:25:45 2002 UTC
# Line 714  Line 714 
714          BitstreamPutBit(bs, 0);         // is_object_layer_identified (0=not given)          BitstreamPutBit(bs, 0);         // is_object_layer_identified (0=not given)
715          BitstreamPutBits(bs, 1, 4);     // aspect_ratio_info (1=1:1)          BitstreamPutBits(bs, 1, 4);     // aspect_ratio_info (1=1:1)
716    
 #ifdef BFRAMES  
         if (pParam->max_bframes > 0) {  
717                  BitstreamPutBit(bs, 1); // vol_control_parameters                  BitstreamPutBit(bs, 1); // vol_control_parameters
718                  BitstreamPutBits(bs, 1, 2);     // chroma_format 1="4:2:0"                  BitstreamPutBits(bs, 1, 2);     // chroma_format 1="4:2:0"
719    
720    #ifdef BFRAMES
721            if (pParam->max_bframes > 0) {
722                  BitstreamPutBit(bs, 0); // low_delay                  BitstreamPutBit(bs, 0); // low_delay
                 BitstreamPutBit(bs, 0); // vbv_parameters (0=not given)  
723          } else          } else
724  #endif  #endif
725          {          {
                 BitstreamPutBit(bs, 1); // vol_control_parameters  
                 BitstreamPutBits(bs, 1, 2);     // chroma_format 1="4:2:0"  
726                  BitstreamPutBit(bs, 1); // low_delay                  BitstreamPutBit(bs, 1); // low_delay
                 BitstreamPutBit(bs, 0); // vbv_parameters (0=not given)  
727          }          }
728            BitstreamPutBit(bs, 0); // vbv_parameters (0=not given)
729    
730          BitstreamPutBits(bs, 0, 2);     // video_object_layer_shape (0=rectangular)          BitstreamPutBits(bs, 0, 2);     // video_object_layer_shape (0=rectangular)
731    
# Line 742  Line 739 
739  #ifdef BFRAMES  #ifdef BFRAMES
740          BitstreamPutBits(bs, pParam->fbase, 16);          BitstreamPutBits(bs, pParam->fbase, 16);
741  #else  #else
742          BitstreamPutBits(bs, 2, 16);          BitstreamPutBits(bs, pParam->fbase, 16);
743  #endif  #endif
744    
745          WRITE_MARKER();          WRITE_MARKER();
# Line 751  Line 748 
748          BitstreamPutBit(bs, 1);         // fixed_vop_rate = 1          BitstreamPutBit(bs, 1);         // fixed_vop_rate = 1
749          BitstreamPutBits(bs, pParam->fincr, log2bin(pParam->fbase));    // fixed_vop_time_increment          BitstreamPutBits(bs, pParam->fincr, log2bin(pParam->fbase));    // fixed_vop_time_increment
750  #else  #else
751          BitstreamPutBit(bs, 0);         // fixed_vop_rate = 0          BitstreamPutBit(bs, 1);         // fixed_vop_rate = 1
752            BitstreamPutBits(bs, pParam->fincr, log2bin(pParam->fbase));    // fixed_vop_time_increment
753  #endif  #endif
754    
755          WRITE_MARKER();          WRITE_MARKER();
# Line 802  Line 800 
800                                                  const FRAMEINFO * frame,                                                  const FRAMEINFO * frame,
801                                                  int vop_coded)                                                  int vop_coded)
802  {  {
 #ifdef BFRAMES  
803          uint32_t i;          uint32_t i;
804  #endif  
805          BitstreamPad(bs);          BitstreamPad(bs);
806          BitstreamPutBits(bs, VOP_START_CODE, 32);          BitstreamPutBits(bs, VOP_START_CODE, 32);
807    
# Line 817  Line 814 
814          }          }
815          BitstreamPutBit(bs, 0);          BitstreamPutBit(bs, 0);
816  #else  #else
817          BitstreamPutBits(bs, 0, 1);          for (i = 0; i < frame->seconds; i++) {
818                    BitstreamPutBit(bs, 1);
819            }
820            BitstreamPutBit(bs, 0);
821    //      BitstreamPutBits(bs, 0, 1);
822  #endif  #endif
823    
824          WRITE_MARKER();          WRITE_MARKER();
# Line 829  Line 830 
830                          frame->coding_type == I_VOP ? 'I' : frame->coding_type ==                          frame->coding_type == I_VOP ? 'I' : frame->coding_type ==
831                          P_VOP ? 'P' : 'B');*/                          P_VOP ? 'P' : 'B');*/
832  #else  #else
833          BitstreamPutBits(bs, 1, 1);          BitstreamPutBits(bs, frame->ticks, log2bin(pParam->fbase));
834    //      BitstreamPutBits(bs, 1, 1);
835  #endif  #endif
836    
837          WRITE_MARKER();          WRITE_MARKER();

Legend:
Removed from v.386  
changed lines
  Added in v.387

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