From 142c46291e2b8daaed2b7a9ef038f7eb39fbd503 Mon Sep 17 00:00:00 2001 From: Pascal Massimino Date: Fri, 29 Mar 2013 03:13:43 -0700 Subject: [PATCH] misc style fix Change-Id: Ib764cb09bd78ab6e72c60f495d55b752ad4dbe4d --- src/dsp/dec_neon.c | 2 +- src/dsp/enc_neon.c | 4 ++-- src/enc/cost.c | 2 +- src/enc/picture.c | 1 - src/enc/syntax.c | 3 +-- src/utils/rescaler.c | 2 +- src/webp/format_constants.h | 10 +++++----- 7 files changed, 11 insertions(+), 13 deletions(-) diff --git a/src/dsp/dec_neon.c b/src/dsp/dec_neon.c index 5d7cff15..952c7552 100644 --- a/src/dsp/dec_neon.c +++ b/src/dsp/dec_neon.c @@ -79,7 +79,7 @@ extern "C" { "vld4.8 {" #c1"[6], " #c2"[6], " #c3"[6], " #c4"[6]}," #b1 "," #stride"\n" \ "vld4.8 {" #c1"[7], " #c2"[7], " #c3"[7], " #c4"[7]}," #b2 "," #stride"\n" -#define STORE8x2(c1, c2, p,stride) \ +#define STORE8x2(c1, c2, p, stride) \ "vst2.8 {" #c1"[0], " #c2"[0]}," #p "," #stride " \n" \ "vst2.8 {" #c1"[1], " #c2"[1]}," #p "," #stride " \n" \ "vst2.8 {" #c1"[2], " #c2"[2]}," #p "," #stride " \n" \ diff --git a/src/dsp/enc_neon.c b/src/dsp/enc_neon.c index b5a1fbaf..06b6b09c 100644 --- a/src/dsp/enc_neon.c +++ b/src/dsp/enc_neon.c @@ -149,8 +149,8 @@ static void ITransform(const uint8_t* ref, // Same code as dec_neon.c static void ITransformWHT(const int16_t* in, int16_t* out) { - const int kStep = 32; // The store is only incrementing the pointer as if we - // had stored a single byte. + const int kStep = 32; // The store is only incrementing the pointer as if we + // had stored a single byte. __asm__ volatile ( // part 1 // load data into q0, q1 diff --git a/src/enc/cost.c b/src/enc/cost.c index 92e0cc71..e7c34c3d 100644 --- a/src/enc/cost.c +++ b/src/enc/cost.c @@ -359,7 +359,7 @@ void VP8CalculateLevelCosts(VP8Proba* const proba) { for (ctype = 0; ctype < NUM_TYPES; ++ctype) { for (band = 0; band < NUM_BANDS; ++band) { - for(ctx = 0; ctx < NUM_CTX; ++ctx) { + for (ctx = 0; ctx < NUM_CTX; ++ctx) { const uint8_t* const p = proba->coeffs_[ctype][band][ctx]; uint16_t* const table = proba->level_cost_[ctype][band][ctx]; const int cost_base = VP8BitCost(1, p[1]); diff --git a/src/enc/picture.c b/src/enc/picture.c index 739a7aa2..1e51a8dc 100644 --- a/src/enc/picture.c +++ b/src/enc/picture.c @@ -462,7 +462,6 @@ int WebPPictureRescale(WebPPicture* pic, int width, int height) { (uint8_t*)tmp.argb, width, height, tmp.argb_stride * 4, work, 4); - } WebPPictureFree(pic); free(work); diff --git a/src/enc/syntax.c b/src/enc/syntax.c index c157cafd..6ee03643 100644 --- a/src/enc/syntax.c +++ b/src/enc/syntax.c @@ -28,7 +28,6 @@ static int IsVP8XNeeded(const VP8Encoder* const enc) { } static int PutPaddingByte(const WebPPicture* const pic) { - const uint8_t pad_byte[1] = { 0 }; return !!pic->writer(pad_byte, 1, pic); } @@ -69,7 +68,7 @@ static WebPEncodingError PutVP8XHeader(const VP8Encoder* const enc) { PutLE32(vp8x + CHUNK_HEADER_SIZE, flags); PutLE24(vp8x + CHUNK_HEADER_SIZE + 4, pic->width - 1); PutLE24(vp8x + CHUNK_HEADER_SIZE + 7, pic->height - 1); - if(!pic->writer(vp8x, sizeof(vp8x), pic)) { + if (!pic->writer(vp8x, sizeof(vp8x), pic)) { return VP8_ENC_ERROR_BAD_WRITE; } return VP8_ENC_OK; diff --git a/src/utils/rescaler.c b/src/utils/rescaler.c index 9825dcbc..61530cfe 100644 --- a/src/utils/rescaler.c +++ b/src/utils/rescaler.c @@ -20,7 +20,7 @@ extern "C" { #endif #define RFIX 30 -#define MULT_FIX(x,y) (((int64_t)(x) * (y) + (1 << (RFIX - 1))) >> RFIX) +#define MULT_FIX(x, y) (((int64_t)(x) * (y) + (1 << (RFIX - 1))) >> RFIX) void WebPRescalerInit(WebPRescaler* const wrk, int src_width, int src_height, uint8_t* const dst, int dst_width, int dst_height, diff --git a/src/webp/format_constants.h b/src/webp/format_constants.h index 2ac8fe67..f87d2c9e 100644 --- a/src/webp/format_constants.h +++ b/src/webp/format_constants.h @@ -83,11 +83,11 @@ enum WebPFeatureFlags { ICCP_FLAG = 0x00000020 }; -#define MAX_CANVAS_SIZE (1 << 24) // 24-bit max for VP8X width/height. -#define MAX_IMAGE_AREA (1ULL << 32) // 32-bit max for width x height. -#define MAX_LOOP_COUNT (1 << 16) // maximum value for loop-count -#define MAX_DURATION (1 << 24) // maximum duration -#define MAX_POSITION_OFFSET (1 << 24) // maximum frame/fragment x/y offset +#define MAX_CANVAS_SIZE (1 << 24) // 24-bit max for VP8X width/height. +#define MAX_IMAGE_AREA (1ULL << 32) // 32-bit max for width x height. +#define MAX_LOOP_COUNT (1 << 16) // maximum value for loop-count +#define MAX_DURATION (1 << 24) // maximum duration +#define MAX_POSITION_OFFSET (1 << 24) // maximum frame/fragment x/y offset // Maximum chunk payload is such that adding the header and padding won't // overflow a uint32_t.