annotate libmpeg2/mpeg2_internal.h @ 9388:d6a1ab009794

update of links regarding tech/ dir
author nicolas
date Mon, 10 Feb 2003 18:56:03 +0000
parents a57c1fc0c2fc
children 47984e3f54ce
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;
5468
arpi
parents: 2756
diff changeset
58 void* mpi;
5515
0cdc1388f02f quant_store moved to frame struct
arpi
parents: 5468
diff changeset
59 #ifdef MPEG12_POSTPROC
0cdc1388f02f quant_store moved to frame struct
arpi
parents: 5468
diff changeset
60 #define MPEG2_MBC 120
0cdc1388f02f quant_store moved to frame struct
arpi
parents: 5468
diff changeset
61 #define MPEG2_MBR 72
7984
a57c1fc0c2fc change qscale type to int8 and fix qscale ordering
michael
parents: 5515
diff changeset
62 int8_t quant_store[MPEG2_MBR+1][MPEG2_MBC+1];
5515
0cdc1388f02f quant_store moved to frame struct
arpi
parents: 5468
diff changeset
63 #endif
0cdc1388f02f quant_store moved to frame struct
arpi
parents: 5468
diff changeset
64
79
b7b038ee3fde backward-frame rendering by slices
arpi_esp
parents: 49
diff changeset
65 // int slice;
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
66 // void (* field) (struct vo_frame_s * frame, int flags);
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
67 // void (* draw) (struct vo_frame_s * frame);
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
68 // vo_instance_t * instance;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
69 } vo_frame_t;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
70
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
71 typedef struct picture_s {
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
72 /* first, state that carries information from one macroblock to the */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
73 /* next inside a slice, and is never used outside of slice_process() */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
74
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
75 /* DCT coefficients - should be kept aligned ! */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
76 int16_t DCTblock[64];
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
77
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
78 /* bit parsing stuff */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
79 uint32_t bitstream_buf; /* current 32 bit working set of buffer */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
80 int bitstream_bits; /* used bits in working set */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
81 uint8_t * bitstream_ptr; /* buffer with stream data */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
82
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
83 /* Motion vectors */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
84 /* The f_ and b_ correspond to the forward and backward motion */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
85 /* predictors */
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
86 motion_t b_motion;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
87 motion_t f_motion;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
88
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
89 /* predictor for DC coefficients in intra blocks */
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
90 int16_t dc_dct_pred[3];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
91
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
92 int quantizer_scale; /* remove */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
93 int current_field; /* remove */
49
727b1337f951 updated to libmpeg2-0.2.1-CVS
arpi_esp
parents: 41
diff changeset
94 int v_offset; /* remove */
36
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
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
97 /* now non-slice-specific information */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
98
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
99 /* sequence header stuff */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
100 uint8_t intra_quantizer_matrix [64];
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
101 uint8_t non_intra_quantizer_matrix [64];
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
102
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
103 /* The width and height of the picture snapped to macroblock units */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
104 int coded_picture_width;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
105 int coded_picture_height;
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 /* picture header stuff */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
108
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
109 /* what type of picture this is (I, P, B, D) */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
110 int picture_coding_type;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
111
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
112 /* picture coding extension stuff */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
113
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
114 /* quantization factor for intra dc coefficients */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
115 int intra_dc_precision;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
116 /* top/bottom/both fields */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
117 int picture_structure;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
118 /* bool to indicate all predictions are frame based */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
119 int frame_pred_frame_dct;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
120 /* bool to indicate whether intra blocks have motion vectors */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
121 /* (for concealment) */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
122 int concealment_motion_vectors;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
123 /* bit to indicate which quantization table to use */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
124 int q_scale_type;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
125 /* bool to use different vlc tables */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
126 int intra_vlc_format;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
127 /* used for DMV MC */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
128 int top_field_first;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
129
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
130 /* stuff derived from bitstream */
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 /* pointer to the zigzag scan we're supposed to be using */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
133 uint8_t * scan;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
134
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
135 struct vo_frame_s * current_frame;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
136 struct vo_frame_s * forward_reference_frame;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
137 struct vo_frame_s * backward_reference_frame;
5468
arpi
parents: 2756
diff changeset
138 struct vo_frame_s * temp_frame; // B frame
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
139
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
140 int second_field;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
141
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
142 int mpeg1;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
143
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
144 /* these things are not needed by the decoder */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
145 /* this is a temporary interface, we will build a better one later. */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
146 int aspect_ratio_information;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
147 int frame_rate_code;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
148 int progressive_sequence;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
149 int repeat_first_field;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
150 int progressive_frame;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
151 int bitrate;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
152
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
153 // added by A'rpi/ESP-team
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
154 int display_picture_width;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
155 int display_picture_height;
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
156 int pp_options;
2196
d5a44e828ae4 mpeg2 fps fix by Ivan Kalvatchev <iive@yahoo.com>
arpi
parents: 2050
diff changeset
157 int display_time;
79
b7b038ee3fde backward-frame rendering by slices
arpi_esp
parents: 49
diff changeset
158
b7b038ee3fde backward-frame rendering by slices
arpi_esp
parents: 49
diff changeset
159 struct vo_frame_s * display_frame;
b7b038ee3fde backward-frame rendering by slices
arpi_esp
parents: 49
diff changeset
160 int slice;
b7b038ee3fde backward-frame rendering by slices
arpi_esp
parents: 49
diff changeset
161
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
162 } picture_t;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
163
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
164 typedef struct mpeg2_config_s {
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
165 /* Bit flags that enable various things */
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
166 uint32_t flags;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
167 } mpeg2_config_t;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
168
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
169 /* The only global variable, */
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
170 /* the config struct */
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
171 extern mpeg2_config_t config;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
172
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
173
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
174
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
175 /* slice.c */
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
176 void header_state_init (picture_t * picture);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
177 int header_process_picture_header (picture_t * picture, uint8_t * buffer);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
178 int header_process_sequence_header (picture_t * picture, uint8_t * buffer);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
179 int header_process_extension (picture_t * picture, uint8_t * buffer);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
180
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
181 /* idct.c */
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
182 void idct_init (void);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
183
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
184 /* idct_mlib.c */
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
185 void idct_block_copy_mlib (int16_t * block, uint8_t * dest, int stride);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
186 void idct_block_add_mlib (int16_t * block, uint8_t * dest, int stride);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
187
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
188 /* idct_mmx.c */
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
189 void idct_block_copy_mmxext (int16_t *block, uint8_t * dest, int stride);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
190 void idct_block_add_mmxext (int16_t *block, uint8_t * dest, int stride);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
191 void idct_block_copy_mmx (int16_t *block, uint8_t * dest, int stride);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
192 void idct_block_add_mmx (int16_t *block, uint8_t * dest, int stride);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
193 void idct_mmx_init (void);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
194
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
195 /* motion_comp.c */
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
196 void motion_comp_init (void);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
197
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
198 typedef struct mc_functions_s
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
199 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
200 void (* put [8]) (uint8_t *dst, uint8_t *, int32_t, int32_t);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
201 void (* avg [8]) (uint8_t *dst, uint8_t *, int32_t, int32_t);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
202 } mc_functions_t;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
203
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
204 #define MOTION_COMP_EXTERN(x) mc_functions_t mc_functions_##x = \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
205 { \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
206 {MC_put_16_##x, MC_put_x16_##x, MC_put_y16_##x, MC_put_xy16_##x, \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
207 MC_put_8_##x, MC_put_x8_##x, MC_put_y8_##x, MC_put_xy8_##x}, \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
208 {MC_avg_16_##x, MC_avg_x16_##x, MC_avg_y16_##x, MC_avg_xy16_##x, \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
209 MC_avg_8_##x, MC_avg_x8_##x, MC_avg_y8_##x, MC_avg_xy8_##x} \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
210 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
211
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
212 extern mc_functions_t mc_functions_c;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
213 extern mc_functions_t mc_functions_mmx;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
214 extern mc_functions_t mc_functions_mmxext;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
215 extern mc_functions_t mc_functions_3dnow;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
216 extern mc_functions_t mc_functions_mlib;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
217
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
218 /* slice.c */
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
219 int slice_process (picture_t *picture, uint8_t code, uint8_t * buffer);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
220
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
221 /* stats.c */
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
222 void stats_header (uint8_t code, uint8_t * buffer);
41
0d76b2b962ad added mpeg 1/2 postprocessing
arpi_esp
parents: 36
diff changeset
223
1291
36ed1692c0b8 video codec stuff moved to dec_video.c
arpi
parents: 829
diff changeset
224 void mpeg2_allocate_image_buffers(picture_t * picture);
2050
18f4dd5d568f -Wall warnings fixed
arpi
parents: 1291
diff changeset
225 void mpeg2_free_image_buffers (picture_t * picture);
1291
36ed1692c0b8 video codec stuff moved to dec_video.c
arpi
parents: 829
diff changeset
226
36ed1692c0b8 video codec stuff moved to dec_video.c
arpi
parents: 829
diff changeset
227