From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 18FE245886 for ; Fri, 24 Feb 2023 15:53:56 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 10FDE68C186; Fri, 24 Feb 2023 17:52:45 +0200 (EET) Received: from out162-62-57-49.mail.qq.com (out162-62-57-49.mail.qq.com [162.62.57.49]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id AAB3068C159 for ; Fri, 24 Feb 2023 17:52:34 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1677253951; bh=3niLG1BOwsm2qMmMmRBiBkl2YuCFgjuSFa2eC6hgpj4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ar4qJE+VOK1rfGNBUPeoOI7uJm0HfNhOPUjm6XVtyNWLkO8kZN2shOfJ8W+Bcq25q sdlj1Jrn1fldvR0XjSJKf0u2jbRM/w8GNJOWWNCuUpsir91aTYo8cSlXurl8YnlWOX KBtZJ7gqOsf4Efewn98sJoP7R5Xiop5IrD6AszXM= Received: from localhost.localdomain ([113.118.101.228]) by newxmesmtplogicsvrszc2-1.qq.com (NewEsmtp) with SMTP id D19BEA50; Fri, 24 Feb 2023 23:52:25 +0800 X-QQ-mid: xmsmtpt1677253950t54d9cjui Message-ID: X-QQ-XMAILINFO: MR/iVh5QLeiev2U1jGoLf90bnUWAwF4zOBwqZ9j4/cVWOOZsDMTZ5SH7Queobl CPvP8JZNwnKN2CynUMs9VCKbeEh7uBGcAPzLDFPQ6h3lh/6HaGQYJA5sVukvSn4M5QjoVJqV++jK jZ0t0J6P+mIwDbvDyxhmIOeOkYgi2ERzzulqWRGaQ0byuIYxQ5xO9COix9WE5RmddPO71rktg8i9 qzltTpyAryvA3nAjgC1CBj5lg6S0bxfqnAGNhAqIltM5Vo3SOmPsYr0SDHfckkez5fNlQ2IGTjQe 4u9OCvtn18lIXdHwpmiOJQdGYoaLozSNgic/8/jtYoUAEmKvgHVqmIagax3J8XO7CMPVQkfRhc2r PmC5vt1Fq9R3gJ0rR+IAf+WtzWyhH1uhr4Dul8GAlAx3HR2eTJlYdMqNgxQnDPwQfw+coIRQn1eE HMn1fJwu9fyJxlYH2BsxjJxbgS+JjsMMqvfI7aEk2KHPj/EBQ8pCr9qWkunlrpX0xO0ByCskyLoj sMu2vp8mlO3ztNCCVT3JBgo3+kFxO5t5r+2GfaK9r/7/WDuRUtCUjabbnrp97xfu8m+L+TJzQkNM sTJPJpzU1z9r0zxGXghmD5zAXKkBBmd+wGTbgYV/AFdKEwqAwnEkPf8b6ZAb+8lCBDHjpjzrw1m0 Yj+Jwm3cq+lACR6kuCdrhk1grcJW45p8SAHXIEI0Fc9n1eQ2vCRWGfyUgHMd87HhqI9ynB9wbSRE DC9qYlpYw9ZqNBh3kB3k2zdfdo3O6AiftLzYlGwz+I2Qt5P72bwvzhzkLLrzThTXhctGq73hnUPu z2ZgeauDNFEDFcQTxqMuSGDCTEPgyTaJ7yIlW9GbyOekpn/4wBuI3OGvqpyNoSFqRIua8ues3MBn fuASjbAVUCjg1/rO6b6ybp3L4whRHZUlPTNBG8gujHyz7Zrz7+ciVoshs1Yh/x9SNug+85Yj6aPh VQJKbh1VcPCimNUmw7yxz1qz7u2ZrzTXC8EdVRfdfDXltXE/mZpFAXLFdXdKzo28ycZ+ND4TFODF BJIW9LW6xP85P22bne From: Zhao Zhili To: ffmpeg-devel@ffmpeg.org Date: Fri, 24 Feb 2023 23:52:21 +0800 X-OQ-MSGID: <20230224155222.194400-8-quinkblack@foxmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230224155222.194400-1-quinkblack@foxmail.com> References: <8bf59545-b8a1-bd88-f83c-ba0db7ee6f04@gmail.com> <20230224155222.194400-1-quinkblack@foxmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 8/9] avcodec/dynamic_hdr_vivid: reindent after the previous commit X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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: Zhao Zhili Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: From: Zhao Zhili Signed-off-by: Zhao Zhili --- libavcodec/dynamic_hdr_vivid.c | 60 +++++++++++++++++----------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/libavcodec/dynamic_hdr_vivid.c b/libavcodec/dynamic_hdr_vivid.c index 7cb13cbf32..a9b6910798 100644 --- a/libavcodec/dynamic_hdr_vivid.c +++ b/libavcodec/dynamic_hdr_vivid.c @@ -92,42 +92,42 @@ int ff_parse_itu_t_t35_to_dynamic_hdr_vivid(AVDynamicHDRVivid *s, const uint8_t tm_params->base_param_Delta_enable_mode = get_bits(gb, 3); tm_params->base_param_Delta = (AVRational){get_bits(gb, 7), base_param_Delta_den}; } - if (get_bits_left(gb) < 1) + if (get_bits_left(gb) < 1) + return AVERROR_INVALIDDATA; + tm_params->three_Spline_enable_flag = get_bits(gb, 1); + if (tm_params->three_Spline_enable_flag) { + AVHDRVivid3SplineParams *three_spline; + + if (get_bits_left(gb) < 1 + tm_params->three_Spline_num * (2 + 12 + 28 + 1)) + return AVERROR_INVALIDDATA; + tm_params->three_Spline_num = get_bits(gb, 1) + 1; + if (tm_params->three_Spline_num > FF_ARRAY_ELEMS(tm_params->three_spline)) return AVERROR_INVALIDDATA; - tm_params->three_Spline_enable_flag = get_bits(gb, 1); - if (tm_params->three_Spline_enable_flag) { - AVHDRVivid3SplineParams *three_spline; - - if (get_bits_left(gb) < 1 + tm_params->three_Spline_num * (2 + 12 + 28 + 1)) - return AVERROR_INVALIDDATA; - tm_params->three_Spline_num = get_bits(gb, 1) + 1; - if (tm_params->three_Spline_num > FF_ARRAY_ELEMS(tm_params->three_spline)) - return AVERROR_INVALIDDATA; - for (int j = 0; j < tm_params->three_Spline_num; j++) { - three_spline = &tm_params->three_spline[j]; - three_spline->th_mode = get_bits(gb, 2); - if (three_spline->th_mode == 0 || three_spline->th_mode == 2) { - if (get_bits_left(gb) < 8) - return AVERROR_INVALIDDATA; - three_spline->th_enable_mb = (AVRational){get_bits(gb, 8), 255}; - } - three_spline->th_enable = (AVRational){get_bits(gb, 12), 4095}; - three_spline->th_delta1 = (AVRational){get_bits(gb, 10), 1023}; - three_spline->th_delta2 = (AVRational){get_bits(gb, 10), 1023}; - three_spline->enable_strength = (AVRational){get_bits(gb, 8), 255}; + for (int j = 0; j < tm_params->three_Spline_num; j++) { + three_spline = &tm_params->three_spline[j]; + three_spline->th_mode = get_bits(gb, 2); + if (three_spline->th_mode == 0 || three_spline->th_mode == 2) { + if (get_bits_left(gb) < 8) + return AVERROR_INVALIDDATA; + three_spline->th_enable_mb = (AVRational){get_bits(gb, 8), 255}; } + three_spline->th_enable = (AVRational){get_bits(gb, 12), 4095}; + three_spline->th_delta1 = (AVRational){get_bits(gb, 10), 1023}; + three_spline->th_delta2 = (AVRational){get_bits(gb, 10), 1023}; + three_spline->enable_strength = (AVRational){get_bits(gb, 8), 255}; + } #if FF_API_HDR_VIVID_THREE_SPLINE - three_spline = &tm_params->three_spline[0]; + three_spline = &tm_params->three_spline[0]; FF_DISABLE_DEPRECATION_WARNINGS - tm_params->three_Spline_TH_mode = three_spline->th_mode; - tm_params->three_Spline_TH_enable_MB = three_spline->th_enable_mb; - tm_params->three_Spline_TH_enable = three_spline->th_enable; - tm_params->three_Spline_TH_Delta1 = three_spline->th_delta1; - tm_params->three_Spline_TH_Delta2 = three_spline->th_delta2; - tm_params->three_Spline_enable_Strength = three_spline->enable_strength; + tm_params->three_Spline_TH_mode = three_spline->th_mode; + tm_params->three_Spline_TH_enable_MB = three_spline->th_enable_mb; + tm_params->three_Spline_TH_enable = three_spline->th_enable; + tm_params->three_Spline_TH_Delta1 = three_spline->th_delta1; + tm_params->three_Spline_TH_Delta2 = three_spline->th_delta2; + tm_params->three_Spline_enable_Strength = three_spline->enable_strength; FF_ENABLE_DEPRECATION_WARNINGS #endif - } + } } } -- 2.34.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".