Hi!

I cleaned up my changes to avifile, adapting it to the recently
released version 0.90 of xvid.

I tested it with a modified version of drip
(http://drip.sourceforge.net/) and for me it works.

Hope you like it!
Michael


diff -c avifile0.7-0.7.22/plugins/libxvid/fillplugins.h 
avifile0.7-0.7.22-olmur/plugins/libxvid/fillplugins.h
*** avifile0.7-0.7.22/plugins/libxvid/fillplugins.h     Sat Nov  2 11:46:45 2002--- 
avifile0.7-0.7.22-olmur/plugins/libxvid/fillplugins.h       Thu Jan  9 19:29:26 2003
***************
*** 28,40 ****
  XVIDCSTR(interlacing);
  XVIDCSTR(quant_type);

  #if 0
  XVIDCSTR(me_zero);
  XVIDCSTR(me_logarithmic);
  XVIDCSTR(me_fullsearch);
  XVIDCSTR(me_pmvfast);
  XVIDCSTR(me_epzs);
- #endif

  XVIDCSTR(postprocessing);
  XVIDCSTR(maxauto);
--- 28,47 ----
  XVIDCSTR(interlacing);
  XVIDCSTR(quant_type);

+ #if API_VERSION >= ((2 << 16) | (1))
+ XVIDCSTR(inter4v);
+ XVIDCSTR(diamond_search);
+ XVIDCSTR(adaptive_quant);
+ #endif
+
  #if 0
  XVIDCSTR(me_zero);
  XVIDCSTR(me_logarithmic);
  XVIDCSTR(me_fullsearch);
+ #endif
+
  XVIDCSTR(me_pmvfast);
  XVIDCSTR(me_epzs);

  XVIDCSTR(postprocessing);
  XVIDCSTR(maxauto);
***************
*** 83,88 ****
--- 90,108 ----
                               AttributeInfo::Integer, 0, 6, 6));
      vs.push_back(AttributeInfo(xvidstr_quant_type,
                               "Quantization type", xvid_quantopt));
+ #if API_VERSION >= ((2 << 16) | (1))
+     vs.push_back(AttributeInfo(xvidstr_inter4v,
+              "4 vectors per 16x16 block",
+              AttributeInfo::Integer, 0, 1));
+
+     vs.push_back(AttributeInfo(xvidstr_diamond_search,
+              "Diamond search",
+              AttributeInfo::Integer, 0, 1));
+
+     vs.push_back(AttributeInfo(xvidstr_adaptive_quant,
+              "Adaptive quantisation",
+              AttributeInfo::Integer, 0, 1));
+ #endif
  #if API_VERSION >= (2 << 16)
      vs.push_back(AttributeInfo(xvidstr_halfpel,
                               "Halfpel interpolation",
***************
*** 104,116 ****
      vs.push_back(AttributeInfo(xvidstr_me_fullsearch,
                               "Motion estimation FULLSEARCH",
                               AttributeInfo::Integer, 0, 1));
      vs.push_back(AttributeInfo(xvidstr_me_pmvfast,
                               "Motion estimation PMVFAST",
                               AttributeInfo::Integer, 0, 1));
      vs.push_back(AttributeInfo(xvidstr_me_epzs,
                               "Motion estimation EPZS",
                               AttributeInfo::Integer, 0, 1));
- #endif // undefined
  #else
      vs.push_back(AttributeInfo(xvidstr_rc_period,
                               "Rate control averaging period",
--- 124,136 ----
      vs.push_back(AttributeInfo(xvidstr_me_fullsearch,
                               "Motion estimation FULLSEARCH",
                               AttributeInfo::Integer, 0, 1));
+ #endif // undefined
      vs.push_back(AttributeInfo(xvidstr_me_pmvfast,
                               "Motion estimation PMVFAST",
                               AttributeInfo::Integer, 0, 1));
      vs.push_back(AttributeInfo(xvidstr_me_epzs,
                               "Motion estimation EPZS",
                               AttributeInfo::Integer, 0, 1));
  #else
      vs.push_back(AttributeInfo(xvidstr_rc_period,
                               "Rate control averaging period",
diff -c avifile0.7-0.7.22/plugins/libxvid/xvid.cpp 
avifile0.7-0.7.22-olmur/plugins/libxvid/xvid.cpp
*** avifile0.7-0.7.22/plugins/libxvid/xvid.cpp  Sat Nov  2 11:34:01 2002
--- avifile0.7-0.7.22-olmur/plugins/libxvid/xvid.cpp    Thu Jan  9 19:32:14 
2003***************
*** 366,371 ****
--- 366,382 ----
        case 1: general = XVID_MPEGQUANT; break;
        }

+ #if API_VERSION >= ((2 << 16) | (1))
+       PluginGetAttrInt(m_Info, xvidstr_inter4v, &t);
+         if (t) general |= XVID_INTER4V;
+
+       PluginGetAttrInt(m_Info, xvidstr_diamond_search, &t);
+         if (t) general |= PMV_HALFPELDIAMOND16 | PMV_HALFPELDIAMOND8;
+
+       PluginGetAttrInt(m_Info, xvidstr_adaptive_quant, &t);
+         if (t) general |= XVID_ADAPTIVEQUANT;
+ #endif
+
        PluginGetAttrInt(m_Info, xvidstr_halfpel, &t);
          if (t) general |= XVID_HALFPEL;

***************
*** 387,395 ****
            PMV_EARLYSTOP16 | PMV_HALFPELREFINE16 | PMV_EARLYSTOP8
            | PMV_HALFPELREFINE8,
            PMV_EARLYSTOP16 | PMV_HALFPELREFINE16 | PMV_EXTSEARCH16
!           | PMV_EARLYSTOP8 | PMV_HALFPELREFINE8
  #ifdef XVID_INTERLACING
!           | PMV_USESQUARES16
  #endif
        };
        PluginGetAttrInt(m_Info, xvidstr_motion_search, &t);
--- 398,406 ----
            PMV_EARLYSTOP16 | PMV_HALFPELREFINE16 | PMV_EARLYSTOP8
            | PMV_HALFPELREFINE8,
            PMV_EARLYSTOP16 | PMV_HALFPELREFINE16 | PMV_EXTSEARCH16
!           | PMV_EARLYSTOP8 | PMV_HALFPELREFINE8 | PMV_EXTSEARCH8
  #ifdef XVID_INTERLACING
!           | PMV_USESQUARES16 | PMV_USESQUARES8
  #endif
        };
        PluginGetAttrInt(m_Info, xvidstr_motion_search, &t);
***************
*** 405,417 ****

        PluginGetAttrInt(m_Info, xvidstr_me_fullsearch, &t);
          if (t) motion |= XVID_ME_FULLSEARCH;

        PluginGetAttrInt(m_Info, xvidstr_me_pmvfast, &t);
          if (t) motion |= XVID_ME_PMVFAST;

        PluginGetAttrInt(m_Info, xvidstr_me_epzs, &t);
        if (t) motion |= XVID_ME_EPZS;
- #endif // undef
  #else
        PluginGetAttrInt(m_Info, xvidstr_rc_period, &param.rc_period);
        PluginGetAttrInt(m_Info, xvidstr_rc_reaction_period, 
&param.rc_reaction_period);
--- 416,428 ----

        PluginGetAttrInt(m_Info, xvidstr_me_fullsearch, &t);
          if (t) motion |= XVID_ME_FULLSEARCH;
+ #endif // undef

        PluginGetAttrInt(m_Info, xvidstr_me_pmvfast, &t);
          if (t) motion |= XVID_ME_PMVFAST;

        PluginGetAttrInt(m_Info, xvidstr_me_epzs, &t);
        if (t) motion |= XVID_ME_EPZS;
  #else
        PluginGetAttrInt(m_Info, xvidstr_rc_period, &param.rc_period);
        PluginGetAttrInt(m_Info, xvidstr_rc_reaction_period, 
&param.rc_reaction_period);



_______________________________________________
Avifile mailing list
[EMAIL PROTECTED]
http://prak.org/mailman/listinfo/avifile

Reply via email to