[FFmpeg-devel] [PATCH] Don't initialize normal horizontal filter if MMX2 filter is used.

Michael Niedermayer michaelni
Fri Jan 15 01:59:56 CET 2010


On Thu, Jan 14, 2010 at 10:52:14PM -0200, Ramiro Polla wrote:
> On Thu, Jan 14, 2010 at 10:40 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> > On Thu, Jan 14, 2010 at 04:04:28AM -0200, Ramiro Polla wrote:
> >> $subj
> >
> >> ?swscale.c | ? 35 ++++++++++++++++++-----------------
> >> ?1 file changed, 18 insertions(+), 17 deletions(-)
> >> 20886640eeb074ef9e8b28dbfd5cf2c4195cc1de ?0002-Don-t-initialize-normal-horizontal-filter-if-MMX2-fi.patch
> >> From 5d3fbc70561493036991270710bb5d2dc46f98f1 Mon Sep 17 00:00:00 2001
> >> From: Ramiro Polla <ramiro.polla at gmail.com>
> >> Date: Wed, 13 Jan 2010 17:51:36 -0200
> >> Subject: [PATCH] Don't initialize normal horizontal filter if MMX2 filter is used.
> >
> > can the MMX2 code handle any pixel count (like 1? 3? 255? 257 ?)
> > if not the C code and the tables is needed
> 
> Hmm, isn't that already checked for before these tables are initialized?
> 
>     if (flags & SWS_CPU_CAPS_MMX2) {
>         c->canMMX2BeUsed= (dstW >=srcW && (dstW&31)==0 && (srcW&15)==0) ? 1 : 0;
>         if (!c->canMMX2BeUsed && dstW >=srcW && (srcW&15)==0 &&
> (flags&SWS_FAST_BILINEAR)) {
>             if (flags&SWS_PRINT_INFO)
>                 av_log(c, AV_LOG_INFO, "output width is not a multiple
> of 32 -> no MMX2 scaler\n");
>         }
>         if (usesHFilter) c->canMMX2BeUsed=0;
>     }
>     else
>         c->canMMX2BeUsed=0;
> 
> and being canMMX2BeUsed set, the MMX2 scaler path will always be taken.

hmm then te patch is ok assuming ist tested

[..]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No great genius has ever existed without some touch of madness. -- Aristotle
-------------- 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/20100115/461b3bd4/attachment.pgp>



More information about the ffmpeg-devel mailing list