[FFmpeg-cvslog] avcodec/mlpenc: fix indentation

Paul B Mahol git at videolan.org
Sun Sep 5 12:45:52 EEST 2021


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Sep  5 11:38:01 2021 +0200| [85b9b9695775156c3ade9860ceca7fc9d408ae3f] | committer: Paul B Mahol

avcodec/mlpenc: fix indentation

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

 libavcodec/mlpenc.c | 57 ++++++++++++++++++++++++++---------------------------
 1 file changed, 28 insertions(+), 29 deletions(-)

diff --git a/libavcodec/mlpenc.c b/libavcodec/mlpenc.c
index 7db28f518a..ef69d246ab 100644
--- a/libavcodec/mlpenc.c
+++ b/libavcodec/mlpenc.c
@@ -130,7 +130,7 @@ typedef struct MLPEncodeContext {
     int32_t        *write_buffer;           ///< Pointer to data currently being written to bitstream.
     int32_t        *sample_buffer;          ///< Pointer to current access unit samples.
     int32_t        *major_scratch_buffer;   ///< Scratch buffer big enough to fit all data for one entire major frame interval.
-    int32_t        last_frames;             ///< Signal last frames.
+    int32_t         last_frames;            ///< Signal last frames.
 
     int32_t        *lpc_sample_buffer;
 
@@ -1509,28 +1509,28 @@ static void lossless_matrix_coeffs(MLPEncodeContext *ctx)
 
     mode = estimate_stereo_mode(ctx);
 
-    switch(mode) {
-        /* TODO: add matrix for MID_SIDE */
-        case MLP_CHMODE_MID_SIDE:
-        case MLP_CHMODE_LEFT_RIGHT:
-            mp->count    = 0;
-            break;
-        case MLP_CHMODE_LEFT_SIDE:
-            mp->count    = 1;
-            mp->outch[0] = 1;
-            mp->coeff[0][0] =  1 << 14; mp->coeff[0][1] = -(1 << 14);
-            mp->coeff[0][2] =  0 << 14; mp->coeff[0][2] =   0 << 14;
-            mp->forco[0][0] =  1 << 14; mp->forco[0][1] = -(1 << 14);
-            mp->forco[0][2] =  0 << 14; mp->forco[0][2] =   0 << 14;
-            break;
-        case MLP_CHMODE_RIGHT_SIDE:
-            mp->count    = 1;
-            mp->outch[0] = 0;
-            mp->coeff[0][0] =  1 << 14; mp->coeff[0][1] =   1 << 14;
-            mp->coeff[0][2] =  0 << 14; mp->coeff[0][2] =   0 << 14;
-            mp->forco[0][0] =  1 << 14; mp->forco[0][1] = -(1 << 14);
-            mp->forco[0][2] =  0 << 14; mp->forco[0][2] =   0 << 14;
-            break;
+    switch (mode) {
+    /* TODO: add matrix for MID_SIDE */
+    case MLP_CHMODE_MID_SIDE:
+    case MLP_CHMODE_LEFT_RIGHT:
+        mp->count    = 0;
+        break;
+    case MLP_CHMODE_LEFT_SIDE:
+        mp->count    = 1;
+        mp->outch[0] = 1;
+        mp->coeff[0][0] =  1 << 14; mp->coeff[0][1] = -(1 << 14);
+        mp->coeff[0][2] =  0 << 14; mp->coeff[0][2] =   0 << 14;
+        mp->forco[0][0] =  1 << 14; mp->forco[0][1] = -(1 << 14);
+        mp->forco[0][2] =  0 << 14; mp->forco[0][2] =   0 << 14;
+        break;
+    case MLP_CHMODE_RIGHT_SIDE:
+        mp->count    = 1;
+        mp->outch[0] = 0;
+        mp->coeff[0][0] =  1 << 14; mp->coeff[0][1] =   1 << 14;
+        mp->coeff[0][2] =  0 << 14; mp->coeff[0][2] =   0 << 14;
+        mp->forco[0][0] =  1 << 14; mp->forco[0][1] = -(1 << 14);
+        mp->forco[0][2] =  0 << 14; mp->forco[0][2] =   0 << 14;
+        break;
     }
 
     for (mat = 0; mat < mp->count; mat++)
@@ -2091,13 +2091,13 @@ static void set_major_params(MLPEncodeContext *ctx)
         ctx->prev_channel_params = restart_channel_params;
 
         for (index = 0; index < MAJOR_HEADER_INTERVAL + 1; index++) {
-                ctx->cur_decoding_params = &ctx->major_decoding_params[index][substr];
-                ctx->cur_channel_params = ctx->major_channel_params[index];
+            ctx->cur_decoding_params = &ctx->major_decoding_params[index][substr];
+            ctx->cur_channel_params = ctx->major_channel_params[index];
 
-                ctx->major_params_changed[index][substr] = compare_decoding_params(ctx);
+            ctx->major_params_changed[index][substr] = compare_decoding_params(ctx);
 
-                ctx->prev_decoding_params = ctx->cur_decoding_params;
-                ctx->prev_channel_params = ctx->cur_channel_params;
+            ctx->prev_decoding_params = ctx->cur_decoding_params;
+            ctx->prev_channel_params = ctx->cur_channel_params;
         }
     }
 
@@ -2114,7 +2114,6 @@ static void analyze_sample_buffer(MLPEncodeContext *ctx)
     unsigned int substr;
 
     for (substr = 0; substr < ctx->num_substreams; substr++) {
-
         ctx->cur_restart_header = &ctx->restart_header[substr];
         ctx->cur_decoding_params = seq_dp + 1*(ctx->num_substreams) + substr;
         ctx->cur_channel_params = seq_cp + 1*(ctx->avctx->channels);



More information about the ffmpeg-cvslog mailing list