Get rid of nuppelvideo.h and its ugly packed struct and instead write the
[mplayer/glamo.git] / libmpcodecs / pullup.h
blob4b1dbb2d55184f11d9475291873f7f75795c2753
1 #ifndef MPLAYER_PULLUP_H
2 #define MPLAYER_PULLUP_H
4 #define PULLUP_CPU_MMX 1
5 #define PULLUP_CPU_MMX2 2
6 #define PULLUP_CPU_3DNOW 4
7 #define PULLUP_CPU_3DNOWEXT 8
8 #define PULLUP_CPU_SSE 16
9 #define PULLUP_CPU_SSE2 32
11 #define PULLUP_FMT_Y 1
12 #define PULLUP_FMT_YUY2 2
13 #define PULLUP_FMT_UYVY 3
14 #define PULLUP_FMT_RGB32 4
16 struct pullup_buffer
18 int lock[2];
19 unsigned char **planes;
22 struct pullup_field
24 int parity;
25 struct pullup_buffer *buffer;
26 unsigned int flags;
27 int breaks;
28 int affinity;
29 int *diffs;
30 int *comb;
31 int *var;
32 struct pullup_field *prev, *next;
35 struct pullup_frame
37 int lock;
38 int length;
39 int parity;
40 struct pullup_buffer **ifields, *ofields[2];
41 struct pullup_buffer *buffer;
44 struct pullup_context
46 /* Public interface */
47 int format;
48 int nplanes;
49 int *bpp, *w, *h, *stride, *background;
50 unsigned int cpu;
51 int junk_left, junk_right, junk_top, junk_bottom;
52 int verbose;
53 int metric_plane;
54 int strict_breaks;
55 int strict_pairs;
56 /* Internal data */
57 struct pullup_field *first, *last, *head;
58 struct pullup_buffer *buffers;
59 int nbuffers;
60 int (*diff)(unsigned char *, unsigned char *, int);
61 int (*comb)(unsigned char *, unsigned char *, int);
62 int (*var)(unsigned char *, unsigned char *, int);
63 int metric_w, metric_h, metric_len, metric_offset;
64 struct pullup_frame *frame;
68 struct pullup_buffer *pullup_lock_buffer(struct pullup_buffer *b, int parity);
69 void pullup_release_buffer(struct pullup_buffer *b, int parity);
70 struct pullup_buffer *pullup_get_buffer(struct pullup_context *c, int parity);
72 void pullup_submit_field(struct pullup_context *c, struct pullup_buffer *b, int parity);
73 void pullup_flush_fields(struct pullup_context *c);
75 struct pullup_frame *pullup_get_frame(struct pullup_context *c);
76 void pullup_pack_frame(struct pullup_context *c, struct pullup_frame *fr);
77 void pullup_release_frame(struct pullup_frame *fr);
79 struct pullup_context *pullup_alloc_context(void);
80 void pullup_preinit_context(struct pullup_context *c);
81 void pullup_init_context(struct pullup_context *c);
82 void pullup_free_context(struct pullup_context *c);
84 #endif /* MPLAYER_PULLUP_H */