in regards to 1280x720 playback, even better than xvid is divx or ffmpegs mpeg4 codec for example. this is because unlike xvid, you can set a maximum bitrate.
i do something like
mencoder -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=5000:vrc_maxrate=5000:vrc_buf_size=4096 infile.mkv -o outfile.avi
which will play without dropping frames on 1280x720p video. The charts on the xbmc4xbox wiki are also out of date. you can do slightly higher bitrates with h264 than it states - also newer h264 will only okay on the dvdplayer player, as the built in mplayer is rather out of date.