Please checkout: http://www.fh-friedberg.de/fachbereiche/e2/telekom-labor/zinke/mk/mpeg2beg/beginnzi.htm
http://en.wikipedia.org/wiki/MPEG-2
http://www.iso.org/iso/iso_catalogue/catalogue_ics/catalogue_detail_ics.htm?csnumber=22990
The 3rd link is the link to the MPEG-2 standard, this is the bible for MPEG-2 codec development. That will give you all the information needed to process a MPEG-2 file.