Re: DWAA minimum tile size?
Larry Gritz <[email protected]> Wed, 21 Nov 2018 08:24:26 -0800
| Newsgroups | gmane.comp.video.openexr.devel |
|---|---|
| Message-ID | <[email protected]> |
--===============2716530611278965230==
Content-Type: multipart/alternative;
boundary="Apple-Mail=_C7A04EAB-7333-4FCE-93E6-306A45993344"
--Apple-Mail=_C7A04EAB-7333-4FCE-93E6-306A45993344
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=utf-8
Funny you should ask.
As it turns out, in that original example I posted, a 3-channel image =
will be default be named R,G,B and a 1-channel image will default to =
"Y".
Right after I send the message, I remembered that certain channel names =
get a different treatment under dwaa, and tried naming the one channel =
"R":
# still fails, even with channel name "R"
oiiotool --pattern checker 512x512 1 -d half -chnames R -compression =
dwaa -tile 8 8 -o test.exr
# still passes, even with a channel named "Y"
oiiotool --pattern checker 512x512 3 -d half -chnames Y,G,B =
-compression dwaa -tile 8 8 -o test.exr
Also, remember that even with one "Y" channel, it worked fine for 16x16 =
tiles, but hit the assertion when smaller.
Oh, but wait, I just tried one more combination!
# 3 channel fails! But only if all at least 2 channels are non-RGB? =
Still works with 16x16 tiles.
oiiotool --pattern checker 512x512 3 -d half -chnames Y,X,B =
-compression dwaa -tile 8 8 -o test.exr
I can transfer this to a GI "Issue" if you prefer. I tried the mail list =
first thinking that maybe somebody was going to tell me it's a known =
problem or that I'm obviously doing something wrong rather than it being =
a bug.
> On Nov 21, 2018, at 6:44 AM, Karl Rasche <[email protected]> wrote:
>=20
> Hey Larry -
>=20
> What is the single channel named?=20
>=20
> For tiled files, dwaa =3D=3D dwab, so you should hit the same issue =
with either case. There=E2=80=99s a couple of paths that lead to hitting =
zlib, and the channel naming should tell us which that is.=20
>=20
> My guess is there=E2=80=99s some degenerate case in the buffer sizing =
logic.
>=20
> Karl
>=20
> On Tue, Nov 20, 2018 at 9:49 PM Larry Gritz <[email protected] =
<mailto:[email protected]>> wrote:
> Here is a strange behavior (easy to repro for those of you who might =
have a copy of OIIO lying around):
>=20
> # works
> oiiotool --pattern checker 512x512 1 -d half -compression dwaa =
-tile 16 16 -o test.exr
>=20
> # fails
> oiiotool --pattern checker 512x512 1 -d half -compression dwaa =
-tile 8 8 -o test.exr
>=20
> Just writing a simple tiled 1-channel half exr file with dwaa (or =
dwab) compression. It succeeds with 16x16 tiles but fails with 8x8, =
wherein writeTiles() throws an exception with the following message:
>=20
> > Failed to write pixel data to image file =
"test.bb700d14.temp.exr". Data compression (zlib) failed.
>=20
>=20
> Curiously, if I instead make a 3-channel file,
>=20
> oiiotool --pattern checker 512x512 3 -d half -compression dwaa =
-tile 8 8 -o test.exr
>=20
> that succeeds (also fine with 4x4, 2x2, 1x1 tile size). Using zip =
compression is fine. I can only make it fail with the specific =
combination of 1 channel images + dwaa/dwab compression + tile size < =
16.
>=20
> Anybody have any insight, or has this bug been reported before?
>=20
> Here's the OIIO issue if anyone wants to follow up there or reference =
it:
> https://github.com/OpenImageIO/oiio/issues/1844 =
<https://github.com/OpenImageIO/oiio/issues/1844>
>=20
> --
> Larry Gritz
> [email protected] <mailto:[email protected]>
>=20
>=20
>=20
>=20
>=20
> _______________________________________________
> Openexr-devel mailing list
> [email protected] <mailto:[email protected]>
> https://lists.nongnu.org/mailman/listinfo/openexr-devel =
<https://lists.nongnu.org/mailman/listinfo/openexr-devel>
--
Larry Gritz
[email protected]
--Apple-Mail=_C7A04EAB-7333-4FCE-93E6-306A45993344
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
charset=utf-8
<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; =
charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; line-break: after-white-space;" class=3D"">Funny=
you should ask.<div class=3D""><br class=3D""></div><div class=3D"">As =
it turns out, in that original example I posted, a 3-channel image will =
be default be named R,G,B and a 1-channel image will default to =
"Y".</div><div class=3D""><br class=3D""></div><div class=3D"">Right =
after I send the message, I remembered that certain channel names get a =
different treatment under dwaa, and tried naming the one channel =
"R":</div><div class=3D""><br class=3D""></div><div class=3D""> =
# still fails, even with channel name "R"<br class=3D""> =
oiiotool --pattern checker 512x512 1 -d half -chnames R =
-compression dwaa -tile 8 8 -o test.exr<br class=3D""></div><div =
class=3D""><br class=3D""></div><div class=3D""><div class=3D""> =
# still passes, even with a channel named "Y"<br class=3D""> =
oiiotool --pattern checker 512x512 3 -d half -chnames Y,G,B =
-compression dwaa -tile 8 8 -o test.exr<br class=3D""></div></div><div =
class=3D""><br class=3D""></div><div class=3D"">Also, remember that even =
with one "Y" channel, it worked fine for 16x16 tiles, but hit the =
assertion when smaller.</div><div class=3D""><br class=3D""></div><div =
class=3D"">Oh, but wait, I just tried one more combination!</div><div =
class=3D""><br class=3D""></div><div class=3D""> # 3 =
channel fails! But only if all at least 2 channels are non-RGB? Still =
works with 16x16 tiles.</div><div class=3D""> oiiotool =
--pattern checker 512x512 3 -d half -chnames Y,X,B -compression dwaa =
-tile 8 8 -o test.exr</div><div class=3D""><br class=3D""></div><div =
class=3D"">I can transfer this to a GI "Issue" if you prefer. I tried =
the mail list first thinking that maybe somebody was going to tell me =
it's a known problem or that I'm obviously doing something wrong rather =
than it being a bug.</div><div class=3D""><br class=3D""><div><br =
class=3D""><blockquote type=3D"cite" class=3D""><div class=3D"">On Nov =
21, 2018, at 6:44 AM, Karl Rasche <<a =
href=3D"mailto:[email protected]" =
class=3D"">[email protected]</a>> wrote:</div><br =
class=3D"Apple-interchange-newline"><div class=3D""><div class=3D""><div =
dir=3D"auto" class=3D"">Hey Larry -</div></div><div dir=3D"auto" =
class=3D""><br class=3D""></div><div dir=3D"auto" class=3D"">What is the =
single channel named? </div><div dir=3D"auto" class=3D""><br =
class=3D""></div><div dir=3D"auto" class=3D"">For tiled files, dwaa =3D=3D=
dwab, so you should hit the same issue with either case. There=E2=80=99s =
a couple of paths that lead to hitting zlib, and the channel naming =
should tell us which that is. </div><div dir=3D"auto" class=3D""><br =
class=3D""></div><div dir=3D"auto" class=3D"">My guess is there=E2=80=99s =
some degenerate case in the buffer sizing logic.</div><div dir=3D"auto" =
class=3D""><br class=3D""></div><div dir=3D"auto" =
class=3D"">Karl</div><div class=3D""><br class=3D""><div =
class=3D"gmail_quote"><div dir=3D"ltr" class=3D"">On Tue, Nov 20, 2018 =
at 9:49 PM Larry Gritz <<a href=3D"mailto:[email protected]" =
class=3D"">[email protected]</a>> wrote:<br =
class=3D""></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 =
.8ex;border-left:1px #ccc solid;padding-left:1ex">Here is a strange =
behavior (easy to repro for those of you who might have a copy of OIIO =
lying around):<br class=3D"">
<br class=3D"">
# works<br class=3D"">
oiiotool --pattern checker 512x512 1 -d half -compression =
dwaa -tile 16 16 -o test.exr<br class=3D"">
<br class=3D"">
# fails<br class=3D"">
oiiotool --pattern checker 512x512 1 -d half -compression =
dwaa -tile 8 8 -o test.exr<br class=3D"">
<br class=3D"">
Just writing a simple tiled 1-channel half exr file with dwaa (or dwab) =
compression. It succeeds with 16x16 tiles but fails with 8x8, wherein =
writeTiles() throws an exception with the following message:<br =
class=3D"">
<br class=3D"">
> Failed to write pixel data to image file =
"test.bb700d14.temp.exr". Data compression (zlib) failed.<br class=3D"">
<br class=3D"">
<br class=3D"">
Curiously, if I instead make a 3-channel file,<br class=3D"">
<br class=3D"">
oiiotool --pattern checker 512x512 3 -d half -compression =
dwaa -tile 8 8 -o test.exr<br class=3D"">
<br class=3D"">
that succeeds (also fine with 4x4, 2x2, 1x1 tile size). Using zip =
compression is fine. I can only make it fail with the specific =
combination of 1 channel images + dwaa/dwab compression + tile size < =
16.<br class=3D"">
<br class=3D"">
Anybody have any insight, or has this bug been reported before?<br =
class=3D"">
<br class=3D"">
Here's the OIIO issue if anyone wants to follow up there or reference =
it:<br class=3D"">
<a href=3D"https://github.com/OpenImageIO/oiio/issues/1844" =
rel=3D"noreferrer" target=3D"_blank" =
class=3D"">https://github.com/OpenImageIO/oiio/issues/1844</a><br =
class=3D"">
<br class=3D"">
--<br class=3D"">
Larry Gritz<br class=3D"">
<a href=3D"mailto:[email protected]" target=3D"_blank" =
class=3D"">[email protected]</a><br class=3D"">
<br class=3D"">
<br class=3D"">
<br class=3D"">
<br class=3D"">
<br class=3D"">
_______________________________________________<br class=3D"">
Openexr-devel mailing list<br class=3D"">
<a href=3D"mailto:[email protected]" target=3D"_blank" =
class=3D"">[email protected]</a><br class=3D"">
<a href=3D"https://lists.nongnu.org/mailman/listinfo/openexr-devel" =
rel=3D"noreferrer" target=3D"_blank" =
class=3D"">https://lists.nongnu.org/mailman/listinfo/openexr-devel</a><br =
class=3D"">
</blockquote></div></div>
</div></blockquote></div><br class=3D""><div class=3D"">
<div style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; =
-webkit-line-break: after-white-space;" class=3D""><div style=3D"color: =
rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: =
normal; font-variant-caps: normal; font-weight: normal; letter-spacing: =
normal; text-align: start; text-indent: 0px; text-transform: none; =
white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: =
0px;">--</div><div style=3D"color: rgb(0, 0, 0); font-family: Helvetica; =
font-size: 14px; font-style: normal; font-variant-caps: normal; =
font-weight: normal; letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px;">Larry =
Gritz</div><div style=3D"color: rgb(0, 0, 0); font-family: Helvetica; =
font-size: 14px; font-style: normal; font-variant-caps: normal; =
font-weight: normal; letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px;"><a =
href=3D"mailto:[email protected]" =
class=3D"">[email protected]</a></div><div style=3D"color: rgb(0, 0, 0); =
font-family: Helvetica; font-size: 14px; font-style: normal; =
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=3D""><br=
class=3D""></div><br class=3D"Apple-interchange-newline"></div><br =
class=3D"Apple-interchange-newline">
</div>
<br class=3D""></div></body></html>=
--Apple-Mail=_C7A04EAB-7333-4FCE-93E6-306A45993344--
--===============2716530611278965230==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Openexr-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/openexr-devel
--===============2716530611278965230==--