comparison mpegvideo_common.h @ 8596:68e959302527 libavcodec

replace all occurrence of ENABLE_ by the corresponding CONFIG_, HAVE_ or ARCH_ and remove all ENABLE_ definitions.
author aurel
date Wed, 14 Jan 2009 17:19:17 +0000
parents 7a463923ecd1
children 04423b2f6e0b
comparison
equal deleted inserted replaced
8595:2f476018b4ac 8596:68e959302527
101 }else{ 101 }else{
102 s->dsp.put_pixels_tab [0][dxy](dest_y, ptr, linesize, 16); 102 s->dsp.put_pixels_tab [0][dxy](dest_y, ptr, linesize, 16);
103 } 103 }
104 } 104 }
105 105
106 if(ENABLE_GRAY && s->flags&CODEC_FLAG_GRAY) return; 106 if(CONFIG_GRAY && s->flags&CODEC_FLAG_GRAY) return;
107 107
108 motion_x= s->sprite_offset[1][0]; 108 motion_x= s->sprite_offset[1][0];
109 motion_y= s->sprite_offset[1][1]; 109 motion_y= s->sprite_offset[1][1];
110 src_x = s->mb_x * 8 + (motion_x >> (s->sprite_warping_accuracy+1)); 110 src_x = s->mb_x * 8 + (motion_x >> (s->sprite_warping_accuracy+1));
111 src_y = s->mb_y * 8 + (motion_y >> (s->sprite_warping_accuracy+1)); 111 src_y = s->mb_y * 8 + (motion_y >> (s->sprite_warping_accuracy+1));
170 s->sprite_delta[0][0], s->sprite_delta[0][1], 170 s->sprite_delta[0][0], s->sprite_delta[0][1],
171 s->sprite_delta[1][0], s->sprite_delta[1][1], 171 s->sprite_delta[1][0], s->sprite_delta[1][1],
172 a+1, (1<<(2*a+1)) - s->no_rounding, 172 a+1, (1<<(2*a+1)) - s->no_rounding,
173 s->h_edge_pos, s->v_edge_pos); 173 s->h_edge_pos, s->v_edge_pos);
174 174
175 if(ENABLE_GRAY && s->flags&CODEC_FLAG_GRAY) return; 175 if(CONFIG_GRAY && s->flags&CODEC_FLAG_GRAY) return;
176 176
177 ox= s->sprite_offset[1][0] + s->sprite_delta[0][0]*s->mb_x*8 + s->sprite_delta[0][1]*s->mb_y*8; 177 ox= s->sprite_offset[1][0] + s->sprite_delta[0][0]*s->mb_x*8 + s->sprite_delta[0][1]*s->mb_y*8;
178 oy= s->sprite_offset[1][1] + s->sprite_delta[1][0]*s->mb_x*8 + s->sprite_delta[1][1]*s->mb_y*8; 178 oy= s->sprite_offset[1][1] + s->sprite_delta[1][0]*s->mb_x*8 + s->sprite_delta[1][1]*s->mb_y*8;
179 179
180 ptr = ref_picture[1]; 180 ptr = ref_picture[1];
319 ff_emulated_edge_mc(s->edge_emu_buffer, ptr_y, s->linesize, 319 ff_emulated_edge_mc(s->edge_emu_buffer, ptr_y, s->linesize,
320 17, 17+field_based, 320 17, 17+field_based,
321 src_x, src_y<<field_based, 321 src_x, src_y<<field_based,
322 s->h_edge_pos, s->v_edge_pos); 322 s->h_edge_pos, s->v_edge_pos);
323 ptr_y = s->edge_emu_buffer; 323 ptr_y = s->edge_emu_buffer;
324 if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){ 324 if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
325 uint8_t *uvbuf= s->edge_emu_buffer+18*s->linesize; 325 uint8_t *uvbuf= s->edge_emu_buffer+18*s->linesize;
326 ff_emulated_edge_mc(uvbuf , 326 ff_emulated_edge_mc(uvbuf ,
327 ptr_cb, s->uvlinesize, 327 ptr_cb, s->uvlinesize,
328 9, 9+field_based, 328 9, 9+field_based,
329 uvsrc_x, uvsrc_y<<field_based, 329 uvsrc_x, uvsrc_y<<field_based,
350 ptr_cr+= s->uvlinesize; 350 ptr_cr+= s->uvlinesize;
351 } 351 }
352 352
353 pix_op[0][dxy](dest_y, ptr_y, linesize, h); 353 pix_op[0][dxy](dest_y, ptr_y, linesize, h);
354 354
355 if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){ 355 if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
356 pix_op[s->chroma_x_shift][uvdxy] 356 pix_op[s->chroma_x_shift][uvdxy]
357 (dest_cb, ptr_cb, uvlinesize, h >> s->chroma_y_shift); 357 (dest_cb, ptr_cb, uvlinesize, h >> s->chroma_y_shift);
358 pix_op[s->chroma_x_shift][uvdxy] 358 pix_op[s->chroma_x_shift][uvdxy]
359 (dest_cr, ptr_cr, uvlinesize, h >> s->chroma_y_shift); 359 (dest_cr, ptr_cr, uvlinesize, h >> s->chroma_y_shift);
360 } 360 }
361 if(!is_mpeg12 && (ENABLE_H261_ENCODER || ENABLE_H261_DECODER) && 361 if(!is_mpeg12 && (CONFIG_H261_ENCODER || CONFIG_H261_DECODER) &&
362 s->out_format == FMT_H261){ 362 s->out_format == FMT_H261){
363 ff_h261_loop_filter(s); 363 ff_h261_loop_filter(s);
364 } 364 }
365 } 365 }
366 /* apply one mpeg motion vector to the three components */ 366 /* apply one mpeg motion vector to the three components */
515 || (unsigned)src_y > v_edge_pos - (motion_y&3) - h ){ 515 || (unsigned)src_y > v_edge_pos - (motion_y&3) - h ){
516 ff_emulated_edge_mc(s->edge_emu_buffer, ptr_y, s->linesize, 516 ff_emulated_edge_mc(s->edge_emu_buffer, ptr_y, s->linesize,
517 17, 17+field_based, src_x, src_y<<field_based, 517 17, 17+field_based, src_x, src_y<<field_based,
518 s->h_edge_pos, s->v_edge_pos); 518 s->h_edge_pos, s->v_edge_pos);
519 ptr_y= s->edge_emu_buffer; 519 ptr_y= s->edge_emu_buffer;
520 if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){ 520 if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
521 uint8_t *uvbuf= s->edge_emu_buffer + 18*s->linesize; 521 uint8_t *uvbuf= s->edge_emu_buffer + 18*s->linesize;
522 ff_emulated_edge_mc(uvbuf, ptr_cb, s->uvlinesize, 522 ff_emulated_edge_mc(uvbuf, ptr_cb, s->uvlinesize,
523 9, 9 + field_based, 523 9, 9 + field_based,
524 uvsrc_x, uvsrc_y<<field_based, 524 uvsrc_x, uvsrc_y<<field_based,
525 s->h_edge_pos>>1, s->v_edge_pos>>1); 525 s->h_edge_pos>>1, s->v_edge_pos>>1);
549 //damn interlaced mode 549 //damn interlaced mode
550 //FIXME boundary mirroring is not exactly correct here 550 //FIXME boundary mirroring is not exactly correct here
551 qpix_op[1][dxy](dest_y , ptr_y , linesize); 551 qpix_op[1][dxy](dest_y , ptr_y , linesize);
552 qpix_op[1][dxy](dest_y+8, ptr_y+8, linesize); 552 qpix_op[1][dxy](dest_y+8, ptr_y+8, linesize);
553 } 553 }
554 if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){ 554 if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
555 pix_op[1][uvdxy](dest_cr, ptr_cr, uvlinesize, h >> 1); 555 pix_op[1][uvdxy](dest_cr, ptr_cr, uvlinesize, h >> 1);
556 pix_op[1][uvdxy](dest_cb, ptr_cb, uvlinesize, h >> 1); 556 pix_op[1][uvdxy](dest_cb, ptr_cb, uvlinesize, h >> 1);
557 } 557 }
558 } 558 }
559 559
703 mv); 703 mv);
704 704
705 mx += mv[0][0]; 705 mx += mv[0][0];
706 my += mv[0][1]; 706 my += mv[0][1];
707 } 707 }
708 if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)) 708 if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY))
709 chroma_4mv_motion(s, dest_cb, dest_cr, ref_picture, pix_op[1], mx, my); 709 chroma_4mv_motion(s, dest_cb, dest_cr, ref_picture, pix_op[1], mx, my);
710 710
711 return; 711 return;
712 } 712 }
713 713
724 }else if(!is_mpeg12 && s->quarter_sample){ 724 }else if(!is_mpeg12 && s->quarter_sample){
725 qpel_motion(s, dest_y, dest_cb, dest_cr, 725 qpel_motion(s, dest_y, dest_cb, dest_cr,
726 0, 0, 0, 726 0, 0, 0,
727 ref_picture, pix_op, qpix_op, 727 ref_picture, pix_op, qpix_op,
728 s->mv[dir][0][0], s->mv[dir][0][1], 16); 728 s->mv[dir][0][0], s->mv[dir][0][1], 16);
729 }else if(!is_mpeg12 && ENABLE_WMV2 && s->mspel){ 729 }else if(!is_mpeg12 && CONFIG_WMV2 && s->mspel){
730 ff_mspel_motion(s, dest_y, dest_cb, dest_cr, 730 ff_mspel_motion(s, dest_y, dest_cb, dest_cr,
731 ref_picture, pix_op, 731 ref_picture, pix_op,
732 s->mv[dir][0][0], s->mv[dir][0][1], 16); 732 s->mv[dir][0][0], s->mv[dir][0][1], 16);
733 }else 733 }else
734 { 734 {
789 mx += s->mv[dir][i][0]; 789 mx += s->mv[dir][i][0];
790 my += s->mv[dir][i][1]; 790 my += s->mv[dir][i][1];
791 } 791 }
792 } 792 }
793 793
794 if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)) 794 if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY))
795 chroma_4mv_motion(s, dest_cb, dest_cr, ref_picture, pix_op[1], mx, my); 795 chroma_4mv_motion(s, dest_cb, dest_cr, ref_picture, pix_op[1], mx, my);
796 } 796 }
797 break; 797 break;
798 case MV_TYPE_FIELD: 798 case MV_TYPE_FIELD:
799 if (s->picture_structure == PICT_FRAME) { 799 if (s->picture_structure == PICT_FRAME) {