]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Remove unnecessary parentheses from return calls.
authordiego <diego@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Tue, 6 May 2008 09:16:36 +0000 (09:16 +0000)
committerdiego <diego@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Tue, 6 May 2008 09:16:36 +0000 (09:16 +0000)
git-svn-id: file:///var/local/repositories/ffmpeg/trunk@13069 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

22 files changed:
libavcodec/imgconvert.c
libavcodec/libamr.c
libavcodec/loco.c
libavcodec/pcm.c
libavcodec/pnm.c
libavcodec/ppc/check_altivec.c
libavcodec/rv34.c
libavcodec/svq1enc.c
libavcodec/truemotion1.c
libavcodec/truemotion2.c
libavcodec/vmdav.c
libavcodec/vorbis.c
libavformat/bethsoftvid.c
libavformat/dv.c
libavformat/gif.c
libavformat/movenc.c
libavformat/mp3.c
libavformat/mpegts.c
libavformat/mtv.c
libavformat/rtsp.c
libavformat/utils.c
libavutil/base64.c

index 88b8e3f32861c83b85dabadbb9926cbfbb54c418..1dcddaa48da1ed4b740f0ffe74415bb574df62b9 100644 (file)
@@ -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)
index 2a7702a64dccd1935cbc123a7ac6615e32cf600d..4a73ee08c7fb96aa7e1035c413317984ae4bb499 100644 (file)
@@ -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 */
index 171652b13be5546b556e4247ebd81081c66db3f2..fcf93151e1e7be66d34d4e5e714273185da7c3a7 100644 (file)
@@ -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,
index c3631936f0817316d9963cd4b8cc84d9aa1f1077..0c47eedff638c055cb58a2c84fe246723442fd4b 100644 (file)
@@ -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 */
index 1f28aced690369e1be309f8b776de343ca3c9377..587b703bedc7fc93dd5a4daa3d8365a6aa03ceda 100644 (file)
@@ -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)
index cf55b9a1d51847bef5c989a2dc966e9d78f4f838..932c218033e0c5b7655e4a9b9e286dc1a69cfcc6 100644 (file)
@@ -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;
index 3f5359196e9a04c8548d1e14b3d874d1baa23057..d7f75874facfc1955aee8a050654ff49571c4008 100644 (file)
@@ -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
index de71caa2057110662c9ad082a373df28fefbff5b..fffa85ebf9e921eeb00f1ce2976ef7ad34a21240 100644 (file)
@@ -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)
index c2b8c1d16ec1ab7f05708decfa567226d413a183..48625f8b1ce7d823ad985827c28c62bf5ef2fc81 100644 (file)
@@ -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)
index 22a9ebb4564766d39f0529044f0cf48da5f213d4..5ed624c0df663de482ebf33a1ac03bdf7d1697b4 100644 (file)
@@ -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) {
index 00b0f59af336012a58d2291c16eda0b49ca55a41..0732eac86b332700014726321efecfeec7e974af 100644 (file)
@@ -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)
index 76d6308b5c5001e0220412029b56a52ff08a4633..f39380aa0e1c0a7e5faadd9a7a9682eab9e2f8b7 100644 (file)
@@ -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
index 594779698b5bfcf31d428c5979abc34e15e2745e..9b04d3fbe06c6641aafa1642f248c77cec763ee3 100644 (file)
@@ -202,7 +202,7 @@ static int vid_read_packet(AVFormatContext *s,
             audio_length = get_le16(pb);
             ret_value = av_get_packet(pb, pkt, audio_length);
             pkt->stream_index = 1;
-            return (ret_value != audio_length ? AVERROR(EIO) : ret_value);
+            return ret_value != audio_length ? AVERROR(EIO) : ret_value;
 
         case VIDEO_P_FRAME:
         case VIDEO_YOFF_P_FRAME:
index 6fb27bfe061a35dca9f0c7e03851698289e22969..0f4c5cf0b4040b1903404d835b3e0d15c56211e3 100644 (file)
@@ -87,7 +87,7 @@ static const uint8_t* dv_extract_pack(uint8_t* frame, enum dv_pack_type t)
           return NULL;
     }
 
-    return (frame[offs] == t ? &frame[offs] : NULL);
+    return frame[offs] == t ? &frame[offs] : NULL;
 }
 
 /*
index 7b71faea931ded06e7256c1f7df0b1ad810dc506..b952fbe69702a2d71ba2570b54433266dec3d9d9 100644 (file)
@@ -236,7 +236,7 @@ static int gif_image_write_header(ByteIOContext *pb,
 /* 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);
 }
 
 
index b5b4da95f50ea490a703a5e532bd3d4b58e7bb3c..5ded25076edc783dce9d20ab7f774b23e7d1b808 100644 (file)
@@ -1247,7 +1247,7 @@ static int ascii_to_wc (ByteIOContext *pb, const uint8_t *b)
 
 static uint16_t language_code (const char *str)
 {
-    return ((((str[0]-0x60) & 0x1F)<<10) + (((str[1]-0x60) & 0x1F)<<5) + ((str[2]-0x60) & 0x1F));
+    return (((str[0]-0x60) & 0x1F) << 10) + (((str[1]-0x60) & 0x1F) << 5) + ((str[2]-0x60) & 0x1F);
 }
 
 static int mov_write_uuidusmt_tag (ByteIOContext *pb, AVFormatContext *s)
index 64e0ce285a00d7864471dae9597c6b34623e235f..1b3ff011f682b00602d30f729b76c05cbd202007 100644 (file)
@@ -160,7 +160,7 @@ static const char *id3v1_genre_str[ID3v1_GENRE_MAX + 1] = {
 /* buf must be ID3v2_HEADER_SIZE byte long */
 static int id3v2_match(const uint8_t *buf)
 {
-    return (buf[0] == 'I' &&
+    return  buf[0] == 'I' &&
             buf[1] == 'D' &&
             buf[2] == '3' &&
             buf[3] != 0xff &&
@@ -168,7 +168,7 @@ static int id3v2_match(const uint8_t *buf)
             (buf[6] & 0x80) == 0 &&
             (buf[7] & 0x80) == 0 &&
             (buf[8] & 0x80) == 0 &&
-            (buf[9] & 0x80) == 0);
+            (buf[9] & 0x80) == 0;
 }
 
 static unsigned int id3v2_get_size(ByteIOContext *s, int len)
index 9407dae138750a883f24a550749f713c047e0d06..6cb4bcab4f765af23a24b77d4e5119b2e03fbc91 100644 (file)
@@ -227,7 +227,7 @@ static int discard_pid(MpegTSContext *ts, unsigned int pid)
         }
     }
 
-    return (!used && discarded);
+    return !used && discarded;
 }
 
 /**
index 32057e6236c44ba3d243133305da047b045d271f..6db0d67bbbbbe1c8e5bd1b2e5823dd21f88950b2 100644 (file)
@@ -124,7 +124,7 @@ static int mtv_read_header(AVFormatContext *s, AVFormatParameters *ap)
     if(url_fseek(pb, MTV_HEADER_SIZE, SEEK_SET) != MTV_HEADER_SIZE)
         return AVERROR(EIO);
 
-    return(0);
+    return 0;
 
 }
 
@@ -171,7 +171,7 @@ static int mtv_read_packet(AVFormatContext *s, AVPacket *pkt)
         pkt->stream_index = VIDEO_SID;
     }
 
-    return(ret);
+    return ret;
 }
 
 AVInputFormat mtv_demuxer = {
index 5064865f127265483d06951efb0c1a0369a6dbff..d5c694ac7766dae6f3ad041884eb5de9fe96ce33 100644 (file)
@@ -90,7 +90,7 @@ static int rtsp_probe(AVProbeData *p)
 
 static int redir_isspace(int c)
 {
-    return (c == ' ' || c == '\t' || c == '\n' || c == '\r');
+    return c == ' ' || c == '\t' || c == '\n' || c == '\r';
 }
 
 static void skip_spaces(const char **pp)
index 530a9bb16a7e59c8bf98fb47860c4111968d0fbb..5d164c5d5a26948cccdabd32c64c5d01fb9ece0f 100644 (file)
@@ -1690,7 +1690,7 @@ static int has_codec_parameters(AVCodecContext *enc)
         val = 1;
         break;
     }
-    return (enc->codec_id != CODEC_ID_NONE && val != 0);
+    return enc->codec_id != CODEC_ID_NONE && val != 0;
 }
 
 static int try_decode_frame(AVStream *st, const uint8_t *data, int size)
index 8567c9924bcacf0ea3763b7feb083efc644a5195..a6b44fb71c3b14848b1f905f160b033089f43870 100644 (file)
@@ -61,7 +61,7 @@ int av_base64_decode(uint8_t * out, const char *in, int out_length)
         }
     }
 
-    return (dst - out);
+    return dst - out;
 }
 
 /*****************************************************************************