[cvs] / xvidcore / src / encoder.c Repository:
ViewVC logotype

Diff of /xvidcore/src/encoder.c

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

revision 1.94, Wed Feb 19 10:08:20 2003 UTC revision 1.95, Wed Feb 19 21:30:52 2003 UTC
# Line 677  Line 677 
677          uint16_t x, y;          uint16_t x, y;
678          Bitstream bs;          Bitstream bs;
679          uint32_t bits;          uint32_t bits;
680          int mode;          int mode = -1; /* Just to shut up compiler warning */
681    
682          int input_valid = 1;          int input_valid = 1;
683          int bframes_count = 0;          int bframes_count = 0;
# Line 1434  Line 1434 
1434                  return;                  return;
1435          }          }
1436    
1437          pEnc->current->fcode =          pEnc->current->fcode = (hint->rawhints) ?
1438                  (hint->rawhints) ? hint->mvhint.fcode : BitstreamGetBits(&bs,                  (uint32_t)hint->mvhint.fcode : BitstreamGetBits(&bs, FCODEBITS);
                                                                                                                                  FCODEBITS);  
1439    
1440          length = pEnc->current->fcode + 5;          length = pEnc->current->fcode + 5;
1441          high = 1 << (length - 1);          high = 1 << (length - 1);
# Line 1451  Line 1450 
1450                          VECTOR tmp;                          VECTOR tmp;
1451                          int vec;                          int vec;
1452    
1453                          pMB->mode =                          pMB->mode =     (hint->rawhints) ?
1454                                  (hint->rawhints) ? bhint->mode : BitstreamGetBits(&bs,                                  (uint32_t)bhint->mode : BitstreamGetBits(&bs, MODEBITS);
                                                                                                                                   MODEBITS);  
1455    
1456                          pMB->mode = (pMB->mode == MODE_INTER_Q) ? MODE_INTER : pMB->mode;                          pMB->mode = (pMB->mode == MODE_INTER_Q) ? MODE_INTER : pMB->mode;
1457                          pMB->mode = (pMB->mode == MODE_INTRA_Q) ? MODE_INTRA : pMB->mode;                          pMB->mode = (pMB->mode == MODE_INTRA_Q) ? MODE_INTRA : pMB->mode;
1458    
1459                          if (pMB->mode == MODE_INTER) {                          if (pMB->mode == MODE_INTER) {
1460                                  tmp.x =                                  tmp.x = (hint->rawhints) ?
1461                                          (hint->rawhints) ? bhint->mvs[0].x : BitstreamGetBits(&bs,                                          bhint->mvs[0].x : (int)BitstreamGetBits(&bs, length);
1462                                                                                                                                                    length);                                  tmp.y = (hint->rawhints) ?
1463                                  tmp.y =                                          bhint->mvs[0].y : (int)BitstreamGetBits(&bs, length);
                                         (hint->rawhints) ? bhint->mvs[0].y : BitstreamGetBits(&bs,  
                                                                                                                                                   length);  
1464                                  tmp.x -= (tmp.x >= high) ? high * 2 : 0;                                  tmp.x -= (tmp.x >= high) ? high * 2 : 0;
1465                                  tmp.y -= (tmp.y >= high) ? high * 2 : 0;                                  tmp.y -= (tmp.y >= high) ? high * 2 : 0;
1466    
# Line 1478  Line 1474 
1474                                  }                                  }
1475                          } else if (pMB->mode == MODE_INTER4V) {                          } else if (pMB->mode == MODE_INTER4V) {
1476                                  for (vec = 0; vec < 4; ++vec) {                                  for (vec = 0; vec < 4; ++vec) {
1477                                          tmp.x =                                          tmp.x = (hint->rawhints) ?
1478                                                  (hint->rawhints) ? bhint->mvs[vec].                                                  bhint->mvs[vec].x : (int)BitstreamGetBits(&bs, length);
1479                                                  x : BitstreamGetBits(&bs, length);                                          tmp.y = (hint->rawhints) ?
1480                                          tmp.y =                                                  bhint->mvs[vec].y : (int)BitstreamGetBits(&bs, length);
                                                 (hint->rawhints) ? bhint->mvs[vec].  
                                                 y : BitstreamGetBits(&bs, length);  
1481                                          tmp.x -= (tmp.x >= high) ? high * 2 : 0;                                          tmp.x -= (tmp.x >= high) ? high * 2 : 0;
1482                                          tmp.y -= (tmp.y >= high) ? high * 2 : 0;                                          tmp.y -= (tmp.y >= high) ? high * 2 : 0;
1483    

Legend:
Removed from v.1.94  
changed lines
  Added in v.1.95

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