split mpeg12 encoder out of mpeg12.c