[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.42, Mon Mar 22 22:36:23 2004 UTC revision 1.43, Fri May 21 14:40:15 2004 UTC
# Line 1197  Line 1197 
1197    
1198      if (pParam->fincr>0) {      if (pParam->fincr>0) {
1199              BitstreamPutBit(bs, 1);             /* fixed_vop_rate = 1 */              BitstreamPutBit(bs, 1);             /* fixed_vop_rate = 1 */
1200              BitstreamPutBits(bs, pParam->fincr, log2bin(pParam->fbase-1));      /* fixed_vop_time_increment */                  BitstreamPutBits(bs, pParam->fincr, MAX(log2bin(pParam->fbase-1),1));   /* fixed_vop_time_increment */
1201      }else{      }else{
1202          BitstreamPutBit(bs, 0);         /* fixed_vop_rate = 0 */          BitstreamPutBit(bs, 0);         /* fixed_vop_rate = 0 */
1203      }      }
# Line 1272  Line 1272 
1272          }          }
1273    
1274          /* xvid id */          /* xvid id */
 #define XVID_ID "XviD" XVID_BS_VERSION  
1275          {          {
1276                  char xvid_id_string[100];                  const char xvid_user_format[] = "XviD%04d%c";
1277                    char xvid_user_data[100];
1278                  if (frame->vop_flags & XVID_VOP_CARTOON)                  sprintf(xvid_user_data,
1279                          sprintf(xvid_id_string, "%sC", XVID_ID);                                  xvid_user_format,
1280                  else                                  XVID_BS_VERSION,
1281                          sprintf(xvid_id_string, "%s", XVID_ID);                                  (frame->vop_flags & XVID_VOP_CARTOON)?'C':'\0');
1282                    BitstreamWriteUserData(bs, xvid_user_data, strlen(xvid_user_data));
                 BitstreamWriteUserData(bs, xvid_id_string, strlen(xvid_id_string));  
1283          }          }
1284  }  }
1285    
# Line 1323  Line 1321 
1321          WRITE_MARKER();          WRITE_MARKER();
1322    
1323          /* time_increment: value=nth_of_sec, nbits = log2(resolution) */          /* time_increment: value=nth_of_sec, nbits = log2(resolution) */
1324            BitstreamPutBits(bs, frame->ticks, MAX(log2bin(pParam->fbase-1), 1));
         BitstreamPutBits(bs, frame->ticks, log2bin(pParam->fbase-1));  
1325  #if 0  #if 0
1326          DPRINTF("[%i:%i] %c",          DPRINTF("[%i:%i] %c",
1327                          frame->seconds, frame->ticks,                          frame->seconds, frame->ticks,

Legend:
Removed from v.1.42  
changed lines
  Added in v.1.43

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