From the comments that precede it (3DPlatformer/platformer.c line 89-91), I think the idea is that the input is the size (in bytes) of the bitmap W * H * 3, where W == H and W is a power of two. So the input for a square bitmap as the comments suggest would be 128 * 128 * 3, if we unravel from there, log(x) / log(2) extracts the most significant bit, pow(2, log(x) / log(2)) sets that bit.
pow(2, log(sqrt(128 * 128 * 3 / 3)) / log(2))
pow(2, log(128) / log(2))
pow(2, 7)
128
It's funny that on the one hand the code is beautifully terse enough that this ugly wart is easily discovered, yet on the other that the code would have such a wart to begin with.