introduce a macroblock index to avoid a few x*width+y calculations