[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.95.2.35, Tue Jul 29 23:02:29 2003 UTC revision 1.95.2.37, Sun Aug 3 10:20:12 2003 UTC
# Line 117  Line 117 
117          Encoder *pEnc;          Encoder *pEnc;
118      int n;      int n;
119    
120          if (XVID_MAJOR(create->version) != 1)   /* v1.x.x */          if (XVID_VERSION_MAJOR(create->version) != 1) /* v1.x.x */
121                  return XVID_ERR_VERSION;                  return XVID_ERR_VERSION;
122    
123          if (create->width%2 || create->height%2)          if (create->width%2 || create->height%2)
# Line 741  Line 741 
741    
742              for (j=0; j<pEnc->mbParam.mb_height; j++)              for (j=0; j<pEnc->mbParam.mb_height; j++)
743              for (i=0; i<pEnc->mbParam.mb_width; i++) {              for (i=0; i<pEnc->mbParam.mb_width; i++) {
744                  data.dquant[j*data.dquant_stride + i] = frame->mbs[j*pEnc->mbParam.mb_width + i].dquant;;                  data.dquant[j*data.dquant_stride + i] = frame->mbs[j*pEnc->mbParam.mb_width + i].dquant;
745              }              }
746          }          }
747    
# Line 867  Line 867 
867          int type;          int type;
868          Bitstream bs;          Bitstream bs;
869    
870          if (XVID_MAJOR(xFrame->version) != 1 || (stats && XVID_MAJOR(stats->version) != 1))     /* v1.x.x */          if (XVID_VERSION_MAJOR(xFrame->version) != 1 || (stats && XVID_VERSION_MAJOR(stats->version) != 1))     /* v1.x.x */
871                  return XVID_ERR_VERSION;                  return XVID_ERR_VERSION;
872    
873          xFrame->out_flags = 0;          xFrame->out_flags = 0;
# Line 1285  Line 1285 
1285  {  {
1286      unsigned int i,j;      unsigned int i,j;
1287      int quant = frame->quant;      int quant = frame->quant;
1288        if (quant > 31)
1289                    frame->quant = quant = 31;
1290            else if (quant < 1)
1291                    frame->quant = quant = 1;
1292    
1293      for (j=0; j<pParam->mb_height; j++)      for (j=0; j<pParam->mb_height; j++)
1294      for (i=0; i<pParam->mb_width; i++) {      for (i=0; i<pParam->mb_width; i++) {
# Line 1292  Line 1296 
1296          quant += pMB->dquant;          quant += pMB->dquant;
1297          if (quant > 31)          if (quant > 31)
1298                          quant = 31;                          quant = 31;
1299                  if (quant < 1)                  else if (quant < 1)
1300                          quant = 1;                          quant = 1;
1301          pMB->quant = quant;          pMB->quant = quant;
1302      }      }
# Line 1480  Line 1484 
1484                  current->warp = GlobalMotionEst( current->mbs, pParam, current, reference,                  current->warp = GlobalMotionEst( current->mbs, pParam, current, reference,
1485                                                                   &pEnc->vInterH, &pEnc->vInterV, &pEnc->vInterHV);                                                                   &pEnc->vInterH, &pEnc->vInterV, &pEnc->vInterHV);
1486    
1487                  if (current->motion_flags & XVID_GME_REFINE) {                  if (current->motion_flags & XVID_ME_GME_REFINE) {
1488                          gmcval = GlobalMotionEstRefine(&current->warp,                          gmcval = GlobalMotionEstRefine(&current->warp,
1489                                                                  current->mbs, pParam,                                                                  current->mbs, pParam,
1490                                                                  current, reference,                                                                  current, reference,

Legend:
Removed from v.1.95.2.35  
changed lines
  Added in v.1.95.2.37

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