Optimized ENC hw layer