Mercurial > libavcodec.hg
changeset 6750:c93570aeb3eb libavcodec
Remove unnecessary parentheses from return calls.
author | diego |
---|---|
date | Tue, 06 May 2008 09:16:36 +0000 |
parents | b1778cf7f3b1 |
children | 1fc844ec6430 |
files | imgconvert.c libamr.c loco.c pcm.c pnm.c ppc/check_altivec.c rv34.c svq1enc.c truemotion1.c truemotion2.c vmdav.c vorbis.c |
diffstat | 12 files changed, 21 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/imgconvert.c Sun May 04 22:39:12 2008 +0000 +++ b/imgconvert.c Tue May 06 09:16:36 2008 +0000 @@ -1362,7 +1362,7 @@ /* 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)
--- a/libamr.c Sun May 04 22:39:12 2008 +0000 +++ b/libamr.c Tue May 06 09:16:36 2008 +0000 @@ -112,7 +112,7 @@ { if(rates[i].rate==bitrate) { - return(rates[i].mode); + return rates[i].mode; } } /* no bitrate matching, return an error */ @@ -559,7 +559,7 @@ { if(rates[i].rate==bitrate) { - return(rates[i].mode); + return rates[i].mode; } } /* no bitrate matching, return an error */
--- a/loco.c Sun May 04 22:39:12 2008 +0000 +++ b/loco.c Tue May 06 09:16:36 2008 +0000 @@ -152,7 +152,7 @@ data += stride; } - return ((get_bits_count(&rc.gb) + 7) >> 3); + return (get_bits_count(&rc.gb) + 7) >> 3; } static int decode_frame(AVCodecContext *avctx,
--- a/pcm.c Sun May 04 22:39:12 2008 +0000 +++ b/pcm.c Tue May 06 09:16:36 2008 +0000 @@ -56,7 +56,7 @@ 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 @@ 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 */
--- a/pnm.c Sun May 04 22:39:12 2008 +0000 +++ b/pnm.c Tue May 06 09:16:36 2008 +0000 @@ -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)
--- a/ppc/check_altivec.c Sun May 04 22:39:12 2008 +0000 +++ b/ppc/check_altivec.c Tue May 06 09:16:36 2008 +0000 @@ -52,7 +52,7 @@ 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;
--- a/rv34.c Sun May 04 22:39:12 2008 +0000 +++ b/rv34.c Tue May 06 09:16:36 2008 +0000 @@ -1186,7 +1186,7 @@ } 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
--- a/svq1enc.c Sun May 04 22:39:12 2008 +0000 +++ b/svq1enc.c Tue May 06 09:16:36 2008 +0000 @@ -551,7 +551,7 @@ 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)
--- a/truemotion1.c Sun May 04 22:39:12 2008 +0000 +++ b/truemotion1.c Tue May 06 09:16:36 2008 +0000 @@ -176,7 +176,7 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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)
--- a/truemotion2.c Sun May 04 22:39:12 2008 +0000 +++ b/truemotion2.c Tue May 06 09:16:36 2008 +0000 @@ -232,7 +232,7 @@ return -1; } - return (buf - obuf); + return buf - obuf; } static int tm2_read_deltas(TM2Context *ctx, int stream_id) {
--- a/vmdav.c Sun May 04 22:39:12 2008 +0000 +++ b/vmdav.c Tue May 06 09:16:36 2008 +0000 @@ -162,13 +162,13 @@ 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 @@ i += l; } while (i < src_len); - return (ps - src); + return ps - src; } static void vmd_decode(VmdVideoContext *s)