[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 162, Mon May 6 03:58:09 2002 UTC revision 163, Mon May 6 08:18:11 2002 UTC
# Line 41  Line 41 
41    *                                                                                                                                                        *    *                                                                                                                                                        *
42    *  Revision history:                                                         *    *  Revision history:                                                         *
43    *                                                                                                                                                        *    *                                                                                                                                                        *
44    *  01.05.2002 added BVOP support to BitstreamWriteVopHeader    *  06.05.2002 fixed fincr/fbase error                                        *
45      *  01.05.2002 added BVOP support to BitstreamWriteVopHeader                  *
46    *  15.04.2002 rewrite log2bin use asm386  By MinChen <chenm001@163.com>      *    *  15.04.2002 rewrite log2bin use asm386  By MinChen <chenm001@163.com>      *
47    *  26.03.2002 interlacing support                                                                                        *    *  26.03.2002 interlacing support                                                                                        *
48    *  03.03.2002 qmatrix writing                                                                                            *    *  03.03.2002 qmatrix writing                                                                                            *
# Line 58  Line 59 
59  #include "../quant/quant_matrix.h"  #include "../quant/quant_matrix.h"
60    
61    
62  static int __inline log2bin(int value)  static uint32_t __inline log2bin(uint32_t value)
63  {  {
64  /* Changed by Chenm001 */  /* Changed by Chenm001 */
65  #ifndef WIN32  #ifndef WIN32
# Line 651  Line 652 
652                          25fps           res=25          inc=1                          25fps           res=25          inc=1
653                          29.97fps        res=30000       inc=1001                          29.97fps        res=30000       inc=1001
654          */          */
655    #ifdef BFRAMES
656            BitstreamPutBits(bs, pParam->fbase, 16);
657    #else
658          BitstreamPutBits(bs, 2, 16);          BitstreamPutBits(bs, 2, 16);
659    #endif
660    
661          WRITE_MARKER();          WRITE_MARKER();
662    
# Line 733  Line 738 
738    
739          // time_increment: value=nth_of_sec, nbits = log2(resolution)          // time_increment: value=nth_of_sec, nbits = log2(resolution)
740  #ifdef BFRAMES  #ifdef BFRAMES
741          BitstreamPutBits(bs, frame->ticks, 5);          BitstreamPutBits(bs, frame->ticks, log2bin(pParam->fbase));
742          dprintf("[%i:%i] %c\n", frame->seconds, frame->ticks, frame->coding_type == I_VOP ? 'I' : frame->coding_type == P_VOP ? 'P' : 'B');          dprintf("[%i:%i] %c\n", frame->seconds, frame->ticks, frame->coding_type == I_VOP ? 'I' : frame->coding_type == P_VOP ? 'P' : 'B');
743  #else  #else
744          BitstreamPutBits(bs, 1, 1);          BitstreamPutBits(bs, 1, 1);
# Line 743  Line 748 
748    
749          BitstreamPutBits(bs, 1, 1);                             // vop_coded          BitstreamPutBits(bs, 1, 1);                             // vop_coded
750    
751          if (frame->coding_type != I_VOP)          if (frame->coding_type == P_VOP)
752                  BitstreamPutBits(bs, frame->rounding_type, 1);                  BitstreamPutBits(bs, frame->rounding_type, 1);
753    
754          BitstreamPutBits(bs, 0, 3);                             // intra_dc_vlc_threshold          BitstreamPutBits(bs, 0, 3);                             // intra_dc_vlc_threshold

Legend:
Removed from v.162  
changed lines
  Added in v.163

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