[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.28, Tue Sep 3 17:25:45 2002 UTC revision 1.28.2.3, Sat Oct 5 21:27:20 2002 UTC
# Line 41  Line 41 
41    *                                                                            *    *                                                                            *
42    *  Revision history:                                                         *    *  Revision history:                                                         *
43    *                                                                            *    *                                                                            *
44      *  04.10.2002 qpel support - Isibaar                                                                             *
45    *  11.07.2002 add VOP width & height return to dec when dec->width           *    *  11.07.2002 add VOP width & height return to dec when dec->width           *
46    *             or dec->height is 0  (for use in examples/ex1.c)               *    *             or dec->height is 0  (for use in examples/ex1.c)               *
47    *             MinChen <chenm001@163.com>                                     *    *             MinChen <chenm001@163.com>                                     *
# Line 60  Line 61 
61    *      30.02.2002     intra_dc_threshold support                             *    *      30.02.2002     intra_dc_threshold support                             *
62    *      04.12.2001     support for additional headers                         *    *      04.12.2001     support for additional headers                         *
63    *      16.12.2001     inital version                                         *    *      16.12.2001     inital version                                         *
64    *    *                                                                                                                                                        *
65    ******************************************************************************/    ******************************************************************************/
66    
67    
# Line 619  Line 620 
620                                  *intra_dc_threshold =                                  *intra_dc_threshold =
621                                          intra_dc_threshold_table[BitstreamGetBits(bs, 3)];                                          intra_dc_threshold_table[BitstreamGetBits(bs, 3)];
622    
623                                    dec->top_field_first = 0;
624                                    dec->alternate_vertical_scan = 0;
625    
626                                  if (dec->interlacing) {                                  if (dec->interlacing) {
627                                          dec->top_field_first = BitstreamGetBit(bs);                                          dec->top_field_first = BitstreamGetBit(bs);
628                                          DPRINTF(DPRINTF_HEADER, "interlace top_field_first %i", dec->top_field_first);                                          DPRINTF(DPRINTF_HEADER, "interlace top_field_first %i", dec->top_field_first);
# Line 711  Line 715 
715    
716          BitstreamPutBit(bs, 0);         // random_accessible_vol          BitstreamPutBit(bs, 0);         // random_accessible_vol
717          BitstreamPutBits(bs, 0, 8);     // video_object_type_indication          BitstreamPutBits(bs, 0, 8);     // video_object_type_indication
718    
719            if (pParam->m_quarterpel == 0)
720            {
721          BitstreamPutBit(bs, 0);         // is_object_layer_identified (0=not given)          BitstreamPutBit(bs, 0);         // is_object_layer_identified (0=not given)
722            }
723            else
724            {
725                    BitstreamPutBit(bs, 1);         // is_object_layer_identified
726                    BitstreamPutBits(bs, 2, 4);     // vol_ver_id == 2
727                    BitstreamPutBits(bs, 0, 3); // vol_ver_priority = 0 ??
728            }
729    
730          BitstreamPutBits(bs, 1, 4);     // aspect_ratio_info (1=1:1)          BitstreamPutBits(bs, 1, 4);     // aspect_ratio_info (1=1:1)
731    
732          BitstreamPutBit(bs, 1); // vol_control_parameters          BitstreamPutBit(bs, 1); // vol_control_parameters
# Line 760  Line 775 
775    
776          BitstreamPutBit(bs, frame->global_flags & XVID_INTERLACING);    // interlace          BitstreamPutBit(bs, frame->global_flags & XVID_INTERLACING);    // interlace
777          BitstreamPutBit(bs, 1);         // obmc_disable (overlapped block motion compensation)          BitstreamPutBit(bs, 1);         // obmc_disable (overlapped block motion compensation)
778    
779            if (pParam->m_quarterpel == 0)
780            {
781          BitstreamPutBit(bs, 0);         // sprite_enable          BitstreamPutBit(bs, 0);         // sprite_enable
782            }
783            else
784            {
785                    BitstreamPutBits(bs, 0, 2);             // sprite_enable
786            }
787    
788          BitstreamPutBit(bs, 0);         // not_in_bit          BitstreamPutBit(bs, 0);         // not_in_bit
789    
790          // quant_type   0=h.263  1=mpeg4(quantizer tables)          // quant_type   0=h.263  1=mpeg4(quantizer tables)
# Line 779  Line 803 
803    
804          }          }
805    
806            if (pParam->m_quarterpel)
807            {
808                    BitstreamPutBit(bs, 1);
809            }
810    
811          BitstreamPutBit(bs, 1);         // complexity_estimation_disable          BitstreamPutBit(bs, 1);         // complexity_estimation_disable
812          BitstreamPutBit(bs, 1);         // resync_marker_disable          BitstreamPutBit(bs, 1);         // resync_marker_disable
813          BitstreamPutBit(bs, 0);         // data_partitioned          BitstreamPutBit(bs, 0);         // data_partitioned
814    
815            if (pParam->m_quarterpel)
816            {
817                    BitstreamPutBit(bs, 0);         // newpred_enable
818                    BitstreamPutBit(bs, 0);         // reduced_resolution_vop_enabled
819            }
820    
821          BitstreamPutBit(bs, 0);         // scalability          BitstreamPutBit(bs, 0);         // scalability
822  }  }
823    
# Line 807  Line 843 
843    
844          BitstreamPutBits(bs, frame->coding_type, 2);          BitstreamPutBits(bs, frame->coding_type, 2);
845    
         // time_base = 0  write n x PutBit(1), PutBit(0)  
846  #ifdef BFRAMES  #ifdef BFRAMES
847          for (i = 0; i < frame->seconds; i++) {          for (i = 0; i < frame->seconds; i++) {
848                  BitstreamPutBit(bs, 1);                  BitstreamPutBit(bs, 1);
# Line 849  Line 884 
884          BitstreamPutBits(bs, 0, 3);     // intra_dc_vlc_threshold          BitstreamPutBits(bs, 0, 3);     // intra_dc_vlc_threshold
885    
886          if (frame->global_flags & XVID_INTERLACING) {          if (frame->global_flags & XVID_INTERLACING) {
887                  BitstreamPutBit(bs, 1); // top field first                  BitstreamPutBit(bs, (frame->global_flags & XVID_TOPFIELDFIRST));
888                  BitstreamPutBit(bs, 0); // alternate vertical scan                  BitstreamPutBit(bs, (frame->global_flags & XVID_ALTERNATESCAN));
889          }          }
890    
891          BitstreamPutBits(bs, frame->quant, 5);  // quantizer          BitstreamPutBits(bs, frame->quant, 5);  // quantizer

Legend:
Removed from v.1.28  
changed lines
  Added in v.1.28.2.3

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