added encoder_factory.cpp and splittede decoder_factory