added msb calculation back into planar kernel