summaryrefslogtreecommitdiff
path: root/libavcodec/atrac3.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-12-08 00:23:37 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-12-08 00:23:37 +0100
commit8e2bab5d4bddb4029503c0f90623854948ddb3c5 (patch)
tree33a095ce0e92ed353c96c9b25b746ee45a2a00c7 /libavcodec/atrac3.c
parent7023fb81c78e10a6a7af6e6bc8902f99da81c458 (diff)
parent78212cefe14a2086dc1ea3778b76623b949e5d0c (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: drawtext: remove typo pcm-mpeg: implement new audio decoding api w32thread: port fixes to pthread_cond_broadcast() from x264. doc: add editor configuration section with Vim and Emacs settings dxva2.h: include d3d9.h to define LPDIRECT3DSURFACE9 avformat/utils: Drop unused goto label. doxygen: Replace '\' by '@' in Doxygen markup tags. cosmetics: drop some completely pointless parentheses cljr: simplify CLJRContext drawtext: introduce rand(min, max) drawtext: introduce explicit draw/hide variable rtmp: Use nb_invokes for all invoke commands Conflicts: libavcodec/mpegvideo.c libavfilter/vf_drawtext.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/atrac3.c')
-rw-r--r--libavcodec/atrac3.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c
index ccbb718e00..b9f1f516cc 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)