yading@10
|
1 /*
|
yading@10
|
2 * This file is part of MPlayer.
|
yading@10
|
3 *
|
yading@10
|
4 * MPlayer is free software; you can redistribute it and/or modify
|
yading@10
|
5 * it under the terms of the GNU General Public License as published by
|
yading@10
|
6 * the Free Software Foundation; either version 2 of the License, or
|
yading@10
|
7 * (at your option) any later version.
|
yading@10
|
8 *
|
yading@10
|
9 * MPlayer is distributed in the hope that it will be useful,
|
yading@10
|
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
yading@10
|
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
yading@10
|
12 * GNU General Public License for more details.
|
yading@10
|
13 *
|
yading@10
|
14 * You should have received a copy of the GNU General Public License along
|
yading@10
|
15 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
|
yading@10
|
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
yading@10
|
17 */
|
yading@10
|
18
|
yading@10
|
19 #ifndef MPLAYER_PULLUP_H
|
yading@10
|
20 #define MPLAYER_PULLUP_H
|
yading@10
|
21
|
yading@10
|
22 #define PULLUP_CPU_MMX 1
|
yading@10
|
23 #define PULLUP_CPU_MMX2 2
|
yading@10
|
24 #define PULLUP_CPU_3DNOW 4
|
yading@10
|
25 #define PULLUP_CPU_3DNOWEXT 8
|
yading@10
|
26 #define PULLUP_CPU_SSE 16
|
yading@10
|
27 #define PULLUP_CPU_SSE2 32
|
yading@10
|
28
|
yading@10
|
29 #define PULLUP_FMT_Y 1
|
yading@10
|
30 #define PULLUP_FMT_YUY2 2
|
yading@10
|
31 #define PULLUP_FMT_UYVY 3
|
yading@10
|
32 #define PULLUP_FMT_RGB32 4
|
yading@10
|
33
|
yading@10
|
34 struct pullup_buffer
|
yading@10
|
35 {
|
yading@10
|
36 int lock[2];
|
yading@10
|
37 unsigned char **planes;
|
yading@10
|
38 };
|
yading@10
|
39
|
yading@10
|
40 struct pullup_field
|
yading@10
|
41 {
|
yading@10
|
42 int parity;
|
yading@10
|
43 struct pullup_buffer *buffer;
|
yading@10
|
44 unsigned int flags;
|
yading@10
|
45 int breaks;
|
yading@10
|
46 int affinity;
|
yading@10
|
47 int *diffs;
|
yading@10
|
48 int *comb;
|
yading@10
|
49 int *var;
|
yading@10
|
50 struct pullup_field *prev, *next;
|
yading@10
|
51 };
|
yading@10
|
52
|
yading@10
|
53 struct pullup_frame
|
yading@10
|
54 {
|
yading@10
|
55 int lock;
|
yading@10
|
56 int length;
|
yading@10
|
57 int parity;
|
yading@10
|
58 struct pullup_buffer **ifields, *ofields[2];
|
yading@10
|
59 struct pullup_buffer *buffer;
|
yading@10
|
60 };
|
yading@10
|
61
|
yading@10
|
62 struct pullup_context
|
yading@10
|
63 {
|
yading@10
|
64 /* Public interface */
|
yading@10
|
65 int format;
|
yading@10
|
66 int nplanes;
|
yading@10
|
67 int *bpp, *w, *h, *stride, *background;
|
yading@10
|
68 unsigned int cpu;
|
yading@10
|
69 int junk_left, junk_right, junk_top, junk_bottom;
|
yading@10
|
70 int verbose;
|
yading@10
|
71 int metric_plane;
|
yading@10
|
72 int strict_breaks;
|
yading@10
|
73 int strict_pairs;
|
yading@10
|
74 /* Internal data */
|
yading@10
|
75 struct pullup_field *first, *last, *head;
|
yading@10
|
76 struct pullup_buffer *buffers;
|
yading@10
|
77 int nbuffers;
|
yading@10
|
78 int (*diff)(unsigned char *, unsigned char *, int);
|
yading@10
|
79 int (*comb)(unsigned char *, unsigned char *, int);
|
yading@10
|
80 int (*var)(unsigned char *, unsigned char *, int);
|
yading@10
|
81 int metric_w, metric_h, metric_len, metric_offset;
|
yading@10
|
82 struct pullup_frame *frame;
|
yading@10
|
83 };
|
yading@10
|
84
|
yading@10
|
85
|
yading@10
|
86 struct pullup_buffer *ff_pullup_lock_buffer(struct pullup_buffer *b, int parity);
|
yading@10
|
87 void ff_pullup_release_buffer(struct pullup_buffer *b, int parity);
|
yading@10
|
88 struct pullup_buffer *ff_pullup_get_buffer(struct pullup_context *c, int parity);
|
yading@10
|
89
|
yading@10
|
90 void ff_pullup_submit_field(struct pullup_context *c, struct pullup_buffer *b, int parity);
|
yading@10
|
91 void ff_pullup_flush_fields(struct pullup_context *c);
|
yading@10
|
92
|
yading@10
|
93 struct pullup_frame *ff_pullup_get_frame(struct pullup_context *c);
|
yading@10
|
94 void ff_pullup_pack_frame(struct pullup_context *c, struct pullup_frame *fr);
|
yading@10
|
95 void ff_pullup_release_frame(struct pullup_frame *fr);
|
yading@10
|
96
|
yading@10
|
97 struct pullup_context *ff_pullup_alloc_context(void);
|
yading@10
|
98 void ff_pullup_preinit_context(struct pullup_context *c);
|
yading@10
|
99 void ff_pullup_init_context(struct pullup_context *c);
|
yading@10
|
100 void ff_pullup_free_context(struct pullup_context *c);
|
yading@10
|
101
|
yading@10
|
102 #endif /* MPLAYER_PULLUP_H */
|