Re: [Openexr-devel] Optimisation code path for reading images

Piotr Stanczyk <[email protected]> Tue, 18 Jun 2013 16:51:03 +0000
Newsgroups gmane.comp.video.openexr.user,gmane.comp.video.openexr.devel
Message-ID <95F01873F66DA54DAD2734EEBF98F86C011092552C@mailbox09.lucas.alllucas.com>
--===============0847826746896101182==
Content-Language: en-GB
Content-Type: multipart/alternative;
	boundary="_000_95F01873F66DA54DAD2734EEBF98F86C011092552Cmailbox09luca_"

--_000_95F01873F66DA54DAD2734EEBF98F86C011092552Cmailbox09luca_
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

aha - ok.

Thanks

- Piotr
________________________________
From: Halfdan Ingvarsson [[email protected]]
Sent: 18 June 2013 09:49
To: Piotr Stanczyk
Cc: Juri Abramov; [email protected]; [email protected]
Subject: Re: [Openexr-devel] Optimisation code path for reading images

Actually, I should clarify. The corruption occurs on *read*, not *write*. A=
ttached is a tiff file converted from a PIZ compressed exr, also attached.

It's most noticeable in the alpha channel, although there's a definite glit=
ch in the red channel just above the plane.

 - =BD

On 13-06-18 12:44 PM, Piotr Stanczyk wrote:
Thanks.

Let me see if I can repro this. I presume that simply writing out PIZ files=
 should flare up.

Were you also seeing test failures?

- Piotr
________________________________
From: Juri Abramov [[email protected]<mailto:[email protected]>]
Sent: 18 June 2013 09:26
To: Piotr Stanczyk; Halfdan Ingvarsson
Cc: [email protected]<mailto:[email protected]>; openexr-devel@=
nongnu.org<mailto:[email protected]>
Subject: RE: [Openexr-devel] Optimisation code path for reading images

I=92m afraid mine are under customer=92s NDA.
It is rather common though, the corruption was reported for alpha.

Juri

From: Piotr Stanczyk [mailto:[email protected]]
Sent: 18 June, 2013 18:16
To: Juri Abramov; Halfdan Ingvarsson
Cc: [email protected]<mailto:[email protected]>; openexr-devel@=
nongnu.org<mailto:[email protected]>
Subject: RE: [Openexr-devel] Optimisation code path for reading images

Is this something that was quite deterministic in behaviour?
(Does anyone have an example of a corrupted image?)

- Piotr
________________________________
From: Juri Abramov [[email protected]<mailto:[email protected]>]
Sent: 18 June 2013 09:13
To: Halfdan Ingvarsson; Piotr Stanczyk
Cc: [email protected]<mailto:[email protected]>; openexr-devel@=
nongnu.org<mailto:[email protected]>
Subject: RE: [Openexr-devel] Optimisation code path for reading images
Hi Halfdan,

Yep, we ran into this one too. Was already the case for OpenEXR 1.6/1.7.
Would be good to know if it is fixed in 4.5.

Juri

From: [email protected]<mailto:openexr=
[email protected]> [mailto:openexr-devel-boun=
[email protected]] On Behalf Of Halfdan Ingvarsson
Sent: 18 June, 2013 18:06
To: Piotr Stanczyk
Cc: [email protected]<mailto:[email protected]>; openexr-devel@=
nongnu.org<mailto:[email protected]>
Subject: Re: [Openexr-devel] Optimisation code path for reading images

Also, compiling the EXR2.0 library using gcc 4.2/4.3/4.4 with -O3 results i=
n the PIZ compression code producing occasional garbage data (-O3 is the de=
fault for cmake release builds). The workaround was to build with -O2. gcc =
4.6 and up seem ok. I didn't test with gcc 4.5.

Unfortunately, I didn't have time to dig any deeper as to whether this was =
an actual optimizer bug, or whether there are some spurious assumptions in =
the code leading to it.

Just something to keep in mind.

 - =BD

On 13-06-17 09:35 PM, Piotr Stanczyk wrote:

Hi,

There have been a few usage cases reported that exercised parts of the opti=
mised reading code path which unfortunately revealed erroneous assumptions =
in the source.

We have a fix for handling these, which also extents to handling more gener=
al cases,  in a separate branch and will be releasing that once we have bui=
lt up more usage cycles.

In the meantime, however, a v2.0.1 release will be available shortly, which=
 disables the optimisation.

- Piotr



_______________________________________________

Openexr-devel mailing list

[email protected]<mailto:[email protected]>

https://lists.nongnu.org/mailman/listinfo/openexr-devel

________________________________
This email message is for the sole use of the intended recipient(s) and may=
 contain confidential information.  Any unauthorized review, use, disclosur=
e or distribution is prohibited.  If you are not the intended recipient, pl=
ease contact the sender by reply email and destroy all copies of the origin=
al message.
________________________________


--_000_95F01873F66DA54DAD2734EEBF98F86C011092552Cmailbox09luca_
Content-Type: text/html; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

<html dir=3D"ltr">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3DWindows-1=
252">
</head>
<body ocsi=3D"0" fpstyle=3D"1" bgcolor=3D"#FFFFFF">
<div style=3D"direction: ltr;font-family: Tahoma;color: #000000;font-size: =
10pt;">aha - ok.<br>
<br>
Thanks <br>
<div><br>
<div style=3D"font-family: Tahoma; font-size: 13px;">- Piotr<br>
</div>
</div>
<div style=3D"font-family: Times New Roman; color: rgb(0, 0, 0); font-size:=
 16px;">
<hr tabindex=3D"-1">
<div style=3D"direction: ltr;" id=3D"divRpF673951"><font color=3D"#000000" =
face=3D"Tahoma" size=3D"2"><b>From:</b> Halfdan Ingvarsson [halfdan@sidefx.=
com]<br>
<b>Sent:</b> 18 June 2013 09:49<br>
<b>To:</b> Piotr Stanczyk<br>
<b>Cc:</b> Juri Abramov; [email protected]; [email protected]<=
br>
<b>Subject:</b> Re: [Openexr-devel] Optimisation code path for reading imag=
es<br>
</font><br>
</div>
<div></div>
<div>
<div class=3D"moz-cite-prefix">Actually, I should clarify. The corruption o=
ccurs on *read*, not *write*. Attached is a tiff file converted from a PIZ =
compressed exr, also attached.<br>
<br>
It's most noticeable in the alpha channel, although there's a definite glit=
ch in the red channel just above the plane.<br>
<br>
&nbsp;- =BD<br>
<br>
On 13-06-18 12:44 PM, Piotr Stanczyk wrote:<br>
</div>
<blockquote type=3D"cite"><style>=0A=
<!--=0A=
@font-face=0A=
	{font-family:PMingLiU}=0A=
@font-face=0A=
	{font-family:PMingLiU}=0A=
@font-face=0A=
	{font-family:Tahoma}=0A=
@font-face=0A=
	{font-family:Verdana}=0A=
@font-face=0A=
	{font-family:Consolas}=0A=
p.MsoNormal, li.MsoNormal, div.MsoNormal=0A=
	{margin:0in;=0A=
	margin-bottom:.0001pt;=0A=
	font-size:12.0pt;=0A=
	font-family:"Times New Roman","serif";=0A=
	color:black}=0A=
a:link, span.MsoHyperlink=0A=
	{color:blue;=0A=
	text-decoration:underline}=0A=
a:visited, span.MsoHyperlinkFollowed=0A=
	{color:purple;=0A=
	text-decoration:underline}=0A=
p=0A=
	{margin:0in;=0A=
	margin-bottom:.0001pt;=0A=
	font-size:12.0pt;=0A=
	font-family:"Times New Roman","serif";=0A=
	color:black}=0A=
pre=0A=
	{margin:0in;=0A=
	margin-bottom:.0001pt;=0A=
	font-size:10.0pt;=0A=
	font-family:"Courier New";=0A=
	color:black}=0A=
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate=0A=
	{margin:0in;=0A=
	margin-bottom:.0001pt;=0A=
	font-size:8.0pt;=0A=
	font-family:"Tahoma","sans-serif";=0A=
	color:black}=0A=
span.HTMLPreformattedChar=0A=
	{font-family:Consolas;=0A=
	color:black}=0A=
p.msochpdefault, li.msochpdefault, div.msochpdefault=0A=
	{margin:0in;=0A=
	margin-bottom:.0001pt;=0A=
	font-size:10.0pt;=0A=
	font-family:"Times New Roman","serif";=0A=
	color:black}=0A=
span.htmlpreformattedchar0=0A=
	{font-family:Consolas;=0A=
	color:black}=0A=
span.emailstyle20=0A=
	{font-family:"Verdana","sans-serif";=0A=
	color:#17365D;=0A=
	font-weight:bold}=0A=
span.EmailStyle23=0A=
	{font-family:"Verdana","sans-serif";=0A=
	color:#17365D;=0A=
	font-weight:bold}=0A=
span.BalloonTextChar=0A=
	{font-family:"Tahoma","sans-serif";=0A=
	color:black}=0A=
.MsoChpDefault=0A=
	{font-size:10.0pt}=0A=
@page WordSection1=0A=
	{margin:1.0in 1.0in 1.0in 1.0in}=0A=
-->=0A=
</style><style id=3D"owaParaStyle" type=3D"text/css">=0A=
<!--=0A=
p=0A=
	{margin-top:0;=0A=
	margin-bottom:0}=0A=
-->=0A=
BODY {direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;}P =
{margin-top:0;margin-bottom:0;}</style>
<div style=3D"direction: ltr; font-family: Tahoma; color: rgb(0, 0, 0); fon=
t-size: 10pt;">
Thanks. <br>
<br>
Let me see if I can repro this. I presume that simply writing out PIZ files=
 should flare up.
<br>
<br>
Were you also seeing test failures?<br>
<div><br>
<div style=3D"font-family: Tahoma; font-size: 13px;">- Piotr<br>
</div>
</div>
<div style=3D"font-family: Times New Roman; color: rgb(0, 0, 0); font-size:=
 16px;">
<hr tabindex=3D"-1">
<div id=3D"divRpF871998" style=3D"direction: ltr;"><font color=3D"#000000" =
face=3D"Tahoma" size=3D"2"><b>From:</b> Juri Abramov [<a class=3D"moz-txt-l=
ink-abbreviated" href=3D"mailto:[email protected]" target=3D"_blank">gabr=
[email protected]</a>]<br>
<b>Sent:</b> 18 June 2013 09:26<br>
<b>To:</b> Piotr Stanczyk; Halfdan Ingvarsson<br>
<b>Cc:</b> <a class=3D"moz-txt-link-abbreviated" href=3D"mailto:openexr-use=
[email protected]" target=3D"_blank">
[email protected]</a>; <a class=3D"moz-txt-link-abbreviated" href=3D"=
mailto:[email protected]" target=3D"_blank">
[email protected]</a><br>
<b>Subject:</b> RE: [Openexr-devel] Optimisation code path for reading imag=
es<br>
</font><br>
</div>
<div>
<div class=3D"WordSection1">
<p class=3D"MsoNormal"><b><span style=3D"font-size: 10pt; font-family: &quo=
t;Verdana&quot;,&quot;sans-serif&quot;; color: rgb(23, 54, 93);">I=92m afra=
id mine are under customer=92s NDA.
</span></b></p>
<p class=3D"MsoNormal"><b><span style=3D"font-size: 10pt; font-family: &quo=
t;Verdana&quot;,&quot;sans-serif&quot;; color: rgb(23, 54, 93);">It is rath=
er common though, the corruption was reported for alpha.</span></b></p>
<p class=3D"MsoNormal"><b><span style=3D"font-size: 10pt; font-family: &quo=
t;Verdana&quot;,&quot;sans-serif&quot;; color: rgb(23, 54, 93);">&nbsp;</sp=
an></b></p>
<p class=3D"MsoNormal"><b><span style=3D"font-size: 10pt; font-family: &quo=
t;Verdana&quot;,&quot;sans-serif&quot;; color: rgb(23, 54, 93);">Juri</span=
></b></p>
<p class=3D"MsoNormal"><b><span style=3D"font-size: 10pt; font-family: &quo=
t;Verdana&quot;,&quot;sans-serif&quot;; color: rgb(23, 54, 93);">&nbsp;</sp=
an></b></p>
<div>
<div style=3D"border-width: 1pt medium medium; border-style: solid none non=
e; padding: 3pt 0in 0in;">
<p class=3D"MsoNormal"><b><span style=3D"font-size: 10pt; font-family: &quo=
t;Tahoma&quot;,&quot;sans-serif&quot;; color: windowtext;">From:</span></b>=
<span style=3D"font-size: 10pt; font-family: &quot;Tahoma&quot;,&quot;sans-=
serif&quot;; color: windowtext;"> Piotr Stanczyk [<a class=3D"moz-txt-link-=
freetext" href=3D"mailto:[email protected]" target=3D"_blank">mailto:pstanc=
[email protected]</a>]
<br>
<b>Sent:</b> 18 June, 2013 18:16<br>
<b>To:</b> Juri Abramov; Halfdan Ingvarsson<br>
<b>Cc:</b> <a class=3D"moz-txt-link-abbreviated" href=3D"mailto:openexr-use=
[email protected]" target=3D"_blank">
[email protected]</a>; <a class=3D"moz-txt-link-abbreviated" href=3D"=
mailto:[email protected]" target=3D"_blank">
[email protected]</a><br>
<b>Subject:</b> RE: [Openexr-devel] Optimisation code path for reading imag=
es</span></p>
</div>
</div>
<p class=3D"MsoNormal">&nbsp;</p>
<div>
<p class=3D"MsoNormal"><span style=3D"font-size: 10pt; font-family: &quot;T=
ahoma&quot;,&quot;sans-serif&quot;;">Is this something that was quite deter=
ministic in behaviour?<br>
(Does anyone have an example of a corrupted image?)</span></p>
<div>
<p class=3D"MsoNormal"><span style=3D"font-size: 10pt; font-family: &quot;T=
ahoma&quot;,&quot;sans-serif&quot;;">&nbsp;</span></p>
<div>
<p class=3D"MsoNormal"><span style=3D"font-size: 10pt; font-family: &quot;T=
ahoma&quot;,&quot;sans-serif&quot;;">- Piotr</span></p>
</div>
</div>
<div>
<div class=3D"MsoNormal" style=3D"text-align: center;" align=3D"center">
<hr align=3D"center" size=3D"3" width=3D"100%">
</div>
<div id=3D"divRpF863779">
<p class=3D"MsoNormal" style=3D"margin-bottom: 12pt;"><b><span style=3D"fon=
t-size: 10pt; font-family: &quot;Tahoma&quot;,&quot;sans-serif&quot;;">From=
:</span></b><span style=3D"font-size: 10pt; font-family: &quot;Tahoma&quot;=
,&quot;sans-serif&quot;;"> Juri Abramov [<a class=3D"moz-txt-link-abbreviat=
ed" href=3D"mailto:[email protected]" target=3D"_blank">[email protected]=
om</a>]<br>
<b>Sent:</b> 18 June 2013 09:13<br>
<b>To:</b> Halfdan Ingvarsson; Piotr Stanczyk<br>
<b>Cc:</b> <a href=3D"mailto:[email protected]" target=3D"_blank">ope=
[email protected]</a>;
<a href=3D"mailto:[email protected]" target=3D"_blank">openexr-devel=
@nongnu.org</a><br>
<b>Subject:</b> RE: [Openexr-devel] Optimisation code path for reading imag=
es</span></p>
</div>
<div>
<div>
<p class=3D"MsoNormal"><b><span style=3D"font-size: 10pt; font-family: &quo=
t;Verdana&quot;,&quot;sans-serif&quot;; color: rgb(23, 54, 93);">Hi Halfdan=
,</span></b></p>
<p class=3D"MsoNormal"><b><span style=3D"font-size: 10pt; font-family: &quo=
t;Verdana&quot;,&quot;sans-serif&quot;; color: rgb(23, 54, 93);">&nbsp;</sp=
an></b></p>
<p class=3D"MsoNormal"><b><span style=3D"font-size: 10pt; font-family: &quo=
t;Verdana&quot;,&quot;sans-serif&quot;; color: rgb(23, 54, 93);">Yep, we ra=
n into this one too. Was already the case for OpenEXR 1.6/1.7.</span></b></=
p>
<p class=3D"MsoNormal"><b><span style=3D"font-size: 10pt; font-family: &quo=
t;Verdana&quot;,&quot;sans-serif&quot;; color: rgb(23, 54, 93);">Would be g=
ood to know if it is fixed in 4.5.</span></b></p>
<p class=3D"MsoNormal"><b><span style=3D"font-size: 10pt; font-family: &quo=
t;Verdana&quot;,&quot;sans-serif&quot;; color: rgb(23, 54, 93);">&nbsp;</sp=
an></b></p>
<p class=3D"MsoNormal"><b><span style=3D"font-size: 10pt; font-family: &quo=
t;Verdana&quot;,&quot;sans-serif&quot;; color: rgb(23, 54, 93);">Juri</span=
></b></p>
<p class=3D"MsoNormal"><b><span style=3D"font-size: 10pt; font-family: &quo=
t;Verdana&quot;,&quot;sans-serif&quot;; color: rgb(23, 54, 93);">&nbsp;</sp=
an></b></p>
<div>
<div style=3D"border-width: 1pt medium medium; border-style: solid none non=
e; padding: 3pt 0in 0in;">
<p class=3D"MsoNormal"><b><span style=3D"font-size: 10pt; font-family: &quo=
t;Tahoma&quot;,&quot;sans-serif&quot;; color: windowtext;">From:</span></b>=
<span style=3D"font-size: 10pt; font-family: &quot;Tahoma&quot;,&quot;sans-=
serif&quot;; color: windowtext;">
<a href=3D"mailto:openexr-devel-bounces&#43;[email protected]=
g" target=3D"_blank">
openexr-devel-bounces&#43;[email protected]</a> [<a href=3D"=
mailto:openexr-devel-bounces&#43;[email protected]" target=
=3D"_blank">mailto:openexr-devel-bounces&#43;[email protected]=
rg</a>]
<b>On Behalf Of </b>Halfdan Ingvarsson<br>
<b>Sent:</b> 18 June, 2013 18:06<br>
<b>To:</b> Piotr Stanczyk<br>
<b>Cc:</b> <a href=3D"mailto:[email protected]" target=3D"_blank">ope=
[email protected]</a>;
<a href=3D"mailto:[email protected]" target=3D"_blank">openexr-devel=
@nongnu.org</a><br>
<b>Subject:</b> Re: [Openexr-devel] Optimisation code path for reading imag=
es</span></p>
</div>
</div>
<p class=3D"MsoNormal">&nbsp;</p>
<div>
<p class=3D"MsoNormal">Also, compiling the EXR2.0 library using gcc 4.2/4.3=
/4.4 with -O3 results in the PIZ compression code producing occasional garb=
age data (-O3 is the default for cmake release builds). The workaround was =
to build with -O2. gcc 4.6 and up
 seem ok. I didn't test with gcc 4.5.<br>
<br>
Unfortunately, I didn't have time to dig any deeper as to whether this was =
an actual optimizer bug, or whether there are some spurious assumptions in =
the code leading to it.<br>
<br>
Just something to keep in mind.<br>
<br>
&nbsp;- =BD<br>
<br>
On 13-06-17 09:35 PM, Piotr Stanczyk wrote:</p>
</div>
<blockquote style=3D"margin-top: 5pt; margin-bottom: 5pt;">
<div>
<p class=3D"MsoNormal" style=3D"margin-bottom: 12pt;"><span style=3D"font-s=
ize: 10pt; font-family: &quot;Tahoma&quot;,&quot;sans-serif&quot;;"><br>
Hi, <br>
<br>
There have been a few usage cases reported that exercised parts of the opti=
mised reading code path which unfortunately revealed erroneous assumptions =
in the source.
<br>
<br>
We have a fix for handling these, which also extents to handling more gener=
al cases,&nbsp; in a separate branch and will be releasing that once we hav=
e built up more usage cycles.
<br>
<br>
In the meantime, however, a v2.0.1 release will be available shortly, which=
 disables the optimisation.</span></p>
<div>
<p class=3D"MsoNormal" style=3D"margin-bottom: 12pt;"><span style=3D"font-s=
ize: 10pt; font-family: &quot;Tahoma&quot;,&quot;sans-serif&quot;;">&nbsp;<=
/span></p>
<div>
<p class=3D"MsoNormal"><span style=3D"font-size: 10pt; font-family: &quot;T=
ahoma&quot;,&quot;sans-serif&quot;;">- Piotr</span></p>
</div>
</div>
</div>
<p class=3D"MsoNormal" style=3D"margin-bottom: 12pt;"><br>
<br>
</p>
<pre>_______________________________________________</pre>
<pre>Openexr-devel mailing list</pre>
<pre><a href=3D"mailto:[email protected]" target=3D"_blank">Openexr-=
[email protected]</a></pre>
<pre><a href=3D"https://lists.nongnu.org/mailman/listinfo/openexr-devel" ta=
rget=3D"_blank">https://lists.nongnu.org/mailman/listinfo/openexr-devel</a>=
</pre>
</blockquote>
<p class=3D"MsoNormal">&nbsp;</p>
</div>
<div>
<div class=3D"MsoNormal" style=3D"text-align: center;" align=3D"center">
<hr align=3D"center" size=3D"3" width=3D"100%">
</div>
</div>
<div>
<p class=3D"MsoNormal">This email message is for the sole use of the intend=
ed recipient(s) and may contain confidential information.&nbsp; Any unautho=
rized review, use, disclosure or distribution is prohibited.&nbsp; If you a=
re not the intended recipient, please contact
 the sender by reply email and destroy all copies of the original message. =
</p>
</div>
<div>
<div class=3D"MsoNormal" style=3D"text-align: center;" align=3D"center">
<hr align=3D"center" size=3D"3" width=3D"100%">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<br>
</div>
</div>
</div>
</body>
</html>

--_000_95F01873F66DA54DAD2734EEBF98F86C011092552Cmailbox09luca_--


--===============0847826746896101182==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Openexr-user mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/openexr-user

--===============0847826746896101182==--