code optimize; modify some constants con't define by user;

code optimize; modify some constants con't define by user;