[svn] / trunk / vfw / src / codec.c Repository:
ViewVC logotype

Diff of /trunk/vfw/src/codec.c

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

revision 363, Tue Aug 6 23:41:01 2002 UTC revision 364, Wed Aug 7 01:10:01 2002 UTC
# Line 56  Line 56 
56  int pmvfast_presets[7] = {  int pmvfast_presets[7] = {
57          0, PMV_QUICKSTOP16, PMV_EARLYSTOP16, PMV_EARLYSTOP16 | PMV_EARLYSTOP8,          0, PMV_QUICKSTOP16, PMV_EARLYSTOP16, PMV_EARLYSTOP16 | PMV_EARLYSTOP8,
58          PMV_EARLYSTOP16 | PMV_HALFPELREFINE16 | PMV_EARLYSTOP8 | PMV_HALFPELDIAMOND8,          PMV_EARLYSTOP16 | PMV_HALFPELREFINE16 | PMV_EARLYSTOP8 | PMV_HALFPELDIAMOND8,
59          PMV_EARLYSTOP16 | PMV_HALFPELREFINE16 | PMV_EARLYSTOP8 | PMV_HALFPELDIAMOND8,          PMV_EARLYSTOP16 | PMV_HALFPELREFINE16 | PMV_EARLYSTOP8 | PMV_HALFPELDIAMOND8 |
60          PMV_EARLYSTOP16 | PMV_HALFPELREFINE16 | PMV_EXTSEARCH16 |          PMV_ADVANCEDDIAMOND16, PMV_EARLYSTOP16 | PMV_HALFPELREFINE16 | PMV_EXTSEARCH16 |
61          PMV_EARLYSTOP8 | PMV_HALFPELREFINE8 | PMV_HALFPELDIAMOND8 | PMV_USESQUARES16          PMV_EARLYSTOP8 | PMV_HALFPELREFINE8 | PMV_HALFPELDIAMOND8 | PMV_USESQUARES16
62  };  };
63    
# Line 387  Line 387 
387          frame.general |= XVID_HALFPEL;          frame.general |= XVID_HALFPEL;
388  //      frame.general |= XVID_ME_EPZS;  //      frame.general |= XVID_ME_EPZS;
389    
390    
391          if (codec->config.motion_search > 4)          if (codec->config.motion_search > 4)
392                  frame.general |= XVID_INTER4V;                  frame.general |= XVID_INTER4V;
393    
# Line 396  Line 397 
397          if (codec->config.interlacing)          if (codec->config.interlacing)
398                  frame.general |= XVID_INTERLACING;                  frame.general |= XVID_INTERLACING;
399    
400    
401    
402  // added by koepi for credits greyscale  // added by koepi for credits greyscale
403    
404          check_greyscale_mode(&codec->config, &frame, codec->framenum);          check_greyscale_mode(&codec->config, &frame, codec->framenum);
405    
406  // end of koepi's addition  // end of koepi's addition
407    
408    
409  // fix 1pass modes/hinted MV by koepi  // fix 1pass modes/hinted MV by koepi
410          if (codec->config.hinted_me && (codec->config.mode == DLG_MODE_CBR || codec->config.mode == DLG_MODE_VBR_QUAL || codec->config.mode == DLG_MODE_VBR_QUANT))          if (codec->config.hinted_me && (codec->config.mode == DLG_MODE_CBR || codec->config.mode == DLG_MODE_VBR_QUAL || codec->config.mode == DLG_MODE_VBR_QUANT))
411          {          {
# Line 740  Line 746 
746                  if (codec_is_in_credits(&codec->config, codec->framenum))                  if (codec_is_in_credits(&codec->config, codec->framenum))
747                  {                  {
748  // added by koepi for credits greyscale  // added by koepi for credits greyscale
749    
750                          check_greyscale_mode(&codec->config, frame, codec->framenum);                          check_greyscale_mode(&codec->config, frame, codec->framenum);
751    
752  // end of koepi's addition  // end of koepi's addition
753    
754                          switch (codec->config.credits_mode)                          switch (codec->config.credits_mode)
755                          {                          {
756                          case CREDITS_MODE_RATE :                          case CREDITS_MODE_RATE :
# Line 760  Line 769 
769                  else                  else
770                  {                  {
771  // added by koepi for credits greyscale  // added by koepi for credits greyscale
772    
773                          check_greyscale_mode(&codec->config, frame, codec->framenum);                          check_greyscale_mode(&codec->config, frame, codec->framenum);
774    
775  // end of koepi's addition  // end of koepi's addition
776    
777                          frame->quant = codec_get_vbr_quant(&codec->config, codec->config.quality);                          frame->quant = codec_get_vbr_quant(&codec->config, codec->config.quality);
778                  }                  }
779                  return ICERR_OK;                  return ICERR_OK;
# Line 770  Line 782 
782                  if (codec_is_in_credits(&codec->config, codec->framenum))                  if (codec_is_in_credits(&codec->config, codec->framenum))
783                  {                  {
784  // added by koepi for credits greyscale  // added by koepi for credits greyscale
785    
786                          check_greyscale_mode(&codec->config, frame, codec->framenum);                          check_greyscale_mode(&codec->config, frame, codec->framenum);
787    
788  // end of koepi's addition  // end of koepi's addition
789    
790                          switch (codec->config.credits_mode)                          switch (codec->config.credits_mode)
791                          {                          {
792                          case CREDITS_MODE_RATE :                          case CREDITS_MODE_RATE :
# Line 792  Line 807 
807                  else                  else
808                  {                  {
809  // added by koepi for credits greyscale  // added by koepi for credits greyscale
810    
811                          check_greyscale_mode(&codec->config, frame, codec->framenum);                          check_greyscale_mode(&codec->config, frame, codec->framenum);
812    
813  // end of koepi's addition  // end of koepi's addition
814    
815                          frame->quant = codec->config.quant;                          frame->quant = codec->config.quant;
816                  }                  }
817                  return ICERR_OK;                  return ICERR_OK;
818    
819          case DLG_MODE_2PASS_1 :          case DLG_MODE_2PASS_1 :
820  // added by koepi for credits greyscale  // added by koepi for credits greyscale
821    
822                  check_greyscale_mode(&codec->config, frame, codec->framenum);                  check_greyscale_mode(&codec->config, frame, codec->framenum);
823    
824  // end of koepi's addition  // end of koepi's addition
825    
826                  if (codec->config.credits_mode == CREDITS_MODE_QUANT)                  if (codec->config.credits_mode == CREDITS_MODE_QUANT)
827                  {                  {
828                          if (codec_is_in_credits(&codec->config, codec->framenum))                          if (codec_is_in_credits(&codec->config, codec->framenum))
# Line 893  Line 914 
914  }  }
915    
916  // added by koepi for credits greyscale  // added by koepi for credits greyscale
917    
918  int check_greyscale_mode(CONFIG* config, XVID_ENC_FRAME* frame, int framenum)  int check_greyscale_mode(CONFIG* config, XVID_ENC_FRAME* frame, int framenum)
919    
920  {  {
921    
922          if ((codec_is_in_credits(config, framenum)) && (config->mode!=DLG_MODE_CBR))          if ((codec_is_in_credits(config, framenum)) && (config->mode!=DLG_MODE_CBR))
923    
924          {          {
925    
926                  if (config->credits_greyscale)                  if (config->credits_greyscale)
927    
928                  {                  {
929    
930                          if ((frame->general && XVID_GREYSCALE))  // use only if not already in greyscale                          if ((frame->general && XVID_GREYSCALE))  // use only if not already in greyscale
931    
932                                  frame->general |= XVID_GREYSCALE;                                  frame->general |= XVID_GREYSCALE;
933    
934                  } else {                  } else {
935    
936                          if (!(frame->general && XVID_GREYSCALE))  // if movie is in greyscale, switch back                          if (!(frame->general && XVID_GREYSCALE))  // if movie is in greyscale, switch back
937    
938                                  frame->general |= XVID_GREYSCALE;                                  frame->general |= XVID_GREYSCALE;
939    
940                  }                  }
941    
942          } else {          } else {
943    
944                  if (config->greyscale)                  if (config->greyscale)
945    
946                  {                  {
947    
948                          if ((frame->general && XVID_GREYSCALE))  // use only if not already in greyscale                          if ((frame->general && XVID_GREYSCALE))  // use only if not already in greyscale
949    
950                                  frame->general |= XVID_GREYSCALE;                                  frame->general |= XVID_GREYSCALE;
951    
952                  } else {                  } else {
953    
954                          if (!(frame->general && XVID_GREYSCALE))  // if credits is in greyscale, switch back                          if (!(frame->general && XVID_GREYSCALE))  // if credits is in greyscale, switch back
955    
956                                  frame->general |= XVID_GREYSCALE;                                  frame->general |= XVID_GREYSCALE;
957    
958                  }                  }
959    
960          }          }
961    
962          return 0;          return 0;
963    
964  }  }
965    
966  // end of koepi's addition  // end of koepi's addition
967    

Legend:
Removed from v.363  
changed lines
  Added in v.364

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