1 /*
2     libfame - Fast Assembly MPEG Encoder Library
3     Copyright (C) 2000-2001  Damien Vincent
4 
5     This library is free software; you can redistribute it and/or
6     modify it under the terms of the GNU Library General Public
7     License as published by the Free Software Foundation; either
8     version 2 of the License, or (at your option) any later version.
9 
10     This library is distributed in the hope that it will be useful,
11     but WITHOUT ANY WARRANTY; without even the implied warranty of
12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13     Library General Public License for more details.
14 
15     You should have received a copy of the GNU Library General Public
16     License along with this library; if not, write to the Free
17     Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 */
19 
20 #ifndef __FAME_DECODER_H
21 #define __FAME_DECODER_H
22 
23 typedef struct _fame_decoder_t_ {
24   FAME_EXTENDS(fame_object_t);
25   void (* init)                (struct _fame_decoder_t_ *decoder,
26 				int width,
27 				int height,
28 				unsigned char *intra_quantisation_table,
29 				unsigned char *inter_quantisation_table,
30 				unsigned char *intra_dc_y_scale_table,
31 				unsigned char *intra_dc_c_scale_table,
32 				fame_mismatch_t mismatch_type);
33   void (* enter)               (struct _fame_decoder_t_ *decoder,
34 				fame_yuv_t **past_ref,
35 				fame_yuv_t **new_ref,
36 				fame_yuv_t **future_ref,
37 				fame_yuv_t *yuv,
38 				unsigned char *shape);
39   void (* reconstruct_intra_mb)(struct _fame_decoder_t_ *decoder,
40 				short x,
41 				short y,
42 				short *blocks[6],
43 				unsigned char q,
44 				fame_bab_t bab_type);
45   void (* reconstruct_inter_mb)(struct _fame_decoder_t_ *decoder,
46 				short x,
47 				short y,
48 				short *blocks[6],
49 				fame_motion_vector_t *forward,
50 				fame_motion_vector_t *backward,
51 				fame_motion_coding_t motion_coding,
52 				unsigned char q,
53 				fame_bab_t bab_type);
54   void (* pad)                 (struct _fame_decoder_t_ *decoder,
55 				unsigned char *bab_map,
56 				fame_box_t *box);
57   void (* interpolate)         (struct _fame_decoder_t_ *decoder,
58 				int rounding);
59   void (* leave)               (struct _fame_decoder_t_ *decoder);
60   void (* close)               (struct _fame_decoder_t_ *decoder);
61 } fame_decoder_t;
62 
63 #define FAME_DECODER(x) ((fame_decoder_t *) x)
64 
65 #endif
66