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 F2AA345E13 for ; Wed, 12 Jul 2023 18:33:40 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 967B868C59B; Wed, 12 Jul 2023 21:33:11 +0300 (EEST) Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 756C968C4F4 for ; Wed, 12 Jul 2023 21:33:03 +0300 (EEST) Received: by mail-lf1-f44.google.com with SMTP id 2adb3069b0e04-4fb73ba3b5dso12059088e87.1 for ; Wed, 12 Jul 2023 11:33:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689186783; x=1691778783; 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=R2vtA8EpFwiom8CrtjTBGatGT7Xd4TeRhJ9I4UL2N90=; b=DTYHVgl76xvUOkjc72rBXgoObdTtWr2i2zc7DllkggK6c9GUiqhsv4/8KcC0jkg2hj LLZDInPLQeL3OBIN9m5ajpkfjwm93DnQ5vXRVD2NGA1PkPcHsVsVEyulA8Ke6cCbCcev IoCoLy6Toj0F1nLTrYj7Obb+bVo+XKX8+gmUQnjREAgVxcngFBpA1jW3da3QJCcPeHWx nPZNjcmMTlgg3NlMTPc4ffJ9NCvZNfdL4XabQCpvw/LtvN4ApsT2p3+ZTR+AHHvE06YN fV8p0+3mlKtZ1sF76bJq4wwOTa/NRM1mI+KyVmE6HBHYg9B9GUk8nFv9oB0MwP+MoZeh gLrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689186783; x=1691778783; 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=R2vtA8EpFwiom8CrtjTBGatGT7Xd4TeRhJ9I4UL2N90=; b=kNvCcAZ2xdTCCEQ8bSJjzgj2tNA9l3DDx3LkUQ01FjZGzC+LJTB2c7C/97fDmMnIhK VjT1YDaNuHXZwCYyQ6iyPV/iVEtweIqS01jxW2QhWiYRLZbaUPVs7htRX+0/2AoqkS2f zEcpV+pJ0VEVeUqeEE9i1EP+sm6gHZfkNclICiRok6o6RffuBwrXW/4BLo0GfhE3dvts VUdEaJB70SnH1F3/xPyivPkIDSH55XgGwCFQMwOps3Jd3IPOIyw5xkmVHmJK+w4X0lCu L6Egax3MFgBMIudJ2DsD/pnavkhfKrQ8Vtk82iD4Kl2vGrEXAv1sVuoVBN5scYxBccNX 5QLQ== X-Gm-Message-State: ABy/qLZb0QwISATzgLYrVEUOLWDeGPD4KGRpwv0L2cWR/6O/fc4SJuYK +mdsGHEXUYLw5/bGj/Wm2o49hkWixEg= X-Google-Smtp-Source: APBJJlFZlVl8TQfCaOTJKkzzYp0shnooFZu+fMIkuu8loliGcut+OGtbWfN+CwrVrxYXa6XYG0txGw== X-Received: by 2002:a05:6512:3b1e:b0:4f6:3677:553 with SMTP id f30-20020a0565123b1e00b004f636770553mr19684838lfv.38.1689186782576; Wed, 12 Jul 2023 11:33:02 -0700 (PDT) Received: from localhost.localdomain (91-153-198-187.elisa-laajakaista.fi. [91.153.198.187]) by smtp.gmail.com with ESMTPSA id s14-20020ac25fae000000b004fba759bf44sm809953lfe.277.2023.07.12.11.33.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jul 2023 11:33:02 -0700 (PDT) From: =?UTF-8?q?Jan=20Ekstr=C3=B6m?= To: ffmpeg-devel@ffmpeg.org Date: Wed, 12 Jul 2023 21:32:47 +0300 Message-ID: <20230712183252.302971-4-jeebjp@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230712183252.302971-1-jeebjp@gmail.com> References: <20230712183252.302971-1-jeebjp@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 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 1e0bac1fa3..d7b9b529ff 100644 --- a/libavcodec/hevcdec.c +++ b/libavcodec/hevcdec.c @@ -2761,17 +2761,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".