add tdm_helper_convert_buffer function