diff mbox series

[FFmpeg-devel,Code,format,dependent] : [Adjust the format of code blocks]

Message ID 20210219124325.24223-1-houlei@uniontech.com
State New
Headers show
Series [FFmpeg-devel,Code,format,dependent] : [Adjust the format of code blocks]
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

houlei@uniontech.com Feb. 19, 2021, 12:43 p.m. UTC
From: Hou Lei <houlei@uniontech.com>

Signed-off-by: Hou Lei <houlei@uniontech.com>
---
 fftools/ffmpeg.c             |  8 ++++----
 libavcodec/h264_loopfilter.c | 22 ++++++++--------------
 2 files changed, 12 insertions(+), 18 deletions(-)

Comments

Thilo Borgmann Feb. 19, 2021, 5:51 p.m. UTC | #1
Hi,

Am 19.02.21 um 13:43 schrieb houlei@uniontech.com:
> From: Hou Lei <houlei@uniontech.com>
> 
> Signed-off-by: Hou Lei <houlei@uniontech.com>
> ---
>  fftools/ffmpeg.c             |  8 ++++----
>  libavcodec/h264_loopfilter.c | 22 ++++++++--------------
>  2 files changed, 12 insertions(+), 18 deletions(-)
> 
> diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
> index add5a3e505..ed20bd3a25 100644
> --- a/fftools/ffmpeg.c
> +++ b/fftools/ffmpeg.c
> [...]
>              if( edge & mask_edge ) {
while you're on it, you might get these right, too.
"if (cond) {"
removing exta " " in (), too.

LGTM otherwise.

Thanks,
Thilo
diff mbox series

Patch

diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index add5a3e505..ed20bd3a25 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -2672,7 +2672,7 @@  static int process_input_packet(InputStream *ist, const AVPacket *pkt, int no_eo
             if (!repeating || !pkt || got_output) {
                 if (pkt && pkt->duration) {
                     duration_dts = av_rescale_q(pkt->duration, ist->st->time_base, AV_TIME_BASE_Q);
-                } else if(ist->dec_ctx->framerate.num != 0 && ist->dec_ctx->framerate.den != 0) {
+                } else if (ist->dec_ctx->framerate.num != 0 && ist->dec_ctx->framerate.den != 0) {
                     int ticks= av_stream_get_parser(ist->st) ? av_stream_get_parser(ist->st)->repeat_pict+1 : ist->dec_ctx->ticks_per_frame;
                     duration_dts = ((int64_t)AV_TIME_BASE *
                                     ist->dec_ctx->framerate.den * ticks) /
@@ -2773,7 +2773,7 @@  static int process_input_packet(InputStream *ist, const AVPacket *pkt, int no_eo
                 ist->next_dts = av_rescale_q(next_dts + 1, av_inv_q(ist->framerate), time_base_q);
             } else if (pkt->duration) {
                 ist->next_dts += av_rescale_q(pkt->duration, ist->st->time_base, AV_TIME_BASE_Q);
-            } else if(ist->dec_ctx->framerate.num != 0) {
+            } else if (ist->dec_ctx->framerate.num != 0) {
                 int ticks= av_stream_get_parser(ist->st) ? av_stream_get_parser(ist->st)->repeat_pict + 1 : ist->dec_ctx->ticks_per_frame;
                 ist->next_dts += ((int64_t)AV_TIME_BASE *
                                   ist->dec_ctx->framerate.den * ticks) /
@@ -3493,7 +3493,7 @@  static int init_output_stream_encode(OutputStream *ost, AVFrame *frame)
 
                 // Don't parse the 'forced_keyframes' in case of 'keep-source-keyframes',
                 // parse it only for static kf timings
-            } else if(strncmp(ost->forced_keyframes, "source", 6)) {
+            } else if (strncmp(ost->forced_keyframes, "source", 6)) {
                 parse_forced_key_frames(ost->forced_keyframes, ost, ost->enc_ctx);
             }
         }
@@ -3986,7 +3986,7 @@  static int check_keyboard_interaction(int64_t cur_time)
     if (key == 'h'){
         if (do_hex_dump){
             do_hex_dump = do_pkt_dump = 0;
-        } else if(do_pkt_dump){
+        } else if (do_pkt_dump){
             do_hex_dump = 1;
         } else
             do_pkt_dump = 1;
diff --git a/libavcodec/h264_loopfilter.c b/libavcodec/h264_loopfilter.c
index 558ec6c02d..28ad82de31 100644
--- a/libavcodec/h264_loopfilter.c
+++ b/libavcodec/h264_loopfilter.c
@@ -324,7 +324,7 @@  static av_always_inline void h264_filter_mb_fast_internal(const H264Context *h,
                     filter_mb_edgeh( &img_cb[4*3*linesize], linesize, bS3, qpc, a, b, h, 0);
                     filter_mb_edgeh( &img_cr[4*3*linesize], linesize, bS3, qpc, a, b, h, 0);
                 }
-            }else if(chroma422){
+            } else if (chroma422){
                 if(left_type){
                     filter_mb_edgecv(&img_cb[2*0<<pixel_shift], uvlinesize, bS4, qpc0, a, b, h, 1);
                     filter_mb_edgecv(&img_cr[2*0<<pixel_shift], uvlinesize, bS4, qpc0, a, b, h, 1);
@@ -386,7 +386,7 @@  static av_always_inline void h264_filter_mb_fast_internal(const H264Context *h,
                 if(chroma444){\
                     filter_mb_edge##hv( &img_cb[4*edge*(dir?linesize:1<<pixel_shift)], linesize, bS[dir][edge], edge ? qpc : qpc##dir, a, b, h, intra );\
                     filter_mb_edge##hv( &img_cr[4*edge*(dir?linesize:1<<pixel_shift)], linesize, bS[dir][edge], edge ? qpc : qpc##dir, a, b, h, intra );\
-                } else if(!(edge&1)) {\
+                } else if (!(edge&1)) {\
                     filter_mb_edgec##hv( &img_cb[2*edge*(dir?uvlinesize:1<<pixel_shift)], uvlinesize, bS[dir][edge], edge ? qpc : qpc##dir, a, b, h, intra );\
                     filter_mb_edgec##hv( &img_cr[2*edge*(dir?uvlinesize:1<<pixel_shift)], uvlinesize, bS[dir][edge], edge ? qpc : qpc##dir, a, b, h, intra );\
                 }\
@@ -397,7 +397,7 @@  static av_always_inline void h264_filter_mb_fast_internal(const H264Context *h,
         if( edges == 1 ) {
             if(top_type)
                 FILTER(h,1,0,1);
-        } else if( IS_8x8DCT(mb_type) ) {
+        } else if ( IS_8x8DCT(mb_type) ) {
             FILTER(v,0,2,0);
             if(top_type)
                 FILTER(h,1,0,1);
@@ -560,8 +560,7 @@  static av_always_inline void filter_mb_dir(const H264Context *h, H264SliceContex
                 if( dir && FRAME_MBAFF(h) && IS_INTERLACED(mb_type ^ mbm_type)) {
                     AV_WN64A(bS, 0x0001000100010001ULL);
                     mv_done = 1;
-                }
-                else if( mask_par0 && ((mbm_type & (MB_TYPE_16x16 | (MB_TYPE_8x16 >> dir)))) ) {
+                } else if ( mask_par0 && ((mbm_type & (MB_TYPE_16x16 | (MB_TYPE_8x16 >> dir)))) ) {
                     int b_idx= 8 + 4;
                     int bn_idx= b_idx - (dir ? 8:1);
 
@@ -580,9 +579,7 @@  static av_always_inline void filter_mb_dir(const H264Context *h, H264SliceContex
                     if (sl->non_zero_count_cache[b_idx] |
                         sl->non_zero_count_cache[bn_idx]) {
                         bS[i] = 2;
-                    }
-                    else if(!mv_done)
-                    {
+                    } else if (!mv_done) {
                         bS[i] = check_mv(sl, b_idx, bn_idx, mvy_limit);
                     }
                 }
@@ -643,8 +640,7 @@  static av_always_inline void filter_mb_dir(const H264Context *h, H264SliceContex
             if( edge & mask_edge ) {
                 AV_ZERO64(bS);
                 mv_done = 1;
-            }
-            else if( mask_par0 ) {
+            } else if ( mask_par0 ) {
                 int b_idx= 8 + 4 + edge * (dir ? 8:1);
                 int bn_idx= b_idx - (dir ? 8:1);
 
@@ -663,9 +659,7 @@  static av_always_inline void filter_mb_dir(const H264Context *h, H264SliceContex
                 if (sl->non_zero_count_cache[b_idx] |
                     sl->non_zero_count_cache[bn_idx]) {
                     bS[i] = 2;
-                }
-                else if(!mv_done)
-                {
+                } else if (!mv_done) {
                     bS[i] = check_mv(sl, b_idx, bn_idx, mvy_limit);
                 }
             }
@@ -687,7 +681,7 @@  static av_always_inline void filter_mb_dir(const H264Context *h, H264SliceContex
                 if (chroma444) {
                     filter_mb_edgev ( &img_cb[4*edge << h->pixel_shift], uvlinesize, bS, sl->chroma_qp[0], a, b, h, 0);
                     filter_mb_edgev ( &img_cr[4*edge << h->pixel_shift], uvlinesize, bS, sl->chroma_qp[1], a, b, h, 0);
-                } else if( (edge&1) == 0 ) {
+                } else if ( (edge&1) == 0 ) {
                     filter_mb_edgecv( &img_cb[2*edge << h->pixel_shift], uvlinesize, bS, sl->chroma_qp[0], a, b, h, 0);
                     filter_mb_edgecv( &img_cr[2*edge << h->pixel_shift], uvlinesize, bS, sl->chroma_qp[1], a, b, h, 0);
                 }