From 50679acf259bd2b79c518c6a7ee8b540512345a9 Mon Sep 17 00:00:00 2001 From: Pascal Massimino Date: Mon, 30 Apr 2012 06:57:57 +0000 Subject: [PATCH] minor style fixes Change-Id: I78a6fa19a799c41d6536631f547279692b658c4d --- src/enc/frame.c | 10 +++++----- src/enc/webpenc.c | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/enc/frame.c b/src/enc/frame.c index 3c7b09d6..54bd07b1 100644 --- a/src/enc/frame.c +++ b/src/enc/frame.c @@ -113,7 +113,7 @@ static int Record(int bit, proba_t* const stats) { // Note: no need to record the fixed probas. static int RecordCoeffs(int ctx, const VP8Residual* const res) { int n = res->first; - proba_t *s = res->stats[VP8EncBands[n]][ctx]; + proba_t* s = res->stats[VP8EncBands[n]][ctx]; if (res->last < 0) { Record(0, s + 0); return 0; @@ -242,7 +242,7 @@ static void SetResidualCoeffs(const int16_t* const coeffs, static int GetResidualCost(int ctx, const VP8Residual* const res) { int n = res->first; int p0 = res->prob[VP8EncBands[n]][ctx][0]; - const uint16_t *t = res->cost[VP8EncBands[n]][ctx]; + const uint16_t* t = res->cost[VP8EncBands[n]][ctx]; int cost; if (res->last < 0) { @@ -717,16 +717,16 @@ static void StoreSideInfo(const VP8EncIterator* const it) { const VP8MBInfo* const mb = it->mb_; WebPPicture* const pic = enc->pic_; - if (pic->stats) { + if (pic->stats != NULL) { StoreSSE(it); enc->block_count_[0] += (mb->type_ == 0); enc->block_count_[1] += (mb->type_ == 1); enc->block_count_[2] += (mb->skip_ != 0); } - if (pic->extra_info) { + if (pic->extra_info != NULL) { uint8_t* const info = &pic->extra_info[it->x_ + it->y_ * enc->mb_w_]; - switch(pic->extra_info_type) { + switch (pic->extra_info_type) { case 1: *info = mb->type_; break; case 2: *info = mb->segment_; break; case 3: *info = enc->dqm_[mb->segment_].quant_; break; diff --git a/src/enc/webpenc.c b/src/enc/webpenc.c index 714d9811..ee68d741 100644 --- a/src/enc/webpenc.c +++ b/src/enc/webpenc.c @@ -49,7 +49,7 @@ int WebPPictureInitInternal(WebPPicture* const picture, int version) { if (version != WEBP_ENCODER_ABI_VERSION) { return 0; // caller/system version mismatch! } - if (picture) { + if (picture != NULL) { memset(picture, 0, sizeof(*picture)); picture->writer = DummyWriter; WebPEncodingSetError(picture, VP8_ENC_OK); @@ -260,7 +260,7 @@ static VP8Encoder* InitEncoder(const WebPConfig* const config, } static void DeleteEncoder(VP8Encoder* enc) { - if (enc) { + if (enc != NULL) { VP8EncDeleteAlpha(enc); #ifdef WEBP_EXPERIMENTAL_FEATURES VP8EncDeleteLayer(enc); @@ -287,7 +287,7 @@ static void FinalizePSNR(const VP8Encoder* const enc) { static void StoreStats(VP8Encoder* const enc) { WebPAuxStats* const stats = enc->pic_->stats; - if (stats) { + if (stats != NULL) { int i, s; for (i = 0; i < NUM_MB_SEGMENTS; ++i) { stats->segment_level[i] = enc->dqm_[i].fstrength_;