[FFmpeg-devel] [PATCH 2/2] mpegaudio: call ff_mpegaudiodec_init_mmx() only from float decoder

Michael Niedermayer michaelni
Thu Jul 1 23:48:23 CEST 2010


On Thu, Jul 01, 2010 at 08:33:55PM +0100, M?ns Rullg?rd wrote:
> Michael Niedermayer <michaelni at gmx.at> writes:
> 
> > On Thu, Jul 01, 2010 at 06:14:16PM +0100, M?ns Rullg?rd wrote:
> >> Vitor Sessak <vitor1001 at gmail.com> writes:
> >> 
> >> > On 07/01/2010 06:26 PM, Mans Rullgard wrote:
> >> >> The mmx code is floating-point only, and this function does not know
> >> >> from which decoder it is called.  Without this change, the integer
> >> >> decoder only "works" because the size of the context struct is smaller
> >> >> in this case, and the mmx init function writes the function pointer
> >> >> outside the allocated context.
> >> >> ---
> >> >>   libavcodec/mpegaudiodec.c |    2 +-
> >> >>   1 files changed, 1 insertions(+), 1 deletions(-)
> >> >>
> >> >> diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c
> >> >> index 3edfc65..af5b3b8 100644
> >> >> --- a/libavcodec/mpegaudiodec.c
> >> >> +++ b/libavcodec/mpegaudiodec.c
> >> >> @@ -320,7 +320,7 @@ static av_cold int decode_init(AVCodecContext * avctx)
> >> >>
> >> >>       s->avctx = avctx;
> >> >>       s->apply_window_mp3 = apply_window_mp3_c;
> >> >> -#if HAVE_MMX
> >> >> +#if HAVE_MMX&&  CONFIG_FLOAT
> >> >
> >> > I was thinking about committing something similar. Your patch should
> >> > fix issue2054. I would also move the line
> >> >
> >> >       s->apply_window_mp3 = apply_window_mp3_c;
> >> >
> >> > inside a #if CONFIG_FLOAT.
> >> 
> >> Don't we want to allow asm optimisation of the fixed-point one as well?
> >
> > on systems with mmx optimized float decoding will liekly be faster
> > anywaym fix this in whichever way you prefer
> 
> I was thinking of FPU-less ARM systems and the like.

ive read the asm as "mmx" it seems, i need sleep

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I have never wished to cater to the crowd; for what I know they do not
approve, and what they approve I do not know. -- Epicurus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100701/0c26931f/attachment.pgp>



More information about the ffmpeg-devel mailing list