Originally committed as revision 17229 to svn://svn.ffmpeg.org/ffmpeg/trunktags/v0.5
| @@ -91,7 +91,6 @@ show_help(){ | |||||
| echo " --enable-w32threads use Win32 threads [no]" | echo " --enable-w32threads use Win32 threads [no]" | ||||
| echo " --enable-x11grab enable X11 grabbing [no]" | echo " --enable-x11grab enable X11 grabbing [no]" | ||||
| echo " --enable-vdpau enable VDPAU support [no]" | echo " --enable-vdpau enable VDPAU support [no]" | ||||
| echo " --enable-xvmc enable XvMC support [no]" | |||||
| echo " --disable-network disable network support [no]" | echo " --disable-network disable network support [no]" | ||||
| echo " --disable-ipv6 disable IPv6 support [no]" | echo " --disable-ipv6 disable IPv6 support [no]" | ||||
| echo " --disable-mpegaudio-hp faster (but less accurate) MPEG audio decoding [no]" | echo " --disable-mpegaudio-hp faster (but less accurate) MPEG audio decoding [no]" | ||||
| @@ -793,7 +792,6 @@ CONFIG_LIST=" | |||||
| vdpau | vdpau | ||||
| vhook | vhook | ||||
| x11grab | x11grab | ||||
| xvmc | |||||
| zlib | zlib | ||||
| " | " | ||||
| @@ -1015,7 +1013,7 @@ mpeg2video_encoder_select="aandct" | |||||
| mpeg4_encoder_select="aandct" | mpeg4_encoder_select="aandct" | ||||
| mpeg_vdpau_decoder_deps="vdpau" | mpeg_vdpau_decoder_deps="vdpau" | ||||
| mpeg1_vdpau_decoder_deps="vdpau" | mpeg1_vdpau_decoder_deps="vdpau" | ||||
| mpeg_xvmc_decoder_deps="xvmc X11_extensions_XvMClib_h" | |||||
| mpeg_xvmc_decoder_deps="X11_extensions_XvMClibx_h" | |||||
| msmpeg4v1_encoder_select="aandct" | msmpeg4v1_encoder_select="aandct" | ||||
| msmpeg4v2_encoder_select="aandct" | msmpeg4v2_encoder_select="aandct" | ||||
| msmpeg4v3_encoder_select="aandct" | msmpeg4v3_encoder_select="aandct" | ||||
| @@ -137,6 +137,7 @@ OBJS-$(CONFIG_MPC7_DECODER) += mpc7.o mpc.o mpegaudiodec.o mpegaudiod | |||||
| OBJS-$(CONFIG_MPC8_DECODER) += mpc8.o mpc.o mpegaudiodec.o mpegaudiodecheader.o mpegaudio.o mpegaudiodata.o | OBJS-$(CONFIG_MPC8_DECODER) += mpc8.o mpc.o mpegaudiodec.o mpegaudiodecheader.o mpegaudio.o mpegaudiodata.o | ||||
| OBJS-$(CONFIG_MPEG_VDPAU_DECODER) += vdpau.o mpeg12.o mpeg12data.o mpegvideo.o error_resilience.o | OBJS-$(CONFIG_MPEG_VDPAU_DECODER) += vdpau.o mpeg12.o mpeg12data.o mpegvideo.o error_resilience.o | ||||
| OBJS-$(CONFIG_MPEG1_VDPAU_DECODER) += vdpau.o mpeg12.o mpeg12data.o mpegvideo.o error_resilience.o | OBJS-$(CONFIG_MPEG1_VDPAU_DECODER) += vdpau.o mpeg12.o mpeg12data.o mpegvideo.o error_resilience.o | ||||
| OBJS-$(CONFIG_MPEG_XVMC_DECODER) += mpegvideo_xvmc.o | |||||
| OBJS-$(CONFIG_MPEGVIDEO_DECODER) += mpeg12.o mpeg12data.o mpegvideo.o error_resilience.o | OBJS-$(CONFIG_MPEGVIDEO_DECODER) += mpeg12.o mpeg12data.o mpegvideo.o error_resilience.o | ||||
| OBJS-$(CONFIG_MPEG1VIDEO_DECODER) += mpeg12.o mpeg12data.o mpegvideo.o error_resilience.o | OBJS-$(CONFIG_MPEG1VIDEO_DECODER) += mpeg12.o mpeg12data.o mpegvideo.o error_resilience.o | ||||
| OBJS-$(CONFIG_MPEG1VIDEO_ENCODER) += mpeg12enc.o mpeg12data.o mpegvideo_enc.o motion_est.o ratecontrol.o mpeg12.o mpeg12data.o mpegvideo.o error_resilience.o | OBJS-$(CONFIG_MPEG1VIDEO_ENCODER) += mpeg12enc.o mpeg12data.o mpegvideo_enc.o motion_est.o ratecontrol.o mpeg12.o mpeg12data.o mpegvideo.o error_resilience.o | ||||
| @@ -252,7 +253,6 @@ OBJS-$(CONFIG_XAN_WC3_DECODER) += xan.o | |||||
| OBJS-$(CONFIG_XAN_WC4_DECODER) += xan.o | OBJS-$(CONFIG_XAN_WC4_DECODER) += xan.o | ||||
| OBJS-$(CONFIG_XL_DECODER) += xl.o | OBJS-$(CONFIG_XL_DECODER) += xl.o | ||||
| OBJS-$(CONFIG_XSUB_DECODER) += xsubdec.o | OBJS-$(CONFIG_XSUB_DECODER) += xsubdec.o | ||||
| OBJS-$(CONFIG_XVMC) += mpegvideo_xvmc.o | |||||
| OBJS-$(CONFIG_ZLIB_DECODER) += lcldec.o | OBJS-$(CONFIG_ZLIB_DECODER) += lcldec.o | ||||
| OBJS-$(CONFIG_ZLIB_ENCODER) += lclenc.o | OBJS-$(CONFIG_ZLIB_ENCODER) += lclenc.o | ||||
| OBJS-$(CONFIG_ZMBV_DECODER) += zmbv.o | OBJS-$(CONFIG_ZMBV_DECODER) += zmbv.o | ||||
| @@ -563,7 +563,7 @@ static int is_intra_more_likely(MpegEncContext *s){ | |||||
| if(undamaged_count < 5) return 0; //almost all MBs damaged -> use temporal prediction | if(undamaged_count < 5) return 0; //almost all MBs damaged -> use temporal prediction | ||||
| #if CONFIG_XVMC | |||||
| #if CONFIG_MPEG_XVMC_DECODER | |||||
| //prevent dsp.sad() check, that requires access to the image | //prevent dsp.sad() check, that requires access to the image | ||||
| if(s->avctx->xvmc_acceleration && s->pict_type==FF_I_TYPE) return 1; | if(s->avctx->xvmc_acceleration && s->pict_type==FF_I_TYPE) return 1; | ||||
| #endif | #endif | ||||
| @@ -935,7 +935,7 @@ void ff_er_frame_end(MpegEncContext *s){ | |||||
| }else | }else | ||||
| guess_mv(s); | guess_mv(s); | ||||
| #if CONFIG_XVMC | |||||
| #if CONFIG_MPEG_XVMC_DECODER | |||||
| /* the filters below are not XvMC compatible, skip them */ | /* the filters below are not XvMC compatible, skip them */ | ||||
| if(s->avctx->xvmc_acceleration) goto ec_clean; | if(s->avctx->xvmc_acceleration) goto ec_clean; | ||||
| #endif | #endif | ||||
| @@ -1024,7 +1024,7 @@ void ff_er_frame_end(MpegEncContext *s){ | |||||
| v_block_filter(s, s->current_picture.data[2], s->mb_width , s->mb_height , s->uvlinesize, 0); | v_block_filter(s, s->current_picture.data[2], s->mb_width , s->mb_height , s->uvlinesize, 0); | ||||
| } | } | ||||
| #if CONFIG_XVMC | |||||
| #if CONFIG_MPEG_XVMC_DECODER | |||||
| ec_clean: | ec_clean: | ||||
| #endif | #endif | ||||
| /* clean a few tables */ | /* clean a few tables */ | ||||
| @@ -301,7 +301,7 @@ static int mpeg_decode_mb(MpegEncContext *s, | |||||
| }else | }else | ||||
| memset(s->last_mv, 0, sizeof(s->last_mv)); /* reset mv prediction */ | memset(s->last_mv, 0, sizeof(s->last_mv)); /* reset mv prediction */ | ||||
| s->mb_intra = 1; | s->mb_intra = 1; | ||||
| #if CONFIG_XVMC | |||||
| #if CONFIG_MPEG_XVMC_DECODER | |||||
| //if 1, we memcpy blocks in xvmcvideo | //if 1, we memcpy blocks in xvmcvideo | ||||
| if(s->avctx->xvmc_acceleration > 1){ | if(s->avctx->xvmc_acceleration > 1){ | ||||
| XVMC_pack_pblocks(s,-1);//inter are always full blocks | XVMC_pack_pblocks(s,-1);//inter are always full blocks | ||||
| @@ -514,7 +514,7 @@ static int mpeg_decode_mb(MpegEncContext *s, | |||||
| return -1; | return -1; | ||||
| } | } | ||||
| #if CONFIG_XVMC | |||||
| #if CONFIG_MPEG_XVMC_DECODER | |||||
| //if 1, we memcpy blocks in xvmcvideo | //if 1, we memcpy blocks in xvmcvideo | ||||
| if(s->avctx->xvmc_acceleration > 1){ | if(s->avctx->xvmc_acceleration > 1){ | ||||
| XVMC_pack_pblocks(s,cbp); | XVMC_pack_pblocks(s,cbp); | ||||
| @@ -1648,7 +1648,7 @@ static int mpeg_field_start(MpegEncContext *s){ | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| #if CONFIG_XVMC | |||||
| #if CONFIG_MPEG_XVMC_DECODER | |||||
| // MPV_frame_start will call this function too, | // MPV_frame_start will call this function too, | ||||
| // but we need to call it on every field | // but we need to call it on every field | ||||
| if(s->avctx->xvmc_acceleration) | if(s->avctx->xvmc_acceleration) | ||||
| @@ -1739,7 +1739,7 @@ static int mpeg_decode_slice(Mpeg1Context *s1, int mb_y, | |||||
| } | } | ||||
| for(;;) { | for(;;) { | ||||
| #if CONFIG_XVMC | |||||
| #if CONFIG_MPEG_XVMC_DECODER | |||||
| //If 1, we memcpy blocks in xvmcvideo. | //If 1, we memcpy blocks in xvmcvideo. | ||||
| if(s->avctx->xvmc_acceleration > 1) | if(s->avctx->xvmc_acceleration > 1) | ||||
| XVMC_init_block(s);//set s->block | XVMC_init_block(s);//set s->block | ||||
| @@ -1921,7 +1921,7 @@ static int slice_end(AVCodecContext *avctx, AVFrame *pict) | |||||
| if (!s1->mpeg_enc_ctx_allocated || !s->current_picture_ptr) | if (!s1->mpeg_enc_ctx_allocated || !s->current_picture_ptr) | ||||
| return 0; | return 0; | ||||
| #if CONFIG_XVMC | |||||
| #if CONFIG_MPEG_XVMC_DECODER | |||||
| if(s->avctx->xvmc_acceleration) | if(s->avctx->xvmc_acceleration) | ||||
| XVMC_field_end(s); | XVMC_field_end(s); | ||||
| #endif | #endif | ||||
| @@ -2487,7 +2487,7 @@ AVCodec mpegvideo_decoder = { | |||||
| .long_name= NULL_IF_CONFIG_SMALL("MPEG-1 video"), | .long_name= NULL_IF_CONFIG_SMALL("MPEG-1 video"), | ||||
| }; | }; | ||||
| #if CONFIG_XVMC | |||||
| #if CONFIG_MPEG_XVMC_DECODER | |||||
| static av_cold int mpeg_mc_decode_init(AVCodecContext *avctx){ | static av_cold int mpeg_mc_decode_init(AVCodecContext *avctx){ | ||||
| Mpeg1Context *s; | Mpeg1Context *s; | ||||
| @@ -939,7 +939,7 @@ alloc: | |||||
| update_noise_reduction(s); | update_noise_reduction(s); | ||||
| } | } | ||||
| #if CONFIG_XVMC | |||||
| #if CONFIG_MPEG_XVMC_DECODER | |||||
| if(s->avctx->xvmc_acceleration) | if(s->avctx->xvmc_acceleration) | ||||
| return XVMC_field_start(s, avctx); | return XVMC_field_start(s, avctx); | ||||
| #endif | #endif | ||||
| @@ -951,7 +951,7 @@ void MPV_frame_end(MpegEncContext *s) | |||||
| { | { | ||||
| int i; | int i; | ||||
| /* draw edge for correct motion prediction if outside */ | /* draw edge for correct motion prediction if outside */ | ||||
| #if CONFIG_XVMC | |||||
| #if CONFIG_MPEG_XVMC_DECODER | |||||
| //just to make sure that all data is rendered. | //just to make sure that all data is rendered. | ||||
| if(s->avctx->xvmc_acceleration){ | if(s->avctx->xvmc_acceleration){ | ||||
| XVMC_field_end(s); | XVMC_field_end(s); | ||||
| @@ -1736,7 +1736,7 @@ void MPV_decode_mb_internal(MpegEncContext *s, DCTELEM block[12][64], | |||||
| { | { | ||||
| int mb_x, mb_y; | int mb_x, mb_y; | ||||
| const int mb_xy = s->mb_y * s->mb_stride + s->mb_x; | const int mb_xy = s->mb_y * s->mb_stride + s->mb_x; | ||||
| #if CONFIG_XVMC | |||||
| #if CONFIG_MPEG_XVMC_DECODER | |||||
| if(s->avctx->xvmc_acceleration){ | if(s->avctx->xvmc_acceleration){ | ||||
| XVMC_decode_mb(s);//xvmc uses pblocks | XVMC_decode_mb(s);//xvmc uses pblocks | ||||
| return; | return; | ||||