summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-video/avifile')
-rw-r--r--media-video/avifile/ChangeLog8
-rw-r--r--media-video/avifile/Manifest6
-rw-r--r--media-video/avifile/avifile-0.7.37.20030522-r1.ebuild176
-rw-r--r--media-video/avifile/files/avifile-0.7.37.20030522-divx.patch391
-rw-r--r--media-video/avifile/files/digest-avifile-0.7.37.20030522-r11
5 files changed, 578 insertions, 4 deletions
diff --git a/media-video/avifile/ChangeLog b/media-video/avifile/ChangeLog
index 47104e7989e2..9050bd0a32e8 100644
--- a/media-video/avifile/ChangeLog
+++ b/media-video/avifile/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for media-video/avifile
# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-video/avifile/ChangeLog,v 1.50 2003/06/12 14:17:00 seemant Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/avifile/ChangeLog,v 1.51 2003/07/08 22:14:51 mholzer Exp $
+
+*avifile-0.7.37.20030522-r1 (09 Jul 2003)
+
+ 09 Jul 2003; Martin Holzer <mholzer@gentoo.org>
+ avifile-0.7.37.20030522-r1.ebuild, files/avifile-0.7.37.20030522-divx.patch:
+ Adding latest divx support. Closes #23795
12 Jun 2003; Seemant Kulleen <seemant@gentoo.org>
avifile-0.7.32.20030219.ebuild, avifile-0.7.34.20030319.ebuild,
diff --git a/media-video/avifile/Manifest b/media-video/avifile/Manifest
index 8d5710aaca3a..51f88adb28b2 100644
--- a/media-video/avifile/Manifest
+++ b/media-video/avifile/Manifest
@@ -1,9 +1,9 @@
-MD5 69f54b152938aefcadc66b8ffab6d407 ChangeLog 9301
+MD5 85b5b803b1b96c513d8171e2b91007ff ChangeLog 9519
MD5 57d49dcece64d038049874257f89f20c avifile-0.7.15.20020816-r1.ebuild 2226
MD5 a39c30fae967c6e1aa9e1550fdf32d33 avifile-0.7.32.20030219.ebuild 4101
MD5 88f6f30b27d42a87e62155463f77797c avifile-0.7.34.20030319.ebuild 4178
-MD5 044e52a62a6d3528eed8c5144370374f avifile-0.7.37.20030522.ebuild 4570
-MD5 044e52a62a6d3528eed8c5144370374f avifile-0.7.37.20030522-r1.ebuild 4570
+MD5 c9a928d42bbc570e593bff00167e47c8 avifile-0.7.37.20030522-r1.ebuild 4573
+MD5 52d2f260f3c6b149b84acbf39a18474a avifile-0.7.37.20030522.ebuild 4282
MD5 f568371b0b1dd7cb7dfd933c551fddc9 files/digest-avifile-0.7.15.20020816-r1 73
MD5 88eda2a3289907201d524c557bd8a753 files/digest-avifile-0.7.32.20030219 73
MD5 081b0f05ada052539e0eb16ae2eb441d files/digest-avifile-0.7.34.20030319 73
diff --git a/media-video/avifile/avifile-0.7.37.20030522-r1.ebuild b/media-video/avifile/avifile-0.7.37.20030522-r1.ebuild
new file mode 100644
index 000000000000..39ddc58d090b
--- /dev/null
+++ b/media-video/avifile/avifile-0.7.37.20030522-r1.ebuild
@@ -0,0 +1,176 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-video/avifile/avifile-0.7.37.20030522-r1.ebuild,v 1.1 2003/07/08 22:14:51 mholzer Exp $
+
+IUSE="static truetype xv sdl dvd mmx sse 3dnow zlib oggvorbis X qt alsa esd"
+
+MAJ_PV=${PV:0:3}
+MIN_PV=${PV:3:3}
+MY_P="${P/.200/-200}"
+MY_S="${PN}${MAJ_PV}-${MAJ_PV}${MIN_PV}"
+S="${WORKDIR}/${MY_S}"
+
+DESCRIPTION="Library for AVI-Files"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tgz"
+HOMEPAGE="http://avifile.sourceforge.net/"
+
+SLOT="0.7"
+LICENSE="GPL-2"
+KEYWORDS="~x86 ~sparc"
+
+DEPEND=">=media-libs/jpeg-6b
+ x86? ( >=media-libs/divx4linux-20020418
+ >=media-libs/win32codecs-0.90 )
+ >=media-video/ffmpeg-0.4
+ >=media-sound/mad-0.14
+ >=media-libs/xvid-0.9.0
+ >=media-sound/lame-3.90
+ >=media-libs/audiofile-0.2.3
+ >=sys-apps/sed-4
+ truetype? ( >=media-libs/freetype-2.1 )
+ xv? ( >=x11-base/xfree-4.2.1 )
+ sdl? ( >=media-libs/libsdl-1.2.2 )
+ dvd? ( >=media-libs/a52dec-0.7 )
+ zlib? ( >=sys-libs/zlib-1.1.3 )
+ oggvorbis? ( >=media-libs/libvorbis-1.0 )
+ X? ( >=x11-base/xfree-4.2.0 virtual/xft )
+ qt? ( >=x11-libs/qt-3.0.3 )
+ alsa? ( >=media-libs/alsa-lib-0.9.0_rc2 )
+ esd? ( >=media-sound/esound-0.2.28 )"
+
+src_unpack() {
+ unpack ${A}
+ use qt || sed -i 's/qt[a-z]*//g' ${S}/samples/Makefile.am
+ #Fixing divx 2003 API
+ if has_version '>=media-libs/divx4linux-20030428'
+ then
+ einfo "DivX 20030428 found"
+ cd ${S}
+ epatch ${FILESDIR}/${P}-divx.patch
+ else
+ einfo "Old DivX Api found"
+ fi
+}
+
+src_compile() {
+ local myconf="--enable-oss"
+ local kdepre=""
+
+ use static \
+ && myconf="${myconf} --enable-static" \
+ || myconf="${myconf} --disable-static"
+
+ use truetype \
+ && myconf="${myconf} --enable-freetype2" \
+ || myconf="${myconf} --disable-freetype2"
+
+ use xv \
+ && myconf="${myconf} --enable-xv" \
+ || myconf="${myconf} --disable-xv"
+
+ if [ "$XINERAMA" = "NO" ]; then
+ myconf="${myconf} --disable-xinerama"
+ fi
+
+ if [ "$DPMS" = "NO" ]; then
+ myconf="${myconf} --disable-dpms"
+ fi
+
+ use sdl \
+ && myconf="${myconf} --enable-sdl" \
+ || myconf="${myconf} --disable-sdl --disable-sdltest"
+
+ if [ "$V4L" = "NO" ]; then
+ myconf="${myconf} --disable-v4l"
+ fi
+
+ if [ "$SUN" = "NO" ]; then
+ myconf="${myconf} --disable-sunaudio"
+ fi
+
+ use dvd \
+ && myconf="${myconf} --enable-a52 --enable-ffmpeg-a52" \
+ || myconf="${myconf} --disable-a52 --disable-ffmpeg-a52"
+
+ if [ "$SBLIVE" = "NO" ]; then
+ myconf="${myconf} --disable-ac3passthrough"
+ fi
+
+ if [ "$RUNTIME_LAME" = "YES" ]; then
+ myconf="${myconf} --enable-lame-bin"
+ fi
+
+ if [ ! -z $DEBUGBUILD ]; then
+ myconf="${myconf} --enable-loader-out"
+ else
+ myconf="${myconf} --enable-quiet"
+ fi
+
+ ( use mmx || use sse || use 3dnow ) && myconf="${myconf} --enable-x86opt"
+
+ use zlib \
+ && myconf="${myconf} --enable-libz" \
+ || myconf="${myconf} --disable-libz"
+
+ use oggvorbis \
+ && myconf="${myconf} --enable-vorbis" \
+ || myconf="${myconf} --disable-vorbis --disable-oggtest --disable-vorbistest"
+
+ if [ "$MGA" = "NO" ]; then
+ myconf="${myconf} --disable-mga"
+ fi
+
+ if [ "$DMALLOC" = "YES" ]; then
+ myconf="${myconf} --with-dmallocth"
+ fi
+
+ use X \
+ && myconf="${myconf} --with-x --enable-xft" \
+ || myconf="${myconf} --without-x --disable-xft"
+
+ use qt \
+ && myconf="${myconf} --with-qt-prefix=${QTDIR}" \
+ || myconf="${myconf} --without-qt"
+
+ # Rather not use custom ones here .. build should set as high as
+ # safe by itself.
+ unset CFLAGS CXXFLAGS LDFLAGS CC CXX
+
+ # Make sure we include freetype2 headers before freetype1 headers, else Xft2
+ # borks, bug #11941.
+ export C_INCLUDE_PATH="${C_INCLUDE_PATH}:/usr/include/freetype2"
+ export CPLUS_INCLUDE_PATH="${CPLUS_INCLUDE_PATH}:/usr/include/freetype2"
+
+ # Fix qt detection
+ cp configure configure.orig
+ sed -e "s:extern \"C\" void exit(int);:/* extern \"C\" void exit(int); */:" \
+ < configure.orig > configure
+
+ econf \
+ --enable-samples \
+ --disable-vidix \
+ --with-fpic \
+ --with-gnu-ld \
+ ${myconf} || die
+ emake || die
+}
+
+src_install () {
+ dodir /usr/lib /usr/bin
+ use avi && dodir /usr/lib/win32
+
+ einstall || die
+
+ cd ${S}
+ dodoc COPYING README INSTALL
+ cd doc
+ dodoc CREDITS EXCEPTIONS FreeBSD LICENSING TODO
+ dodoc VIDEO-PERFORMANCE WARNINGS KNOWN_BUGS
+}
+
+pkg_postinst() {
+ einfo "In order to use certain video modes, you must be root"
+ einfo "chmod +s /usr/bin/aviplay to suid root"
+ einfo "As this is considered a security risk on multiuser"
+ einfo "systems, this is not done by default"
+}
diff --git a/media-video/avifile/files/avifile-0.7.37.20030522-divx.patch b/media-video/avifile/files/avifile-0.7.37.20030522-divx.patch
new file mode 100644
index 000000000000..42de7c380750
--- /dev/null
+++ b/media-video/avifile/files/avifile-0.7.37.20030522-divx.patch
@@ -0,0 +1,391 @@
+===================================================================
+RCS file: /cvsroot/avifile/avifile-0.6/plugins/libdivx4/divx4.cpp,v
+retrieving revision 1.86
+retrieving revision 1.87
+diff -u -r1.86 -r1.87
+--- avifile/avifile-0.6/plugins/libdivx4/divx4.cpp 2003/05/20 14:41:44 1.86
++++ avifile/avifile-0.6/plugins/libdivx4/divx4.cpp 2003/05/23 23:21:52 1.87
+@@ -32,7 +32,11 @@
+ class DIVX_VideoDecoder: public IVideoDecoder, public IRtConfig
+ {
+ void* m_pDll;
++#if DECORE_VERSION >= 20021112
++ void* m_pHandle;
++#else
+ unsigned long m_ulHandle;
++#endif
+ int m_iLastPPMode;
+ int m_iMaxAuto;
+ int m_iLastBrightness;
+@@ -44,15 +48,28 @@
+ bool m_bFlip;
+ char m_cFormatBuf[128];
+ avm::vector<AttributeInfo> m_YvAttrs;
+- int STDCALL (*m_pDecore)(unsigned long handle, // handle - the handle of the calling entity, must be unique
+- unsigned long dec_opt, // dec_opt - the option for docoding, see below
++#if DECORE_VERSION >= 20021112
++ typedef int STDCALL (*pDecoreFun)(void *handle, // handle - the handle of the calling entity, must be unique
++ int dec_opt, // dec_opt - the option for docoding, see below
+ void *param1, // param1 - the parameter 1 (it's actually meaning depends on dec_opt
+ void *param2); // param2 - the parameter 2 (it's actually meaning depends on dec_opt
+-
++#else
++ typedef int STDCALL (*pDecoreFun)(unsigned long handle, // handle - the handle of the calling entity, must be unique
++ unsigned long dec_opt, // dec_opt - the option for docoding, see below
++ void *param1, // param1 - the parameter 1 (it's actually meaning depends on dec_opt
++ void *param2); // param2 - the parameter 2 (it's actually meaning depends on dec_opt
++#endif
++ pDecoreFun m_pDecore;
+ public:
+ DIVX_VideoDecoder(const CodecInfo& info, const BITMAPINFOHEADER& bh,
+ int flip) :
+- IVideoDecoder(info, bh), m_pDll(0), m_ulHandle(0), m_iLastPPMode(0),
++ IVideoDecoder(info, bh), m_pDll(0),
++#if DECORE_VERSION < 20021112
++ m_ulHandle(0),
++#else
++ m_pHandle(0),
++#endif
++ m_iLastPPMode(0),
+ m_iLastBrightness(0), m_iLastContrast(0), m_iLastSaturation(0),
+ m_bSetFlg(true), m_bFlip(flip)
+ {
+@@ -74,9 +91,7 @@
+ divx4_error_set("can't open %s", divxdecore);
+ return -1;
+ }
+- m_pDecore = (int STDCALL (*)(unsigned long, unsigned long,
+- void *, void *))
+- dlsym(m_pDll, "decore");
++ m_pDecore = (pDecoreFun) dlsym(m_pDll, "decore");
+ if (!m_pDecore)
+ {
+ divx4_error_set("can't resolve %s:decore", divxdecore);
+@@ -142,6 +157,31 @@
+ }
+ virtual int Start()
+ {
++#if DECORE_VERSION >= 20021112
++ DEC_INIT init;
++ memset(&init, 0, sizeof(init));
++ switch(m_Info.fourcc)
++ {
++ case fccDIV3: init.codec_version = 311; break;
++ case fccDIVX: init.codec_version = 412; break;
++ default:
++ case fccDX50: init.codec_version = 500; break;
++ }
++
++ int result=m_pDecore((void*) &m_pHandle, DEC_OPT_INIT, &init, 0);
++ if(result)
++ {
++ divx4_error_set("Error %d creating decoder instance", result);
++ return -1;
++ }
++ assert(m_pHandle);
++ result=m_pDecore(m_pHandle, DEC_OPT_SETOUT, &m_Dest, 0);
++ if(result) // unacceptable color space
++ {
++ divx4_error_set("Error %d setting output", result);
++ return -1;
++ }
++#else /* version < 20021112 */
+ DEC_PARAM param;
+
+ memset(&param, 0, sizeof(param));
+@@ -211,13 +251,19 @@
+ case fccDX50: param.codec_version = 500; break;
+ }
+ param.build_number = 0;
+-#endif
++#endif /* 20020303 */
+ m_ulHandle = (unsigned long) this;
+ m_pDecore(m_ulHandle, DEC_OPT_INIT, &param, m_cFormatBuf);
++#endif /* 20021112 */
+ return 0;
+ }
+ virtual int Stop()
+- {
++ {
++#if DECORE_VERSION >= 20021112
++ if (!m_pHandle)
++ return -1;
++ m_pDecore(m_pHandle, DEC_OPT_RELEASE, 0, 0);
++#else /* 20021112 */
+ if (!m_ulHandle)
+ return -1;
+ #if DECORE_VERSION > 20011009
+@@ -225,17 +271,22 @@
+ // so release memory only with newer versions
+ // and leave the memory leak with the older version
+ m_pDecore(m_ulHandle, DEC_OPT_RELEASE, 0, 0);
+-#else
++#else /* 20011009 */
+ #warning !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ #warning !USING OLD DIVX4 library - memory will be unreleased!
+ #warning !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+-#endif
++#endif /* 20011009 */
++#endif /* 20021112 */
+ PluginSetAttrInt(m_Info, divx4str_saturation, m_iLastSaturation);
+ PluginSetAttrInt(m_Info, divx4str_contrast, m_iLastContrast);
+ PluginSetAttrInt(m_Info, divx4str_brightness, m_iLastBrightness);
+ PluginSetAttrInt(m_Info, divx4str_maxauto, m_iMaxAuto);
+ PluginSetAttrInt(m_Info, divx4str_postprocessing, m_iLastPPMode);
++#if DECORE_VERSION >= 20021112
++ m_pHandle = 0;
++#else
+ m_ulHandle = 0;
++#endif
+ return 0;
+ }
+ virtual int DecodeFrame(CImage* pImage, const void* src, uint_t size,
+@@ -243,14 +294,21 @@
+ CImage** pOut = 0)
+ {
+ DEC_FRAME param;
+-
+- if (!size || !m_ulHandle)
++
++ if (!size ||
++#if DECORE_VERSION >= 20021112
++ !m_pHandle
++#else
++ !m_ulHandle
++#endif
++ )
+ return 0;
+ if (m_Dest.biHeight != pImage->GetFmt()->biHeight)
+ {
+ m_Dest = pImage->GetFmt();
+ Restart();
+ }
++ memset(&param, 0, sizeof(param));
+
+ // leave here for some time - until all users will use new headers
+ param.bitstream = (void*) src;
+@@ -268,10 +326,20 @@
+ param.stride = 0;
+ param.render_flag = 0;
+ }
+-
+ if (m_bSetFlg)
+ {
+ m_bSetFlg = false;
++#if DECORE_VERSION >= 20021112
++ int iSetOperation = DEC_ADJ_SET | DEC_ADJ_POSTPROCESSING;
++ int iPP=m_iLastPPMode * 10;
++ m_pDecore(m_pHandle, DEC_OPT_ADJUST, &iSetOperation, &iPP);
++ iSetOperation = DEC_ADJ_SET | DEC_ADJ_BRIGHTNESS;
++ m_pDecore(m_pHandle, DEC_OPT_ADJUST, &iSetOperation, &m_iLastBrightness);
++ iSetOperation = DEC_ADJ_SET | DEC_ADJ_CONTRAST;
++ m_pDecore(m_pHandle, DEC_OPT_ADJUST, &iSetOperation, &m_iLastContrast);
++ iSetOperation = DEC_ADJ_SET | DEC_ADJ_SATURATION;
++ m_pDecore(m_pHandle, DEC_OPT_ADJUST, &iSetOperation, &m_iLastSaturation);
++#else /* version < 20021112 */
+ DEC_SET set;
+ set.postproc_level = m_iLastPPMode * 10;
+ m_pDecore(m_ulHandle, DEC_OPT_SETPP, &set, 0);
+@@ -279,9 +347,13 @@
+ m_pDecore(m_ulHandle, DEC_OPT_GAMMA, (void*)DEC_GAMMA_BRIGHTNESS, (void*)m_iLastBrightness);
+ m_pDecore(m_ulHandle, DEC_OPT_GAMMA, (void*)DEC_GAMMA_CONTRAST, (void*)m_iLastContrast);
+ m_pDecore(m_ulHandle, DEC_OPT_GAMMA, (void*)DEC_GAMMA_SATURATION, (void*)m_iLastSaturation);
+-#endif
++#endif /* DEC_OPT_GAMMA */
++#endif /* 20021112 */
+ }
+
++#if DECORE_VERSION >= 20021112
++ m_pDecore(m_pHandle, DEC_OPT_FRAME, &param, 0);
++#else /* version < 20021112 */
+ #ifdef USE_311_DECODER
+ #if DECORE_VERSION < 20020303
+ if(m_bCompat311)
+@@ -292,11 +364,12 @@
+ m_pDecore(m_ulHandle, DEC_OPT_FRAME_311, &param, 0);
+ }
+ else
+-#endif
+-#endif
++#endif /* 20020303 */
++#endif /* USE_311_DECODER */
+ {
+ m_pDecore(m_ulHandle, DEC_OPT_FRAME, &param, 0);
+ }
++#endif
+ pImage->SetQuality((float) m_iLastPPMode / DIVX4_MAX_QUALITY);
+
+ return size;
+@@ -324,9 +397,13 @@
+ default:
+ return -1;
+ }
++#if DECORE_VERSION >= 20021112
++ if(m_pHandle)
++ m_pDecore(m_pHandle, DEC_OPT_SETOUT, &m_Dest, 0);
++#else
+ if (m_ulHandle)
+ Restart();
+-
++#endif
+ return 0;
+ }
+ virtual const avm::vector<AttributeInfo>& GetAttrs() const
+@@ -444,6 +521,7 @@
+ (m_Info.fourcc == fccDIVX) ? "DivX4" : "DivX5" );
+ m_obh.biCompression = m_Info.fourcc;
+ m_obh.biHeight = labs(m_obh.biHeight);
++#if ENCORE_VERSION < 5200
+ switch (m_bh.biCompression)
+ {
+ // supports only bottom-up RGB for encoding
+@@ -460,29 +538,60 @@
+ divx4_error_set("Unsupported input format");
+ return -1;
+ }
++#else
++ switch (m_bh.biCompression)
++ {
++ // supports only bottom-up RGB for encoding
++ case 0:
++ if (m_bh.biBitCount != 24) {
++ divx4_error_set("Unsupported input bit depth");
++ return -1;
++ }
++ break;
++ case fccYUY2:
++ case fccYV12:
++ case fccI420:
++ break;
++ default:
++ divx4_error_set("Unsupported input format");
++ return -1;
++ }
++#endif
+ return 0;
+ }
+ virtual int Start()
+ {
++#if ENCORE_MAJOR_VERSION < 5200
+ ENC_PARAM param;
++#else
++ SETTINGS param;
++#endif
+ memset(&param, 0, sizeof(param));
++#if ENCORE_MAJOR_VERSION < 5200
+ param.x_dim=m_bh.biWidth;
+ //param.y_dim=m_bh.biHeight;// labs(m_bh.biHeight);
+ param.y_dim=labs(m_bh.biHeight);
+ param.framerate=30;//frames/sec
+-
++#else
++ param.input_clock = 1000000;
++ param.input_frame_period = 33333;
++#endif
+ PluginGetAttrInt(m_Info, divx4str_bitrate, &param.bitrate);//bits/sec
++#if ENCORE_MAJOR_VERSION < 5200
+ PluginGetAttrInt(m_Info, divx4str_rc_period, &param.rc_period);
+ PluginGetAttrInt(m_Info, divx4str_rc_reaction_period, &param.rc_reaction_period);
+ PluginGetAttrInt(m_Info, divx4str_rc_reaction_ratio, &param.rc_reaction_ratio);
+ PluginGetAttrInt(m_Info, divx4str_max_quantizer, &param.max_quantizer);//just guess
+ PluginGetAttrInt(m_Info, divx4str_min_quantizer, &param.min_quantizer);
++#endif
+ PluginGetAttrInt(m_Info, divx4str_max_key_interval, &param.max_key_interval);
+ PluginGetAttrInt(m_Info, divx4str_quality, &param.quality);
+
+ int deinterlace = 0;
+ int bidirect = 0;
+ int obmc = 0;
++#if ENCORE_MAJOR_VERSION < 5200
++// to be done: all extended parameters of new encore
+ #ifdef IF_SUPPORT_PRO
+ // fast deinterlace
+ PluginGetAttrInt(m_Info, divx4str_deinterlace, &deinterlace);
+@@ -490,16 +599,13 @@
+ PluginGetAttrInt(m_Info, divx4str_bidirect, &bidirect);
+ // flag to enable overlapped block motion compensation mode
+ PluginGetAttrInt(m_Info, divx4str_obmc, &obmc);
+-#endif
++#endif /* IF_SUPPORT_PRO */
+ param.deinterlace = deinterlace;
+ #ifndef ENCORE_MAJOR_VERSION
+ param.use_bidirect = bidirect;
+-#if DECORE_VERSION > 2001009
+ param.obmc = obmc;
+-#endif
+-#else
++#else /* ENCORE_MAJOR_VERSION */
+ memset(&param.extensions, 0, sizeof(param.extensions));
+-
+ #ifdef IF_SUPPORT_PRO
+ param.extensions.use_bidirect = bidirect;
+ param.extensions.obmc = obmc;
+@@ -532,11 +638,13 @@
+ PluginGetAttrInt(m_Info, divx4str_spatial_level, &tmp);
+ param.extensions.spatial_level = tmp / (double) 1000.0;
+
+-#endif // ENCORE_MAJOR_VERSION >= 5010
++#endif /* ENCORE_MAJOR_VERSION >= 5010 */
++
++#endif /* IF_SUPPORT_PRO */
+
+-#endif // IF_SUPPORT_PRO
++#endif /* ENCORE_MAJOR_VERSION */
+
+-#endif // ENCORE_MAJOR_VERSION
++#endif /* 5200 */
+ if (param.quality == 1)
+ {
+ m_bRtMode=true;
+@@ -551,8 +659,17 @@
+ else
+ m_bRtMode=false;
+ // param.flip=1;
++#if ENCORE_MAJOR_VERSION < 5200
+ m_pEncore(0, ENC_OPT_INIT, &param, 0);
+ m_pHandle=param.handle;
++#else
++ int result=m_pEncore((void*)&m_pHandle, ENC_OPT_INIT, &param, &m_bh);
++ if(result!=ENC_OK)
++ {
++ divx4_error_set("Error %d creating encoder", result);
++ return -1;
++ }
++#endif
+ return 0;
+ }
+ virtual int Stop()
+@@ -584,12 +701,16 @@
+ //return -1;
+ }
+ ENC_FRAME param;
++ memset(&param, 0, sizeof(param));
+ ENC_RESULT result;
+ param.bitstream = dest;
++#if ENCORE_MAJOR_VERSION < 5200
+ param.colorspace = m_iCSP;
+- param.image = (ci) ? ci->Data() : (void*) src->Data();
+ param.mvs = 0;
++#endif
++ param.image = (ci) ? ci->Data() : (void*) src->Data();
+ param.length = GetOutputSize();
++#if ENCORE_MAJOR_VERSION < 5200
+ if (m_bRtMode)
+ {
+ param.quant=m_iQuant;
+@@ -598,9 +719,15 @@
+ m_pEncore(m_pHandle, ENC_OPT_ENCODE_VBR, &param, &result);
+ }
+ else
++#endif
+ m_pEncore(m_pHandle, ENC_OPT_ENCODE, &param, &result);
++#if ENCORE_MAJOR_VERSION < 5200
+ if (is_keyframe)
+ *is_keyframe = result.is_key_frame ? 16 : 0;
++#else
++ if (is_keyframe)
++ *is_keyframe = (result.cType == 'I') ? 16 : 0;
++#endif
+ if (size)
+ *size = param.length;
+ if (ci)
diff --git a/media-video/avifile/files/digest-avifile-0.7.37.20030522-r1 b/media-video/avifile/files/digest-avifile-0.7.37.20030522-r1
new file mode 100644
index 000000000000..decb06dd70e4
--- /dev/null
+++ b/media-video/avifile/files/digest-avifile-0.7.37.20030522-r1
@@ -0,0 +1 @@
+MD5 074bd003318128e433dd96a64c80b776 avifile-0.7.37-20030522.tgz 2862210