reorganize make_decoder/make_encoder
factor make_decoder and make_encoder in make_codec