From patchwork Fri May 3 21:54:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 48480 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:e68f:b0:1af:836d:81b3 with SMTP id mz15csp68844pzb; Fri, 3 May 2024 14:55:26 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVyiVR7uMITWVaSLdWWHXItKRz8IvPXVdWaTJc62/IdfkZZghkn0/PAprbcBkiP6Oy2ebH9Lc3nwmHWeNRCBvEz2ULS3/mlpmOcHA== X-Google-Smtp-Source: AGHT+IEvKtmur4tZLR2D9An6LPTrOz33TEEP7R5XY+febuNrBJKLb21taz22lm2Svk5C6YjeuY+d X-Received: by 2002:a17:907:1c90:b0:a58:9709:eadb with SMTP id nb16-20020a1709071c9000b00a589709eadbmr3366568ejc.2.1714773325960; Fri, 03 May 2024 14:55:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1714773325; cv=none; d=google.com; s=arc-20160816; b=rgrYocZI21Wihf7uQkElJyfhjABhtJOfNfA/VHndwAqo07gJP5mmy/XNDRjJFeZQVI WltQ6+AzJ+4KqHbXtXr9beZhBqVjeZlIDPS61/Hh9lfRJ8hMcq6aXIfvU2iacCLS2nFo wWgj/hOHjj7UWrhzdsYsmE+Z11UtTsPJhk0kAUd4RXs2CJ8BXdXMH6x8BFl6dIT6G8Q5 vh+BM3f+5D9j7akZmvpUn+9hNcRTqcuAsT3uwGgPsN5D873FQsodKNx5H4ZolQ/idyUW t2UN4EWmIEVZ+YZC0v4Tr4/Dn9j8krI3TTokUJYZCoAp+7LuB1b/8ti07DDj2Q57rw9i To3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=pTZTXjAsfC8wx+UOC/8j96/MNzhvAA75CDRUOWXvcZY=; fh=e5zN9xSzcxLA6bGo3lF+CqTbY/oLwzApV03EO/RBfgQ=; b=KqXeKnoLmx9Jkgv8AihaUiPO0MTwl+NG9QIkXU0JjF321B3AWmGLP6bvOiLF5smnKM QjSPQrjXo3vMWmGmAJn6NgJKCGMdT8nXnBvBtCJHQQ0liLxOGgLhX3SzKqFeWb6lG7ai /KkTRftvL9HRKhcjQ80RCwT+jMrL1GjDTMhgxXJxOW3UdKpYcoD7n0ivV9T1b/qq9Hqm jH09IjDsperFYdczJrKp/AwUYjgbcy2r68sIDiw+hKkQxjxTd996TZYuOiPVs6lSkG+D KfPJ588WmL8kigLWSivSKEEnI5sdgcffFedI0gbGchxqUG42xFPSiF5vhEkYpzbZtEWx 33eA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b="Pnr5/GC4"; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id gs43-20020a1709072d2b00b00a5991a53115si1088347ejc.83.2024.05.03.14.55.25; Fri, 03 May 2024 14:55:25 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b="Pnr5/GC4"; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4A91668D693; Sat, 4 May 2024 00:55:12 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A6BA368D659 for ; Sat, 4 May 2024 00:55:05 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 041DAE0007 for ; Fri, 3 May 2024 21:55:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1714773305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tc9Ct4OJuyyGGeY1BQgXa4TgM0IMYvW1j/9+gkVR9zg=; b=Pnr5/GC4VdmUWQRYPR865NPzeqRqFqqkjs85l/2Geep+9UsdulEPLfBiA44tUh5gXvY3nr lzZ9SeP0I5nDFR/eodDhEyQCfP5KoUzbl3RcOnEfGiTlzFhQzhsS68dh4+/NL+GhnTgxOz 8GgDyrWQ+9OeqPSfbh1NgKS+js2l0Y+eoTAMQqjBAAh46YDrCIDpu6TNLZe4M6ERoH0cyn l+32hOVmKBp8Xm+LvQDfV+Vh7g0NWFNDzEm/YuHFy4W4s5Qro3/V/dy6ENIlYuTHsoKZHa ir0iATO6IeLBba/ZKeNGcLb/8Vg7b6Or23kPiVBeMsG1gFuyflnOcyWPY/4Hxg== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Fri, 3 May 2024 23:54:59 +0200 Message-ID: <20240503215502.1509887-2-michael@niedermayer.cc> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240503215502.1509887-1-michael@niedermayer.cc> References: <20240503215502.1509887-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 2/5] avcodec/dovi_rpuenc: initialize profile 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: lzSEf9wSEV2f Code is taken from dovi_rpudec Fixes: CID1596604 Uninitialized scalar variable Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavcodec/dovi_rpuenc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/dovi_rpuenc.c b/libavcodec/dovi_rpuenc.c index 3feaa04b9ed..80dc22234a9 100644 --- a/libavcodec/dovi_rpuenc.c +++ b/libavcodec/dovi_rpuenc.c @@ -571,6 +571,8 @@ int ff_dovi_rpu_generate(DOVIContext *s, const AVDOVIMetadata *metadata, set_ue_golomb(pb, vdr_rpu_id); s->mapping = &s->vdr[vdr_rpu_id]->mapping; + profile = s->cfg.dv_profile ? s->cfg.dv_profile : ff_dovi_guess_profile_hevc(hdr); + if (!use_prev_vdr_rpu) { set_ue_golomb(pb, mapping->mapping_color_space); set_ue_golomb(pb, mapping->mapping_chroma_format_idc);