yading@10: /* yading@10: * This file is part of MPlayer. yading@10: * yading@10: * MPlayer is free software; you can redistribute it and/or modify yading@10: * it under the terms of the GNU General Public License as published by yading@10: * the Free Software Foundation; either version 2 of the License, or yading@10: * (at your option) any later version. yading@10: * yading@10: * MPlayer is distributed in the hope that it will be useful, yading@10: * but WITHOUT ANY WARRANTY; without even the implied warranty of yading@10: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the yading@10: * GNU General Public License for more details. yading@10: * yading@10: * You should have received a copy of the GNU General Public License along yading@10: * with MPlayer; if not, write to the Free Software Foundation, Inc., yading@10: * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. yading@10: */ yading@10: yading@10: #ifndef MPLAYER_PULLUP_H yading@10: #define MPLAYER_PULLUP_H yading@10: yading@10: #define PULLUP_CPU_MMX 1 yading@10: #define PULLUP_CPU_MMX2 2 yading@10: #define PULLUP_CPU_3DNOW 4 yading@10: #define PULLUP_CPU_3DNOWEXT 8 yading@10: #define PULLUP_CPU_SSE 16 yading@10: #define PULLUP_CPU_SSE2 32 yading@10: yading@10: #define PULLUP_FMT_Y 1 yading@10: #define PULLUP_FMT_YUY2 2 yading@10: #define PULLUP_FMT_UYVY 3 yading@10: #define PULLUP_FMT_RGB32 4 yading@10: yading@10: struct pullup_buffer yading@10: { yading@10: int lock[2]; yading@10: unsigned char **planes; yading@10: }; yading@10: yading@10: struct pullup_field yading@10: { yading@10: int parity; yading@10: struct pullup_buffer *buffer; yading@10: unsigned int flags; yading@10: int breaks; yading@10: int affinity; yading@10: int *diffs; yading@10: int *comb; yading@10: int *var; yading@10: struct pullup_field *prev, *next; yading@10: }; yading@10: yading@10: struct pullup_frame yading@10: { yading@10: int lock; yading@10: int length; yading@10: int parity; yading@10: struct pullup_buffer **ifields, *ofields[2]; yading@10: struct pullup_buffer *buffer; yading@10: }; yading@10: yading@10: struct pullup_context yading@10: { yading@10: /* Public interface */ yading@10: int format; yading@10: int nplanes; yading@10: int *bpp, *w, *h, *stride, *background; yading@10: unsigned int cpu; yading@10: int junk_left, junk_right, junk_top, junk_bottom; yading@10: int verbose; yading@10: int metric_plane; yading@10: int strict_breaks; yading@10: int strict_pairs; yading@10: /* Internal data */ yading@10: struct pullup_field *first, *last, *head; yading@10: struct pullup_buffer *buffers; yading@10: int nbuffers; yading@10: int (*diff)(unsigned char *, unsigned char *, int); yading@10: int (*comb)(unsigned char *, unsigned char *, int); yading@10: int (*var)(unsigned char *, unsigned char *, int); yading@10: int metric_w, metric_h, metric_len, metric_offset; yading@10: struct pullup_frame *frame; yading@10: }; yading@10: yading@10: yading@10: struct pullup_buffer *ff_pullup_lock_buffer(struct pullup_buffer *b, int parity); yading@10: void ff_pullup_release_buffer(struct pullup_buffer *b, int parity); yading@10: struct pullup_buffer *ff_pullup_get_buffer(struct pullup_context *c, int parity); yading@10: yading@10: void ff_pullup_submit_field(struct pullup_context *c, struct pullup_buffer *b, int parity); yading@10: void ff_pullup_flush_fields(struct pullup_context *c); yading@10: yading@10: struct pullup_frame *ff_pullup_get_frame(struct pullup_context *c); yading@10: void ff_pullup_pack_frame(struct pullup_context *c, struct pullup_frame *fr); yading@10: void ff_pullup_release_frame(struct pullup_frame *fr); yading@10: yading@10: struct pullup_context *ff_pullup_alloc_context(void); yading@10: void ff_pullup_preinit_context(struct pullup_context *c); yading@10: void ff_pullup_init_context(struct pullup_context *c); yading@10: void ff_pullup_free_context(struct pullup_context *c); yading@10: yading@10: #endif /* MPLAYER_PULLUP_H */