Mercurial > libavcodec.hg
comparison mpegvideo.c @ 1820:98dbb5c7f8cc libavcodec
simplify
author | michael |
---|---|
date | Wed, 18 Feb 2004 22:54:02 +0000 |
parents | 3ea589261c6e |
children | fcbf31baa1af |
comparison
equal
deleted
inserted
replaced
1819:34cdcb221665 | 1820:98dbb5c7f8cc |
---|---|
3443 ptr_y = s->new_picture.data[0] + (mb_y * 16 * wrap_y) + mb_x * 16; | 3443 ptr_y = s->new_picture.data[0] + (mb_y * 16 * wrap_y) + mb_x * 16; |
3444 ptr_cb = s->new_picture.data[1] + (mb_y * 8 * wrap_c) + mb_x * 8; | 3444 ptr_cb = s->new_picture.data[1] + (mb_y * 8 * wrap_c) + mb_x * 8; |
3445 ptr_cr = s->new_picture.data[2] + (mb_y * 8 * wrap_c) + mb_x * 8; | 3445 ptr_cr = s->new_picture.data[2] + (mb_y * 8 * wrap_c) + mb_x * 8; |
3446 | 3446 |
3447 if(mb_x*16+16 > s->width || mb_y*16+16 > s->height){ | 3447 if(mb_x*16+16 > s->width || mb_y*16+16 > s->height){ |
3448 ff_emulated_edge_mc(s->edge_emu_buffer, ptr_y, wrap_y, 16, 16, mb_x*16, mb_y*16, s->width, s->height); | 3448 ff_emulated_edge_mc(s->edge_emu_buffer , ptr_y , wrap_y,16,16,mb_x*16,mb_y*16, s->width , s->height); |
3449 ptr_y= s->edge_emu_buffer; | 3449 ptr_y= s->edge_emu_buffer; |
3450 emu=1; | 3450 ff_emulated_edge_mc(s->edge_emu_buffer+16*wrap_y , ptr_cb, wrap_c, 8, 8, mb_x*8, mb_y*8, s->width>>1, s->height>>1); |
3451 ptr_cb= s->edge_emu_buffer+16*wrap_y; | |
3452 ff_emulated_edge_mc(s->edge_emu_buffer+16*wrap_y+8, ptr_cr, wrap_c, 8, 8, mb_x*8, mb_y*8, s->width>>1, s->height>>1); | |
3453 ptr_cr= s->edge_emu_buffer+16*wrap_y+8; | |
3451 } | 3454 } |
3452 | 3455 |
3453 if (s->mb_intra) { | 3456 if (s->mb_intra) { |
3454 if(s->flags&CODEC_FLAG_INTERLACED_DCT){ | 3457 if(s->flags&CODEC_FLAG_INTERLACED_DCT){ |
3455 int progressive_score, interlaced_score; | 3458 int progressive_score, interlaced_score; |
3477 | 3480 |
3478 if(s->flags&CODEC_FLAG_GRAY){ | 3481 if(s->flags&CODEC_FLAG_GRAY){ |
3479 skip_dct[4]= 1; | 3482 skip_dct[4]= 1; |
3480 skip_dct[5]= 1; | 3483 skip_dct[5]= 1; |
3481 }else{ | 3484 }else{ |
3482 if(emu){ //FIXME move out of loop and fix edge_emu_buffer mess | |
3483 ff_emulated_edge_mc(s->edge_emu_buffer, ptr_cb, wrap_c, 8, 8, mb_x*8, mb_y*8, s->width>>1, s->height>>1); | |
3484 ptr_cb= s->edge_emu_buffer; | |
3485 ff_emulated_edge_mc(s->edge_emu_buffer+8, ptr_cr, wrap_c, 8, 8, mb_x*8, mb_y*8, s->width>>1, s->height>>1); | |
3486 ptr_cr= s->edge_emu_buffer+8; | |
3487 } | |
3488 s->dsp.get_pixels(s->block[4], ptr_cb, wrap_c); | 3485 s->dsp.get_pixels(s->block[4], ptr_cb, wrap_c); |
3489 s->dsp.get_pixels(s->block[5], ptr_cr, wrap_c); | 3486 s->dsp.get_pixels(s->block[5], ptr_cr, wrap_c); |
3490 } | 3487 } |
3491 }else{ | 3488 }else{ |
3492 op_pixels_func (*op_pix)[4]; | 3489 op_pixels_func (*op_pix)[4]; |
3543 | 3540 |
3544 if(s->flags&CODEC_FLAG_GRAY){ | 3541 if(s->flags&CODEC_FLAG_GRAY){ |
3545 skip_dct[4]= 1; | 3542 skip_dct[4]= 1; |
3546 skip_dct[5]= 1; | 3543 skip_dct[5]= 1; |
3547 }else{ | 3544 }else{ |
3548 if(emu){ | |
3549 ff_emulated_edge_mc(s->edge_emu_buffer, ptr_cb, wrap_c, 8, 8, mb_x*8, mb_y*8, s->width>>1, s->height>>1); | |
3550 ptr_cb= s->edge_emu_buffer; | |
3551 ff_emulated_edge_mc(s->edge_emu_buffer+8, ptr_cr, wrap_c, 8, 8, mb_x*8, mb_y*8, s->width>>1, s->height>>1); | |
3552 ptr_cr= s->edge_emu_buffer+8; | |
3553 } | |
3554 s->dsp.diff_pixels(s->block[4], ptr_cb, dest_cb, wrap_c); | 3545 s->dsp.diff_pixels(s->block[4], ptr_cb, dest_cb, wrap_c); |
3555 s->dsp.diff_pixels(s->block[5], ptr_cr, dest_cr, wrap_c); | 3546 s->dsp.diff_pixels(s->block[5], ptr_cr, dest_cr, wrap_c); |
3556 } | 3547 } |
3557 /* pre quantization */ | 3548 /* pre quantization */ |
3558 if(s->current_picture.mc_mb_var[s->mb_stride*mb_y+ mb_x]<2*s->qscale*s->qscale){ | 3549 if(s->current_picture.mc_mb_var[s->mb_stride*mb_y+ mb_x]<2*s->qscale*s->qscale){ |