[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mjpeg-cvs
Subject:    Re: [Mjpeg-cvs] CVS: mjpeg_play/utils/altivec add_pred.c, 1.3,
From:       "Steven M. Schultz" <sms () 2BSD ! COM>
Date:       2006-08-04 15:50:41
Message-ID: Pine.BSI.4.05L.10608040841170.12578-100000 () moe ! 2bsd ! com
[Download RAW message or body]


On Thu, 3 Aug 2006, James Klicman wrote:

> I think it would have been cleaner to change #undef ALTIVEC_VERIFY in
> altivec_conf.h to #define ALTIVEC_VERIFY. That will turn on all of the

	But that would, as you mention, turn on ALL of the SLOW checks.

	That's not what I was looking to do.  What I wanted was some
	simple/small and fast sanity checking of parameters.  

	If you look more closely you'll see that all that was done was
	move a couple SMALL & FAST 'if' statements outside the '#ALTIVEC_VERIFY'
	blocks.  I really don't think something like 'if (h != 8 && h != 16)'
	has any measurable effect on the performance.  Other than preventing
	a mysterious crash when an application passes in '32' ;)

> verification code. All of those test are slow and unneeded except for
> debugging.

	Right.  Which is why ALMOST ALL of them were left disabled - i.e.
	most of the ALTIVEC_VERIFY blocks are still there.  A few of the 
	smaller/cheaper 'if' checks (but NO LOOPS) were moved outside the
	ifdef blocks.

> Also, changes to altivec_conf.h are probably not something
> that should be committed to CVS.

	Precisely so.  And that's why no changes were made and no commit
	was done to altivec_conf.h - I still show the last date/time on that
	file in my checked out copy as being 2003-10-12

	While a large number of files were changed, I think closer examination
	would show that the individual changes were small and limited to
	the cheaper parameters checks (buffer alignment isn't checked for 
	example because on Altivec platforms malloc does the right thing).

	If the penalty is a bit much it's trivial to nudge the 'if ()' 
	statements back inside the '#ifdef' secions.

	Cheers,
	Steven Schultz


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Mjpeg-cvs mailing list
Mjpeg-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mjpeg-cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic