diff options
author | Diego Biurrun <diego@biurrun.de> | 2008-05-06 09:16:36 +0000 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2008-05-06 09:16:36 +0000 |
commit | ccd425e7993ef0e76da7bf10c566d33f7acc7c6d (patch) | |
tree | 29a2af2f8eb50c22d5b23cca7763d9d507273cab /libavcodec | |
parent | 91605c69fb79bc37e7b8ae756b42bbe1f3cf5423 (diff) | |
download | ffmpeg-ccd425e7993ef0e76da7bf10c566d33f7acc7c6d.tar.gz |
Remove unnecessary parentheses from return calls.
Originally committed as revision 13069 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/imgconvert.c | 2 | ||||
-rw-r--r-- | libavcodec/libamr.c | 4 | ||||
-rw-r--r-- | libavcodec/loco.c | 2 | ||||
-rw-r--r-- | libavcodec/pcm.c | 4 | ||||
-rw-r--r-- | libavcodec/pnm.c | 2 | ||||
-rw-r--r-- | libavcodec/ppc/check_altivec.c | 2 | ||||
-rw-r--r-- | libavcodec/rv34.c | 2 | ||||
-rw-r--r-- | libavcodec/svq1enc.c | 2 | ||||
-rw-r--r-- | libavcodec/truemotion1.c | 12 | ||||
-rw-r--r-- | libavcodec/truemotion2.c | 2 | ||||
-rw-r--r-- | libavcodec/vmdav.c | 6 | ||||
-rw-r--r-- | libavcodec/vorbis.c | 2 |
12 files changed, 21 insertions, 21 deletions
diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c index 88b8e3f328..1dcddaa48d 100644 --- a/libavcodec/imgconvert.c +++ b/libavcodec/imgconvert.c @@ -1362,7 +1362,7 @@ void ff_shrink88(uint8_t *dst, int dst_wrap, /* this is maybe slow, but allows for extensions */ static inline unsigned char gif_clut_index(uint8_t r, uint8_t g, uint8_t b) { - return ((((r)/47)%6)*6*6+(((g)/47)%6)*6+(((b)/47)%6)); + return (((r) / 47) % 6) * 6 * 6 + (((g) / 47) % 6) * 6 + (((b) / 47) % 6); } static void build_rgb_palette(uint8_t *palette, int has_alpha) diff --git a/libavcodec/libamr.c b/libavcodec/libamr.c index 2a7702a64d..4a73ee08c7 100644 --- a/libavcodec/libamr.c +++ b/libavcodec/libamr.c @@ -112,7 +112,7 @@ static int getBitrateMode(int bitrate) { if(rates[i].rate==bitrate) { - return(rates[i].mode); + return rates[i].mode; } } /* no bitrate matching, return an error */ @@ -559,7 +559,7 @@ static int getWBBitrateMode(int bitrate) { if(rates[i].rate==bitrate) { - return(rates[i].mode); + return rates[i].mode; } } /* no bitrate matching, return an error */ diff --git a/libavcodec/loco.c b/libavcodec/loco.c index 171652b13b..fcf93151e1 100644 --- a/libavcodec/loco.c +++ b/libavcodec/loco.c @@ -152,7 +152,7 @@ static int loco_decode_plane(LOCOContext *l, uint8_t *data, int width, int heigh data += stride; } - return ((get_bits_count(&rc.gb) + 7) >> 3); + return (get_bits_count(&rc.gb) + 7) >> 3; } static int decode_frame(AVCodecContext *avctx, diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c index c3631936f0..0c47eedff6 100644 --- a/libavcodec/pcm.c +++ b/libavcodec/pcm.c @@ -56,7 +56,7 @@ static av_cold int alaw2linear(unsigned char a_val) if(seg) t= (t + t + 1 + 32) << (seg + 2); else t= (t + t + 1 ) << 3; - return ((a_val & SIGN_BIT) ? t : -t); + return (a_val & SIGN_BIT) ? t : -t; } static av_cold int ulaw2linear(unsigned char u_val) @@ -73,7 +73,7 @@ static av_cold int ulaw2linear(unsigned char u_val) t = ((u_val & QUANT_MASK) << 3) + BIAS; t <<= ((unsigned)u_val & SEG_MASK) >> SEG_SHIFT; - return ((u_val & SIGN_BIT) ? (BIAS - t) : (t - BIAS)); + return (u_val & SIGN_BIT) ? (BIAS - t) : (t - BIAS); } /* 16384 entries per table */ diff --git a/libavcodec/pnm.c b/libavcodec/pnm.c index 1f28aced69..587b703bed 100644 --- a/libavcodec/pnm.c +++ b/libavcodec/pnm.c @@ -23,7 +23,7 @@ static inline int pnm_space(int c) { - return (c == ' ' || c == '\n' || c == '\r' || c == '\t'); + return c == ' ' || c == '\n' || c == '\r' || c == '\t'; } static void pnm_get(PNMContext *sc, char *str, int buf_size) diff --git a/libavcodec/ppc/check_altivec.c b/libavcodec/ppc/check_altivec.c index cf55b9a1d5..932c218033 100644 --- a/libavcodec/ppc/check_altivec.c +++ b/libavcodec/ppc/check_altivec.c @@ -52,7 +52,7 @@ int has_altivec(void) err = sysctl(sels, 2, &has_vu, &len, NULL, 0); - if (err == 0) return (has_vu != 0); + if (err == 0) return has_vu != 0; return 0; #elif defined(RUNTIME_CPUDETECT) int proc_ver; diff --git a/libavcodec/rv34.c b/libavcodec/rv34.c index 3f5359196e..d7f75874fa 100644 --- a/libavcodec/rv34.c +++ b/libavcodec/rv34.c @@ -1186,7 +1186,7 @@ static int rv34_decode_slice(RV34DecContext *r, int end, uint8_t* buf, int buf_s } ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, AC_END|DC_END|MV_END); - return (s->mb_y == s->mb_height); + return s->mb_y == s->mb_height; } /** @} */ // recons group end diff --git a/libavcodec/svq1enc.c b/libavcodec/svq1enc.c index de71caa205..fffa85ebf9 100644 --- a/libavcodec/svq1enc.c +++ b/libavcodec/svq1enc.c @@ -551,7 +551,7 @@ static int svq1_encode_frame(AVCodecContext *avctx, unsigned char *buf, flush_put_bits(&s->pb); - return (put_bits_count(&s->pb) / 8); + return put_bits_count(&s->pb) / 8; } static av_cold int svq1_encode_end(AVCodecContext *avctx) diff --git a/libavcodec/truemotion1.c b/libavcodec/truemotion1.c index c2b8c1d16e..48625f8b1c 100644 --- a/libavcodec/truemotion1.c +++ b/libavcodec/truemotion1.c @@ -176,7 +176,7 @@ static int make_ydt15_entry(int p1, int p2, int16_t *ydt) lo += (lo << 5) + (lo << 10); hi = ydt[p2]; hi += (hi << 5) + (hi << 10); - return ((lo + (hi << 16)) << 1); + return (lo + (hi << 16)) << 1; } #ifdef WORDS_BIGENDIAN @@ -190,7 +190,7 @@ static int make_cdt15_entry(int p1, int p2, int16_t *cdt) b = cdt[p2]; r = cdt[p1] << 10; lo = b + r; - return ((lo + (lo << 16)) << 1); + return (lo + (lo << 16)) << 1; } #ifdef WORDS_BIGENDIAN @@ -205,7 +205,7 @@ static int make_ydt16_entry(int p1, int p2, int16_t *ydt) lo += (lo << 6) + (lo << 11); hi = ydt[p2]; hi += (hi << 6) + (hi << 11); - return ((lo + (hi << 16)) << 1); + return (lo + (hi << 16)) << 1; } #ifdef WORDS_BIGENDIAN @@ -219,7 +219,7 @@ static int make_cdt16_entry(int p1, int p2, int16_t *cdt) b = cdt[p2]; r = cdt[p1] << 11; lo = b + r; - return ((lo + (lo << 16)) << 1); + return (lo + (lo << 16)) << 1; } #ifdef WORDS_BIGENDIAN @@ -232,7 +232,7 @@ static int make_ydt24_entry(int p1, int p2, int16_t *ydt) lo = ydt[p1]; hi = ydt[p2]; - return ((lo + (hi << 8) + (hi << 16)) << 1); + return (lo + (hi << 8) + (hi << 16)) << 1; } #ifdef WORDS_BIGENDIAN @@ -245,7 +245,7 @@ static int make_cdt24_entry(int p1, int p2, int16_t *cdt) b = cdt[p2]; r = cdt[p1]<<16; - return ((b+r) << 1); + return (b+r) << 1; } static void gen_vector_table15(TrueMotion1Context *s, const uint8_t *sel_vector_table) diff --git a/libavcodec/truemotion2.c b/libavcodec/truemotion2.c index 22a9ebb456..5ed624c0df 100644 --- a/libavcodec/truemotion2.c +++ b/libavcodec/truemotion2.c @@ -232,7 +232,7 @@ static inline int tm2_read_header(TM2Context *ctx, const uint8_t *buf) return -1; } - return (buf - obuf); + return buf - obuf; } static int tm2_read_deltas(TM2Context *ctx, int stream_id) { diff --git a/libavcodec/vmdav.c b/libavcodec/vmdav.c index 00b0f59af3..0732eac86b 100644 --- a/libavcodec/vmdav.c +++ b/libavcodec/vmdav.c @@ -162,13 +162,13 @@ static int rle_unpack(const unsigned char *src, unsigned char *dest, if (l & 0x80) { l = (l & 0x7F) * 2; if (pd + l > dest_end) - return (ps - src); + return ps - src; memcpy(pd, ps, l); ps += l; pd += l; } else { if (pd + i > dest_end) - return (ps - src); + return ps - src; for (i = 0; i < l; i++) { *pd++ = ps[0]; *pd++ = ps[1]; @@ -178,7 +178,7 @@ static int rle_unpack(const unsigned char *src, unsigned char *dest, i += l; } while (i < src_len); - return (ps - src); + return ps - src; } static void vmd_decode(VmdVideoContext *s) diff --git a/libavcodec/vorbis.c b/libavcodec/vorbis.c index 76d6308b5c..f39380aa0e 100644 --- a/libavcodec/vorbis.c +++ b/libavcodec/vorbis.c @@ -40,7 +40,7 @@ unsigned int ff_vorbis_nth_root(unsigned int x, unsigned int n) { // x^(1/n) for(i=0,j=ret;i<n-1;i++) j*=ret; } while (j<=x); - return (ret-1); + return ret - 1; } // Generate vlc codes from vorbis huffman code lengths |