refactor a function for further strategy adjustment
Merge pull request #1378 from sijchen/ref_refac22

[Encoder] Refactor a function for further strategy adjustment