r1009: Move the dependencies to newer package names
[cinelerra_cv/mob.git] / quicktime / encore50 / encore.h
blob9caf138610ba1fc5ec69d0f440f61f3e9d9900f2
2 // This is the header file describing
3 // the entrance function of the encoder core
4 // or the encore ...
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
10 typedef struct _ENC_PARAM_ {
11 int x_dim; // the x dimension of the frames to be encoded
12 int y_dim; // the y dimension of the frames to be encoded
13 float framerate;// the frame rate of the sequence to be encoded
14 long bitrate; // the bitrate of the target encoded stream
15 long rc_period; // the intended rate control averaging period
16 long rc_reaction_period; // the reation period for rate control
17 long rc_reaction_ratio; // the ratio for down/up rate control
18 long max_key_interval; // the maximum interval between key frames
19 int max_quantizer; // the upper limit of the quantizer
20 int min_quantizer; // the lower limit of the quantizer
21 int search_range; // the forward search range for motion estimation
22 } ENC_PARAM;
24 typedef struct _ENC_FRAME_ {
25 void *image; // the image frame to be encoded
26 void *bitstream;// the buffer for encoded bitstream
27 long length; // the length of the encoded bitstream
28 int quant;
29 } ENC_FRAME;
31 typedef struct _ENC_RESULT_ {
32 int isKeyFrame; // the current frame is encoded as a key frame
33 } ENC_RESULT;
35 // the prototype of the encore() - main encode engine entrance
36 int encore(
37 unsigned long handle, // handle - the handle of the calling entity, must be unique
38 unsigned long enc_opt, // enc_opt - the option for encoding, see below
39 void *param1, // param1 - the parameter 1 (its actually meaning depends on enc_opt
40 void *param2); // param2 - the parameter 2 (its actually meaning depends on enc_opt
42 // encore options (the enc_opt parameter of encore())
43 #define ENC_OPT_WRITE 1024 // write the reconstruct image to files (for debuging)
44 #define ENC_OPT_INIT 32768 // initialize the encoder for an handle
45 #define ENC_OPT_RELEASE 65536 // release all the resource associated with the handle
47 // return code of encore()
48 #define ENC_OK 0
49 #define ENC_MEMORY 1
50 #define ENC_BAD_FORMAT 2
53 // Set global variables for an encoding session
54 void encore_set_global(ENC_PARAM *param);
56 #ifdef __cplusplus
58 #endif