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 C93454704D for ; Tue, 25 Jul 2023 19:30:06 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CA6FF68C8A9; Tue, 25 Jul 2023 22:29:38 +0300 (EEST) Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E850968C7E7 for ; Tue, 25 Jul 2023 22:29:29 +0300 (EEST) Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-4fb7769f15aso9060842e87.0 for ; Tue, 25 Jul 2023 12:29:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690313369; x=1690918169; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=kYYBdVhi522u9l5fPI36y0CKXC/xvNsTa6OFgqMR5vg=; b=qXkMAKSYD1QpwkXd2U1v+10dguMpcshEsdJ2PK0n7fPPwcoUVuaDjMT1ca85DMFGTE fVghYVSkAKKqwNWfXpjgWbhpi8wKFtpUUSj2jPEfzkIk0mMD8JzYguBT2SQjipzGYzEg i/J+ErjtmzTwwutl/1HaRNXHif5nt2R6pQjdcaJLDq1mOOMRex6cxtZNdok8e/LPcNnb Y+lX0C2E65mT4LZdxov3xlRzgx6jEU+dNTKJUb08t7fHeKxx3VwzamIPiz3DsWNvPMkN h/pk/Q3liw7HuS8H0SoRPU5M9kmT4UG3QYg/0WoaclGeKcC+MJtvlUty20ddGhy/pLHw d4CQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690313369; x=1690918169; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kYYBdVhi522u9l5fPI36y0CKXC/xvNsTa6OFgqMR5vg=; b=FirRZIoA3MgWPqGurU6umr8VoWO/TcqBFxKL5V2Y6JNY5zzwr+rcbzOwV3rOlq6V6u D/6EV7lGnLLykRU1vvQSsEU1PwpZFg4aYgvkL3ndHtd7dIRd7P+A2wEKrkVsG8cRfbp2 83DH2NntdedG6dvFM9PIOtHcOTcbXuB5PNzmVer7xfdAjJk7n18xB68v0s9Xk+UvOEmT 0P9T01BUqmrnlzilJIjr0NYVndKEd60SShbbqtjftciLy/5yqBrJQqvKoUcMRn/I0GGe 5XwrqgNT5H9vh+f3M9Gjq6KtO0H9A292m4iypkc6kjT7fNKISwUhx/eNlR8to3cFzB+B KZpA== X-Gm-Message-State: ABy/qLY/HXO26g5CKuajPKOHVn1dFVkgGdWKAwu5LG3WzeOVXhMWOsTY bwkzVyimSjnUQTk2dEmGK4DXYBNhDRs= X-Google-Smtp-Source: APBJJlHyCsSOX/efqQOrH54QgMm02LK9O5JQ0gaK2CHSOFA/7iqSr/lrV0vo5828revV0eMgPT5WFA== X-Received: by 2002:ac2:5f0b:0:b0:4fd:c923:db62 with SMTP id 11-20020ac25f0b000000b004fdc923db62mr8019714lfq.23.1690313369002; Tue, 25 Jul 2023 12:29:29 -0700 (PDT) Received: from localhost.localdomain (91-153-198-187.elisa-laajakaista.fi. [91.153.198.187]) by smtp.gmail.com with ESMTPSA id b2-20020a056512218200b004fa77914b55sm2913124lft.140.2023.07.25.12.29.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jul 2023 12:29:28 -0700 (PDT) From: =?UTF-8?q?Jan=20Ekstr=C3=B6m?= To: ffmpeg-devel@ffmpeg.org Date: Tue, 25 Jul 2023 22:29:11 +0300 Message-ID: <20230725192918.199526-4-jeebjp@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230725192918.199526-1-jeebjp@gmail.com> References: <20230725192918.199526-1-jeebjp@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 3/3] avcodec/hevcdec: simplify decrementing of MDCV/CLL flags 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 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: Mostly done to be able to update the comment so that it no longer mentions the same flag twice. --- libavcodec/hevcdec.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c index 1fe91238d4..15276edd33 100644 --- a/libavcodec/hevcdec.c +++ b/libavcodec/hevcdec.c @@ -2760,17 +2760,15 @@ static int set_side_data(HEVCContext *s) AVFrame *out = s->ref->frame; int ret; - // Decrement the mastering display flag when IRAP frame has no_rasl_output_flag=1 - // so the side data persists for the entire coded video sequence. - if (s->sei.common.mastering_display.present > 0 && - IS_IRAP(s) && s->no_rasl_output_flag) { - s->sei.common.mastering_display.present--; - } - // Decrement the mastering display flag when IRAP frame has no_rasl_output_flag=1 - // so the side data persists for the entire coded video sequence. - if (s->sei.common.content_light.present > 0 && - IS_IRAP(s) && s->no_rasl_output_flag) { - s->sei.common.content_light.present--; + // Decrement the mastering display and content light level flag when IRAP + // frame has no_rasl_output_flag=1 so the side data persists for the entire + // coded video sequence. + if (IS_IRAP(s) && s->no_rasl_output_flag) { + if (s->sei.common.mastering_display.present > 0) + s->sei.common.mastering_display.present--; + + if (s->sei.common.content_light.present > 0) + s->sei.common.content_light.present--; } ret = ff_h2645_sei_to_frame(out, &s->sei.common, AV_CODEC_ID_HEVC, NULL, -- 2.41.0 _______________________________________________ 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".