input: make slave command file descriptors nonblocking
[mplayer/greg.git] / libmpcodecs / pullup.h
blob0db8f6f8948e204882a08442d1a7a118a7edd81d
1 /*
2 * This file is part of MPlayer.
4 * MPlayer is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * MPlayer is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 #ifndef MPLAYER_PULLUP_H
20 #define MPLAYER_PULLUP_H
22 #define PULLUP_CPU_MMX 1
23 #define PULLUP_CPU_MMX2 2
24 #define PULLUP_CPU_3DNOW 4
25 #define PULLUP_CPU_3DNOWEXT 8
26 #define PULLUP_CPU_SSE 16
27 #define PULLUP_CPU_SSE2 32
29 #define PULLUP_FMT_Y 1
30 #define PULLUP_FMT_YUY2 2
31 #define PULLUP_FMT_UYVY 3
32 #define PULLUP_FMT_RGB32 4
34 struct pullup_buffer
36 int lock[2];
37 unsigned char **planes;
40 struct pullup_field
42 int parity;
43 double pts;
44 struct pullup_buffer *buffer;
45 unsigned int flags;
46 int breaks;
47 int affinity;
48 int *diffs;
49 int *comb;
50 int *var;
51 struct pullup_field *prev, *next;
54 struct pullup_frame
56 int lock;
57 int length;
58 int parity;
59 double pts;
60 struct pullup_buffer **ifields, *ofields[2];
61 struct pullup_buffer *buffer;
64 struct pullup_context
66 /* Public interface */
67 int format;
68 int nplanes;
69 int *bpp, *w, *h, *stride, *background;
70 unsigned int cpu;
71 int junk_left, junk_right, junk_top, junk_bottom;
72 int verbose;
73 int metric_plane;
74 int strict_breaks;
75 int strict_pairs;
76 /* Internal data */
77 struct pullup_field *first, *last, *head;
78 struct pullup_buffer *buffers;
79 int nbuffers;
80 int (*diff)(unsigned char *, unsigned char *, int);
81 int (*comb)(unsigned char *, unsigned char *, int);
82 int (*var)(unsigned char *, unsigned char *, int);
83 int metric_w, metric_h, metric_len, metric_offset;
84 struct pullup_frame *frame;
88 struct pullup_buffer *pullup_lock_buffer(struct pullup_buffer *b, int parity);
89 void pullup_release_buffer(struct pullup_buffer *b, int parity);
90 struct pullup_buffer *pullup_get_buffer(struct pullup_context *c, int parity);
92 void pullup_submit_field(struct pullup_context *c, struct pullup_buffer *b,
93 int parity, double pts);
94 void pullup_flush_fields(struct pullup_context *c);
96 struct pullup_frame *pullup_get_frame(struct pullup_context *c);
97 void pullup_pack_frame(struct pullup_context *c, struct pullup_frame *fr);
98 void pullup_release_frame(struct pullup_frame *fr);
100 struct pullup_context *pullup_alloc_context(void);
101 void pullup_preinit_context(struct pullup_context *c);
102 void pullup_init_context(struct pullup_context *c);
103 void pullup_free_context(struct pullup_context *c);
105 #endif /* MPLAYER_PULLUP_H */