[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.57, Fri Dec 12 09:58:40 2003 UTC revision 1.109, Sun Dec 5 13:01:27 2004 UTC
# Line 57  Line 57 
57                                            Bitstream * bs);                                            Bitstream * bs);
58    
59  static int FrameCodeP(Encoder * pEnc,  static int FrameCodeP(Encoder * pEnc,
60                                            Bitstream * bs,                                            Bitstream * bs);
                                           bool force_inter,  
                                           bool vol_header);  
61    
62  static void FrameCodeB(Encoder * pEnc,  static void FrameCodeB(Encoder * pEnc,
63                                             FRAMEINFO * frame,                                             FRAMEINFO * frame,
# Line 102  Line 100 
100                  i--;                  i--;
101          }          }
102    
103          /* if neccessary, round to 65535 accuracy */          if (*base > 65535 || *inc > 65535) {
104          if (*base > 65535) {                  int *biggest;
105                  float div = (float) *base / 65535;                  int *other;
106                  *base = (int) (*base / div);                  float div;
107                  *inc = (int) (*inc / div);  
108                    if (*base > *inc) {
109                            biggest = base;
110                            other = inc;
111                    } else {
112                            biggest = inc;
113                            other = base;
114                    }
115    
116                    div = ((float)*biggest)/((float)65535);
117                    *biggest = (int)(((float)*biggest)/div);
118                    *other = (int)(((float)*other)/div);
119          }          }
120  }  }
121    
# Line 123  Line 132 
132          if (create->width%2 || create->height%2)          if (create->width%2 || create->height%2)
133                  return XVID_ERR_FAIL;                  return XVID_ERR_FAIL;
134    
135            if (create->width<=0 || create->height<=0)
136                    return XVID_ERR_FAIL;
137    
138          /* allocate encoder struct */          /* allocate encoder struct */
139    
140          pEnc = (Encoder *) xvid_malloc(sizeof(Encoder), CACHE_LINE);          pEnc = (Encoder *) xvid_malloc(sizeof(Encoder), CACHE_LINE);
# Line 652  Line 664 
664                  data.max_quant[i] = pEnc->mbParam.max_quant[i];                  data.max_quant[i] = pEnc->mbParam.max_quant[i];
665          }          }
666    
667          data.reference.csp = XVID_CSP_USER;          data.reference.csp = XVID_CSP_PLANAR;
668          data.reference.plane[0] = pEnc->reference->image.y;          data.reference.plane[0] = pEnc->reference->image.y;
669          data.reference.plane[1] = pEnc->reference->image.u;          data.reference.plane[1] = pEnc->reference->image.u;
670          data.reference.plane[2] = pEnc->reference->image.v;          data.reference.plane[2] = pEnc->reference->image.v;
# Line 660  Line 672 
672          data.reference.stride[1] = pEnc->mbParam.edged_width/2;          data.reference.stride[1] = pEnc->mbParam.edged_width/2;
673          data.reference.stride[2] = pEnc->mbParam.edged_width/2;          data.reference.stride[2] = pEnc->mbParam.edged_width/2;
674    
675          data.current.csp = XVID_CSP_USER;          data.current.csp = XVID_CSP_PLANAR;
676          data.current.plane[0] = frame->image.y;          data.current.plane[0] = frame->image.y;
677          data.current.plane[1] = frame->image.u;          data.current.plane[1] = frame->image.u;
678          data.current.plane[2] = frame->image.v;          data.current.plane[2] = frame->image.v;
# Line 690  Line 702 
702    
703          } else { /* XVID_PLG_AFTER */          } else { /* XVID_PLG_AFTER */
704                  if ((pEnc->mbParam.plugin_flags & XVID_REQORIGINAL)) {                  if ((pEnc->mbParam.plugin_flags & XVID_REQORIGINAL)) {
705                          data.original.csp = XVID_CSP_USER;                          data.original.csp = XVID_CSP_PLANAR;
706                          data.original.plane[0] = original->y;                          data.original.plane[0] = original->y;
707                          data.original.plane[1] = original->u;                          data.original.plane[1] = original->u;
708                          data.original.plane[2] = original->v;                          data.original.plane[2] = original->v;
# Line 740  Line 752 
752                  data.mblks = frame->sStat.mblks;                  data.mblks = frame->sStat.mblks;
753                  data.ublks = frame->sStat.ublks;                  data.ublks = frame->sStat.ublks;
754    
755                  if (stats) {                  /* New code */
756                          stats->type = coding2type(frame->coding_type);                  data.stats.type      = coding2type(frame->coding_type);
757                          stats->quant = frame->quant;                  data.stats.quant     = frame->quant;
758                          stats->vol_flags = frame->vol_flags;                  data.stats.vol_flags = frame->vol_flags;
759                          stats->vop_flags = frame->vop_flags;                  data.stats.vop_flags = frame->vop_flags;
760                          stats->length = frame->length;                  data.stats.length    = frame->length;
761                          stats->hlength = frame->length - (frame->sStat.iTextBits / 8);                  data.stats.hlength   = frame->length - (frame->sStat.iTextBits / 8);
762                          stats->kblks = frame->sStat.kblks;                  data.stats.kblks     = frame->sStat.kblks;
763                          stats->mblks = frame->sStat.mblks;                  data.stats.mblks     = frame->sStat.mblks;
764                          stats->ublks = frame->sStat.ublks;                  data.stats.ublks     = frame->sStat.ublks;
765                          stats->sse_y = data.sse_y;                  data.stats.sse_y     = data.sse_y;
766                          stats->sse_u = data.sse_u;                  data.stats.sse_u     = data.sse_u;
767                          stats->sse_v = data.sse_v;                  data.stats.sse_v     = data.sse_v;
768                  }  
769                    if (stats)
770                            *stats = data.stats;
771          }          }
772    
773          /* call plugins */          /* call plugins */
# Line 848  Line 862 
862          pCur->ticks = (int32_t)pCur->stamp % time_base;          pCur->ticks = (int32_t)pCur->stamp % time_base;
863                  pCur->seconds =  ((int32_t)pCur->stamp / time_base)     - ((int32_t)pRef->stamp / time_base) ;                  pCur->seconds =  ((int32_t)pCur->stamp / time_base)     - ((int32_t)pRef->stamp / time_base) ;
864    
865                  /* HEAVY DEBUG OUTPUT remove when timecodes prove to be stable */  #if 0   /* HEAVY DEBUG OUTPUT */
866            fprintf(stderr,"WriteVop:   %d - %d \n",
 /*              fprintf(stderr,"WriteVop:   %d - %d \n",  
867                          ((int32_t)pCur->stamp / time_base), ((int32_t)pRef->stamp / time_base));                          ((int32_t)pCur->stamp / time_base), ((int32_t)pRef->stamp / time_base));
868                  fprintf(stderr,"set_timecodes: VOP %1d   stamp=%lld ref_stamp=%lld  base=%d\n",                  fprintf(stderr,"set_timecodes: VOP %1d   stamp=%lld ref_stamp=%lld  base=%d\n",
869                          pCur->coding_type, pCur->stamp, pRef->stamp, time_base);                          pCur->coding_type, pCur->stamp, pRef->stamp, time_base);
870                  fprintf(stderr,"set_timecodes: VOP %1d   seconds=%d   ticks=%d   (ref-sec=%d  ref-tick=%d)\n",                  fprintf(stderr,"set_timecodes: VOP %1d   seconds=%d   ticks=%d   (ref-sec=%d  ref-tick=%d)\n",
871                          pCur->coding_type, pCur->seconds, pCur->ticks, pRef->seconds, pRef->ticks);                          pCur->coding_type, pCur->seconds, pCur->ticks, pRef->seconds, pRef->ticks);
872    #endif
873    }
874    
875  */  static int
876    gcd(int a, int b)
877    {
878            int r ;
879    
880            if (b > a) {
881                    r = a;
882                    a = b;
883                    b = r;
884            }
885    
886            while ((r = a % b)) {
887                    a = b;
888                    b = r;
889            }
890            return b;
891    }
892    
893    static void
894    simplify_par(int *par_width, int *par_height)
895    {
896    
897            int _par_width  = (!*par_width)  ? 1 : (*par_width<0)  ? -*par_width:  *par_width;
898            int _par_height = (!*par_height) ? 1 : (*par_height<0) ? -*par_height: *par_height;
899            int divisor = gcd(_par_width, _par_height);
900    
901            _par_width  /= divisor;
902            _par_height /= divisor;
903    
904            /* 2^8 precision maximum */
905            if (_par_width>255 || _par_height>255) {
906                    float div;
907                    emms();
908                    if (_par_width>_par_height)
909                            div = (float)_par_width/255;
910                    else
911                            div = (float)_par_height/255;
912    
913                    _par_width  = (int)((float)_par_width/div);
914                    _par_height = (int)((float)_par_height/div);
915  }  }
916    
917            *par_width = _par_width;
918            *par_height = _par_height;
919    
920            return;
921    }
922    
923    
924  /*****************************************************************************  /*****************************************************************************
# Line 1039  Line 1098 
1098                                  DPRINTF(XVID_DEBUG_DEBUG,"*** PFRAME bf: head=%i tail=%i   queue: head=%i tail=%i size=%i\n",                                  DPRINTF(XVID_DEBUG_DEBUG,"*** PFRAME bf: head=%i tail=%i   queue: head=%i tail=%i size=%i\n",
1099                                  pEnc->bframenum_head, pEnc->bframenum_tail,                                  pEnc->bframenum_head, pEnc->bframenum_tail,
1100                                  pEnc->queue_head, pEnc->queue_tail, pEnc->queue_size);                                  pEnc->queue_head, pEnc->queue_tail, pEnc->queue_size);
1101                                    pEnc->mbParam.frame_drop_ratio = -1; /* it must be a coded vop */
1102    
1103                                  FrameCodeP(pEnc, &bs, 1, 0);                                  FrameCodeP(pEnc, &bs);
1104    
1105    
1106                                  if ((pEnc->mbParam.global_flags & XVID_GLOBAL_PACKED) && pEnc->bframenum_tail==0) {                                  if ((pEnc->mbParam.global_flags & XVID_GLOBAL_PACKED) && pEnc->bframenum_tail==0) {
# Line 1074  Line 1134 
1134    
1135          pEnc->current->fincr = pEnc->mbParam.fincr>0 ? pEnc->mbParam.fincr : frame->fincr;          pEnc->current->fincr = pEnc->mbParam.fincr>0 ? pEnc->mbParam.fincr : frame->fincr;
1136          inc_frame_num(pEnc);          inc_frame_num(pEnc);
1137          pEnc->current->vol_flags = pEnc->mbParam.vol_flags;          pEnc->current->vol_flags = frame->vol_flags;
1138          pEnc->current->vop_flags = frame->vop_flags;          pEnc->current->vop_flags = frame->vop_flags;
1139          pEnc->current->motion_flags = frame->motion;          pEnc->current->motion_flags = frame->motion;
1140          pEnc->current->fcode = pEnc->mbParam.m_fcode;          pEnc->current->fcode = pEnc->mbParam.m_fcode;
# Line 1109  Line 1169 
1169                  }                  }
1170          }          }
1171    
1172            if (type != I_VOP)
1173                    pEnc->current->vol_flags = pEnc->mbParam.vol_flags; /* don't allow VOL changes here */
1174    
1175          /* bframes buffer overflow check */          /* bframes buffer overflow check */
1176          if (type == B_VOP && pEnc->bframenum_tail >= pEnc->mbParam.max_bframes) {          if (type == B_VOP && pEnc->bframenum_tail >= pEnc->mbParam.max_bframes) {
1177                  type = P_VOP;                  type = P_VOP;
# Line 1221  Line 1284 
1284                  pEnc->iFrameNum = 1;                  pEnc->iFrameNum = 1;
1285    
1286                  /* ---- update vol flags at IVOP ----------- */                  /* ---- update vol flags at IVOP ----------- */
1287                  pEnc->current->vol_flags = pEnc->mbParam.vol_flags = frame->vol_flags;                  pEnc->mbParam.vol_flags = pEnc->current->vol_flags;
1288    
1289                    /* Aspect ratio */
1290                  switch(frame->par) {                  switch(frame->par) {
                 case 0:  
                         pEnc->mbParam.par = XVID_PAR_11_VGA;  
                         break;  
1291                  case XVID_PAR_11_VGA:                  case XVID_PAR_11_VGA:
1292                  case XVID_PAR_43_PAL:                  case XVID_PAR_43_PAL:
1293                  case XVID_PAR_43_NTSC:                  case XVID_PAR_43_NTSC:
# Line 1235  Line 1297 
1297                          pEnc->mbParam.par = frame->par;                          pEnc->mbParam.par = frame->par;
1298                          break;                          break;
1299                  default:                  default:
1300                          pEnc->mbParam.par = XVID_PAR_EXT;                          pEnc->mbParam.par = XVID_PAR_11_VGA;
1301                          break;                          break;
1302                  }                  }
1303                  pEnc->mbParam.par_width = (frame->par_width)?frame->par_width:1;  
1304                  pEnc->mbParam.par_height = (frame->par_height)?frame->par_height:1;                  /* For extended PAR only, we try to sanityse/simplify par values */
1305                    if (pEnc->mbParam.par == XVID_PAR_EXT) {
1306                            pEnc->mbParam.par_width  = frame->par_width;
1307                            pEnc->mbParam.par_height = frame->par_height;
1308                            simplify_par(&pEnc->mbParam.par_width, &pEnc->mbParam.par_height);
1309                    }
1310    
1311                  if ((pEnc->mbParam.vol_flags & XVID_VOL_MPEGQUANT)) {                  if ((pEnc->mbParam.vol_flags & XVID_VOL_MPEGQUANT)) {
1312                          if (frame->quant_intra_matrix != NULL)                          if (frame->quant_intra_matrix != NULL)
# Line 1285  Line 1352 
1352                                     pEnc->mbParam.edged_width, pEnc->mbParam.height);                                     pEnc->mbParam.edged_width, pEnc->mbParam.height);
1353                  }                  }
1354    
1355                  FrameCodeP(pEnc, &bs, 1, 0);                  if ( FrameCodeP(pEnc, &bs) == 0 ) {
1356                            /* N-VOP, we mustn't code b-frames yet */
1357                            call_plugins(pEnc, pEnc->current, &pEnc->sOriginal, XVID_PLG_AFTER, 0, 0, stats);
1358                            goto done;
1359                    }
1360          }          }
1361    
1362    
# Line 1386  Line 1457 
1457                  start_timer();                  start_timer();
1458                  image_setedges(&pEnc->current->image,                  image_setedges(&pEnc->current->image,
1459                          pEnc->mbParam.edged_width, pEnc->mbParam.edged_height,                          pEnc->mbParam.edged_width, pEnc->mbParam.edged_height,
1460                          pEnc->mbParam.width, pEnc->mbParam.height);                          pEnc->mbParam.width, pEnc->mbParam.height, 0);
1461                  stop_edges_timer();                  stop_edges_timer();
1462          }          }
1463    
# Line 1398  Line 1469 
1469    
1470          SetMacroblockQuants(&pEnc->mbParam, pEnc->current);          SetMacroblockQuants(&pEnc->mbParam, pEnc->current);
1471    
1472          BitstreamWriteVolHeader(bs, &pEnc->mbParam);          BitstreamWriteVolHeader(bs, &pEnc->mbParam, pEnc->current);
1473    
1474          set_timecodes(pEnc->current,pEnc->reference,pEnc->mbParam.fbase);          set_timecodes(pEnc->current,pEnc->reference,pEnc->mbParam.fbase);
1475    
# Line 1463  Line 1534 
1534  /* FrameCodeP also handles S(GMC)-VOPs */  /* FrameCodeP also handles S(GMC)-VOPs */
1535  static int  static int
1536  FrameCodeP(Encoder * pEnc,  FrameCodeP(Encoder * pEnc,
1537                     Bitstream * bs,                     Bitstream * bs)
                    bool force_inter,  
                    bool vol_header)  
1538  {  {
1539          float fSigma;          float fSigma;
1540          int bits = BitstreamPos(bs);          int bits = BitstreamPos(bs);
# Line 1473  Line 1542 
1542          DECLARE_ALIGNED_MATRIX(dct_codes, 6, 64, int16_t, CACHE_LINE);          DECLARE_ALIGNED_MATRIX(dct_codes, 6, 64, int16_t, CACHE_LINE);
1543          DECLARE_ALIGNED_MATRIX(qcoeff, 6, 64, int16_t, CACHE_LINE);          DECLARE_ALIGNED_MATRIX(qcoeff, 6, 64, int16_t, CACHE_LINE);
1544    
         int iLimit;  
1545          int x, y, k;          int x, y, k;
1546          int iSearchRange;          int iSearchRange;
1547          int bIntra=0, skip_possible;          int skip_possible;
1548          FRAMEINFO *const current = pEnc->current;          FRAMEINFO *const current = pEnc->current;
1549          FRAMEINFO *const reference = pEnc->reference;          FRAMEINFO *const reference = pEnc->reference;
1550          MBParam * const pParam = &pEnc->mbParam;          MBParam * const pParam = &pEnc->mbParam;
1551          int mb_width = pParam->mb_width;          int mb_width = pParam->mb_width;
1552          int mb_height = pParam->mb_height;          int mb_height = pParam->mb_height;
1553            int coded = 1;
1554    
1555    
1556          /* IMAGE *pCurrent = &current->image; */          /* IMAGE *pCurrent = &current->image; */
# Line 1497  Line 1566 
1566          if (!reference->is_edged) {          if (!reference->is_edged) {
1567                  start_timer();                  start_timer();
1568                  image_setedges(pRef, pParam->edged_width, pParam->edged_height,                  image_setedges(pRef, pParam->edged_width, pParam->edged_height,
1569                                             pParam->width, pParam->height);                                             pParam->width, pParam->height, 0);
1570                  stop_edges_timer();                  stop_edges_timer();
1571                  reference->is_edged = 1;                  reference->is_edged = 1;
1572          }          }
# Line 1506  Line 1575 
1575          current->rounding_type = pParam->m_rounding_type;          current->rounding_type = pParam->m_rounding_type;
1576          current->fcode = pParam->m_fcode;          current->fcode = pParam->m_fcode;
1577    
         if (!force_inter)  
                 iLimit = (int)(mb_width * mb_height *  INTRA_THRESHOLD);  
         else  
                 iLimit = mb_width * mb_height + 1;  
   
1578          if ((current->vop_flags & XVID_VOP_HALFPEL)) {          if ((current->vop_flags & XVID_VOP_HALFPEL)) {
1579                  if (reference->is_interpolated != current->rounding_type) {                  if (reference->is_interpolated != current->rounding_type) {
1580                          start_timer();                          start_timer();
# Line 1581  Line 1645 
1645                  }                  }
1646          }          }
1647    
         bIntra =  
1648                  MotionEstimation(&pEnc->mbParam, current, reference,                  MotionEstimation(&pEnc->mbParam, current, reference,
1649                                           &pEnc->vInterH, &pEnc->vInterV, &pEnc->vInterHV,                                           &pEnc->vInterH, &pEnc->vInterV, &pEnc->vInterHV,
1650                                           &pEnc->vGMC, iLimit);                                           &pEnc->vGMC, 256*4096);
1651    
1652    
1653          stop_motion_timer();          stop_motion_timer();
1654    
         if (bIntra == 1) return FrameCodeI(pEnc, bs);  
   
1655          set_timecodes(current,reference,pParam->fbase);          set_timecodes(current,reference,pParam->fbase);
         if (vol_header)  
         {       BitstreamWriteVolHeader(bs, &pEnc->mbParam);  
                 BitstreamPad(bs);  
         }  
1656    
1657          BitstreamWriteVopHeader(bs, &pEnc->mbParam, current, 1, current->mbs[0].quant);          BitstreamWriteVopHeader(bs, &pEnc->mbParam, current, 1, current->mbs[0].quant);
1658    
# Line 1608  Line 1665 
1665                          MACROBLOCK *pMB =                          MACROBLOCK *pMB =
1666                                  &current->mbs[x + y * pParam->mb_width];                                  &current->mbs[x + y * pParam->mb_width];
1667    
1668                          bIntra = (pMB->mode == MODE_INTRA) || (pMB->mode == MODE_INTRA_Q);                          int bIntra = (pMB->mode == MODE_INTRA) || (pMB->mode == MODE_INTRA_Q);
1669    
1670                          if (bIntra) {                          if (bIntra) {
1671                                  CodeIntraMB(pEnc, pMB);                                  CodeIntraMB(pEnc, pMB);
# Line 1640  Line 1697 
1697                                                                   pParam->height,                                                                   pParam->height,
1698                                                                   pParam->edged_width,                                                                   pParam->edged_width,
1699                                                                   (current->vol_flags & XVID_VOL_QUARTERPEL),                                                                   (current->vol_flags & XVID_VOL_QUARTERPEL),
                                                                  (current->vop_flags & XVID_VOP_REDUCED),  
1700                                                                   current->rounding_type);                                                                   current->rounding_type);
1701    
1702                          stop_comp_timer();                          stop_comp_timer();
# Line 1809  Line 1865 
1865  #if 0  #if 0
1866          DPRINTF(XVID_DEBUG_DEBUG, "kmu %i %i %i\n", current->sStat.kblks, current->sStat.mblks, current->sStat.ublks);          DPRINTF(XVID_DEBUG_DEBUG, "kmu %i %i %i\n", current->sStat.kblks, current->sStat.mblks, current->sStat.ublks);
1867  #endif  #endif
1868          if (current->sStat.kblks + current->sStat.mblks <          if (current->sStat.kblks + current->sStat.mblks <=
1869                  (pParam->frame_drop_ratio * mb_width * mb_height) / 100)                  (pParam->frame_drop_ratio * mb_width * mb_height) / 100 &&
1870                    ( (pEnc->bframenum_head >= pEnc->bframenum_tail) || !(pEnc->mbParam.global_flags & XVID_GLOBAL_CLOSED_GOP)) )
1871          {          {
1872                  current->sStat.kblks = current->sStat.mblks = 0;                  current->sStat.kblks = current->sStat.mblks = 0;
1873                  current->sStat.ublks = mb_width * mb_height;                  current->sStat.ublks = mb_width * mb_height;
# Line 1826  Line 1883 
1883                  current->rounding_type = reference->rounding_type;                  current->rounding_type = reference->rounding_type;
1884                  current->fcode = reference->fcode;                  current->fcode = reference->fcode;
1885                  current->bcode = reference->bcode;                  current->bcode = reference->bcode;
1886                    current->stamp = reference->stamp;
1887                  image_copy(&current->image, &reference->image, pParam->edged_width, pParam->height);                  image_copy(&current->image, &reference->image, pParam->edged_width, pParam->height);
1888                  memcpy(current->mbs, reference->mbs, sizeof(MACROBLOCK) * mb_width * mb_height);                  memcpy(current->mbs, reference->mbs, sizeof(MACROBLOCK) * mb_width * mb_height);
1889          }                  coded = 0;
1890    
1891            } else {
1892    
1893          pEnc->current->is_edged = 0; /* not edged */          pEnc->current->is_edged = 0; /* not edged */
1894          pEnc->current->is_interpolated = -1; /* not interpolated (fake rounding -1) */          pEnc->current->is_interpolated = -1; /* not interpolated (fake rounding -1) */
# Line 1839  Line 1899 
1899          image_swap(&pEnc->vInterH, &pEnc->f_refh);          image_swap(&pEnc->vInterH, &pEnc->f_refh);
1900          image_swap(&pEnc->vInterV, &pEnc->f_refv);          image_swap(&pEnc->vInterV, &pEnc->f_refv);
1901          image_swap(&pEnc->vInterHV, &pEnc->f_refhv);          image_swap(&pEnc->vInterHV, &pEnc->f_refhv);
1902            }
1903    
1904          /* XXX: debug          /* XXX: debug
1905          {          {
# Line 1860  Line 1920 
1920    
1921          current->length = (BitstreamPos(bs) - bits) / 8;          current->length = (BitstreamPos(bs) - bits) / 8;
1922    
1923          return 0;                                       /* inter */          return coded;
1924  }  }
1925    
1926    
# Line 1895  Line 1955 
1955          if (!pEnc->reference->is_edged) {          if (!pEnc->reference->is_edged) {
1956                  image_setedges(f_ref, pEnc->mbParam.edged_width,                  image_setedges(f_ref, pEnc->mbParam.edged_width,
1957                                             pEnc->mbParam.edged_height, pEnc->mbParam.width,                                             pEnc->mbParam.edged_height, pEnc->mbParam.width,
1958                                             pEnc->mbParam.height);                                             pEnc->mbParam.height, 0);
1959                  pEnc->current->is_edged = 1;                  pEnc->current->is_edged = 1;
1960          }          }
1961    
# Line 1912  Line 1972 
1972          if (!pEnc->current->is_edged) {          if (!pEnc->current->is_edged) {
1973                  image_setedges(b_ref, pEnc->mbParam.edged_width,                  image_setedges(b_ref, pEnc->mbParam.edged_width,
1974                                             pEnc->mbParam.edged_height, pEnc->mbParam.width,                                             pEnc->mbParam.edged_height, pEnc->mbParam.width,
1975                                             pEnc->mbParam.height);                                             pEnc->mbParam.height, 0);
1976                  pEnc->current->is_edged = 1;                  pEnc->current->is_edged = 1;
1977          }          }
1978    
# Line 1956  Line 2016 
2016                          if (mb->mode == MODE_NOT_CODED) {                          if (mb->mode == MODE_NOT_CODED) {
2017                                  if (pEnc->mbParam.plugin_flags & XVID_REQORIGINAL) {                                  if (pEnc->mbParam.plugin_flags & XVID_REQORIGINAL) {
2018                                          MBMotionCompensation(mb, x, y, f_ref, NULL, f_ref, NULL, NULL, &frame->image,                                          MBMotionCompensation(mb, x, y, f_ref, NULL, f_ref, NULL, NULL, &frame->image,
2019                                                                                          NULL, 0, 0, pEnc->mbParam.edged_width, 0, 0, 0);                                                                                          NULL, 0, 0, pEnc->mbParam.edged_width, 0, 0);
2020                                  }                                  }
2021    
2022                                  continue;                                  continue;

Legend:
Removed from v.1.95.2.57  
changed lines
  Added in v.1.109

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