comparison mpegvideo.c @ 1848:c72589baee53 libavcodec

initial chroma_format changes,xvmc tweaks and codec_cap
author iive
date Mon, 01 Mar 2004 14:55:21 +0000
parents cea4f1a80059
children 07a4c1c4b929
comparison
equal deleted inserted replaced
1847:ef661c4dc5a6 1848:c72589baee53
265 ff_init_scantable(s->dsp.idct_permutation, &s->intra_scantable , ff_zigzag_direct); 265 ff_init_scantable(s->dsp.idct_permutation, &s->intra_scantable , ff_zigzag_direct);
266 } 266 }
267 ff_init_scantable(s->dsp.idct_permutation, &s->intra_h_scantable, ff_alternate_horizontal_scan); 267 ff_init_scantable(s->dsp.idct_permutation, &s->intra_h_scantable, ff_alternate_horizontal_scan);
268 ff_init_scantable(s->dsp.idct_permutation, &s->intra_v_scantable, ff_alternate_vertical_scan); 268 ff_init_scantable(s->dsp.idct_permutation, &s->intra_v_scantable, ff_alternate_vertical_scan);
269 269
270 s->picture_structure= PICT_FRAME;
271
272 return 0; 270 return 0;
273 } 271 }
274 272
275 static void copy_picture(Picture *dst, Picture *src){ 273 static void copy_picture(Picture *dst, Picture *src){
276 *dst = *src; 274 *dst = *src;
422 CHECKED_ALLOCZ(s->me.score_map, ME_MAP_SIZE*sizeof(uint32_t)) 420 CHECKED_ALLOCZ(s->me.score_map, ME_MAP_SIZE*sizeof(uint32_t))
423 if(s->avctx->noise_reduction){ 421 if(s->avctx->noise_reduction){
424 CHECKED_ALLOCZ(s->dct_error_sum, 2 * 64 * sizeof(int)) 422 CHECKED_ALLOCZ(s->dct_error_sum, 2 * 64 * sizeof(int))
425 } 423 }
426 } 424 }
427 CHECKED_ALLOCZ(s->blocks, 64*6*2 * sizeof(DCTELEM)) 425 CHECKED_ALLOCZ(s->blocks, 64*12*2 * sizeof(DCTELEM))
428 s->block= s->blocks[0]; 426 s->block= s->blocks[0];
429 427
430 for(i=0;i<12;i++){ 428 for(i=0;i<12;i++){
431 s->pblocks[i] = (short *)(&s->block[i]); 429 s->pblocks[i] = (short *)(&s->block[i]);
432 } 430 }
537 s->block_wrap[5]= s->mb_width + 2; 535 s->block_wrap[5]= s->mb_width + 2;
538 536
539 s->y_dc_scale_table= 537 s->y_dc_scale_table=
540 s->c_dc_scale_table= ff_mpeg1_dc_scale_table; 538 s->c_dc_scale_table= ff_mpeg1_dc_scale_table;
541 s->chroma_qscale_table= ff_default_chroma_qscale_table; 539 s->chroma_qscale_table= ff_default_chroma_qscale_table;
542 if (!s->encoding) 540 if( s->codec_id != CODEC_ID_MPEG1VIDEO &&
543 s->progressive_sequence= 1; 541 s->codec_id != CODEC_ID_MPEG2VIDEO)
544 s->progressive_frame= 1; 542 {
543 /* default structure is frame */
544 s->progressive_frame= 1;
545 s->picture_structure= PICT_FRAME;
546
547 s->y_dc_scale_table=
548 s->c_dc_scale_table= ff_mpeg1_dc_scale_table;
549 if (!s->encoding)
550 s->progressive_sequence= 1;
551 }
545 s->coded_picture_number = 0; 552 s->coded_picture_number = 0;
546 553
547 y_size = (2 * s->mb_width + 2) * (2 * s->mb_height + 2); 554 y_size = (2 * s->mb_width + 2) * (2 * s->mb_height + 2);
548 c_size = (s->mb_width + 2) * (s->mb_height + 2); 555 c_size = (s->mb_width + 2) * (s->mb_height + 2);
549 yc_size = y_size + 2 * c_size; 556 yc_size = y_size + 2 * c_size;