diff mbox series

[FFmpeg-devel,8/9] avcodec/mpegutils: Reindent after the previous commit

Message ID GV1P250MB07374FB04068FBA9D3DF53428F269@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit f63c6c81d49d964dbe5f24022f91083186f77ccf
Headers show
Series [FFmpeg-devel,1/9] avcodec/(ffv1|h264|png|snow)dec: Remove comment out DRAW_HORIZ_BAND cap | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt Oct. 16, 2022, 8:46 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/mpegutils.c | 51 +++++++++++++++++++++---------------------
 1 file changed, 25 insertions(+), 26 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/mpegutils.c b/libavcodec/mpegutils.c
index afbb16e201..36d75b9633 100644
--- a/libavcodec/mpegutils.c
+++ b/libavcodec/mpegutils.c
@@ -56,7 +56,6 @@  void ff_draw_horiz_band(AVCodecContext *avctx,
     const int field_pic = picture_structure != PICT_FRAME;
     const AVFrame *src;
     int offset[AV_NUM_DATA_POINTERS];
-    int i;
 
     if (!avctx->draw_horiz_band)
         return;
@@ -72,34 +71,34 @@  void ff_draw_horiz_band(AVCodecContext *avctx,
         !(avctx->slice_flags & SLICE_FLAG_ALLOW_FIELD))
         return;
 
-        if (cur->pict_type == AV_PICTURE_TYPE_B || low_delay ||
-           (avctx->slice_flags & SLICE_FLAG_CODED_ORDER))
-            src = cur;
-        else if (last)
-            src = last;
-        else
-            return;
+    if (cur->pict_type == AV_PICTURE_TYPE_B || low_delay ||
+        (avctx->slice_flags & SLICE_FLAG_CODED_ORDER))
+        src = cur;
+    else if (last)
+        src = last;
+    else
+        return;
 
-        if (cur->pict_type == AV_PICTURE_TYPE_B &&
-            picture_structure == PICT_FRAME &&
-            avctx->codec_id != AV_CODEC_ID_SVQ3) {
-            for (i = 0; i < AV_NUM_DATA_POINTERS; i++)
-                offset[i] = 0;
-        } else {
-            const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt);
-            int vshift = desc->log2_chroma_h;
-
-            offset[0]= y * src->linesize[0];
-            offset[1]=
-            offset[2]= (y >> vshift) * src->linesize[1];
-            for (i = 3; i < AV_NUM_DATA_POINTERS; i++)
-                offset[i] = 0;
-        }
+    if (cur->pict_type == AV_PICTURE_TYPE_B &&
+        picture_structure == PICT_FRAME &&
+        avctx->codec_id != AV_CODEC_ID_SVQ3) {
+        for (int i = 0; i < AV_NUM_DATA_POINTERS; i++)
+            offset[i] = 0;
+    } else {
+        const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt);
+        int vshift = desc->log2_chroma_h;
+
+        offset[0] = y * src->linesize[0];
+        offset[1] =
+        offset[2] = (y >> vshift) * src->linesize[1];
+        for (int i = 3; i < AV_NUM_DATA_POINTERS; i++)
+            offset[i] = 0;
+    }
 
-        emms_c();
+    emms_c();
 
-        avctx->draw_horiz_band(avctx, src, offset,
-                               y, picture_structure, h);
+    avctx->draw_horiz_band(avctx, src, offset,
+                            y, picture_structure, h);
 }
 
 static char get_type_mv_char(int mb_type)