Commit 5fe64d88 authored by Mans Rullgard's avatar Mans Rullgard
Browse files

x86: allow using add_hfyu_median_prediction_cmov on any cpu with cmov

For some reason add_hfyu_median_prediction_cmov is only selected
on 3Dnow-capable CPUs, even though it uses no 3Dnow instructions.
This patch allows it to be selected on any cpu with cmov with the
possibility of being overridden by the mmxext version.
Signed-off-by: default avatarMans Rullgard <>
parent 9afb7061
......@@ -2717,6 +2717,8 @@ static void dsputil_init_mmx2(DSPContext *c, AVCodecContext *avctx,
c->avg_h264_chroma_pixels_tab[1] = ff_avg_h264_chroma_mc4_10_mmx2;
/* slower than cmov version on AMD */
if (!(mm_flags & AV_CPU_FLAG_3DNOW))
c->add_hfyu_median_prediction = ff_add_hfyu_median_prediction_mmx2;
c->scalarproduct_int16 = ff_scalarproduct_int16_mmx2;
......@@ -2794,11 +2796,6 @@ static void dsputil_init_3dnow(DSPContext *c, AVCodecContext *avctx,
c->vorbis_inverse_coupling = vorbis_inverse_coupling_3dnow;
if (mm_flags & AV_CPU_FLAG_CMOV)
c->add_hfyu_median_prediction = add_hfyu_median_prediction_cmov;
#endif /* HAVE_INLINE_ASM */
......@@ -3009,6 +3006,11 @@ void ff_dsputil_init_mmx(DSPContext *c, AVCodecContext *avctx)
int mm_flags = av_get_cpu_flags();
if (mm_flags & AV_CPU_FLAG_CMOV)
c->add_hfyu_median_prediction = add_hfyu_median_prediction_cmov;
if (mm_flags & AV_CPU_FLAG_MMX) {
const int idct_algo = avctx->idct_algo;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment