A Novel Encoding Method for P-frames