[svn] / branches / dev-api-3 / xvidcore / src / encoder.c Repository:
ViewVC logotype

Diff of /branches/dev-api-3/xvidcore/src/encoder.c

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

revision 83, Fri Mar 29 04:25:16 2002 UTC revision 84, Fri Mar 29 07:03:24 2002 UTC
# Line 241  Line 241 
241                  pEnc->mbParam.quant = adaptive_quantization(pEnc->sCurrent.y,                  pEnc->mbParam.quant = adaptive_quantization(pEnc->sCurrent.y,
242                                                              pEnc->mbParam.width,                                                              pEnc->mbParam.width,
243                                                              temp_dquants,                                                              temp_dquants,
244                                                              pFrame->quant,                                                              pEnc->mbParam.quant,
245                                                              pFrame->quant,                                                              pEnc->mbParam.quant,
246                                                              2*pFrame->quant,                                                              2*pEnc->mbParam.quant,
247                                                              pEnc->mbParam.mb_width,                                                              pEnc->mbParam.mb_width,
248                                                              pEnc->mbParam.mb_height);                                                              pEnc->mbParam.mb_height);
249    
# Line 436  Line 436 
436          else          else
437                  iLimit = pEnc->mbParam.mb_width * pEnc->mbParam.mb_height + 1;                  iLimit = pEnc->mbParam.mb_width * pEnc->mbParam.mb_height + 1;
438    
439          if ((pEnc->mbParam.global_flags & XVID_HALFPEL) > 0) {          if ((pEnc->mbParam.global_flags & XVID_HALFPEL) > 0)
440            {
441                    IMAGE *vInterV = NULL;
442                    IMAGE *vInterVf = NULL;
443                    IMAGE *vInterHV = NULL;
444                    IMAGE *vInterHVf = NULL;
445    
446                    // interpolate fields together if field ME is used
447                    if (pEnc->mbParam.global_flags & XVID_INTERLACING &&
448                            pEnc->mbParam.global_flags & XVID_FIELDME)
449                    {
450                            vInterVf = &pEnc->vInterVf;
451                            vInterHVf = &pEnc->vInterHVf;
452                    }
453    
454                    // perform normal interpolation, unless only field-based ME is allowed
455                    if (!(pEnc->mbParam.global_flags & XVID_INTERLACING) ||
456                            !(pEnc->mbParam.global_flags & XVID_FIELDMEONLY))
457                    {
458                            vInterV = &pEnc->vInterV;
459                            vInterHV = &pEnc->vInterHV;
460                    }
461    
462                  start_timer();                  start_timer();
463                  image_interpolate(pRef, &pEnc->vInterH, &pEnc->vInterV, &pEnc->vInterHV,                  image_interpolate(pRef,
464                                    pEnc->mbParam.edged_width, pEnc->mbParam.edged_height,                                  &pEnc->vInterH,
465                                    vInterV, vInterVf,
466                                    vInterHV, vInterHVf,
467                                    pEnc->mbParam.edged_width,
468                                    pEnc->mbParam.edged_height,
469                                    pEnc->mbParam.rounding_type);                                    pEnc->mbParam.rounding_type);
470                  stop_inter_timer();                  stop_inter_timer();
471          }          }
472    
473          start_timer();          start_timer();
474          bIntra = MotionEstimation(pEnc->pMBs, &pEnc->mbParam, &pEnc->sReference,          bIntra = MotionEstimation(pEnc->pMBs,
475                                    &pEnc->vInterH, &pEnc->vInterV,                                  &pEnc->mbParam,
476                                    &pEnc->vInterHV, &pEnc->sCurrent, iLimit);                                  &pEnc->sReference,
477                                    &pEnc->vInterH,
478                                    &pEnc->vInterV, &pEnc->vInterVf,
479                                    &pEnc->vInterHV, &pEnc->vInterHVf,
480                                    &pEnc->sCurrent,
481                                    iLimit);
482          stop_motion_timer();          stop_motion_timer();
483    
484          if (bIntra == 1)          if (bIntra == 1)
# Line 482  Line 513 
513                                                       x, y,                                                       x, y,
514                                                       &pEnc->sReference,                                                       &pEnc->sReference,
515                                                       &pEnc->vInterH,                                                       &pEnc->vInterH,
516                                                       &pEnc->vInterV,                                                       &pEnc->vInterV, &pEnc->vInterVf,
517                                                       &pEnc->vInterHV,                                                       &pEnc->vInterHV, &pEnc->vInterHVf,
518                                                       &pEnc->sCurrent,                                                       &pEnc->sCurrent,
519                                                       dct_codes,                                                       dct_codes,
520                                                       pEnc->mbParam.width,                                                       pEnc->mbParam.width,

Legend:
Removed from v.83  
changed lines
  Added in v.84

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