Various optimizations
Merge remote-tracking branch 'origin/hevc' into hevc