diff --git a/examples/cwebp.c b/examples/cwebp.c index 30e7ec1e..35c832a4 100644 --- a/examples/cwebp.c +++ b/examples/cwebp.c @@ -640,10 +640,10 @@ static const char* const kErrorMessages[VP8_ENC_ERROR_LAST] = { //------------------------------------------------------------------------------ -int main(int argc, const char *argv[]) { +int main(int argc, const char* argv[]) { int return_value = -1; - const char *in_file = NULL, *out_file = NULL, *dump_file = NULL; - FILE *out = NULL; + const char* in_file = NULL, *out_file = NULL, *dump_file = NULL; + FILE* out = NULL; int c; int short_output = 0; int quiet = 0; diff --git a/examples/dwebp.c b/examples/dwebp.c index 7284f305..e9a0e66a 100644 --- a/examples/dwebp.c +++ b/examples/dwebp.c @@ -176,10 +176,10 @@ static uint8_t* AllocateExternalBuffer(WebPDecoderConfig* config, return external_buffer; } -int main(int argc, const char *argv[]) { +int main(int argc, const char* argv[]) { int ok = 0; - const char *in_file = NULL; - const char *out_file = NULL; + const char* in_file = NULL; + const char* out_file = NULL; WebPDecoderConfig config; WebPDecBuffer* const output_buffer = &config.output; diff --git a/examples/gif2webp.c b/examples/gif2webp.c index 40b9c401..a9f5936c 100644 --- a/examples/gif2webp.c +++ b/examples/gif2webp.c @@ -96,12 +96,12 @@ static void Help(void) { //------------------------------------------------------------------------------ -int main(int argc, const char *argv[]) { +int main(int argc, const char* argv[]) { int verbose = 0; int gif_error = GIF_ERROR; WebPMuxError err = WEBP_MUX_OK; int ok = 0; - const W_CHAR *in_file = NULL, *out_file = NULL; + const W_CHAR* in_file = NULL, *out_file = NULL; GifFileType* gif = NULL; int frame_duration = 0; int frame_timestamp = 0; @@ -379,7 +379,7 @@ int main(int argc, const char *argv[]) { } case EXTENSION_RECORD_TYPE: { int extension; - GifByteType *data = NULL; + GifByteType* data = NULL; if (DGifGetExtension(gif, &extension, &data) == GIF_ERROR) { goto End; } @@ -593,7 +593,7 @@ int main(int argc, const char *argv[]) { #else // !WEBP_HAVE_GIF -int main(int argc, const char *argv[]) { +int main(int argc, const char* argv[]) { fprintf(stderr, "GIF support not enabled in %s.\n", argv[0]); (void)argc; return 0; diff --git a/examples/vwebp.c b/examples/vwebp.c index 3e21af60..ef26e1ba 100644 --- a/examples/vwebp.c +++ b/examples/vwebp.c @@ -479,7 +479,7 @@ static void Help(void) { " 'q' / 'Q' / ESC .... quit\n"); } -int main(int argc, char *argv[]) { +int main(int argc, char* argv[]) { int c; WebPDecoderConfig* const config = &kParams.config; WebPIterator* const curr = &kParams.curr_frame; @@ -630,7 +630,7 @@ int main(int argc, char *argv[]) { #else // !WEBP_HAVE_GL -int main(int argc, const char *argv[]) { +int main(int argc, const char* argv[]) { fprintf(stderr, "OpenGL support not enabled in %s.\n", argv[0]); (void)argc; return 0; diff --git a/extras/get_disto.c b/extras/get_disto.c index 646b6391..151beada 100644 --- a/extras/get_disto.c +++ b/extras/get_disto.c @@ -226,7 +226,7 @@ static void Help(void) { " Also handles PNG, JPG and TIFF files, in addition to WebP.\n"); } -int main(int argc, const char *argv[]) { +int main(int argc, const char* argv[]) { WebPPicture pic1, pic2; size_t size1 = 0, size2 = 0; int ret = 1; diff --git a/extras/vwebp_sdl.c b/extras/vwebp_sdl.c index 762ad24a..3cf44666 100644 --- a/extras/vwebp_sdl.c +++ b/extras/vwebp_sdl.c @@ -92,7 +92,7 @@ int main(int argc, char* argv[]) { #else // !WEBP_HAVE_SDL -int main(int argc, const char *argv[]) { +int main(int argc, const char* argv[]) { fprintf(stderr, "SDL support not enabled in %s.\n", argv[0]); (void)argc; return 0; diff --git a/extras/webp_quality.c b/extras/webp_quality.c index e76c061d..0a3b25f1 100644 --- a/extras/webp_quality.c +++ b/extras/webp_quality.c @@ -15,7 +15,7 @@ #include "imageio/imageio_util.h" #include "../examples/unicode.h" -int main(int argc, const char *argv[]) { +int main(int argc, const char* argv[]) { int c; int quiet = 0; int ok = 1; diff --git a/src/dec/vp8li_dec.h b/src/dec/vp8li_dec.h index 0a4d613f..72b2e861 100644 --- a/src/dec/vp8li_dec.h +++ b/src/dec/vp8li_dec.h @@ -37,7 +37,7 @@ struct VP8LTransform { int bits_; // subsampling bits defining transform window. int xsize_; // transform window X index. int ysize_; // transform window Y index. - uint32_t *data_; // transform data. + uint32_t* data_; // transform data. }; typedef struct { @@ -48,23 +48,23 @@ typedef struct { int huffman_mask_; int huffman_subsample_bits_; int huffman_xsize_; - uint32_t *huffman_image_; + uint32_t* huffman_image_; int num_htree_groups_; - HTreeGroup *htree_groups_; - HuffmanCode *huffman_tables_; + HTreeGroup* htree_groups_; + HuffmanCode* huffman_tables_; } VP8LMetadata; typedef struct VP8LDecoder VP8LDecoder; struct VP8LDecoder { VP8StatusCode status_; VP8LDecodeState state_; - VP8Io *io_; + VP8Io* io_; - const WebPDecBuffer *output_; // shortcut to io->opaque->output + const WebPDecBuffer* output_; // shortcut to io->opaque->output - uint32_t *pixels_; // Internal data: either uint8_t* for alpha + uint32_t* pixels_; // Internal data: either uint8_t* for alpha // or uint32_t* for BGRA. - uint32_t *argb_cache_; // Scratch buffer for temporary BGRA storage. + uint32_t* argb_cache_; // Scratch buffer for temporary BGRA storage. VP8LBitReader br_; int incremental_; // if true, incremental decoding is expected @@ -86,8 +86,8 @@ struct VP8LDecoder { // or'd bitset storing the transforms types. uint32_t transforms_seen_; - uint8_t *rescaler_memory; // Working memory for rescaling work. - WebPRescaler *rescaler; // Common rescaler for all channels. + uint8_t* rescaler_memory; // Working memory for rescaling work. + WebPRescaler* rescaler; // Common rescaler for all channels. }; //------------------------------------------------------------------------------ diff --git a/src/dsp/dsp.h b/src/dsp/dsp.h index fafc2d05..a784de33 100644 --- a/src/dsp/dsp.h +++ b/src/dsp/dsp.h @@ -246,9 +246,9 @@ extern VP8Fdct VP8FTransform2; // performs two transforms at a time extern VP8WHT VP8FTransformWHT; // Predictions // *dst is the destination block. *top and *left can be NULL. -typedef void (*VP8IntraPreds)(uint8_t *dst, const uint8_t* left, +typedef void (*VP8IntraPreds)(uint8_t* dst, const uint8_t* left, const uint8_t* top); -typedef void (*VP8Intra4Preds)(uint8_t *dst, const uint8_t* top); +typedef void (*VP8Intra4Preds)(uint8_t* dst, const uint8_t* top); extern VP8Intra4Preds VP8EncPredLuma4; extern VP8IntraPreds VP8EncPredLuma16; extern VP8IntraPreds VP8EncPredChroma8; diff --git a/src/dsp/upsampling_msa.c b/src/dsp/upsampling_msa.c index 99eea70e..f2e03e85 100644 --- a/src/dsp/upsampling_msa.c +++ b/src/dsp/upsampling_msa.c @@ -576,9 +576,9 @@ static void FUNC_NAME(const uint8_t* top_y, const uint8_t* bot_y, \ const uint32_t l_uv = ((cur_u[0]) | ((cur_v[0]) << 16)); \ const uint32_t uv0 = (3 * tl_uv + l_uv + 0x00020002u) >> 2; \ const uint8_t* ptop_y = &top_y[1]; \ - uint8_t *ptop_dst = top_dst + XSTEP; \ + uint8_t* ptop_dst = top_dst + XSTEP; \ const uint8_t* pbot_y = &bot_y[1]; \ - uint8_t *pbot_dst = bot_dst + XSTEP; \ + uint8_t* pbot_dst = bot_dst + XSTEP; \ \ FUNC(top_y[0], uv0 & 0xff, (uv0 >> 16), top_dst); \ if (bot_y != NULL) { \ diff --git a/src/dsp/upsampling_neon.c b/src/dsp/upsampling_neon.c index 17cbc9f9..6ba71a7d 100644 --- a/src/dsp/upsampling_neon.c +++ b/src/dsp/upsampling_neon.c @@ -58,8 +58,8 @@ } while (0) // Turn the macro into a function for reducing code-size when non-critical -static void Upsample16Pixels_NEON(const uint8_t *r1, const uint8_t *r2, - uint8_t *out) { +static void Upsample16Pixels_NEON(const uint8_t* r1, const uint8_t* r2, + uint8_t* out) { UPSAMPLE_16PIXELS(r1, r2, out); } @@ -190,14 +190,14 @@ static const int16_t kCoeffs1[4] = { 19077, 26149, 6419, 13320 }; } #define NEON_UPSAMPLE_FUNC(FUNC_NAME, FMT, XSTEP) \ -static void FUNC_NAME(const uint8_t *top_y, const uint8_t *bottom_y, \ - const uint8_t *top_u, const uint8_t *top_v, \ - const uint8_t *cur_u, const uint8_t *cur_v, \ - uint8_t *top_dst, uint8_t *bottom_dst, int len) { \ +static void FUNC_NAME(const uint8_t* top_y, const uint8_t* bottom_y, \ + const uint8_t* top_u, const uint8_t* top_v, \ + const uint8_t* cur_u, const uint8_t* cur_v, \ + uint8_t* top_dst, uint8_t* bottom_dst, int len) { \ int block; \ /* 16 byte aligned array to cache reconstructed u and v */ \ uint8_t uv_buf[2 * 32 + 15]; \ - uint8_t *const r_uv = (uint8_t*)((uintptr_t)(uv_buf + 15) & ~15); \ + uint8_t* const r_uv = (uint8_t*)((uintptr_t)(uv_buf + 15) & ~15); \ const int uv_len = (len + 1) >> 1; \ /* 9 pixels must be read-able for each block */ \ const int num_blocks = (uv_len - 1) >> 3; \ diff --git a/src/enc/histogram_enc.c b/src/enc/histogram_enc.c index d89b9852..a4e6bf3a 100644 --- a/src/enc/histogram_enc.c +++ b/src/enc/histogram_enc.c @@ -641,7 +641,7 @@ static void HistogramAnalyzeEntropyBin(VP8LHistogramSet* const image_histo, // Merges some histograms with same bin_id together if it's advantageous. // Sets the remaining histograms to NULL. static void HistogramCombineEntropyBin(VP8LHistogramSet* const image_histo, - int *num_used, + int* num_used, const uint16_t* const clusters, uint16_t* const cluster_mappings, VP8LHistogram* cur_combo, diff --git a/src/enc/picture_csp_enc.c b/src/enc/picture_csp_enc.c index 02d9df76..b3510a81 100644 --- a/src/enc/picture_csp_enc.c +++ b/src/enc/picture_csp_enc.c @@ -1050,7 +1050,7 @@ int WebPPictureYUVAToARGB(WebPPicture* picture) { const int height = picture->height; const int argb_stride = 4 * picture->argb_stride; uint8_t* dst = (uint8_t*)picture->argb; - const uint8_t *cur_u = picture->u, *cur_v = picture->v, *cur_y = picture->y; + const uint8_t* cur_u = picture->u, *cur_v = picture->v, *cur_y = picture->y; WebPUpsampleLinePairFunc upsample = WebPGetLinePairConverter(ALPHA_OFFSET > 0); diff --git a/src/enc/vp8i_enc.h b/src/enc/vp8i_enc.h index 24e19446..57f588b1 100644 --- a/src/enc/vp8i_enc.h +++ b/src/enc/vp8i_enc.h @@ -249,7 +249,7 @@ typedef struct { int percent0_; // saved initial progress percent DError left_derr_; // left error diffusion (u/v) - DError *top_derr_; // top diffusion error - NULL if disabled + DError* top_derr_; // top diffusion error - NULL if disabled uint8_t* y_left_; // left luma samples (addressable from index -1 to 15). uint8_t* u_left_; // left u samples (addressable from index -1 to 7) diff --git a/src/utils/color_cache_utils.h b/src/utils/color_cache_utils.h index ec21d519..b45d47c2 100644 --- a/src/utils/color_cache_utils.h +++ b/src/utils/color_cache_utils.h @@ -26,7 +26,7 @@ extern "C" { // Main color cache struct. typedef struct { - uint32_t *colors_; // color entries + uint32_t* colors_; // color entries int hash_shift_; // Hash shift: 32 - hash_bits_. int hash_bits_; } VP8LColorCache; diff --git a/src/utils/thread_utils.c b/src/utils/thread_utils.c index 438296b4..4e470e17 100644 --- a/src/utils/thread_utils.c +++ b/src/utils/thread_utils.c @@ -73,7 +73,7 @@ typedef struct { #endif static int pthread_create(pthread_t* const thread, const void* attr, - unsigned int (__stdcall *start)(void*), void* arg) { + unsigned int (__stdcall* start)(void*), void* arg) { (void)attr; #ifdef USE_CREATE_THREAD *thread = CreateThread(NULL, /* lpThreadAttributes */ diff --git a/src/webp/encode.h b/src/webp/encode.h index 339f8810..a68518c0 100644 --- a/src/webp/encode.h +++ b/src/webp/encode.h @@ -306,7 +306,7 @@ struct WebPPicture { // YUV input (mostly used for input to lossy compression) WebPEncCSP colorspace; // colorspace: should be YUV420 for now (=Y'CbCr). int width, height; // dimensions (less or equal to WEBP_MAX_DIMENSION) - uint8_t *y, *u, *v; // pointers to luma/chroma planes. + uint8_t* y, *u, *v; // pointers to luma/chroma planes. int y_stride, uv_stride; // luma/chroma strides. uint8_t* a; // pointer to the alpha plane int a_stride; // stride of the alpha plane @@ -350,7 +350,7 @@ struct WebPPicture { uint32_t pad3[3]; // padding for later use // Unused for now - uint8_t *pad4, *pad5; + uint8_t* pad4, *pad5; uint32_t pad6[8]; // padding for later use // PRIVATE FIELDS