Add ETC1 powered SSE encoder for tile texture compression
commit5f3849aa8307399b7e6dfe5665ed149594244077
authorradu.velea <radu.velea@intel.com>
Thu, 14 May 2015 13:24:18 +0000 (14 06:24 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 14 May 2015 13:24:31 +0000 (14 13:24 +0000)
tree7a9100621453e5b21b49ab67f8fe06609da98679
parent557da2ea7e62412987275ed9f1d3684b5f5ce879
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}
AUTHORS
cc/BUILD.gn
cc/cc.gyp
cc/cc_tests.gyp
cc/resources/texture_compressor.cc
cc/resources/texture_compressor_etc1.cc
cc/resources/texture_compressor_etc1.h
cc/resources/texture_compressor_etc1_sse.cc [new file with mode: 0644]
cc/resources/texture_compressor_etc1_sse.h [copied from cc/resources/texture_compressor_etc1.h with 65% similarity]
cc/resources/texture_compressor_etc1_unittest.cc [new file with mode: 0644]
cc/resources/texture_compressor_perftest.cc