[XviD-devel] Entry point for encoder

Michael Militzer michael at xvid.org
Mon Jan 16 00:32:45 CET 2006


Hi,

you should communicate with the XviD en- and decoder through the XviD API,
which is defined in the header file xvid.h. Refer to the comments in 
xvid.h for some explanation for the params and data structs. Also see
xvid_encraw.c, which as an example encoder front-end that demonstrates
how to interface with the xvidcore library to implement encoding
functionality.

In more detail: enc_create() is called just once, so that's not the way
to feed in your input. Rather, use the XviD API as defined in xvid.h. The
xvid_enc_frame_t struct allows you to signal new Y,U,V pointers for every
input frame. 

And in order to connect encoder and decoder: you should also do this
using the XviD API. You can use the bitstream output of the encoder
as soon as it finished to encode a frame and use this as input for the
decoder. See xvid_decraw.c as an example how to interface with the XviD
decoder using the XviD API.

Regards,
Michael


Quoting postmaster at itsacon.net:

> Hi everyone.
> For a university project, I'm currently trying to port XviD to a Texas
> Instruments DM642 DSP. This board, to be exactly:
> http://focus.ti.com/docs/toolsw/folders/print/tmdsevm642.html
> 
> I already have the video capture and video out parts, and I'm trying to find
> the
> best way to hook in the decoder.
> My video capture code gives me three pointers to a fram (Y, U & V), and I've
> found that I probably need to hook these into the image queue for the
> enc_encode() function. My first question, what is the best way to do this?
> Can
> I pass them as parameters to an enc_create() call? Or is enc_create only
> called
> once, as an init function, and not every frame? I'm not very clear on this
> part.
> If the second, what IS the right way? For the first parameter of
> enc_encode()
> wants a lot more than only the frame pointers, so do I really need to send
> these again every frame?
> 
> Second, I'm trying to create a loopback device, that is, encode my incoming
> videostream, decode it again and pass it on to de video out.
> What is the 'easiest' way to hook the encoder's output to the decoder's
> input?
> 
> Thank you all in advance,
> 
> Bernard.
> _______________________________________________
> XviD-devel mailing list
> XviD-devel at xvid.org
> http://list.xvid.org/mailman/listinfo/xvid-devel
> 






More information about the XviD-devel mailing list