+ added a protection flag XVID_SAFE_BS_TAIL for not reading
more than 4byte past the end of the input buffer. This is
disabled by default (because slow), and 8byte-padding of input
buffer should be a prefered solution in case of problem.
Please cross-check i didn't break something.
Thanks to Liang Jian ( jianliang79 at gmail dot com ) for
pointing out the problem.

+ removed the x_Ref%4 in qpel.h, in favor of x_Ref>>2.
As suggested by Gruel, there might be a compiler
problem for some very very exotic platform.
Hence, i've added a test_compiler() in xvid_bench.c, to
be sure everything are ok. Hope the test is correct.
+ added benches for interlaced decoding, as supplied
by Christoph KÃ¼hnel (info at intek-darmstadt dot de).
Thanks a lot.

> > - uint32_t intra_dc_threshold; /* fake variable */
> > + int intra_dc_threshold; /* fake variable */
This patch fixes a warning spotted by gcc 4.0.1, because &intra_dc_threshold
is passed to some function which expects a int*, not a uint32_t* (on 64bit this
is important, even if this is fake data, the callee could corrupt the stack
writing 64bit to a 32bit allocated destination)

Field interlaced decoding, contributed by Christoph Kuehnel
decoder.c
=========
- Some new defines for DIV
- <decoder_mb_decode> modified: had wrong address offsets for interlaced
- <decoder_mbinter_field> = new function for interlaced
- <get_motion_vector_interlaced> = new function for interlaced motion vector prediction
- <decoder_pframe> modified so that it differs between frame and field prediction
global.h
========
- For field motion prediction MACORBLOCK has new member that is the average of
field1 and field2 motion vector = <mvs_avg>
xvid.c
======
- For field predicted macroblocks we need new field oriented transfer functions.
For colour calculations they may only process 4 lines (one field from the colour
macroblock that is 8x8). So I introduced 4 new function pointers:
<transfer8x4_copy, interpolate8x4_ ...)
mbcoding.c
==========
- _DEBUG code; index is checked against 64
interpolate8x8.[c,h,asm]
===========================
- New 8x4 functions
mbpredicition.[c,h]
===============
- New function <get_pmv2_interlaced> for interlaced prediciton according to spec
mem_transfer.[c,h,asm]
==============
- New 8x4 function

+ Aligned local arrays in test_transfer() of xvid_bench.c
+ optimized the C-version of mem_transfer.c. You can activate
the new code by commenting out the "#define USE_REFERENCE_C"
at the beginning of the source file.

encoder.c: simplify_time() optimized by Euclid.
bitstream.c: write_video_packet_header() was buggy and
kind of obfuscated, as noticed by Sigdrak at free.fr.
from Edouard:
gcc4 warning removal.
- No executable shared objects installed
(Do not install the lib as executable. It's no use as the SO has no
main symbol anyway, and the static lib is not runnable anyway.)
- Statically link xvid_bench with libxvidcore.a
- New autoconf garbage removal
- Quotes in configure.in

- New lambda tables for R-D motion search. The old tables were obviously
taken from h.264, which uses a logarithmic quantizer scale. This lead to
bad results at very low bit-rates. With this patch, compression efficiency
at low bit-rates is greatly improved.

I made all these changes on my own working copy until i had
something really usable wihtout regressions for most users.
I think its place is now in CVS. Here is a ChangeLog summary
generated from my local patches.
base-0
Imported xvidcore 0.9.0 into arch repository
patch-1
Updated to current stable CVS_HEAD
patch-2
Changed build system for Unix OSes
patch-3
Fixes for the new build system in sources.
patch-4
Fixed options and added the --disable-assembly option
patch-5
Fixed a BSD checking in nasm output format.
patch-6
Fixed the "ar" "s" option for some platforms.
patch-7
Changed the way I add strings into variables.
patch-8
Fixed portab.h for _DEBUG target and GCC/ICC compilers.
patch-9
Added Altivec detection (Guillaume Morin)
patch-10
Fixed MacOSX build.
patch-11
Fixed WIN32/_MSC_VER confusion and updated MSVC libxvidcore.dsp project file.
patch-12
DivX4 compatibility layer has been turned into an option (default:disable).
ToDo:
- Fix IA64 assembly file selection.
- Do I disable PPC assembly code ? (according to Guillaume, it needs to be updated)

Added several MB-functions which do the same as MBTransQuantInter/Intra now,
but split into several routines. MBTransQuantInter2/Intra2 do the same as
-Inter/Intra but using the split up routines, MBTransQuantBVOP skips unneeded
decoding operations for B-VOPs.

Interpolated and DirectMode motion estimation (DiamondSearch) for B-Frames.
Slow, but working, this might have been the final step to a complete
implemenation of b-frame encoding. Btw... it's 5.a.m so don't trust
this CVS entry!

Added #ifdef _DISABLE_SKIP in MBCoding(). If this is defined, there
will be __no skipped macroblocks__ in P-frames!
This is of course bad (bigger files), but it's needed for clean B-frame
encoding until we have a workaround for the SKIP-flaw in the standard. :-(

ProfDrMorph's new (unoptimized) Luma Masking code:
luminance masking now works with relative values instead of absolute ones
the new code raises/lowers oberall quant for especially bright/dark frames ( Weber-Fechner law: humans see less differences in bright scenes )
every pixel with a very low lumi value is set to 0 for better compressability ( again the Weber-Fechner law; below a certain intesity humans won't see anything )

- Added quiet_encore symbol so transcode can use XviD with its divx4 API
- Added comments
- Added possible ToDos and pointed out 2 major problems :
+ Reentrance
+ the quality setting for the encoder part