Avoid passing test invalid arguments when string is empty.
[mplayer/glamo.git] / libmpcodecs / pullup.h
blob2f5b11994926ad9a441fe7036a995f7d9d5d12aa
3 #define PULLUP_CPU_MMX 1
4 #define PULLUP_CPU_MMX2 2
5 #define PULLUP_CPU_3DNOW 4
6 #define PULLUP_CPU_3DNOWEXT 8
7 #define PULLUP_CPU_SSE 16
8 #define PULLUP_CPU_SSE2 32
10 #define PULLUP_FMT_Y 1
11 #define PULLUP_FMT_YUY2 2
12 #define PULLUP_FMT_UYVY 3
13 #define PULLUP_FMT_RGB32 4
15 struct pullup_buffer
17 int lock[2];
18 unsigned char **planes;
21 struct pullup_field
23 int parity;
24 struct pullup_buffer *buffer;
25 unsigned int flags;
26 int breaks;
27 int affinity;
28 int *diffs;
29 int *comb;
30 int *var;
31 struct pullup_field *prev, *next;
34 struct pullup_frame
36 int lock;
37 int length;
38 int parity;
39 struct pullup_buffer **ifields, *ofields[2];
40 struct pullup_buffer *buffer;
43 struct pullup_context
45 /* Public interface */
46 int format;
47 int nplanes;
48 int *bpp, *w, *h, *stride, *background;
49 unsigned int cpu;
50 int junk_left, junk_right, junk_top, junk_bottom;
51 int verbose;
52 int metric_plane;
53 int strict_breaks;
54 int strict_pairs;
55 /* Internal data */
56 struct pullup_field *first, *last, *head;
57 struct pullup_buffer *buffers;
58 int nbuffers;
59 int (*diff)(unsigned char *, unsigned char *, int);
60 int (*comb)(unsigned char *, unsigned char *, int);
61 int (*var)(unsigned char *, unsigned char *, int);
62 int metric_w, metric_h, metric_len, metric_offset;
63 struct pullup_frame *frame;
67 struct pullup_buffer *pullup_lock_buffer(struct pullup_buffer *b, int parity);
68 void pullup_release_buffer(struct pullup_buffer *b, int parity);
69 struct pullup_buffer *pullup_get_buffer(struct pullup_context *c, int parity);
71 void pullup_submit_field(struct pullup_context *c, struct pullup_buffer *b, int parity);
72 void pullup_flush_fields(struct pullup_context *c);
74 struct pullup_frame *pullup_get_frame(struct pullup_context *c);
75 void pullup_pack_frame(struct pullup_context *c, struct pullup_frame *fr);
76 void pullup_release_frame(struct pullup_frame *fr);
78 struct pullup_context *pullup_alloc_context(void);
79 void pullup_preinit_context(struct pullup_context *c);
80 void pullup_init_context(struct pullup_context *c);
81 void pullup_free_context(struct pullup_context *c);