lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 18 Jul 2016 15:21:10 +0200
From:	Ricardo Ribalda Delgado <ricardo.ribalda@...il.com>
To:	Philipp Zabel <p.zabel@...gutronix.de>
Cc:	Jonathan Corbet <corbet@....net>,
	Mauro Carvalho Chehab <mchehab@...nel.org>,
	Hans Verkuil <hverkuil@...all.nl>,
	Markus Heiser <markus.heiser@...marit.de>,
	Laurent Pinchart <laurent.pinchart@...asonboard.com>,
	Helen Mae Koike Fornazier <helen.koike@...labora.co.uk>,
	Antti Palosaari <crope@....fi>,
	Shuah Khan <shuahkh@....samsung.com>,
	linux-doc@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
	linux-media <linux-media@...r.kernel.org>
Subject: Re: [PATCH v4 09/12] [media] vivid: Local optimization

Hi Philipp

On Mon, Jul 18, 2016 at 3:13 PM, Philipp Zabel <p.zabel@...gutronix.de> wrote:
> Since the constant expressions are evaluated at compile time, you are
> not actually removing shifts. The code generated for precalculate_color
> by gcc 5.4 even grows by one asr instruction with this patch.
>

I dont think that I follow you completely here. The original code was

if (a)
   y= clamp(y, 16<<4, 235<<4)

y = clamp(y>>4, 1, 254)


And now is

if (a)
   y= clamp(y >>4, 16, 235)
else
    y = clamp(y, 1, 254)


On the previous case, when a was true there was 2 clamp operations.
Now it is only one.


Best regards!

-- 
Ricardo Ribalda

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ