"Ronald S. Bultje" <[email protected]> writes:
> Hi,
>
> On Tue, May 24, 2011 at 12:15 PM, Luca Barbato <[email protected]> wrote:
>> On 05/24/2011 05:33 PM, Ronald S. Bultje wrote:
>>> ---
>>> libswscale/x86/swscale_template.c | 3 ++-
>>> 1 files changed, 2 insertions(+), 1 deletions(-)
>>
>> Ok.
>
> Slightly updated patch attached.
>
> Ronald
>
> From c9d8c222aaa159b3c4307048a9fa3ed8140c96ca Mon Sep 17 00:00:00 2001
> From: Ronald S. Bultje <[email protected]>
> Date: Tue, 24 May 2011 13:04:46 -0400
> Subject: [PATCH 2/5] swscale: use emms_c().
>
> ---
> libswscale/utils.c | 3 +--
> libswscale/x86/swscale_template.c | 2 +-
> 2 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/libswscale/utils.c b/libswscale/utils.c
> index b49ec89..09b56a2 100644
> --- a/libswscale/utils.c
> +++ b/libswscale/utils.c
> @@ -193,8 +193,7 @@ static int initFilter(int16_t **outFilter, int16_t
> **filterPos, int *outFilterSi
> const int64_t fone= 1LL<<54;
> int ret= -1;
>
> - if (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX)
> - __asm__ volatile("emms\n\t"::: "memory"); //FIXME this should not be
> required but it IS (even for non-MMX versions)
> + emms_c(); //FIXME this should not be required but it IS (even for
> non-MMX versions)
What's with that FIXME?
There's also one more emms instance in that file, at line 761.
> // NOTE: the +1 is for the MMX scaler which reads over the end
> FF_ALLOC_OR_GOTO(NULL, *filterPos, (dstW+1)*sizeof(int16_t), fail);
> diff --git a/libswscale/x86/swscale_template.c
> b/libswscale/x86/swscale_template.c
> index e03fbd4..576e22c 100644
> --- a/libswscale/x86/swscale_template.c
> +++ b/libswscale/x86/swscale_template.c
> @@ -2494,7 +2494,7 @@ static int RENAME(swScale)(SwsContext *c, const
> uint8_t* src[], int srcStride[],
> fillPlane(dst[3], dstStride[3], dstW, dstY-lastDstY, lastDstY, 255);
>
> if (COMPILE_TEMPLATE_MMX2) __asm__ volatile("sfence":::"memory");
> - __asm__ volatile("emms" :::"memory");
> + emms_c();
>
> /* store changed local vars back in the context */
> c->dstY= dstY;
> --
> 1.7.4.4
Changes as such look OK.
--
Måns Rullgård
[email protected]
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel