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 F0B0E477C4 for ; Mon, 23 Oct 2023 06:10:48 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6EB4B68C9D1; Mon, 23 Oct 2023 09:10:45 +0300 (EEST) Received: from mail-qt1-f172.google.com (mail-qt1-f172.google.com [209.85.160.172]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 46E6B68B70F for ; Mon, 23 Oct 2023 09:10:38 +0300 (EEST) Received: by mail-qt1-f172.google.com with SMTP id d75a77b69052e-41cbcb392e5so6086821cf.0 for ; Sun, 22 Oct 2023 23:10:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698041436; x=1698646236; darn=ffmpeg.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=1ud5djY4xFD11nFY9JxfFk5w4ZpzETrBqCWpafICUX8=; b=edH0GBvyNsA0R1BbpgRNzTBRQ8XEy/tsMLIzcayhOuFzulfKJGGkG+wFN3InncPxol UVUwUoE1jk2sggF/cXZIlQDPAOnA0BZRrOy0CxlTJJBV6ntLkGha8F0pKk6jSWzb3jk+ 1/YVYh7G57IZNd0m0W2+yCXftnBU4hM+l0qulqegnkFCjr3oKHlhoPfBvAtAjYFDdGrH xmYk6GoAUKEOpualCNH+QHfeGGWu5ID3pOkreGyznreiPL7ACTYqUn8JWSxSw5mDRPYb WVDGBtaHxWMIOan7bfKqpvxXC9xpB1MUmAHwn2H2kAdsEm8P/PjaMVDsNz5sLUs/pTWI 3YKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698041436; x=1698646236; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=1ud5djY4xFD11nFY9JxfFk5w4ZpzETrBqCWpafICUX8=; b=FyHOXWaSNfanJvRlciPRmwLG4gTWB40wMjac2vNliQz8GbpB+kS5pkXjODxofh4oYd hCFbQn4KLjZrJlBJ4sDUgQL+gGy+bSrCeXOp6JBdWgMObZB3Ie8hlqp/8r014+7YRTNu t24auPj/FfWyPLhiejO6BKbl9l/T+uKdwk9hnqtZr6jeUXo549kM0Vw9DEbEDVSP/lAi PQo6MflZX30br28vsmJyWAvf0IF/8bO/A9a5fvamrcuEyTqj1fBvlrsmfAp8ZAq52KZV rlpf12JHnKAibu3Vam39aP7M3vw6QxG+mb9qO3YRJTb1dY546WCP06+b7Ko3YqzQnsV9 VEVQ== X-Gm-Message-State: AOJu0YzjJA0W0+eaHHatmsDSY47oSErXlD/NPt4aaCVgfTUMhZ8HR/hJ dmZEdXS0CnMRtzO3g/Gy2iK2rFbadbKG8w== X-Google-Smtp-Source: AGHT+IHxEdOfAc+gcgvhOYL+HO2/Pct+2oC9Z3qL09QBSj3okz8FApz4g0NhwYxmmavAYVW//B/FQA== X-Received: by 2002:ad4:58f2:0:b0:66d:44f2:7fcb with SMTP id di18-20020ad458f2000000b0066d44f27fcbmr8681549qvb.2.1698041436547; Sun, 22 Oct 2023 23:10:36 -0700 (PDT) Received: from [192.168.1.35] (c-68-56-149-176.hsd1.mi.comcast.net. [68.56.149.176]) by smtp.gmail.com with ESMTPSA id r13-20020a0cf60d000000b0065b12c7a48dsm2643548qvm.133.2023.10.22.23.10.35 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 22 Oct 2023 23:10:36 -0700 (PDT) Message-ID: <7096e5b9-6a8e-4875-a3b6-32b2fe2dbb11@gmail.com> Date: Mon, 23 Oct 2023 02:10:35 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US-large To: ffmpeg-devel@ffmpeg.org References: <20231022215113.3469-1-michael@niedermayer.cc> <20231022215113.3469-5-michael@niedermayer.cc> From: Leo Izen In-Reply-To: <20231022215113.3469-5-michael@niedermayer.cc> Subject: Re: [FFmpeg-devel] [PATCH 5/9] avcodec/vlc: Pass VLC_MULTI_ELEM directly not by pointer 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 10/22/23 17:51, Michael Niedermayer wrote: > This makes the code more testable as uninitialized fields are 0 > and not random values from the last call > > Signed-off-by: Michael Niedermayer > --- > libavcodec/vlc.c | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/libavcodec/vlc.c b/libavcodec/vlc.c > index 9b7a42f79a3..4adec2da705 100644 > --- a/libavcodec/vlc.c > +++ b/libavcodec/vlc.c > @@ -356,7 +356,7 @@ static void add_level(VLC_MULTI_ELEM *table, const int is16bit, > uint32_t curcode, int curlen, > int curlimit, int curlevel, > const int minlen, const int max, > - unsigned* levelcnt, VLC_MULTI_ELEM *info) > + unsigned* levelcnt, VLC_MULTI_ELEM info) Is passing a struct by value advisable? Did you benchmark this? How does it compare to memset(info, 0, sizeof(*info))? - Leo Izen (Traneptora) _______________________________________________ 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".