alpha_processing*: use WEBP_RESTRICT qualifier

this helps both auto-vectorization in the C code and the optimized code
generation

Change-Id: Ide570d6be45125ffef7248bdc40e9eb08f00e832
This commit is contained in:
James Zern
2021-07-03 17:43:11 -07:00
parent a2e18f10eb
commit a1e5dae0f0
4 changed files with 54 additions and 37 deletions

View File

@ -17,11 +17,13 @@
#include <smmintrin.h>
#include "src/utils/utils.h"
//------------------------------------------------------------------------------
static int ExtractAlpha_SSE41(const uint8_t* argb, int argb_stride,
int width, int height,
uint8_t* alpha, int alpha_stride) {
static int ExtractAlpha_SSE41(const uint8_t* WEBP_RESTRICT argb,
int argb_stride, int width, int height,
uint8_t* WEBP_RESTRICT alpha, int alpha_stride) {
// alpha_and stores an 'and' operation of all the alpha[] values. The final
// value is not 0xff if any of the alpha[] is not equal to 0xff.
uint32_t alpha_and = 0xff;