summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-06-08 16:52:15 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-07-22 08:12:20 +0200
commit6914aa7fb4f88379dec6d177791811adf87d2f07 (patch)
treecc948bcc337fec50a5d9d8770558035125533847 /libavcodec
parent421de73a10e26d69a81e88b706d0fe4b3407b580 (diff)
avcodec/adpcm: Fix indentation
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/adpcm.c76
1 files changed, 38 insertions, 38 deletions
diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c
index f3eaefeffe..79581c863c 100644
--- a/libavcodec/adpcm.c
+++ b/libavcodec/adpcm.c
@@ -1034,18 +1034,18 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
}
bytestream2_skip(&gb, avctx->block_align - avctx->channels * 4);
} else {
- for (int n = 0; n < (nb_samples - 1) / 8; n++) {
- for (int i = 0; i < avctx->channels; i++) {
- ADPCMChannelStatus *cs = &c->status[i];
- samples = &samples_p[i][1 + n * 8];
- for (int m = 0; m < 8; m += 2) {
- int v = bytestream2_get_byteu(&gb);
- samples[m ] = adpcm_ima_expand_nibble(cs, v & 0x0F, 3);
- samples[m + 1] = adpcm_ima_expand_nibble(cs, v >> 4 , 3);
+ for (int n = 0; n < (nb_samples - 1) / 8; n++) {
+ for (int i = 0; i < avctx->channels; i++) {
+ ADPCMChannelStatus *cs = &c->status[i];
+ samples = &samples_p[i][1 + n * 8];
+ for (int m = 0; m < 8; m += 2) {
+ int v = bytestream2_get_byteu(&gb);
+ samples[m ] = adpcm_ima_expand_nibble(cs, v & 0x0F, 3);
+ samples[m + 1] = adpcm_ima_expand_nibble(cs, v >> 4 , 3);
+ }
}
}
}
- }
break;
case AV_CODEC_ID_ADPCM_4XM:
for (int i = 0; i < avctx->channels; i++)
@@ -1823,41 +1823,41 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
}
for (int m = 0; m < blocks; m++) {
- for (int channel = 0; channel < avctx->channels; channel++) {
- int prev1 = c->status[channel].sample1;
- int prev2 = c->status[channel].sample2;
+ for (int channel = 0; channel < avctx->channels; channel++) {
+ int prev1 = c->status[channel].sample1;
+ int prev2 = c->status[channel].sample2;
- samples = samples_p[channel] + m * 16;
- /* Read in every sample for this channel. */
- for (int i = 0; i < samples_per_block; i++) {
- int byte = bytestream2_get_byteu(&gb);
- int scale = 1 << (byte >> 4);
- int index = byte & 0xf;
- int factor1 = ff_adpcm_afc_coeffs[0][index];
- int factor2 = ff_adpcm_afc_coeffs[1][index];
+ samples = samples_p[channel] + m * 16;
+ /* Read in every sample for this channel. */
+ for (int i = 0; i < samples_per_block; i++) {
+ int byte = bytestream2_get_byteu(&gb);
+ int scale = 1 << (byte >> 4);
+ int index = byte & 0xf;
+ int factor1 = ff_adpcm_afc_coeffs[0][index];
+ int factor2 = ff_adpcm_afc_coeffs[1][index];
- /* Decode 16 samples. */
- for (int n = 0; n < 16; n++) {
- int32_t sampledat;
+ /* Decode 16 samples. */
+ for (int n = 0; n < 16; n++) {
+ int32_t sampledat;
- if (n & 1) {
- sampledat = sign_extend(byte, 4);
- } else {
- byte = bytestream2_get_byteu(&gb);
- sampledat = sign_extend(byte >> 4, 4);
- }
+ if (n & 1) {
+ sampledat = sign_extend(byte, 4);
+ } else {
+ byte = bytestream2_get_byteu(&gb);
+ sampledat = sign_extend(byte >> 4, 4);
+ }
- sampledat = ((prev1 * factor1 + prev2 * factor2) >> 11) +
- sampledat * scale;
- *samples = av_clip_int16(sampledat);
- prev2 = prev1;
- prev1 = *samples++;
+ sampledat = ((prev1 * factor1 + prev2 * factor2) >> 11) +
+ sampledat * scale;
+ *samples = av_clip_int16(sampledat);
+ prev2 = prev1;
+ prev1 = *samples++;
+ }
}
- }
- c->status[channel].sample1 = prev1;
- c->status[channel].sample2 = prev2;
- }
+ c->status[channel].sample1 = prev1;
+ c->status[channel].sample2 = prev2;
+ }
}
bytestream2_seek(&gb, 0, SEEK_END);
break;