do O(1) instead of O(n) atomic operations in register functions

about 1ms faster startup time

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/qdm2: move static init to normal init to avoid initializing tables that might never be used

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>