[svn] / branches / dev-api-4 / xvidcore / vfw / src / codec.c Repository:
ViewVC logotype

Diff of /branches/dev-api-4/xvidcore/vfw/src/codec.c

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

revision 948, Wed Mar 26 11:01:03 2003 UTC revision 949, Wed Mar 26 14:56:49 2003 UTC
# Line 55  Line 55 
55    
56  int pmvfast_presets[7] = {  int pmvfast_presets[7] = {
57          0, 0, 0, 0,          0, 0, 0, 0,
58          0 | PMV_HALFPELREFINE16 | 0,          0 | XVID_ME_HALFPELREFINE16 | 0,
59          0 | PMV_HALFPELREFINE16 | 0 |          0 | XVID_ME_HALFPELREFINE16 | 0 |
60          PMV_ADVANCEDDIAMOND16, PMV_HALFPELREFINE16 | PMV_EXTSEARCH16 |          XVID_ME_ADVANCEDDIAMOND16, XVID_ME_HALFPELREFINE16 | XVID_ME_EXTSEARCH16 |
61          PMV_HALFPELREFINE8 | 0 | PMV_USESQUARES16          XVID_ME_HALFPELREFINE8 | 0 | XVID_ME_USESQUARES16
62  };  };
63    
64  /*      return xvid compatbile colorspace,  /*      return xvid compatbile colorspace,
# Line 315  Line 315 
315      }      }
316    
317      if (codec->config.packed)      if (codec->config.packed)
318          create.global |= XVID_PACKED;          create.global |= XVID_GLOBAL_PACKED;
319          if (codec->config.dx50bvop)          if (codec->config.dx50bvop)
320                  create.global |= XVID_CLOSED_GOP;                  create.global |= XVID_GLOBAL_CLOSED_GOP;
321    
322      create.max_key_interval = codec->config.max_key_interval;      create.max_key_interval = codec->config.max_key_interval;
323          /* XXX: param.min_quantizer = codec->config.min_pquant;          /* XXX: param.min_quantizer = codec->config.min_pquant;
# Line 414  Line 414 
414    
415          if (codec->config.quant_type != QUANT_MODE_H263)          if (codec->config.quant_type != QUANT_MODE_H263)
416          {          {
417                  frame.vol_flags |= XVID_MPEGQUANT;                  frame.vol_flags |= XVID_VOL_MPEGQUANT;
418    
419                  // we actually need "default/custom" selectbox for both inter/intra                  // we actually need "default/custom" selectbox for both inter/intra
420                  // this will do for now                  // this will do for now
# Line 431  Line 431 
431          }          }
432    
433          if (codec->config.reduced_resolution) {          if (codec->config.reduced_resolution) {
434                  frame.vol_flags |= XVID_REDUCED_ENABLE;                  frame.vol_flags |= XVID_VOL_REDUCED_ENABLE;
435                  frame.vop_flags |= XVID_REDUCED;        /* XXX: need auto decion mode */                  frame.vop_flags |= XVID_VOP_REDUCED;    /* XXX: need auto decion mode */
436          }          }
437    
438          if (codec->config.qpel) {          if (codec->config.qpel) {
439                  frame.vol_flags |= XVID_QUARTERPEL;                  frame.vol_flags |= XVID_VOL_QUARTERPEL;
440                  frame.motion |= PMV_QUARTERPELREFINE16 | PMV_QUARTERPELREFINE8;                  frame.motion |= XVID_ME_QUARTERPELREFINE16 | XVID_ME_QUARTERPELREFINE8;
441          }          }
442    
443          if (codec->config.gmc)          if (codec->config.gmc)
444                  frame.vol_flags |= XVID_GMC;                  frame.vol_flags |= XVID_VOL_GMC;
445    
446          if (codec->config.interlacing)          if (codec->config.interlacing)
447                  frame.vol_flags |= XVID_INTERLACING;                  frame.vol_flags |= XVID_VOL_INTERLACING;
448    
449      /* vop stuff */      /* vop stuff */
450    
451          frame.vop_flags |= XVID_HALFPEL;          frame.vop_flags |= XVID_VOP_HALFPEL;
452          frame.vop_flags |= XVID_HQACPRED;          frame.vop_flags |= XVID_VOP_HQACPRED;
453    
454          if (codec->config.debug)          if (codec->config.debug)
455                  frame.vop_flags |= XVID_DEBUG;                  frame.vop_flags |= XVID_VOP_DEBUG;
456    
457          if (codec->config.motion_search > 4)          if (codec->config.motion_search > 4)
458                  frame.vop_flags |= XVID_INTER4V;                  frame.vop_flags |= XVID_VOP_INTER4V;
459    
460          if (codec->config.chromame)          if (codec->config.chromame)
461                  frame.vop_flags |= PMV_CHROMA16 + PMV_CHROMA8;                  frame.vop_flags |= XVID_ME_CHROMA16 + XVID_ME_CHROMA8;
462    
463          if (codec->config.chroma_opt)          if (codec->config.chroma_opt)
464                  frame.vop_flags |= XVID_CHROMAOPT;                  frame.vop_flags |= XVID_VOP_CHROMAOPT;
465    
466          check_greyscale_mode(&codec->config, &frame, codec->framenum);          check_greyscale_mode(&codec->config, &frame, codec->framenum);
467    
# Line 511  Line 511 
511          switch (codec->config.vhq_mode)          switch (codec->config.vhq_mode)
512          {          {
513          case VHQ_MODE_DECISION :          case VHQ_MODE_DECISION :
514                  frame.vop_flags |= XVID_MODEDECISION_BITS;                  frame.vop_flags |= XVID_VOP_MODEDECISION_BITS;
515                  break;                  break;
516    
517          case VHQ_LIMITED_SEARCH :          case VHQ_LIMITED_SEARCH :
518                  frame.vop_flags |= XVID_MODEDECISION_BITS;                  frame.vop_flags |= XVID_VOP_MODEDECISION_BITS;
519                  frame.motion |= HALFPELREFINE16_BITS;                  frame.motion |= XVID_ME_HALFPELREFINE16_BITS;
520                  frame.motion |= QUARTERPELREFINE16_BITS;                  frame.motion |= XVID_ME_QUARTERPELREFINE16_BITS;
521                  break;                  break;
522    
523          case VHQ_MEDIUM_SEARCH :          case VHQ_MEDIUM_SEARCH :
524                  frame.vop_flags |= XVID_MODEDECISION_BITS;                  frame.vop_flags |= XVID_VOP_MODEDECISION_BITS;
525                  frame.motion |= HALFPELREFINE16_BITS;                  frame.motion |= XVID_ME_HALFPELREFINE16_BITS;
526                  frame.motion |= HALFPELREFINE8_BITS;                  frame.motion |= XVID_ME_HALFPELREFINE8_BITS;
527                  frame.motion |= QUARTERPELREFINE16_BITS;                  frame.motion |= XVID_ME_QUARTERPELREFINE16_BITS;
528                  frame.motion |= QUARTERPELREFINE8_BITS;                  frame.motion |= XVID_ME_QUARTERPELREFINE8_BITS;
529                  frame.motion |= CHECKPREDICTION_BITS;                  frame.motion |= XVID_ME_CHECKPREDICTION_BITS;
530                  break;                  break;
531    
532          case VHQ_WIDE_SEARCH :          case VHQ_WIDE_SEARCH :
533                  frame.vop_flags |= XVID_MODEDECISION_BITS;                  frame.vop_flags |= XVID_VOP_MODEDECISION_BITS;
534                  frame.motion |= HALFPELREFINE16_BITS;                  frame.motion |= XVID_ME_HALFPELREFINE16_BITS;
535                  frame.motion |= HALFPELREFINE8_BITS;                  frame.motion |= XVID_ME_HALFPELREFINE8_BITS;
536                  frame.motion |= QUARTERPELREFINE16_BITS;                  frame.motion |= XVID_ME_QUARTERPELREFINE16_BITS;
537                  frame.motion |= QUARTERPELREFINE8_BITS;                  frame.motion |= XVID_ME_QUARTERPELREFINE8_BITS;
538                  frame.motion |= CHECKPREDICTION_BITS;                  frame.motion |= XVID_ME_CHECKPREDICTION_BITS;
539                  frame.motion |= EXTSEARCH_BITS;                  frame.motion |= XVID_ME_EXTSEARCH_BITS;
540                  break;                  break;
541    
542          default :          default :
# Line 1086  Line 1086 
1086    
1087                  {                  {
1088    
1089                          if ((frame->vop_flags && XVID_GREYSCALE))  // use only if not already in greyscale                          if ((frame->vop_flags && XVID_VOP_GREYSCALE))  // use only if not already in greyscale
1090    
1091                                  frame->vop_flags |= XVID_GREYSCALE;                                  frame->vop_flags |= XVID_VOP_GREYSCALE;
1092    
1093                  } else {                  } else {
1094    
1095                          if (!(frame->vop_flags && XVID_GREYSCALE))  // if movie is in greyscale, switch back                          if (!(frame->vop_flags && XVID_VOP_GREYSCALE))  // if movie is in greyscale, switch back
1096    
1097                                  frame->vop_flags |= XVID_GREYSCALE;                                  frame->vop_flags |= XVID_VOP_GREYSCALE;
1098    
1099                  }                  }
1100    
# Line 1104  Line 1104 
1104    
1105                  {                  {
1106    
1107                          if ((frame->vop_flags && XVID_GREYSCALE))  // use only if not already in greyscale                          if ((frame->vop_flags && XVID_VOP_GREYSCALE))  // use only if not already in greyscale
1108    
1109                                  frame->vop_flags |= XVID_GREYSCALE;                                  frame->vop_flags |= XVID_VOP_GREYSCALE;
1110    
1111                  } else {                  } else {
1112    
1113                          if (!(frame->vop_flags && XVID_GREYSCALE))  // if credits is in greyscale, switch back                          if (!(frame->vop_flags && XVID_VOP_GREYSCALE))  // if credits is in greyscale, switch back
1114    
1115                                  frame->vop_flags |= XVID_GREYSCALE;                                  frame->vop_flags |= XVID_VOP_GREYSCALE;
1116    
1117                  }                  }
1118    

Legend:
Removed from v.948  
changed lines
  Added in v.949

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