[go: nahoru, domu]

Add ETC1 powered SSE encoder for tile texture compression

Created an ETC1 encoder that uses SSE2 to improve compression speed.
The SSE encoder extends TextureCompressor and uses the same algorithm as TextureCompressorETC1.

Added unittest for TextureCompressorETC1.

Moved shared code into a etc1 header.

Added new performance test scenarios.

Performance difference on Ubuntu x64, Haswell Processor:
Without SSE:
*RESULT Compress256x256BlackAndWhiteGradientImage: ETC1 Low= 1.966321587562561 us
*RESULT Compress256x256SolidBlackImage: ETC1 Low= .0956009104847908 us
*RESULT Compress256x256SolidColorImage: ETC1 Low= .4367307722568512 us
*RESULT Compress256x256RandomColorImage: ETC1 Low= 5.948055744171143 us

With SSE:
*RESULT Compress256x256BlackAndWhiteGradientImage: ETC1 Low= 1.0316201448440552 us
*RESULT Compress256x256SolidBlackImage: ETC1 Low= .25716209411621094 us
*RESULT Compress256x256SolidColorImage: ETC1 Low= .2768038809299469 us
*RESULT Compress256x256RandomColorImage: ETC1 Low= 1.834145426750183 us

BUG=434699
TEST=newly added unittest TextureCompressorETC1Test::Compress256x256CreateETC1, TextureCompressorETC1Test::Compress256x256RatioETC1

Review URL: https://codereview.chromium.org/1096703002

Cr-Commit-Position: refs/heads/master@{#329840}
11 files changed