comparison dsputil.c @ 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 d6bab465b82c
comparison
equal deleted inserted replaced
8595:2f476018b4ac 8596:68e959302527
2840 wmv2_mspel8_h_lowpass(halfH, src-stride, 8, stride, 11); 2840 wmv2_mspel8_h_lowpass(halfH, src-stride, 8, stride, 11);
2841 wmv2_mspel8_v_lowpass(dst, halfH+8, stride, 8, 8); 2841 wmv2_mspel8_v_lowpass(dst, halfH+8, stride, 8, 8);
2842 } 2842 }
2843 2843
2844 static void h263_v_loop_filter_c(uint8_t *src, int stride, int qscale){ 2844 static void h263_v_loop_filter_c(uint8_t *src, int stride, int qscale){
2845 if(ENABLE_ANY_H263) { 2845 if(CONFIG_ANY_H263) {
2846 int x; 2846 int x;
2847 const int strength= ff_h263_loop_filter_strength[qscale]; 2847 const int strength= ff_h263_loop_filter_strength[qscale];
2848 2848
2849 for(x=0; x<8; x++){ 2849 for(x=0; x<8; x++){
2850 int d1, d2, ad1; 2850 int d1, d2, ad1;
2877 } 2877 }
2878 } 2878 }
2879 } 2879 }
2880 2880
2881 static void h263_h_loop_filter_c(uint8_t *src, int stride, int qscale){ 2881 static void h263_h_loop_filter_c(uint8_t *src, int stride, int qscale){
2882 if(ENABLE_ANY_H263) { 2882 if(CONFIG_ANY_H263) {
2883 int y; 2883 int y;
2884 const int strength= ff_h263_loop_filter_strength[qscale]; 2884 const int strength= ff_h263_loop_filter_strength[qscale];
2885 2885
2886 for(y=0; y<8; y++){ 2886 for(y=0; y<8; y++){
2887 int d1, d2, ad1; 2887 int d1, d2, ad1;
4283 c->fdct248 = ff_fdct248_islow; 4283 c->fdct248 = ff_fdct248_islow;
4284 } 4284 }
4285 #endif //CONFIG_ENCODERS 4285 #endif //CONFIG_ENCODERS
4286 4286
4287 if(avctx->lowres==1){ 4287 if(avctx->lowres==1){
4288 if(avctx->idct_algo==FF_IDCT_INT || avctx->idct_algo==FF_IDCT_AUTO || !ENABLE_H264_DECODER){ 4288 if(avctx->idct_algo==FF_IDCT_INT || avctx->idct_algo==FF_IDCT_AUTO || !CONFIG_H264_DECODER){
4289 c->idct_put= ff_jref_idct4_put; 4289 c->idct_put= ff_jref_idct4_put;
4290 c->idct_add= ff_jref_idct4_add; 4290 c->idct_add= ff_jref_idct4_add;
4291 }else{ 4291 }else{
4292 c->idct_put= ff_h264_lowres_idct_put_c; 4292 c->idct_put= ff_h264_lowres_idct_put_c;
4293 c->idct_add= ff_h264_lowres_idct_add_c; 4293 c->idct_add= ff_h264_lowres_idct_add_c;
4308 if(avctx->idct_algo==FF_IDCT_INT){ 4308 if(avctx->idct_algo==FF_IDCT_INT){
4309 c->idct_put= ff_jref_idct_put; 4309 c->idct_put= ff_jref_idct_put;
4310 c->idct_add= ff_jref_idct_add; 4310 c->idct_add= ff_jref_idct_add;
4311 c->idct = j_rev_dct; 4311 c->idct = j_rev_dct;
4312 c->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM; 4312 c->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM;
4313 }else if((ENABLE_VP3_DECODER || ENABLE_VP5_DECODER || ENABLE_VP6_DECODER || ENABLE_THEORA_DECODER ) && 4313 }else if((CONFIG_VP3_DECODER || CONFIG_VP5_DECODER || CONFIG_VP6_DECODER || CONFIG_THEORA_DECODER ) &&
4314 avctx->idct_algo==FF_IDCT_VP3){ 4314 avctx->idct_algo==FF_IDCT_VP3){
4315 c->idct_put= ff_vp3_idct_put_c; 4315 c->idct_put= ff_vp3_idct_put_c;
4316 c->idct_add= ff_vp3_idct_add_c; 4316 c->idct_add= ff_vp3_idct_add_c;
4317 c->idct = ff_vp3_idct_c; 4317 c->idct = ff_vp3_idct_c;
4318 c->idct_permutation_type= FF_NO_IDCT_PERM; 4318 c->idct_permutation_type= FF_NO_IDCT_PERM;
4324 }else if(avctx->idct_algo==FF_IDCT_FAAN){ 4324 }else if(avctx->idct_algo==FF_IDCT_FAAN){
4325 c->idct_put= ff_faanidct_put; 4325 c->idct_put= ff_faanidct_put;
4326 c->idct_add= ff_faanidct_add; 4326 c->idct_add= ff_faanidct_add;
4327 c->idct = ff_faanidct; 4327 c->idct = ff_faanidct;
4328 c->idct_permutation_type= FF_NO_IDCT_PERM; 4328 c->idct_permutation_type= FF_NO_IDCT_PERM;
4329 }else if(ENABLE_EATGQ_DECODER && avctx->idct_algo==FF_IDCT_EA) { 4329 }else if(CONFIG_EATGQ_DECODER && avctx->idct_algo==FF_IDCT_EA) {
4330 c->idct_put= ff_ea_idct_put_c; 4330 c->idct_put= ff_ea_idct_put_c;
4331 c->idct_permutation_type= FF_NO_IDCT_PERM; 4331 c->idct_permutation_type= FF_NO_IDCT_PERM;
4332 }else{ //accurate/default 4332 }else{ //accurate/default
4333 c->idct_put= ff_simple_idct_put; 4333 c->idct_put= ff_simple_idct_put;
4334 c->idct_add= ff_simple_idct_add; 4334 c->idct_add= ff_simple_idct_add;
4335 c->idct = ff_simple_idct; 4335 c->idct = ff_simple_idct;
4336 c->idct_permutation_type= FF_NO_IDCT_PERM; 4336 c->idct_permutation_type= FF_NO_IDCT_PERM;
4337 } 4337 }
4338 } 4338 }
4339 4339
4340 if (ENABLE_H264_DECODER) { 4340 if (CONFIG_H264_DECODER) {
4341 c->h264_idct_add= ff_h264_idct_add_c; 4341 c->h264_idct_add= ff_h264_idct_add_c;
4342 c->h264_idct8_add= ff_h264_idct8_add_c; 4342 c->h264_idct8_add= ff_h264_idct8_add_c;
4343 c->h264_idct_dc_add= ff_h264_idct_dc_add_c; 4343 c->h264_idct_dc_add= ff_h264_idct_dc_add_c;
4344 c->h264_idct8_dc_add= ff_h264_idct8_dc_add_c; 4344 c->h264_idct8_dc_add= ff_h264_idct8_dc_add_c;
4345 c->h264_idct_add16 = ff_h264_idct_add16_c; 4345 c->h264_idct_add16 = ff_h264_idct_add16_c;
4570 c->h264_h_loop_filter_chroma= h264_h_loop_filter_chroma_c; 4570 c->h264_h_loop_filter_chroma= h264_h_loop_filter_chroma_c;
4571 c->h264_v_loop_filter_chroma_intra= h264_v_loop_filter_chroma_intra_c; 4571 c->h264_v_loop_filter_chroma_intra= h264_v_loop_filter_chroma_intra_c;
4572 c->h264_h_loop_filter_chroma_intra= h264_h_loop_filter_chroma_intra_c; 4572 c->h264_h_loop_filter_chroma_intra= h264_h_loop_filter_chroma_intra_c;
4573 c->h264_loop_filter_strength= NULL; 4573 c->h264_loop_filter_strength= NULL;
4574 4574
4575 if (ENABLE_ANY_H263) { 4575 if (CONFIG_ANY_H263) {
4576 c->h263_h_loop_filter= h263_h_loop_filter_c; 4576 c->h263_h_loop_filter= h263_h_loop_filter_c;
4577 c->h263_v_loop_filter= h263_v_loop_filter_c; 4577 c->h263_v_loop_filter= h263_v_loop_filter_c;
4578 } 4578 }
4579 4579
4580 if (ENABLE_VP3_DECODER || ENABLE_THEORA_DECODER) { 4580 if (CONFIG_VP3_DECODER || CONFIG_THEORA_DECODER) {
4581 c->vp3_h_loop_filter= ff_vp3_h_loop_filter_c; 4581 c->vp3_h_loop_filter= ff_vp3_h_loop_filter_c;
4582 c->vp3_v_loop_filter= ff_vp3_v_loop_filter_c; 4582 c->vp3_v_loop_filter= ff_vp3_v_loop_filter_c;
4583 } 4583 }
4584 4584
4585 c->h261_loop_filter= h261_loop_filter_c; 4585 c->h261_loop_filter= h261_loop_filter_c;
4621 c->prefetch= just_return; 4621 c->prefetch= just_return;
4622 4622
4623 memset(c->put_2tap_qpel_pixels_tab, 0, sizeof(c->put_2tap_qpel_pixels_tab)); 4623 memset(c->put_2tap_qpel_pixels_tab, 0, sizeof(c->put_2tap_qpel_pixels_tab));
4624 memset(c->avg_2tap_qpel_pixels_tab, 0, sizeof(c->avg_2tap_qpel_pixels_tab)); 4624 memset(c->avg_2tap_qpel_pixels_tab, 0, sizeof(c->avg_2tap_qpel_pixels_tab));
4625 4625
4626 if (ENABLE_MMX) dsputil_init_mmx (c, avctx); 4626 if (HAVE_MMX) dsputil_init_mmx (c, avctx);
4627 if (ENABLE_ARM) dsputil_init_arm (c, avctx); 4627 if (ARCH_ARM) dsputil_init_arm (c, avctx);
4628 if (ENABLE_MLIB) dsputil_init_mlib (c, avctx); 4628 if (CONFIG_MLIB) dsputil_init_mlib (c, avctx);
4629 if (ENABLE_VIS) dsputil_init_vis (c, avctx); 4629 if (HAVE_VIS) dsputil_init_vis (c, avctx);
4630 if (ENABLE_ALPHA) dsputil_init_alpha (c, avctx); 4630 if (ARCH_ALPHA) dsputil_init_alpha (c, avctx);
4631 if (ENABLE_PPC) dsputil_init_ppc (c, avctx); 4631 if (ARCH_PPC) dsputil_init_ppc (c, avctx);
4632 if (ENABLE_MMI) dsputil_init_mmi (c, avctx); 4632 if (HAVE_MMI) dsputil_init_mmi (c, avctx);
4633 if (ENABLE_SH4) dsputil_init_sh4 (c, avctx); 4633 if (ARCH_SH4) dsputil_init_sh4 (c, avctx);
4634 if (ENABLE_BFIN) dsputil_init_bfin (c, avctx); 4634 if (ARCH_BFIN) dsputil_init_bfin (c, avctx);
4635 4635
4636 for(i=0; i<64; i++){ 4636 for(i=0; i<64; i++){
4637 if(!c->put_2tap_qpel_pixels_tab[0][i]) 4637 if(!c->put_2tap_qpel_pixels_tab[0][i])
4638 c->put_2tap_qpel_pixels_tab[0][i]= c->put_h264_qpel_pixels_tab[0][i]; 4638 c->put_2tap_qpel_pixels_tab[0][i]= c->put_h264_qpel_pixels_tab[0][i];
4639 if(!c->avg_2tap_qpel_pixels_tab[0][i]) 4639 if(!c->avg_2tap_qpel_pixels_tab[0][i])