[FFmpeg-cvslog] avcodec/adpcm_{psx,argo}: add missing indent

Zane van Iperen git at videolan.org
Sat Sep 19 10:16:55 EEST 2020


ffmpeg | branch: master | Zane van Iperen <zane at zanevaniperen.com> | Wed Sep 16 17:09:57 2020 +1000| [bb021be31c3de749f4a8fa60f42032fd7523281d] | committer: Zane van Iperen

avcodec/adpcm_{psx,argo}: add missing indent

Signed-off-by: Zane van Iperen <zane at zanevaniperen.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bb021be31c3de749f4a8fa60f42032fd7523281d
---

 libavcodec/adpcm.c | 86 +++++++++++++++++++++++++++---------------------------
 1 file changed, 43 insertions(+), 43 deletions(-)

diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c
index 14be1f4f88..4755308824 100644
--- a/libavcodec/adpcm.c
+++ b/libavcodec/adpcm.c
@@ -1966,42 +1966,42 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
     case AV_CODEC_ID_ADPCM_PSX:
         for (int block = 0; block < avpkt->size / FFMAX(avctx->block_align, 16 * avctx->channels); block++) {
             int nb_samples_per_block = 28 * FFMAX(avctx->block_align, 16 * avctx->channels) / (16 * avctx->channels);
-        for (channel = 0; channel < avctx->channels; channel++) {
-            samples = samples_p[channel] + block * nb_samples_per_block;
-
-            /* Read in every sample for this channel.  */
-            for (i = 0; i < nb_samples_per_block / 28; i++) {
-                int filter, shift, flag, byte;
-
-                filter = bytestream2_get_byteu(&gb);
-                shift  = filter & 0xf;
-                filter = filter >> 4;
-                if (filter >= FF_ARRAY_ELEMS(xa_adpcm_table))
-                    return AVERROR_INVALIDDATA;
-                flag   = bytestream2_get_byteu(&gb);
-
-                /* Decode 28 samples.  */
-                for (n = 0; n < 28; n++) {
-                    int sample = 0, scale;
-
-                    if (flag < 0x07) {
-                        if (n & 1) {
-                            scale = sign_extend(byte >> 4, 4);
-                        } else {
-                            byte  = bytestream2_get_byteu(&gb);
-                            scale = sign_extend(byte, 4);
+            for (channel = 0; channel < avctx->channels; channel++) {
+                samples = samples_p[channel] + block * nb_samples_per_block;
+
+                /* Read in every sample for this channel.  */
+                for (i = 0; i < nb_samples_per_block / 28; i++) {
+                    int filter, shift, flag, byte;
+
+                    filter = bytestream2_get_byteu(&gb);
+                    shift  = filter & 0xf;
+                    filter = filter >> 4;
+                    if (filter >= FF_ARRAY_ELEMS(xa_adpcm_table))
+                        return AVERROR_INVALIDDATA;
+                    flag   = bytestream2_get_byteu(&gb);
+
+                    /* Decode 28 samples.  */
+                    for (n = 0; n < 28; n++) {
+                        int sample = 0, scale;
+
+                        if (flag < 0x07) {
+                            if (n & 1) {
+                                scale = sign_extend(byte >> 4, 4);
+                            } else {
+                                byte  = bytestream2_get_byteu(&gb);
+                                scale = sign_extend(byte, 4);
+                            }
+
+                            scale  = scale * (1 << 12);
+                            sample = (int)((scale >> shift) + (c->status[channel].sample1 * xa_adpcm_table[filter][0] + c->status[channel].sample2 * xa_adpcm_table[filter][1]) / 64);
                         }
-
-                        scale  = scale * (1 << 12);
-                        sample = (int)((scale >> shift) + (c->status[channel].sample1 * xa_adpcm_table[filter][0] + c->status[channel].sample2 * xa_adpcm_table[filter][1]) / 64);
+                        *samples++ = av_clip_int16(sample);
+                        c->status[channel].sample2 = c->status[channel].sample1;
+                        c->status[channel].sample1 = sample;
                     }
-                    *samples++ = av_clip_int16(sample);
-                    c->status[channel].sample2 = c->status[channel].sample1;
-                    c->status[channel].sample1 = sample;
                 }
             }
         }
-        }
         break;
     case AV_CODEC_ID_ADPCM_ARGO:
         /*
@@ -2022,23 +2022,23 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
          * They should be 0 initially.
          */
         for (int block = 0; block < avpkt->size / avctx->block_align; block++) {
-        for (channel = 0; channel < avctx->channels; channel++) {
-            int control, shift;
+            for (channel = 0; channel < avctx->channels; channel++) {
+                int control, shift;
 
-            samples = samples_p[channel] + block * 32;
-            cs = c->status + channel;
+                samples = samples_p[channel] + block * 32;
+                cs = c->status + channel;
 
-            /* Get the control byte and decode the samples, 2 at a time. */
-            control = bytestream2_get_byteu(&gb);
-            shift = (control >> 4) + 2;
+                /* Get the control byte and decode the samples, 2 at a time. */
+                control = bytestream2_get_byteu(&gb);
+                shift = (control >> 4) + 2;
 
-            for (n = 0; n < 16; n++) {
-                int sample = bytestream2_get_byteu(&gb);
-                *samples++ = ff_adpcm_argo_expand_nibble(cs, sample >> 4, shift, control & 0x04);
-                *samples++ = ff_adpcm_argo_expand_nibble(cs, sample >> 0, shift, control & 0x04);
+                for (n = 0; n < 16; n++) {
+                    int sample = bytestream2_get_byteu(&gb);
+                    *samples++ = ff_adpcm_argo_expand_nibble(cs, sample >> 4, shift, control & 0x04);
+                    *samples++ = ff_adpcm_argo_expand_nibble(cs, sample >> 0, shift, control & 0x04);
+                }
             }
         }
-        }
         break;
     case AV_CODEC_ID_ADPCM_ZORK:
         if (!c->has_status) {



More information about the ffmpeg-cvslog mailing list