[Ffmpeg-cvslog] r5740 - in trunk/libavutil: Makefile lls.c lls.h

Måns Rullgård mru
Fri Jul 14 23:19:18 CEST 2006


Michael Niedermayer <michaelni at gmx.at> writes:

> Hi
>
> On Fri, Jul 14, 2006 at 09:35:01PM +0100, M?ns Rullg?rd wrote:
>> Michael Niedermayer <michaelni at gmx.at> writes:
>> 
>> > i agree but theres a problem, some asserts are irrelevant
>> > speedwise and some are in speed-critical parts, and there are some people
>> > (me for example, and possibly other developers...) who want the rarely
>> > executed asserts() to be enabled while the often executed ones should be
>> > disabled in their build ... a global NDEBUG is not enough here
>> >
>> > IIRC ive already at least suggested once that 2 av_asserts, one for
>> > speedcritical and one for non-speedcritical parts should be added
>> > yeah i shouldnt suggest but rather do the work myself i know ...
>> 
>> We could also use a single av_assert with a numerical argument
>> specifying the debug level at which to enable it.
>> 
>> Something like
>> 
>> #ifndef AV_DEBUG
>> #define AV_DEBUG 0
>> #endif
>> 
>> #define av_assert(level, expr) do { \
>>     if(level < AV_DEBUG){           \
>>         assert(expr)                \
>>     }                               \
>> } while(0)
>
> no objections, feel free to commit
>
> about the levels, id suggest:
> 0   assert failure could lead to exploits
> 1   assert in speed uncritical code
> 2   assert in speed critical code

Not promising to actually do anything, but which header would this
belong in?

-- 
M?ns Rullg?rd
mru at inprovide.com




More information about the ffmpeg-cvslog mailing list