diff options
author | Diego Biurrun <diego@biurrun.de> | 2011-12-07 16:48:58 +0400 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2011-12-07 18:29:13 +0400 |
commit | ee41963f19eb6303b1582601dfccb1753866ab63 (patch) | |
tree | b57d0533b89169f91867435381f34b519706671a | |
parent | fc9489f6adb9d3e790e6e5ebe984eaee0c733b09 (diff) |
cosmetics: drop some completely pointless parentheses
-rw-r--r-- | libavcodec/atrac3.c | 11 | ||||
-rw-r--r-- | libavcodec/mpegvideo.c | 7 | ||||
-rw-r--r-- | libavcodec/mpegvideo_common.h | 2 | ||||
-rw-r--r-- | libavcodec/msrledec.c | 4 | ||||
-rw-r--r-- | libavcodec/vc1dec.c | 2 | ||||
-rw-r--r-- | libavdevice/libdc1394.c | 4 |
6 files changed, 17 insertions, 13 deletions
diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c index bdd03402da..744ef17a06 100644 --- a/libavcodec/atrac3.c +++ b/libavcodec/atrac3.c @@ -708,9 +708,10 @@ static int decodeChannelSoundUnit (ATRAC3Context *q, GetBitContext *gb, channel_ memset(pSnd->IMDCT_buf, 0, 512 * sizeof(float)); /* gain compensation and overlapping */ - gainCompensateAndOverlap (pSnd->IMDCT_buf, &(pSnd->prevFrame[band*256]), &(pOut[band*256]), - &((pSnd->gainBlock[1 - (pSnd->gcBlkSwitch)]).gBlock[band]), - &((pSnd->gainBlock[pSnd->gcBlkSwitch]).gBlock[band])); + gainCompensateAndOverlap(pSnd->IMDCT_buf, &pSnd->prevFrame[band * 256], + &pOut[band * 256], + &pSnd->gainBlock[1 - pSnd->gcBlkSwitch].gBlock[band], + &pSnd->gainBlock[ pSnd->gcBlkSwitch].gBlock[band]); } /* Swap the gain control buffers for the next frame. */ @@ -795,7 +796,9 @@ static int decodeFrame(ATRAC3Context *q, const uint8_t* databuf, for (i=0 ; i<q->channels ; i++) { /* Set the bitstream reader at the start of a channel sound unit. */ - init_get_bits(&q->gb, databuf+((i*q->bytes_per_frame)/q->channels), (q->bits_per_frame)/q->channels); + init_get_bits(&q->gb, + databuf + i * q->bytes_per_frame / q->channels, + q->bits_per_frame / q->channels); result = decodeChannelSoundUnit(q,&q->gb, &q->pUnits[i], out_samples[i], i, q->codingMode); if (result != 0) diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 78fae1026d..f2651c8ac1 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -885,7 +885,7 @@ av_cold int MPV_common_init(MpegEncContext *s) s->parse_context.state = -1; if ((s->avctx->debug & (FF_DEBUG_VIS_QP | FF_DEBUG_VIS_MB_TYPE)) || - (s->avctx->debug_mv)) { + s->avctx->debug_mv) { s->visualization_buffer[0] = av_malloc((s->mb_width * 16 + 2 * EDGE_WIDTH) * s->mb_height * 16 + 2 * EDGE_WIDTH); s->visualization_buffer[1] = av_malloc((s->mb_width * 16 + @@ -1564,7 +1564,8 @@ void ff_print_debug_info(MpegEncContext *s, AVFrame *pict){ } } - if((s->avctx->debug&(FF_DEBUG_VIS_QP|FF_DEBUG_VIS_MB_TYPE)) || (s->avctx->debug_mv)){ + if ((s->avctx->debug & (FF_DEBUG_VIS_QP | FF_DEBUG_VIS_MB_TYPE)) || + s->avctx->debug_mv) { const int shift= 1 + s->quarter_sample; int mb_y; uint8_t *ptr; @@ -1589,7 +1590,7 @@ void ff_print_debug_info(MpegEncContext *s, AVFrame *pict){ int mb_x; for(mb_x=0; mb_x<s->mb_width; mb_x++){ const int mb_index= mb_x + mb_y*s->mb_stride; - if((s->avctx->debug_mv) && pict->motion_val){ + if (s->avctx->debug_mv && pict->motion_val) { int type; for(type=0; type<3; type++){ int direction = 0; diff --git a/libavcodec/mpegvideo_common.h b/libavcodec/mpegvideo_common.h index 96155d0f9a..b5b0d23c16 100644 --- a/libavcodec/mpegvideo_common.h +++ b/libavcodec/mpegvideo_common.h @@ -585,7 +585,7 @@ static inline void chroma_4mv_motion(MpegEncContext *s, if (src_y == (s->height >> 1)) dxy &= ~2; - offset = (src_y * (s->uvlinesize)) + src_x; + offset = src_y * s->uvlinesize + src_x; ptr = ref_picture[1] + offset; if(s->flags&CODEC_FLAG_EMU_EDGE){ if( (unsigned)src_x > (s->h_edge_pos>>1) - (dxy &1) - 8 diff --git a/libavcodec/msrledec.c b/libavcodec/msrledec.c index 46cd50dcbc..5e33a59280 100644 --- a/libavcodec/msrledec.c +++ b/libavcodec/msrledec.c @@ -138,8 +138,8 @@ static int msrle_decode_8_16_24_32(AVCodecContext *avctx, AVPicture *pic, int de uint32_t av_uninit(pix32); unsigned int width= FFABS(pic->linesize[0]) / (depth >> 3); - output = pic->data[0] + (avctx->height - 1) * pic->linesize[0]; - output_end = pic->data[0] + (avctx->height) * pic->linesize[0]; + output = pic->data[0] + (avctx->height - 1) * pic->linesize[0]; + output_end = pic->data[0] + avctx->height * pic->linesize[0]; while(src < data + srcsize) { p1 = *src++; if(p1 == 0) { //Escape code diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c index b5b8c29bda..7c9e906505 100644 --- a/libavcodec/vc1dec.c +++ b/libavcodec/vc1dec.c @@ -236,7 +236,7 @@ static void vc1_put_signed_blocks_clamped(VC1Context *v) if (s->mb_x) { topleft_mb_pos = (s->mb_y - 1) * s->mb_stride + s->mb_x - 1; fieldtx = v->fieldtx_plane[topleft_mb_pos]; - stride_y = (s->linesize) << fieldtx; + stride_y = s->linesize << fieldtx; v_dist = (16 - fieldtx) >> (fieldtx == 0); s->dsp.put_signed_pixels_clamped(v->block[v->topleft_blk_idx][0], s->dest[0] - 16 * s->linesize - 16, diff --git a/libavdevice/libdc1394.c b/libavdevice/libdc1394.c index 71f08b137d..ac4bb093d4 100644 --- a/libavdevice/libdc1394.c +++ b/libavdevice/libdc1394.c @@ -371,8 +371,8 @@ static int dc1394_v2_read_packet(AVFormatContext *c, AVPacket *pkt) res = dc1394_capture_dequeue(dc1394->camera, DC1394_CAPTURE_POLICY_WAIT, &dc1394->frame); if (res == DC1394_SUCCESS) { - dc1394->packet.data = (uint8_t *)(dc1394->frame->image); - dc1394->packet.pts = (dc1394->current_frame * 1000000) / (dc1394->frame_rate); + dc1394->packet.data = (uint8_t *) dc1394->frame->image; + dc1394->packet.pts = dc1394->current_frame * 1000000 / dc1394->frame_rate; res = dc1394->frame->image_bytes; } else { av_log(c, AV_LOG_ERROR, "DMA capture failed\n"); |