annotate libmpeg2/mpeg2_internal.h @ 3131:1356a5a69073

packed attribute added
author arpi
date Mon, 26 Nov 2001 01:14:17 +0000
parents b4d0cc1fd14b
children b0d37b8ff4b4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2 * mpeg2_internal.h
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
3 * Copyright (C) 1999-2001 Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
4 *
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
5 * This file is part of mpeg2dec, a free MPEG-2 video stream decoder.
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
6 *
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
7 * mpeg2dec is free software; you can redistribute it and/or modify
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
8 * it under the terms of the GNU General Public License as published by
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
9 * the Free Software Foundation; either version 2 of the License, or
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
10 * (at your option) any later version.
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
11 *
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
12 * mpeg2dec is distributed in the hope that it will be useful,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
15 * GNU General Public License for more details.
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
16 *
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
17 * You should have received a copy of the GNU General Public License
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
18 * along with this program; if not, write to the Free Software
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
20 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
21
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
22 /* macroblock modes */
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
23 #define MACROBLOCK_INTRA 1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
24 #define MACROBLOCK_PATTERN 2
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
25 #define MACROBLOCK_MOTION_BACKWARD 4
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
26 #define MACROBLOCK_MOTION_FORWARD 8
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
27 #define MACROBLOCK_QUANT 16
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
28 #define DCT_TYPE_INTERLACED 32
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
29 /* motion_type */
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
30 #define MOTION_TYPE_MASK (3*64)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
31 #define MOTION_TYPE_BASE 64
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
32 #define MC_FIELD (1*64)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
33 #define MC_FRAME (2*64)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
34 #define MC_16X8 (2*64)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
35 #define MC_DMV (3*64)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
36
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
37 /* picture structure */
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
38 #define TOP_FIELD 1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
39 #define BOTTOM_FIELD 2
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
40 #define FRAME_PICTURE 3
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
41
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
42 /* picture coding type */
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
43 #define I_TYPE 1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
44 #define P_TYPE 2
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
45 #define B_TYPE 3
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
46 #define D_TYPE 4
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
47
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
48 typedef struct motion_s {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
49 uint8_t * ref[2][3];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
50 int pmv[2][2];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
51 int f_code[2];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
52 } motion_t;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
53
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
54 typedef struct vo_frame_s {
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
55 uint8_t * base[3]; /* pointer to 3 planes */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
56 void (* copy) (struct vo_frame_s * frame, uint8_t ** src);
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
57 void* vo;
79
b7b038ee3fde backward-frame rendering by slices
arpi_esp
parents: 49
diff changeset
58 // int slice;
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
59 // void (* field) (struct vo_frame_s * frame, int flags);
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
60 // void (* draw) (struct vo_frame_s * frame);
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
61 // vo_instance_t * instance;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
62 } vo_frame_t;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
63
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
64 typedef struct picture_s {
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
65 /* first, state that carries information from one macroblock to the */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
66 /* next inside a slice, and is never used outside of slice_process() */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
67
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
68 /* DCT coefficients - should be kept aligned ! */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
69 int16_t DCTblock[64];
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
70
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
71 /* bit parsing stuff */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
72 uint32_t bitstream_buf; /* current 32 bit working set of buffer */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
73 int bitstream_bits; /* used bits in working set */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
74 uint8_t * bitstream_ptr; /* buffer with stream data */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
75
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
76 /* Motion vectors */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
77 /* The f_ and b_ correspond to the forward and backward motion */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
78 /* predictors */
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
79 motion_t b_motion;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
80 motion_t f_motion;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
81
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
82 /* predictor for DC coefficients in intra blocks */
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
83 int16_t dc_dct_pred[3];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
84
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
85 int quantizer_scale; /* remove */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
86 int current_field; /* remove */
49
727b1337f951 updated to libmpeg2-0.2.1-CVS
arpi_esp
parents: 41
diff changeset
87 int v_offset; /* remove */
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
88
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
89
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
90 /* now non-slice-specific information */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
91
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
92 /* sequence header stuff */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
93 uint8_t intra_quantizer_matrix [64];
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
94 uint8_t non_intra_quantizer_matrix [64];
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
95
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
96 /* The width and height of the picture snapped to macroblock units */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
97 int coded_picture_width;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
98 int coded_picture_height;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
99
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
100 /* picture header stuff */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
101
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
102 /* what type of picture this is (I, P, B, D) */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
103 int picture_coding_type;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
104
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
105 /* picture coding extension stuff */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
106
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
107 /* quantization factor for intra dc coefficients */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
108 int intra_dc_precision;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
109 /* top/bottom/both fields */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
110 int picture_structure;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
111 /* bool to indicate all predictions are frame based */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
112 int frame_pred_frame_dct;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
113 /* bool to indicate whether intra blocks have motion vectors */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
114 /* (for concealment) */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
115 int concealment_motion_vectors;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
116 /* bit to indicate which quantization table to use */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
117 int q_scale_type;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
118 /* bool to use different vlc tables */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
119 int intra_vlc_format;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
120 /* used for DMV MC */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
121 int top_field_first;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
122
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
123 /* stuff derived from bitstream */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
124
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
125 /* pointer to the zigzag scan we're supposed to be using */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
126 uint8_t * scan;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
127
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
128 struct vo_frame_s * current_frame;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
129 struct vo_frame_s * forward_reference_frame;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
130 struct vo_frame_s * backward_reference_frame;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
131
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
132 int second_field;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
133
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
134 int mpeg1;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
135
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
136 /* these things are not needed by the decoder */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
137 /* this is a temporary interface, we will build a better one later. */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
138 int aspect_ratio_information;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
139 int frame_rate_code;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
140 int progressive_sequence;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
141 int repeat_first_field;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
142 int progressive_frame;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
143 int bitrate;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
144
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
145 // added by A'rpi/ESP-team
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
146 int display_picture_width;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
147 int display_picture_height;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
148 int pp_options;
2196
d5a44e828ae4 mpeg2 fps fix by Ivan Kalvatchev <iive@yahoo.com>
arpi
parents: 2050
diff changeset
149 int display_time;
79
b7b038ee3fde backward-frame rendering by slices
arpi_esp
parents: 49
diff changeset
150
b7b038ee3fde backward-frame rendering by slices
arpi_esp
parents: 49
diff changeset
151 struct vo_frame_s * display_frame;
b7b038ee3fde backward-frame rendering by slices
arpi_esp
parents: 49
diff changeset
152 int slice;
b7b038ee3fde backward-frame rendering by slices
arpi_esp
parents: 49
diff changeset
153
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
154 } picture_t;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
155
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
156 typedef struct mpeg2_config_s {
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
157 /* Bit flags that enable various things */
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
158 uint32_t flags;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
159 } mpeg2_config_t;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
160
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
161 /* The only global variable, */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
162 /* the config struct */
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
163 extern mpeg2_config_t config;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
164
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
165
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
166
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
167 /* slice.c */
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
168 void header_state_init (picture_t * picture);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
169 int header_process_picture_header (picture_t * picture, uint8_t * buffer);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
170 int header_process_sequence_header (picture_t * picture, uint8_t * buffer);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
171 int header_process_extension (picture_t * picture, uint8_t * buffer);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
172
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
173 /* idct.c */
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
174 void idct_init (void);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
175
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
176 /* idct_mlib.c */
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
177 void idct_block_copy_mlib (int16_t * block, uint8_t * dest, int stride);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
178 void idct_block_add_mlib (int16_t * block, uint8_t * dest, int stride);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
179
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
180 /* idct_mmx.c */
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
181 void idct_block_copy_mmxext (int16_t *block, uint8_t * dest, int stride);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
182 void idct_block_add_mmxext (int16_t *block, uint8_t * dest, int stride);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
183 void idct_block_copy_mmx (int16_t *block, uint8_t * dest, int stride);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
184 void idct_block_add_mmx (int16_t *block, uint8_t * dest, int stride);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
185 void idct_mmx_init (void);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
186
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
187 /* motion_comp.c */
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
188 void motion_comp_init (void);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
189
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
190 typedef struct mc_functions_s
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
191 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
192 void (* put [8]) (uint8_t *dst, uint8_t *, int32_t, int32_t);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
193 void (* avg [8]) (uint8_t *dst, uint8_t *, int32_t, int32_t);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
194 } mc_functions_t;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
195
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
196 #define MOTION_COMP_EXTERN(x) mc_functions_t mc_functions_##x = \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
197 { \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
198 {MC_put_16_##x, MC_put_x16_##x, MC_put_y16_##x, MC_put_xy16_##x, \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
199 MC_put_8_##x, MC_put_x8_##x, MC_put_y8_##x, MC_put_xy8_##x}, \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
200 {MC_avg_16_##x, MC_avg_x16_##x, MC_avg_y16_##x, MC_avg_xy16_##x, \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
201 MC_avg_8_##x, MC_avg_x8_##x, MC_avg_y8_##x, MC_avg_xy8_##x} \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
202 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
203
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
204 extern mc_functions_t mc_functions_c;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
205 extern mc_functions_t mc_functions_mmx;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
206 extern mc_functions_t mc_functions_mmxext;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
207 extern mc_functions_t mc_functions_3dnow;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
208 extern mc_functions_t mc_functions_mlib;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
209
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
210 /* slice.c */
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
211 int slice_process (picture_t *picture, uint8_t code, uint8_t * buffer);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
212
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
213 /* stats.c */
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
214 void stats_header (uint8_t code, uint8_t * buffer);
41
0d76b2b962ad added mpeg 1/2 postprocessing
arpi_esp
parents: 36
diff changeset
215
1291
36ed1692c0b8 video codec stuff moved to dec_video.c
arpi
parents: 829
diff changeset
216 void mpeg2_allocate_image_buffers(picture_t * picture);
2050
18f4dd5d568f -Wall warnings fixed
arpi
parents: 1291
diff changeset
217 void mpeg2_free_image_buffers (picture_t * picture);
1291
36ed1692c0b8 video codec stuff moved to dec_video.c
arpi
parents: 829
diff changeset
218
36ed1692c0b8 video codec stuff moved to dec_video.c
arpi
parents: 829
diff changeset
219
41
0d76b2b962ad added mpeg 1/2 postprocessing
arpi_esp
parents: 36
diff changeset
220 #ifdef MPEG12_POSTPROC
2722
b3624c70aba2 MBC->MPEG2_MBC, max image size increased
arpi
parents: 2196
diff changeset
221 #define MPEG2_MBC 120
b3624c70aba2 MBC->MPEG2_MBC, max image size increased
arpi
parents: 2196
diff changeset
222 #define MPEG2_MBR 72
41
0d76b2b962ad added mpeg 1/2 postprocessing
arpi_esp
parents: 36
diff changeset
223 #endif