[Mesa-dev] [PATCH 1/3] vl: Only initialize vlc once

Younes Manton younes.m at gmail.com
Wed Dec 21 08:24:20 PST 2011


2011/12/21 Maarten Lankhorst <m.b.lankhorst at gmail.com>:
> Hey Christian,
>
> On 12/21/2011 04:41 PM, Christian König wrote:
>> Those functions are called a couple of million times a second, so even if the assertion is only tested in debug builds it has quite an effect on performance, sometimes even masquerading real performance problems. So my practice was to only uncomment them when I work on that part of the code. I don't want to change the Assert semantics in any way, just a simple define enabling certain assertions only under certain conditions should be sufficient.
> I think it makes sense to have the debug builds enabling those asserts by default.
>
> You could always do this in vl_mpeg12_bitstream.c when testing:
> #include "u_debug.h"
> #undef assert
> #include "vl_vlc.h"
> #define assert debug_assert
>
> On a related note, why is the vl code using assert.h directly instead of u_debug.h ?
>
> ~Maarten

u_debug.h didn't always have assert wrappers.


More information about the mesa-dev mailing list