Lens barrel, where the hood attaches, not around the front element where the filters attach. Notice that neither of them are 77 mm. The lens barrel has to contain the lens element/group mountings, focussing rack, zooming rack, IS components, etc. Max. diameter (per Canon) of the IS is 86.2 mm, of the non-IS is 84.6 mm.

