[FFmpeg-devel] XVMC Deathmatch

Aurelien Jacobs aurel
Sun Feb 22 01:28:14 CET 2009


On Sun, 22 Feb 2009 00:32:30 +0100
Michael Niedermayer <michaelni at gmx.at> wrote:

> On Sat, Feb 21, 2009 at 11:32:30PM +0200, Ivan Kalvachev wrote:
> > On 2/18/09, Michael Niedermayer <michaelni at gmx.at> wrote:
> > > thus spliting assert() in the 3 cases of speedcritical, normal and security
> > > relevant
> > >
> > > the speedcritical ones, one only wants activated for serious debuging
> > > the security relevant ones, one never wants disabled
> > 
> > See, if you never want them disabled, then they should be using just if() ;)
> 
> this isnt a bad argument but it applies just to 1 of the 3 cases.

I like Ivan idea, and it is easy to expand to the 3 cases.

3 case would be:
 - security related assert: must never be disabled so should be replaced
   by simple if().
 - assert in speed critical code: should only be enabled with some special
   heavy debuging option so should be replaced with if(CONFIG_HEAVY_DEBUG && )
 - "normal" assert: should be disabled by default and enabled in debug
   build. This should be the most common case, and should stay as assert().
   Default build should define NDEBUG.

Aurel




More information about the ffmpeg-devel mailing list