Mercurial > libavcodec.hg
comparison mpegvideo.c @ 726:a91203b34e71 libavcodec
moved dct init out from mpv_common_init to dct_common_init (for less-uglier way for dv)
author | al3x |
---|---|
date | Fri, 04 Oct 2002 20:59:29 +0000 |
parents | 71f669e9f633 |
children | b24ea84b23e2 |
comparison
equal
deleted
inserted
replaced
725:eac6c71ef30f | 726:a91203b34e71 |
---|---|
177 { | 177 { |
178 j_rev_dct (block); | 178 j_rev_dct (block); |
179 add_pixels_clamped(block, dest, line_size); | 179 add_pixels_clamped(block, dest, line_size); |
180 } | 180 } |
181 | 181 |
182 /* init common structure for both encoder and decoder */ | 182 /* init common dct for both encoder and decoder */ |
183 int MPV_common_init(MpegEncContext *s) | 183 int DCT_common_init(MpegEncContext *s) |
184 { | 184 { |
185 int c_size, i; | 185 int i; |
186 UINT8 *pict; | |
187 | 186 |
188 s->dct_unquantize_h263 = dct_unquantize_h263_c; | 187 s->dct_unquantize_h263 = dct_unquantize_h263_c; |
189 s->dct_unquantize_mpeg1 = dct_unquantize_mpeg1_c; | 188 s->dct_unquantize_mpeg1 = dct_unquantize_mpeg1_c; |
190 s->dct_unquantize_mpeg2 = dct_unquantize_mpeg2_c; | 189 s->dct_unquantize_mpeg2 = dct_unquantize_mpeg2_c; |
191 s->dct_quantize= dct_quantize_c; | 190 s->dct_quantize= dct_quantize_c; |
217 MPV_common_init_mlib(s); | 216 MPV_common_init_mlib(s); |
218 #endif | 217 #endif |
219 #ifdef HAVE_MMI | 218 #ifdef HAVE_MMI |
220 MPV_common_init_mmi(s); | 219 MPV_common_init_mmi(s); |
221 #endif | 220 #endif |
222 | |
223 | 221 |
224 /* load & permutate scantables | 222 /* load & permutate scantables |
225 note: only wmv uses differnt ones | 223 note: only wmv uses differnt ones |
226 */ | 224 */ |
227 ff_init_scantable(s, &s->inter_scantable , ff_zigzag_direct); | 225 ff_init_scantable(s, &s->inter_scantable , ff_zigzag_direct); |
228 ff_init_scantable(s, &s->intra_scantable , ff_zigzag_direct); | 226 ff_init_scantable(s, &s->intra_scantable , ff_zigzag_direct); |
229 ff_init_scantable(s, &s->intra_h_scantable, ff_alternate_horizontal_scan); | 227 ff_init_scantable(s, &s->intra_h_scantable, ff_alternate_horizontal_scan); |
230 ff_init_scantable(s, &s->intra_v_scantable, ff_alternate_vertical_scan); | 228 ff_init_scantable(s, &s->intra_v_scantable, ff_alternate_vertical_scan); |
229 | |
230 return 0; | |
231 } | |
232 | |
233 /* init common structure for both encoder and decoder */ | |
234 int MPV_common_init(MpegEncContext *s) | |
235 { | |
236 int c_size, i; | |
237 UINT8 *pict; | |
238 | |
239 DCT_common_init(s); | |
231 | 240 |
232 s->mb_width = (s->width + 15) / 16; | 241 s->mb_width = (s->width + 15) / 16; |
233 s->mb_height = (s->height + 15) / 16; | 242 s->mb_height = (s->height + 15) / 16; |
234 | 243 |
235 /* set default edge pos, will be overriden in decode_header if needed */ | 244 /* set default edge pos, will be overriden in decode_header if needed */ |