TEncCU:fix for large memory consumption