00001 #ifndef _VIDEO_CODEC_H_
00002 #define _VIDEO_CODEC_H_
00003
00004 #include "al_sending.h"
00005 #include "al_receiving.h"
00006 #include "vid_sim.h"
00007
00008 typedef struct {
00009 al_sending_entity *output;
00010 al_receiving_entity *input;
00011 int bitrate;
00012 char input_file[256];
00013 char output_file[256];
00014
00015 int sequenced;
00016 int retransmit;
00017
00018
00019 char label[256];
00020
00021 int first;
00022
00023 int start_time;
00024
00025 int last_frame;
00026
00027 int done;
00028
00029 int simbuffer;
00030
00031
00032
00033 int headerlength;
00034 int pels;
00035 int cpels;
00036 int lines;
00037 int trace;
00038 int advanced;
00039 int syntax_arith_coding;
00040 int pb_frames;
00041 int mv_outside_frame;
00042 int long_vectors;
00043 float target_framerate;
00044 FILE *tf;
00045
00046
00047
00048 PictImage *prev_image;
00049 PictImage *curr_image;
00050 PictImage *curr_recon;
00051 PictImage *prev_recon;
00052
00053
00054 PictImage *B_recon;
00055 PictImage *B_image;
00056
00057 Pict *pic;
00058 int first_loop_finished;
00059 unsigned char *image;
00060 float mean_frame_rate, ref_frame_rate, frame_rate, seconds;
00061 int total_frames_passed, PPFlag, targetrate;
00062 int frames,bframes,pframes,wcopies,icopies, write_repeated,pdist,bdist;
00063 int start, end, frame_no, writediff;
00064 int first_frameskip, chosen_frameskip, orig_frameskip, frameskip;
00065 int QP,QPI;
00066 Bits *bits;
00067 Bits *total_bits;
00068 Bits *intra_bits;
00069 Results *res;
00070 Results *total_res;
00071 Results *b_res;
00072 char *seqfilename;
00073 char *streamname;
00074 char *outputfile;
00075 char *diff_filename;
00076 char *tracefile;
00077
00078 float DelayBetweenFramesInSeconds;
00079 int CommBacklog;
00080
00081
00082 FILE *streamfile;
00083
00084
00085
00086
00087
00088 float B_prev;
00089 float B_target;
00090 float global_adj;
00091
00092
00093
00094 unsigned char outbfr;
00095 int outcnt;
00096 int bytecnt;
00097
00098
00099
00100 int arith_used;
00101
00102 int tmndecode;
00103 int no_coding;
00104 } video_codec;
00105
00106 video_codec *new_video_codec(char *name);
00107
00108
00109
00110
00111 #endif