From patchwork Fri Feb 19 12:43:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: HouLei X-Patchwork-Id: 25806 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id F1DF5449738 for ; Fri, 19 Feb 2021 14:43:46 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C1EB768A2C0; Fri, 19 Feb 2021 14:43:46 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from lucky1.263xmail.com (lucky1.263xmail.com [211.157.147.134]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id ABD5A680C55 for ; Fri, 19 Feb 2021 14:43:39 +0200 (EET) Received: from localhost (unknown [192.168.167.69]) by lucky1.263xmail.com (Postfix) with ESMTP id EA937C6DCD for ; Fri, 19 Feb 2021 20:43:33 +0800 (CST) X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-ADDR-CHECKED4: 1 X-ANTISPAM-LEVEL: 2 X-ABS-CHECKED: 0 Received: from localhost.localdomain (unknown [119.4.240.125]) by smtp.263.net (postfix) whith ESMTP id P17138T139833196410624S1613738609099770_; Fri, 19 Feb 2021 20:43:34 +0800 (CST) X-IP-DOMAINF: 1 X-UNIQUE-TAG: <41b825cf527bfcd689aa7cdb3c4aba2d> X-RL-SENDER: houlei@uniontech.com X-SENDER: houlei@uniontech.com X-LOGIN-NAME: houlei@uniontech.com X-FST-TO: ffmpeg-devel@ffmpeg.org X-SENDER-IP: 119.4.240.125 X-ATTACHMENT-NUM: 0 X-System-Flag: 0 From: houlei@uniontech.com To: ffmpeg-devel@ffmpeg.org Date: Fri, 19 Feb 2021 20:43:25 +0800 Message-Id: <20210219124325.24223-1-houlei@uniontech.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] [Code format dependent] : [Adjust the format of code blocks] X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: houlei@uniontech.com Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From: Hou Lei Signed-off-by: Hou Lei --- 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 @@ -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<> 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); }