I made this diagram about a year ago. It attempts to explain the various places that padding can be added and their related priorities.
https://forum.icetv.com.au/iceforum/index.php?topic=7572.0
https://forum.icetv.com.au/iceforum/index.php?topic=7572.0