[FFmpeg-cvslog] cosmetics: drop some completely pointless parentheses
Diego Biurrun
git at videolan.org
Thu Dec 8 00:31:48 CET 2011
ffmpeg | branch: master | Diego Biurrun <diego at biurrun.de> | Wed Dec 7 13:48:58 2011 +0100| [ee41963f19eb6303b1582601dfccb1753866ab63] | committer: Diego Biurrun
cosmetics: drop some completely pointless parentheses
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ee41963f19eb6303b1582601dfccb1753866ab63
---
libavcodec/atrac3.c | 11 +++++++----
libavcodec/mpegvideo.c | 7 ++++---
libavcodec/mpegvideo_common.h | 2 +-
libavcodec/msrledec.c | 4 ++--
libavcodec/vc1dec.c | 2 +-
libavdevice/libdc1394.c | 4 ++--
6 files changed, 17 insertions(+), 13 deletions(-)
diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c
index bdd0340..744ef17 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 78fae10..f2651c8 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 96155d0..b5b0d23 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 46cd50d..5e33a59 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 b5b8c29..7c9e906 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 71f08b1..ac4bb09 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");
More information about the ffmpeg-cvslog
mailing list