|
NAMEfame_init - initialize the fame librarySYNOPSIS#include <fame.h> fame_context_t * fame_init(fame_context_t *context, fame_parameters_t *parameters, unsigned char *buffer, unsigned int size); ); DESCRIPTIONThe fame_init() call is used to open and initialize the fame library.context is the context handle previously returned by fame_open parameters is a fame_parameters_t structure as specified in fame.h: typedef struct _fame_parameters_ { width and height specify the size of each frames of the video sequence. Both must be multiple of 16. width and height must be less than 4096x4096 coding is a string of I, P or B characters representing the sequence of frames the encoder must produce. I frames are intra-coded frames (similar to JPEG), whereas P and B frames are motion compressed, respectively predicted from past reference (I or P) frame, or bidirectionally predicted from past and future reference frame. quality is a percentage, which controls compression versus quality. slices_per_frame is the number of frame slices per frame. More slices provide better error recovery. There must be at least one slice per frame, and at most height / 16 frames_per_sequence is the maximum number of frames contained in a video sequence. frame_rate_num/frame_rate_den specify the number of frames per second for playback. shape_quality is percentage determing the average binary shape accuracy in video with arbitrary shape. search_range specifies the motion estimation search range in pixel unit. Small search ranges work best with slow motion videos, whereas larger search ranges are rather for fast motion videos. verbose when set to 1 outputs information on copyright, modules used and current frame on standard error. buffer is the buffer where encoded data will be written to. It must be large enough to contain a few frames. size specifies the length of the buffer. RETURN VALUEfame_init return a new context, or NULL if an error occurred.BUGSbuffer must be large enough to contain encoded data. There is no checking of buffer overflow as this would be too slow. Encoding of B frame is not yet supported.SEE ALSOfame_encode_frame(3), fame_close(3)
Visit the GSP FreeBSD Man Page Interface. |