Original code from 3gpp.org. License unknown.
