[FFmpeg-cvslog] x86: mpegvideo: more sensible names for optimization file and init function
Stefano Sabatini
stefasab at gmail.com
Mon Aug 27 13:16:15 CEST 2012
On date Friday 2012-08-24 14:44:32 +0200, Diego Biurrun wrote:
> ffmpeg | branch: master | Diego Biurrun <diego at biurrun.de> | Mon Aug 13 13:13:57 2012 +0200| [dc402854271ef3d4eaaa3c53fa85237e996a06be] | committer: Diego Biurrun
>
> x86: mpegvideo: more sensible names for optimization file and init function
>
> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dc402854271ef3d4eaaa3c53fa85237e996a06be
> ---
>
> libavcodec/mpegvideo.c | 4 ++--
> libavcodec/mpegvideo.h | 2 +-
> libavcodec/x86/Makefile | 2 +-
> libavcodec/x86/{mpegvideo_mmx.c => mpegvideo.c} | 2 +-
> 4 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
> index 8f3544f..13e2acc 100644
> --- a/libavcodec/mpegvideo.c
> +++ b/libavcodec/mpegvideo.c
> @@ -185,8 +185,8 @@ av_cold int ff_dct_common_init(MpegEncContext *s)
> s->dct_unquantize_mpeg2_intra = dct_unquantize_mpeg2_intra_bitexact;
> s->dct_unquantize_mpeg2_inter = dct_unquantize_mpeg2_inter_c;
>
> -#if HAVE_MMX
> - ff_MPV_common_init_mmx(s);
> +#if ARCH_X86
> + ff_MPV_common_init_x86(s);
This apparently broke compilation here with optimizations
disabled. ARCH_X86 is enabled, but not HAVE_MMX, so x86/mpegvideo.o is
not compiled and I get this:
libavcodec/libavcodec.a(dnxhdenc.o): In function `dnxhd_encode_init':
/home/stefano/src/ffmpeg/libavcodec/dnxhdenc.c:298: undefined reference to `ff_dnxhdenc_init_x86'
libavcodec/libavcodec.a(mpegvideo.o): In function `ff_dct_common_init':
/home/stefano/src/ffmpeg/libavcodec/mpegvideo.c:189: undefined reference to `ff_MPV_common_init_x86'
libavcodec/libavcodec.a(mpegvideo_enc.o): In function `ff_MPV_encode_init':
/home/stefano/src/ffmpeg/libavcodec/mpegvideo_enc.c:836: undefined reference to `ff_MPV_encode_init_x86'
collect2: ld returned 1 exit status
Changing the check to:
#if ARCH_X86 && HAVE_MMX
fixes the problem for mpegvideo, but I'm not sure what's the best fix.
> #elif ARCH_ALPHA
> ff_MPV_common_init_axp(s);
> #elif HAVE_MMI
> diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h
> index 850681b..7ea7f82 100644
> --- a/libavcodec/mpegvideo.h
> +++ b/libavcodec/mpegvideo.h
> @@ -757,7 +757,7 @@ int ff_MPV_encode_end(AVCodecContext *avctx);
> int ff_MPV_encode_picture(AVCodecContext *avctx, AVPacket *pkt,
> const AVFrame *frame, int *got_packet);
> void ff_MPV_encode_init_x86(MpegEncContext *s);
> -void ff_MPV_common_init_mmx(MpegEncContext *s);
> +void ff_MPV_common_init_x86(MpegEncContext *s);
> void ff_MPV_common_init_axp(MpegEncContext *s);
> void ff_MPV_common_init_mmi(MpegEncContext *s);
> void ff_MPV_common_init_arm(MpegEncContext *s);
> diff --git a/libavcodec/x86/Makefile b/libavcodec/x86/Makefile
> index d843bc9..4dffe6c 100644
> --- a/libavcodec/x86/Makefile
> +++ b/libavcodec/x86/Makefile
> @@ -22,7 +22,7 @@ MMX-OBJS-$(CONFIG_H264DSP) += x86/h264dsp_init.o
> MMX-OBJS-$(CONFIG_H264PRED) += x86/h264_intrapred_init.o
> MMX-OBJS-$(CONFIG_LPC) += x86/lpc_mmx.o
> MMX-OBJS-$(CONFIG_MPEGAUDIODSP) += x86/mpegaudiodec_mmx.o
> -MMX-OBJS-$(CONFIG_MPEGVIDEO) += x86/mpegvideo_mmx.o
> +MMX-OBJS-$(CONFIG_MPEGVIDEO) += x86/mpegvideo.o
[...]
--
FFmpeg = Fostering and Fanciful Monstrous Pitiful Ecstatic Guru
More information about the ffmpeg-cvslog
mailing list