The "decore" project is now available for linux in the form of a standard library.
The libdivxdecore library will allow any linux developer to take advantage of the OpenDivX decoding engine through an easy-to-use API and quickly enable any application with OpenDivX decoding.
The library is provided as a tar.gz source package, and has no dependencies except that you'll need autoconf, automake and libtool installed in order to compile it.
HOW TO INSTALL:
---------------
Run succesively:
./configure [with the options you want, see ./configure --help]
make
make install (as root if needed)
FILES THAT WILL BE INSTALLED:
-----------------------------
After the installation you will have on your system:
* In $prefix/lib
libdivxdecore.so
libdivxdecore.a
libdivxdecore.la
* In $prefix/include/divx
decore.h
Where prefix is /usr/local by default
HOW TO USE THE DECORE LIBRARY:
------------------------------
The decore.h header has only one function:
int decore(unsigned long handle,
unsigned long dec_opt,
void *param1,
void *param2);
This single function will be the entry point for all your calls.
In addition to that decore.h defines 3 structures:
typedef struct _DEC_PARAM_
{
int x_dim; // x dimension of the frames to be decoded
int y_dim; // y dimension of the frames to be decoded
unsigned long color_depth;
} DEC_PARAM;
typedef struct _DEC_FRAME_
{
void *bmp; // the 24-bit decoded bitmap
void *bitstream; // the decoder buffer
long length; // the lenght of the decoder stream
int render_flag;
} DEC_FRAME;
typedef struct _DEC_SET_
{
int postproc_level; // valid interval are [0..100]
} DEC_SET;
The library will output the video data in YUV12 format (411 planar).
Using all that, a typical decore session will look like: