00001
00002
00003
00004
00005
00006 #define PULLUP_CPU_MMX 1
00007 #define PULLUP_CPU_MMX2 2
00008 #define PULLUP_CPU_3DNOW 4
00009 #define PULLUP_CPU_3DNOWEXT 8
00010 #define PULLUP_CPU_SSE 16
00011 #define PULLUP_CPU_SSE2 32
00012
00013 #define PULLUP_FMT_Y 1
00014 #define PULLUP_FMT_YUY2 2
00015 #define PULLUP_FMT_UYVY 3
00016 #define PULLUP_FMT_RGB32 4
00017
00018 struct pullup_buffer
00019 {
00020 int lock[2];
00021 unsigned char **planes;
00022 };
00023
00024 struct pullup_field
00025 {
00026 int parity;
00027 struct pullup_buffer *buffer;
00028 unsigned int flags;
00029 int breaks;
00030 int affinity;
00031 int *diffs;
00032 int *comb;
00033 int *var;
00034 struct pullup_field *prev, *next;
00035 };
00036
00037 struct pullup_frame
00038 {
00039 int lock;
00040 int length;
00041 int parity;
00042 struct pullup_buffer **ifields, *ofields[2];
00043 struct pullup_buffer *buffer;
00044 };
00045
00046 struct pullup_context
00047 {
00048
00049 int format;
00050 int nplanes;
00051 int *bpp, *w, *h, *stride, *background;
00052 unsigned int cpu;
00053 int junk_left, junk_right, junk_top, junk_bottom;
00054 int verbose;
00055 int metric_plane;
00056 int strict_breaks;
00057 int strict_pairs;
00058
00059 struct pullup_field *first, *last, *head;
00060 struct pullup_buffer *buffers;
00061 int nbuffers;
00062 int (*diff)(unsigned char *, unsigned char *, int);
00063 int (*comb)(unsigned char *, unsigned char *, int);
00064 int (*var)(unsigned char *, unsigned char *, int);
00065 int metric_w, metric_h, metric_len, metric_offset;
00066 struct pullup_frame *frame;
00067 };
00068
00069
00070 struct pullup_buffer *pullup_lock_buffer(struct pullup_buffer *b, int parity);
00071 void pullup_release_buffer(struct pullup_buffer *b, int parity);
00072 struct pullup_buffer *pullup_get_buffer(struct pullup_context *c, int parity);
00073
00074 void pullup_submit_field(struct pullup_context *c, struct pullup_buffer *b, int parity);
00075 void pullup_flush_fields(struct pullup_context *c);
00076
00077 struct pullup_frame *pullup_get_frame(struct pullup_context *c);
00078 void pullup_pack_frame(struct pullup_context *c, struct pullup_frame *fr);
00079 void pullup_release_frame(struct pullup_frame *fr);
00080
00081 struct pullup_context *pullup_alloc_context(void);
00082 void pullup_preinit_context(struct pullup_context *c);
00083 void pullup_init_context(struct pullup_context *c);
00084 void pullup_free_context(struct pullup_context *c);
00085
00086