Re-do image decoders' call sequence state machine

This commit is contained in:
Nigel Tao committed 2022-05-28 15:06:56 +10:00
1 parent a2e3a5a272
commit 8d03a67e6e
12 files changed
+606 -511

No files matched your search

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

@@ -0,0 +1,96 @@
<svg version="1.1" viewBox="0.0 0.0 1280.0 960.0" fill="none" stroke="none" stroke-linecap="square" stroke-miterlimit="10" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg">
<clipPath id="p.0">
<path d="m0 0l1280.0 0l0 960.0l-1280.0 0l0 -960.0z" clip-rule="nonzero"/>
</clipPath>
<g clip-path="url(#p.0)">
<path fill="#000000" fill-opacity="0.0" d="m0 0l1280.0 0l0 960.0l-1280.0 0z" fill-rule="evenodd"/>
<path fill="#f4cccc" d="m232.11023 113.00525l0 0c0 -24.744095 20.059067 -44.803146 44.80316 -44.803146l0 0c11.882538 0 23.278381 4.720314 31.680603 13.122536c8.402222 8.402222 13.122528 19.79808 13.122528 31.68061l0 0c0 24.744095 -20.059052 44.803146 -44.80313 44.803146l0 0c-24.744095 0 -44.80316 -20.059052 -44.80316 -44.803146z" fill-rule="evenodd"/>
<path stroke="#000000" stroke-width="2.0" stroke-linejoin="round" stroke-linecap="butt" d="m232.11023 113.00525l0 0c0 -24.744095 20.059067 -44.803146 44.80316 -44.803146l0 0c11.882538 0 23.278381 4.720314 31.680603 13.122536c8.402222 8.402222 13.122528 19.79808 13.122528 31.68061l0 0c0 24.744095 -20.059052 44.803146 -44.80313 44.803146l0 0c-24.744095 0 -44.80316 -20.059052 -44.80316 -44.803146z" fill-rule="evenodd"/>
<path fill="#000000" d="m267.51105 114.162125q0 2.359375 -0.984375 3.609375q-0.96875 1.25 -2.859375 1.25q-1.859375 0 -2.84375 -1.21875q-0.984375 -1.234375 -1.0 -3.53125l0 -2.09375q0 -2.375 0.984375 -3.609375q0.984375 -1.234375 2.84375 -1.234375q1.859375 0 2.84375 1.21875q0.984375 1.21875 1.015625 3.515625l0 2.09375zm-2.265625 -2.296875q0 -1.421875 -0.390625 -2.0625q-0.375 -0.640625 -1.203125 -0.640625q-0.796875 0 -1.171875 0.609375q-0.375 0.609375 -0.40625 1.921875l0 2.765625q0 1.390625 0.375 2.0625q0.390625 0.671875 1.21875 0.671875q0.828125 0 1.1875 -0.640625q0.375 -0.65625 0.390625 -1.984375l0 -2.703125zm7.1015625 1.0625l1.421875 -2.515625l2.40625 0l-2.40625 4.140625l2.515625 4.3125l-2.421875 0l-1.515625 -2.65625l-1.5 2.65625l-2.421875 0l2.5 -4.3125l-2.390625 -4.140625l2.421875 0l1.390625 2.515625zm12.484375 1.234375q0 2.359375 -0.984375 3.609375q-0.96875 1.25 -2.859375 1.25q-1.859375 0 -2.84375 -1.21875q-0.984375 -1.234375 -1.0 -3.53125l0 -2.09375q0 -2.375 0.984375 -3.609375q0.984375 -1.234375 2.84375 -1.234375q1.859375 0 2.84375 1.21875q0.984375 1.21875 1.015625 3.515625l0 2.09375zm-2.265625 -2.296875q0 -1.421875 -0.390625 -2.0625q-0.375 -0.640625 -1.203125 -0.640625q-0.796875 0 -1.171875 0.609375q-0.375 0.609375 -0.40625 1.921875l0 2.765625q0 1.390625 0.375 2.0625q0.390625 0.671875 1.21875 0.671875q0.828125 0 1.1875 -0.640625q0.375 -0.65625 0.390625 -1.984375l0 -2.703125zm11.4453125 2.296875q0 2.359375 -0.984375 3.609375q-0.96875 1.25 -2.859375 1.25q-1.859375 0 -2.84375 -1.21875q-0.984375 -1.234375 -1.0 -3.53125l0 -2.09375q0 -2.375 0.984375 -3.609375q0.984375 -1.234375 2.84375 -1.234375q1.859375 0 2.84375 1.21875q0.984375 1.21875 1.015625 3.515625l0 2.09375zm-2.265625 -2.296875q0 -1.421875 -0.390625 -2.0625q-0.375 -0.640625 -1.203125 -0.640625q-0.796875 0 -1.171875 0.609375q-0.375 0.609375 -0.40625 1.921875l0 2.765625q0 1.390625 0.375 2.0625q0.390625 0.671875 1.21875 0.671875q0.828125 0 1.1875 -0.640625q0.375 -0.65625 0.390625 -1.984375l0 -2.703125z" fill-rule="nonzero"/>
<path fill="#d9d9d9" d="m395.7257 113.00525l0 0c0 -24.744095 20.059082 -44.803146 44.80316 -44.803146l0 0c11.882538 0 23.278381 4.720314 31.680603 13.122536c8.402222 8.402222 13.122559 19.79808 13.122559 31.68061l0 0c0 24.744095 -20.059052 44.803146 -44.80316 44.803146l0 0c-24.74408 0 -44.80316 -20.059052 -44.80316 -44.803146z" fill-rule="evenodd"/>
<path stroke="#000000" stroke-width="2.0" stroke-linejoin="round" stroke-linecap="butt" d="m395.7257 113.00525l0 0c0 -24.744095 20.059082 -44.803146 44.80316 -44.803146l0 0c11.882538 0 23.278381 4.720314 31.680603 13.122536c8.402222 8.402222 13.122559 19.79808 13.122559 31.68061l0 0c0 24.744095 -20.059052 44.803146 -44.80316 44.803146l0 0c-24.74408 0 -44.80316 -20.059052 -44.80316 -44.803146z" fill-rule="evenodd"/>
<path fill="#000000" d="m427.13434 119.0215q-1.4375 -0.03125 -2.15625 -1.015625q-0.71875 -1.0 -0.65625 -2.859375q0.015625 -0.578125 0.09375 -1.140625l0.28125 -1.890625q0.375 -2.4375 1.421875 -3.625q1.0625 -1.203125 2.78125 -1.15625q1.453125 0.03125 2.171875 1.0q0.71875 0.953125 0.65625 2.796875q-0.015625 0.578125 -0.09375 1.140625l-0.265625 1.84375q-0.421875 2.5625 -1.46875 3.765625q-1.046875 1.1875 -2.765625 1.140625zm3.140625 -7.0q0.109375 -0.953125 0.09375 -1.46875q-0.03125 -1.984375 -1.53125 -2.046875q-1.09375 -0.03125 -1.78125 0.8125q-0.671875 0.84375 -0.9375 2.65625l-0.328125 2.265625q-0.109375 0.90625 -0.109375 1.484375q0.046875 2.0625 1.53125 2.125q1.046875 0.046875 1.71875 -0.765625q0.671875 -0.8125 0.96875 -2.578125l0.375 -2.484375zm5.84375 1.46875l2.296875 -3.078125l1.734375 0l-3.390625 4.25l2.0625 4.203125l-1.53125 0l-1.40625 -3.15625l-2.375 3.15625l-1.734375 0l3.5 -4.34375l-2.0 -4.109375l1.546875 0l1.296875 3.078125zm8.6171875 5.375l-1.421875 0l1.671875 -9.59375l-3.015625 1.0625l0.234375 -1.375l4.21875 -1.53125l0.25 0l-1.9375 11.4375zm7.765625 0.15625q-1.4375 -0.03125 -2.15625 -1.015625q-0.71875 -1.0 -0.65625 -2.859375q0.015625 -0.578125 0.09375 -1.140625l0.28125 -1.890625q0.375 -2.4375 1.421875 -3.625q1.0625 -1.203125 2.78125 -1.15625q1.453125 0.03125 2.171875 1.0q0.71875 0.953125 0.65625 2.796875q-0.015625 0.578125 -0.09375 1.140625l-0.265625 1.84375q-0.421875 2.5625 -1.46875 3.765625q-1.046875 1.1875 -2.765625 1.140625zm3.140625 -7.0q0.109375 -0.953125 0.09375 -1.46875q-0.03125 -1.984375 -1.53125 -2.046875q-1.09375 -0.03125 -1.78125 0.8125q-0.671875 0.84375 -0.9375 2.65625l-0.328125 2.265625q-0.109375 0.90625 -0.109375 1.484375q0.046875 2.0625 1.53125 2.125q1.046875 0.046875 1.71875 -0.765625q0.671875 -0.8125 0.96875 -2.578125l0.375 -2.484375z" fill-rule="nonzero"/>
<path fill="#d9ead3" d="m232.11154 281.12686l0 0c0 -24.74411 20.059067 -44.803146 44.80316 -44.803146l0 0c11.882538 0 23.278381 4.7203064 31.680603 13.122528c8.402222 8.402237 13.122528 19.79808 13.122528 31.680618l0 0c0 24.74408 -20.059052 44.80316 -44.80313 44.80316l0 0c-24.744095 0 -44.80316 -20.059082 -44.80316 -44.80316z" fill-rule="evenodd"/>
<path stroke="#000000" stroke-width="2.0" stroke-linejoin="round" stroke-linecap="butt" d="m232.11154 281.12686l0 0c0 -24.74411 20.059067 -44.803146 44.80316 -44.803146l0 0c11.882538 0 23.278381 4.7203064 31.680603 13.122528c8.402222 8.402237 13.122528 19.79808 13.122528 31.680618l0 0c0 24.74408 -20.059052 44.80316 -44.80313 44.80316l0 0c-24.744095 0 -44.80316 -20.059082 -44.80316 -44.80316z" fill-rule="evenodd"/>
<path fill="#000000" d="m267.51236 282.28372q0 2.359375 -0.984375 3.609375q-0.96875 1.25 -2.859375 1.25q-1.859375 0 -2.84375 -1.21875q-0.984375 -1.234375 -1.0 -3.53125l0 -2.09375q0 -2.375 0.984375 -3.609375q0.984375 -1.234375 2.84375 -1.234375q1.859375 0 2.84375 1.21875q0.984375 1.21875 1.015625 3.515625l0 2.09375zm-2.265625 -2.296875q0 -1.421875 -0.390625 -2.0625q-0.375 -0.640625 -1.203125 -0.640625q-0.796875 0 -1.171875 0.609375q-0.375 0.609375 -0.40625 1.921875l0 2.765625q0 1.390625 0.375 2.0625q0.390625 0.671875 1.21875 0.671875q0.828125 0 1.1875 -0.640625q0.375 -0.65625 0.390625 -1.984375l0 -2.703125zm7.1015625 1.0625l1.421875 -2.515625l2.40625 0l-2.40625 4.140625l2.515625 4.3125l-2.421875 0l-1.515625 -2.65625l-1.5 2.65625l-2.421875 0l2.5 -4.3125l-2.390625 -4.140625l2.421875 0l1.390625 2.515625zm12.625 5.9375l-7.796875 0l0 -1.546875l3.671875 -3.921875q0.765625 -0.828125 1.125 -1.4375q0.359375 -0.625 0.359375 -1.1875q0 -0.75 -0.390625 -1.1875q-0.375 -0.4375 -1.078125 -0.4375q-0.765625 0 -1.21875 0.53125q-0.4375 0.53125 -0.4375 1.390625l-2.265625 0q0 -1.046875 0.5 -1.90625q0.5 -0.859375 1.40625 -1.34375q0.90625 -0.484375 2.046875 -0.484375q1.765625 0 2.734375 0.84375q0.96875 0.84375 0.96875 2.375q0 0.84375 -0.4375 1.71875q-0.4375 0.875 -1.5 2.046875l-2.578125 2.71875l4.890625 0l0 1.828125zm9.0390625 -4.703125q0 2.359375 -0.984375 3.609375q-0.96875 1.25 -2.859375 1.25q-1.859375 0 -2.84375 -1.21875q-0.984375 -1.234375 -1.0 -3.53125l0 -2.09375q0 -2.375 0.984375 -3.609375q0.984375 -1.234375 2.84375 -1.234375q1.859375 0 2.84375 1.21875q0.984375 1.21875 1.015625 3.515625l0 2.09375zm-2.265625 -2.296875q0 -1.421875 -0.390625 -2.0625q-0.375 -0.640625 -1.203125 -0.640625q-0.796875 0 -1.171875 0.609375q-0.375 0.609375 -0.40625 1.921875l0 2.765625q0 1.390625 0.375 2.0625q0.390625 0.671875 1.21875 0.671875q0.828125 0 1.1875 -0.640625q0.375 -0.65625 0.390625 -1.984375l0 -2.703125z" fill-rule="nonzero"/>
<path fill="#d9d9d9" d="m395.72702 281.12686l0 0c0 -24.74411 20.059082 -44.803146 44.80316 -44.803146l0 0c11.882538 0 23.278381 4.7203064 31.680603 13.122528c8.402222 8.402237 13.122559 19.79808 13.122559 31.680618l0 0c0 24.74408 -20.059052 44.80316 -44.80316 44.80316l0 0c-24.74408 0 -44.80316 -20.059082 -44.80316 -44.80316z" fill-rule="evenodd"/>
<path stroke="#000000" stroke-width="2.0" stroke-linejoin="round" stroke-linecap="butt" d="m395.72702 281.12686l0 0c0 -24.74411 20.059082 -44.803146 44.80316 -44.803146l0 0c11.882538 0 23.278381 4.7203064 31.680603 13.122528c8.402222 8.402237 13.122559 19.79808 13.122559 31.680618l0 0c0 24.74408 -20.059052 44.80316 -44.80316 44.80316l0 0c-24.74408 0 -44.80316 -20.059082 -44.80316 -44.80316z" fill-rule="evenodd"/>
<path fill="#000000" d="m427.13565 287.1431q-1.4375 -0.03125 -2.15625 -1.015625q-0.71875 -1.0 -0.65625 -2.859375q0.015625 -0.578125 0.09375 -1.140625l0.28125 -1.890625q0.375 -2.4375 1.421875 -3.625q1.0625 -1.203125 2.78125 -1.15625q1.453125 0.03125 2.171875 1.0q0.71875 0.953125 0.65625 2.796875q-0.015625 0.578125 -0.09375 1.140625l-0.265625 1.84375q-0.421875 2.5625 -1.46875 3.765625q-1.046875 1.1875 -2.765625 1.140625zm3.140625 -7.0q0.109375 -0.953125 0.09375 -1.46875q-0.03125 -1.984375 -1.53125 -2.046875q-1.09375 -0.03125 -1.78125 0.8125q-0.671875 0.84375 -0.9375 2.65625l-0.328125 2.265625q-0.109375 0.90625 -0.109375 1.484375q0.046875 2.0625 1.53125 2.125q1.046875 0.046875 1.71875 -0.765625q0.671875 -0.8125 0.96875 -2.578125l0.375 -2.484375zm5.84375 1.46875l2.296875 -3.078125l1.734375 0l-3.390625 4.25l2.0625 4.203125l-1.53125 0l-1.40625 -3.15625l-2.375 3.15625l-1.734375 0l3.5 -4.34375l-2.0 -4.109375l1.546875 0l1.296875 3.078125zm7.1484375 -1.015625l0.9375 0q1.03125 0 1.734375 -0.53125q0.71875 -0.546875 0.8125 -1.484375q0.109375 -0.90625 -0.328125 -1.421875q-0.4375 -0.515625 -1.28125 -0.53125q-0.890625 -0.015625 -1.515625 0.515625q-0.609375 0.53125 -0.75 1.4375l-1.40625 0.015625q0.140625 -1.40625 1.203125 -2.28125q1.0625 -0.890625 2.546875 -0.875q1.421875 0.03125 2.234375 0.90625q0.828125 0.859375 0.71875 2.265625q-0.078125 0.8125 -0.625 1.484375q-0.546875 0.65625 -1.515625 1.09375q0.78125 0.3125 1.15625 0.984375q0.390625 0.671875 0.328125 1.578125q-0.125 1.546875 -1.234375 2.484375q-1.09375 0.9375 -2.65625 0.90625q-1.46875 -0.03125 -2.34375 -0.90625q-0.859375 -0.875 -0.796875 -2.265625l1.421875 0.015625q-0.046875 0.875 0.421875 1.40625q0.46875 0.53125 1.359375 0.5625q1.0 0.03125 1.65625 -0.5625q0.671875 -0.609375 0.765625 -1.609375q0.078125 -0.9375 -0.4375 -1.453125q-0.5 -0.515625 -1.5 -0.546875l-1.09375 -0.015625l0.1875 -1.171875zm9.234375 6.546875q-1.4375 -0.03125 -2.15625 -1.015625q-0.71875 -1.0 -0.65625 -2.859375q0.015625 -0.578125 0.09375 -1.140625l0.28125 -1.890625q0.375 -2.4375 1.421875 -3.625q1.0625 -1.203125 2.78125 -1.15625q1.453125 0.03125 2.171875 1.0q0.71875 0.953125 0.65625 2.796875q-0.015625 0.578125 -0.09375 1.140625l-0.265625 1.84375q-0.421875 2.5625 -1.46875 3.765625q-1.046875 1.1875 -2.765625 1.140625zm3.140625 -7.0q0.109375 -0.953125 0.09375 -1.46875q-0.03125 -1.984375 -1.53125 -2.046875q-1.09375 -0.03125 -1.78125 0.8125q-0.671875 0.84375 -0.9375 2.65625l-0.328125 2.265625q-0.109375 0.90625 -0.109375 1.484375q0.046875 2.0625 1.53125 2.125q1.046875 0.046875 1.71875 -0.765625q0.671875 -0.8125 0.96875 -2.578125l0.375 -2.484375z" fill-rule="nonzero"/>
<path fill="#c9daf8" d="m232.11023 449.24847l0 0c0 -24.74411 20.059067 -44.80316 44.80316 -44.80316l0 0c11.882538 0 23.278381 4.720337 31.680603 13.122559c8.402222 8.402222 13.122528 19.798065 13.122528 31.680603l0 0c0 24.74408 -20.059052 44.80313 -44.80313 44.80313l0 0c-24.744095 0 -44.80316 -20.059052 -44.80316 -44.80313z" fill-rule="evenodd"/>
<path stroke="#000000" stroke-width="2.0" stroke-linejoin="round" stroke-linecap="butt" d="m232.11023 449.24847l0 0c0 -24.74411 20.059067 -44.80316 44.80316 -44.80316l0 0c11.882538 0 23.278381 4.720337 31.680603 13.122559c8.402222 8.402222 13.122528 19.798065 13.122528 31.680603l0 0c0 24.74408 -20.059052 44.80313 -44.80313 44.80313l0 0c-24.744095 0 -44.80316 -20.059052 -44.80316 -44.80313z" fill-rule="evenodd"/>
<path fill="#000000" d="m267.51105 450.40533q0 2.359375 -0.984375 3.609375q-0.96875 1.25 -2.859375 1.25q-1.859375 0 -2.84375 -1.21875q-0.984375 -1.234375 -1.0 -3.53125l0 -2.09375q0 -2.375 0.984375 -3.609375q0.984375 -1.234375 2.84375 -1.234375q1.859375 0 2.84375 1.21875q0.984375 1.21875 1.015625 3.515625l0 2.09375zm-2.265625 -2.296875q0 -1.421875 -0.390625 -2.0625q-0.375 -0.640625 -1.203125 -0.640625q-0.796875 0 -1.171875 0.609375q-0.375 0.609375 -0.40625 1.921875l0 2.765625q0 1.390625 0.375 2.0625q0.390625 0.671875 1.21875 0.671875q0.828125 0 1.1875 -0.640625q0.375 -0.65625 0.390625 -1.984375l0 -2.703125zm7.1015625 1.0625l1.421875 -2.515625l2.40625 0l-2.40625 4.140625l2.515625 4.3125l-2.421875 0l-1.515625 -2.65625l-1.5 2.65625l-2.421875 0l2.5 -4.3125l-2.390625 -4.140625l2.421875 0l1.390625 2.515625zm11.5 1.65625l1.296875 0l0 1.8125l-1.296875 0l0 2.46875l-2.25 0l0 -2.46875l-4.671875 0l-0.09375 -1.421875l4.734375 -7.484375l2.28125 0l0 7.09375zm-4.765625 0l2.515625 0l0 -4.015625l-0.15625 0.25l-2.359375 3.765625zm14.9296875 -0.421875q0 2.359375 -0.984375 3.609375q-0.96875 1.25 -2.859375 1.25q-1.859375 0 -2.84375 -1.21875q-0.984375 -1.234375 -1.0 -3.53125l0 -2.09375q0 -2.375 0.984375 -3.609375q0.984375 -1.234375 2.84375 -1.234375q1.859375 0 2.84375 1.21875q0.984375 1.21875 1.015625 3.515625l0 2.09375zm-2.265625 -2.296875q0 -1.421875 -0.390625 -2.0625q-0.375 -0.640625 -1.203125 -0.640625q-0.796875 0 -1.171875 0.609375q-0.375 0.609375 -0.40625 1.921875l0 2.765625q0 1.390625 0.375 2.0625q0.390625 0.671875 1.21875 0.671875q0.828125 0 1.1875 -0.640625q0.375 -0.65625 0.390625 -1.984375l0 -2.703125z" fill-rule="nonzero"/>
<path fill="#d9d9d9" d="m395.7257 449.24847l0 0c0 -24.74411 20.059082 -44.80316 44.80316 -44.80316l0 0c11.882538 0 23.278381 4.720337 31.680603 13.122559c8.402222 8.402222 13.122559 19.798065 13.122559 31.680603l0 0c0 24.74408 -20.059052 44.80313 -44.80316 44.80313l0 0c-24.74408 0 -44.80316 -20.059052 -44.80316 -44.80313z" fill-rule="evenodd"/>
<path stroke="#000000" stroke-width="2.0" stroke-linejoin="round" stroke-linecap="butt" d="m395.7257 449.24847l0 0c0 -24.74411 20.059082 -44.80316 44.80316 -44.80316l0 0c11.882538 0 23.278381 4.720337 31.680603 13.122559c8.402222 8.402222 13.122559 19.798065 13.122559 31.680603l0 0c0 24.74408 -20.059052 44.80313 -44.80316 44.80313l0 0c-24.74408 0 -44.80316 -20.059052 -44.80316 -44.80313z" fill-rule="evenodd"/>
<path fill="#000000" d="m427.13434 455.2647q-1.4375 -0.03125 -2.15625 -1.015625q-0.71875 -1.0 -0.65625 -2.859375q0.015625 -0.578125 0.09375 -1.140625l0.28125 -1.890625q0.375 -2.4375 1.421875 -3.625q1.0625 -1.203125 2.78125 -1.15625q1.453125 0.03125 2.171875 1.0q0.71875 0.953125 0.65625 2.796875q-0.015625 0.578125 -0.09375 1.140625l-0.265625 1.84375q-0.421875 2.5625 -1.46875 3.765625q-1.046875 1.1875 -2.765625 1.140625zm3.140625 -7.0q0.109375 -0.953125 0.09375 -1.46875q-0.03125 -1.984375 -1.53125 -2.046875q-1.09375 -0.03125 -1.78125 0.8125q-0.671875 0.84375 -0.9375 2.65625l-0.328125 2.265625q-0.109375 0.90625 -0.109375 1.484375q0.046875 2.0625 1.53125 2.125q1.046875 0.046875 1.71875 -0.765625q0.671875 -0.8125 0.96875 -2.578125l0.375 -2.484375zm5.84375 1.46875l2.296875 -3.078125l1.734375 0l-3.390625 4.25l2.0625 4.203125l-1.53125 0l-1.40625 -3.15625l-2.375 3.15625l-1.734375 0l3.5 -4.34375l-2.0 -4.109375l1.546875 0l1.296875 3.078125zm5.6171875 -0.359375l1.4375 -5.640625l5.671875 0l-0.203125 1.328125l-4.453125 0l-0.875 3.109375q0.859375 -0.5 1.859375 -0.484375q1.40625 0.015625 2.15625 1.0625q0.765625 1.046875 0.625 2.671875q-0.140625 1.75 -1.234375 2.828125q-1.09375 1.0625 -2.734375 1.03125q-1.359375 -0.015625 -2.203125 -0.875q-0.828125 -0.875 -0.875 -2.296875l1.328125 0q0.046875 0.9375 0.515625 1.453125q0.484375 0.515625 1.296875 0.53125q1.0 0.03125 1.6875 -0.703125q0.6875 -0.75 0.8125 -1.953125q0.109375 -1.0625 -0.375 -1.734375q-0.46875 -0.6875 -1.390625 -0.71875q-0.578125 -0.015625 -1.015625 0.171875q-0.4375 0.1875 -0.875 0.53125l-1.15625 -0.3125zm10.765625 5.890625q-1.4375 -0.03125 -2.15625 -1.015625q-0.71875 -1.0 -0.65625 -2.859375q0.015625 -0.578125 0.09375 -1.140625l0.28125 -1.890625q0.375 -2.4375 1.421875 -3.625q1.0625 -1.203125 2.78125 -1.15625q1.453125 0.03125 2.171875 1.0q0.71875 0.953125 0.65625 2.796875q-0.015625 0.578125 -0.09375 1.140625l-0.265625 1.84375q-0.421875 2.5625 -1.46875 3.765625q-1.046875 1.1875 -2.765625 1.140625zm3.140625 -7.0q0.109375 -0.953125 0.09375 -1.46875q-0.03125 -1.984375 -1.53125 -2.046875q-1.09375 -0.03125 -1.78125 0.8125q-0.671875 0.84375 -0.9375 2.65625l-0.328125 2.265625q-0.109375 0.90625 -0.109375 1.484375q0.046875 2.0625 1.53125 2.125q1.046875 0.046875 1.71875 -0.765625q0.671875 -0.8125 0.96875 -2.578125l0.375 -2.484375z" fill-rule="nonzero"/>
<path fill="#fff2cc" d="m232.11154 617.37006l0 0c0 -24.74408 20.059067 -44.8031 44.80316 -44.8031l0 0c11.882538 0 23.278381 4.720276 31.680603 13.122498c8.402222 8.402222 13.122528 19.798096 13.122528 31.680603l0 0c0 24.74414 -20.059052 44.80316 -44.80313 44.80316l0 0c-24.744095 0 -44.80316 -20.059021 -44.80316 -44.80316z" fill-rule="evenodd"/>
<path stroke="#000000" stroke-width="2.0" stroke-linejoin="round" stroke-linecap="butt" d="m232.11154 617.37006l0 0c0 -24.74408 20.059067 -44.8031 44.80316 -44.8031l0 0c11.882538 0 23.278381 4.720276 31.680603 13.122498c8.402222 8.402222 13.122528 19.798096 13.122528 31.680603l0 0c0 24.74414 -20.059052 44.80316 -44.80313 44.80316l0 0c-24.744095 0 -44.80316 -20.059021 -44.80316 -44.80316z" fill-rule="evenodd"/>
<path fill="#000000" d="m267.51236 618.527q0 2.359375 -0.984375 3.609375q-0.96875 1.25 -2.859375 1.25q-1.859375 0 -2.84375 -1.21875q-0.984375 -1.234375 -1.0 -3.53125l0 -2.09375q0 -2.375 0.984375 -3.609375q0.984375 -1.234375 2.84375 -1.234375q1.859375 0 2.84375 1.21875q0.984375 1.21875 1.015625 3.515625l0 2.09375zm-2.265625 -2.296875q0 -1.421875 -0.390625 -2.0625q-0.375 -0.640625 -1.203125 -0.640625q-0.796875 0 -1.171875 0.609375q-0.375 0.609375 -0.40625 1.921875l0 2.765625q0 1.390625 0.375 2.0625q0.390625 0.671875 1.21875 0.671875q0.828125 0 1.1875 -0.640625q0.375 -0.65625 0.390625 -1.984375l0 -2.703125zm7.1015625 1.0625l1.421875 -2.515625l2.40625 0l-2.40625 4.140625l2.515625 4.3125l-2.421875 0l-1.515625 -2.65625l-1.5 2.65625l-2.421875 0l2.5 -4.3125l-2.390625 -4.140625l2.421875 0l1.390625 2.515625zm10.953125 -5.5625l0 1.859375l-0.21875 0q-1.53125 0.03125 -2.46875 0.8125q-0.9375 0.765625 -1.125 2.140625q0.90625 -0.921875 2.296875 -0.921875q1.484375 0 2.359375 1.0625q0.875 1.0625 0.875 2.796875q0 1.109375 -0.484375 2.015625q-0.484375 0.890625 -1.359375 1.390625q-0.875 0.5 -1.984375 0.5q-1.796875 0 -2.90625 -1.25q-1.109375 -1.25 -1.109375 -3.34375l0 -0.8125q0 -1.84375 0.703125 -3.265625q0.703125 -1.421875 2.0 -2.1875q1.3125 -0.78125 3.046875 -0.796875l0.375 0zm-2.203125 5.703125q-0.546875 0 -1.0 0.28125q-0.4375 0.28125 -0.65625 0.75l0 0.6875q0 1.140625 0.4375 1.78125q0.453125 0.625 1.265625 0.625q0.71875 0 1.171875 -0.5625q0.453125 -0.578125 0.453125 -1.5q0 -0.921875 -0.453125 -1.484375q-0.453125 -0.578125 -1.21875 -0.578125zm12.9140625 1.09375q0 2.359375 -0.984375 3.609375q-0.96875 1.25 -2.859375 1.25q-1.859375 0 -2.84375 -1.21875q-0.984375 -1.234375 -1.0 -3.53125l0 -2.09375q0 -2.375 0.984375 -3.609375q0.984375 -1.234375 2.84375 -1.234375q1.859375 0 2.84375 1.21875q0.984375 1.21875 1.015625 3.515625l0 2.09375zm-2.265625 -2.296875q0 -1.421875 -0.390625 -2.0625q-0.375 -0.640625 -1.203125 -0.640625q-0.796875 0 -1.171875 0.609375q-0.375 0.609375 -0.40625 1.921875l0 2.765625q0 1.390625 0.375 2.0625q0.390625 0.671875 1.21875 0.671875q0.828125 0 1.1875 -0.640625q0.375 -0.65625 0.390625 -1.984375l0 -2.703125z" fill-rule="nonzero"/>
<path fill="#000000" fill-opacity="0.0" d="m321.71652 113.00525l74.01575 0" fill-rule="evenodd"/>
<path stroke="#990000" stroke-width="2.0" stroke-linejoin="round" stroke-linecap="butt" d="m321.71652 113.00525l62.015747 0" fill-rule="evenodd"/>
<path fill="#990000" stroke="#990000" stroke-width="2.0" stroke-linecap="butt" d="m383.73227 116.308716l9.076202 -3.3034668l-9.076202 -3.3034668z" fill-rule="evenodd"/>
<path fill="#000000" fill-opacity="0.0" d="m408.84827 144.68587l-100.25198 0" fill-rule="evenodd"/>
<path stroke="#666666" stroke-width="2.0" stroke-linejoin="round" stroke-linecap="butt" d="m408.84827 144.68585l-88.25198 0" fill-rule="evenodd"/>
<path fill="#666666" stroke="#666666" stroke-width="2.0" stroke-linecap="butt" d="m320.59628 141.3824l-9.076172 3.3034515l9.076172 3.3034668z" fill-rule="evenodd"/>
<path fill="#000000" fill-opacity="0.0" d="m276.9134 157.8084l0 78.519684" fill-rule="evenodd"/>
<path stroke="#990000" stroke-width="2.0" stroke-linejoin="round" stroke-linecap="butt" d="m276.9134 157.8084l0 66.519684" fill-rule="evenodd"/>
<path fill="#990000" stroke="#990000" stroke-width="2.0" stroke-linecap="butt" d="m273.60992 224.32808l3.3034668 9.076202l3.3034668 -9.076202z" fill-rule="evenodd"/>
<path fill="#000000" fill-opacity="0.0" d="m321.71783 281.12686l74.01575 0" fill-rule="evenodd"/>
<path stroke="#38761d" stroke-width="2.0" stroke-linejoin="round" stroke-linecap="butt" d="m321.71783 281.12686l62.015747 0" fill-rule="evenodd"/>
<path fill="#38761d" stroke="#38761d" stroke-width="2.0" stroke-linecap="butt" d="m383.73358 284.43033l9.076202 -3.3034668l-9.076202 -3.3034668z" fill-rule="evenodd"/>
<path fill="#000000" fill-opacity="0.0" d="m408.84958 312.80746l-100.25198 0" fill-rule="evenodd"/>
<path stroke="#666666" stroke-width="2.0" stroke-linejoin="round" stroke-linecap="butt" d="m408.84958 312.80746l-88.25198 0" fill-rule="evenodd"/>
<path fill="#666666" stroke="#666666" stroke-width="2.0" stroke-linecap="butt" d="m320.5976 309.504l-9.076172 3.3034668l9.076172 3.3034668z" fill-rule="evenodd"/>
<path fill="#000000" fill-opacity="0.0" d="m276.9147 325.93002l0 78.519684" fill-rule="evenodd"/>
<path stroke="#38761d" stroke-width="2.0" stroke-linejoin="round" stroke-linecap="butt" d="m276.9147 325.93002l0 66.51965" fill-rule="evenodd"/>
<path fill="#38761d" stroke="#38761d" stroke-width="2.0" stroke-linecap="butt" d="m273.61124 392.44968l3.3034668 9.076202l3.3034668 -9.076202z" fill-rule="evenodd"/>
<path fill="#000000" fill-opacity="0.0" d="m321.71652 449.24847l74.01575 0" fill-rule="evenodd"/>
<path stroke="#1155cc" stroke-width="2.0" stroke-linejoin="round" stroke-linecap="butt" d="m321.71652 449.24847l62.015747 0" fill-rule="evenodd"/>
<path fill="#1155cc" stroke="#1155cc" stroke-width="2.0" stroke-linecap="butt" d="m383.73227 452.55194l9.076202 -3.3034668l-9.076202 -3.3034668z" fill-rule="evenodd"/>
<path fill="#000000" fill-opacity="0.0" d="m408.84827 480.92908l-100.25198 0" fill-rule="evenodd"/>
<path stroke="#666666" stroke-width="2.0" stroke-linejoin="round" stroke-linecap="butt" d="m408.84827 480.9291l-88.25198 0" fill-rule="evenodd"/>
<path fill="#666666" stroke="#666666" stroke-width="2.0" stroke-linecap="butt" d="m320.59628 477.62564l-9.076172 3.3034668l9.076172 3.3034363z" fill-rule="evenodd"/>
<path fill="#000000" fill-opacity="0.0" d="m424.24933 602.3884l74.01578 0" fill-rule="evenodd"/>
<path stroke="#990000" stroke-width="2.0" stroke-linejoin="round" stroke-linecap="butt" d="m424.24933 602.3884l62.015778 0" fill-rule="evenodd"/>
<path fill="#990000" stroke="#990000" stroke-width="2.0" stroke-linecap="butt" d="m486.2651 605.6919l9.076172 -3.3034668l-9.076172 -3.3034668z" fill-rule="evenodd"/>
<path fill="#000000" fill-opacity="0.0" d="m509.0105 583.0026l179.18109 0l0 38.771667l-179.18109 0z" fill-rule="evenodd"/>
<path fill="#990000" d="m518.7605 603.06573q0 -1.953125 0.921875 -3.125q0.921875 -1.1875 2.40625 -1.1875q1.484375 0 2.359375 1.015625l0 -4.40625l1.4375 0l0 12.0l-1.328125 0l-0.0625 -0.90625q-0.875 1.0625 -2.421875 1.0625q-1.46875 0 -2.390625 -1.203125q-0.921875 -1.203125 -0.921875 -3.140625l0 -0.109375zm1.4375 0.15625q0 1.4375 0.59375 2.25q0.59375 0.8125 1.640625 0.8125q1.375 0 2.015625 -1.234375l0 -3.875q-0.65625 -1.203125 -2.0 -1.203125q-1.0625 0 -1.65625 0.828125q-0.59375 0.8125 -0.59375 2.421875zm11.4453125 4.296875q-1.71875 0 -2.796875 -1.125q-1.078125 -1.140625 -1.078125 -3.03125l0 -0.265625q0 -1.25 0.46875 -2.234375q0.484375 -1.0 1.34375 -1.546875q0.875 -0.5625 1.875 -0.5625q1.65625 0 2.5625 1.09375q0.921875 1.078125 0.921875 3.09375l0 0.609375l-5.734375 0q0.03125 1.25 0.734375 2.015625q0.703125 0.765625 1.78125 0.765625q0.765625 0 1.296875 -0.3125q0.53125 -0.3125 0.921875 -0.828125l0.890625 0.6875q-1.0625 1.640625 -3.1875 1.640625zm-0.1875 -7.578125q-0.875 0 -1.46875 0.640625q-0.59375 0.625 -0.734375 1.78125l4.234375 0l0 -0.109375q-0.0625 -1.109375 -0.59375 -1.703125q-0.53125 -0.609375 -1.4375 -0.609375zm8.5390625 6.390625q0.78125 0 1.359375 -0.46875q0.578125 -0.46875 0.640625 -1.171875l1.359375 0q-0.03125 0.734375 -0.5 1.390625q-0.453125 0.65625 -1.234375 1.046875q-0.765625 0.390625 -1.625 0.390625q-1.71875 0 -2.75 -1.15625q-1.015625 -1.15625 -1.015625 -3.15625l0 -0.234375q0 -1.234375 0.453125 -2.1875q0.453125 -0.96875 1.296875 -1.5q0.859375 -0.53125 2.015625 -0.53125q1.421875 0 2.359375 0.859375q0.9375 0.84375 1.0 2.203125l-1.359375 0q-0.0625 -0.828125 -0.625 -1.34375q-0.5625 -0.53125 -1.375 -0.53125q-1.109375 0 -1.71875 0.796875q-0.59375 0.78125 -0.59375 2.28125l0 0.28125q0 1.453125 0.59375 2.25q0.609375 0.78125 1.71875 0.78125zm4.609375 -3.28125q0 -1.234375 0.484375 -2.21875q0.484375 -1.0 1.359375 -1.53125q0.875 -0.546875 1.984375 -0.546875q1.734375 0 2.796875 1.203125q1.0625 1.1875 1.0625 3.171875l0 0.09375q0 1.234375 -0.46875 2.21875q-0.46875 0.984375 -1.359375 1.53125q-0.875 0.546875 -2.015625 0.546875q-1.71875 0 -2.78125 -1.1875q-1.0625 -1.203125 -1.0625 -3.171875l0 -0.109375zm1.453125 0.171875q0 1.40625 0.640625 2.265625q0.65625 0.84375 1.75 0.84375q1.109375 0 1.75 -0.859375q0.65625 -0.859375 0.65625 -2.421875q0 -1.390625 -0.671875 -2.25q-0.65625 -0.859375 -1.75 -0.859375q-1.0625 0 -1.71875 0.859375q-0.65625 0.84375 -0.65625 2.421875zm7.703125 -0.15625q0 -1.953125 0.921875 -3.125q0.921875 -1.1875 2.40625 -1.1875q1.484375 0 2.359375 1.015625l0 -4.40625l1.4375 0l0 12.0l-1.328125 0l-0.0625 -0.90625q-0.875 1.0625 -2.421875 1.0625q-1.46875 0 -2.390625 -1.203125q-0.921875 -1.203125 -0.921875 -3.140625l0 -0.109375zm1.4375 0.15625q0 1.4375 0.59375 2.25q0.59375 0.8125 1.640625 0.8125q1.375 0 2.015625 -1.234375l0 -3.875q-0.65625 -1.203125 -2.0 -1.203125q-1.0625 0 -1.65625 0.828125q-0.59375 0.8125 -0.59375 2.421875zm11.4453125 4.296875q-1.71875 0 -2.796875 -1.125q-1.078125 -1.140625 -1.078125 -3.03125l0 -0.265625q0 -1.25 0.46875 -2.234375q0.484375 -1.0 1.34375 -1.546875q0.875 -0.5625 1.875 -0.5625q1.65625 0 2.5625 1.09375q0.921875 1.078125 0.921875 3.09375l0 0.609375l-5.734375 0q0.03125 1.25 0.734375 2.015625q0.703125 0.765625 1.78125 0.765625q0.765625 0 1.296875 -0.3125q0.53125 -0.3125 0.921875 -0.828125l0.890625 0.6875q-1.0625 1.640625 -3.1875 1.640625zm-0.1875 -7.578125q-0.875 0 -1.46875 0.640625q-0.59375 0.625 -0.734375 1.78125l4.234375 0l0 -0.109375q-0.0625 -1.109375 -0.59375 -1.703125q-0.53125 -0.609375 -1.4375 -0.609375zm11.2421875 8.609375l-7.15625 0l0 -1.1875l7.15625 0l0 1.1875zm2.703125 -1.1875l-1.453125 0l0 -8.453125l1.453125 0l0 8.453125zm-1.5625 -10.703125q0 -0.34375 0.203125 -0.578125q0.21875 -0.25 0.640625 -0.25q0.421875 0 0.640625 0.25q0.21875 0.234375 0.21875 0.59375q0 0.34375 -0.21875 0.578125q-0.21875 0.234375 -0.640625 0.234375q-0.421875 0 -0.640625 -0.234375q-0.203125 -0.234375 -0.203125 -0.59375zm5.2265625 2.25l0.046875 0.9375q0.921875 -1.09375 2.5 -1.09375q1.78125 0 2.421875 1.359375q0.421875 -0.609375 1.09375 -0.984375q0.671875 -0.375 1.59375 -0.375q2.78125 0 2.828125 2.9375l0 5.671875l-1.4375 0l0 -5.578125q0 -0.90625 -0.421875 -1.359375q-0.40625 -0.453125 -1.390625 -0.453125q-0.796875 0 -1.328125 0.484375q-0.53125 0.484375 -0.625 1.296875l0 5.609375l-1.453125 0l0 -5.546875q0 -1.84375 -1.796875 -1.84375q-1.421875 0 -1.953125 1.21875l0 6.171875l-1.4375 0l0 -8.453125l1.359375 0zm17.882812 8.453125q-0.125 -0.25 -0.203125 -0.890625q-1.0 1.046875 -2.40625 1.046875q-1.25 0 -2.046875 -0.703125q-0.796875 -0.71875 -0.796875 -1.796875q0 -1.328125 1.0 -2.046875q1.0 -0.734375 2.828125 -0.734375l1.40625 0l0 -0.671875q0 -0.75 -0.453125 -1.203125q-0.453125 -0.453125 -1.34375 -0.453125q-0.765625 0 -1.296875 0.390625q-0.515625 0.390625 -0.515625 0.953125l-1.453125 0q0 -0.640625 0.4375 -1.21875q0.453125 -0.59375 1.21875 -0.9375q0.78125 -0.34375 1.703125 -0.34375q1.453125 0 2.28125 0.734375q0.828125 0.71875 0.859375 2.0l0 3.890625q0 1.171875 0.296875 1.859375l0 0.125l-1.515625 0zm-2.3906Line truncated
<path fill="#000000" fill-opacity="0.0" d="m424.24933 640.0623l74.01578 0" fill-rule="evenodd"/>
<path stroke="#38761d" stroke-width="2.0" stroke-linejoin="round" stroke-linecap="butt" d="m424.24933 640.0623l62.015778 0" fill-rule="evenodd"/>
<path fill="#38761d" stroke="#38761d" stroke-width="2.0" stroke-linecap="butt" d="m486.2651 643.3658l9.076172 -3.3034668l-9.076172 -3.3034668z" fill-rule="evenodd"/>
<path fill="#000000" fill-opacity="0.0" d="m509.0105 620.6765l179.18109 0l0 38.771667l-179.18109 0z" fill-rule="evenodd"/>
<path fill="#38761d" d="m518.7605 640.7396q0 -1.953125 0.921875 -3.125q0.921875 -1.1875 2.40625 -1.1875q1.484375 0 2.359375 1.015625l0 -4.40625l1.4375 0l0 12.0l-1.328125 0l-0.0625 -0.90625q-0.875 1.0625 -2.421875 1.0625q-1.46875 0 -2.390625 -1.203125q-0.921875 -1.203125 -0.921875 -3.140625l0 -0.109375zm1.4375 0.15625q0 1.4375 0.59375 2.25q0.59375 0.8125 1.640625 0.8125q1.375 0 2.015625 -1.234375l0 -3.875q-0.65625 -1.203125 -2.0 -1.203125q-1.0625 0 -1.65625 0.828125q-0.59375 0.8125 -0.59375 2.421875zm11.4453125 4.296875q-1.71875 0 -2.796875 -1.125q-1.078125 -1.140625 -1.078125 -3.03125l0 -0.265625q0 -1.25 0.46875 -2.234375q0.484375 -1.0 1.34375 -1.546875q0.875 -0.5625 1.875 -0.5625q1.65625 0 2.5625 1.09375q0.921875 1.078125 0.921875 3.09375l0 0.609375l-5.734375 0q0.03125 1.25 0.734375 2.015625q0.703125 0.765625 1.78125 0.765625q0.765625 0 1.296875 -0.3125q0.53125 -0.3125 0.921875 -0.828125l0.890625 0.6875q-1.0625 1.640625 -3.1875 1.640625zm-0.1875 -7.578125q-0.875 0 -1.46875 0.640625q-0.59375 0.625 -0.734375 1.78125l4.234375 0l0 -0.109375q-0.0625 -1.109375 -0.59375 -1.703125q-0.53125 -0.609375 -1.4375 -0.609375zm8.5390625 6.390625q0.78125 0 1.359375 -0.46875q0.578125 -0.46875 0.640625 -1.171875l1.359375 0q-0.03125 0.734375 -0.5 1.390625q-0.453125 0.65625 -1.234375 1.046875q-0.765625 0.390625 -1.625 0.390625q-1.71875 0 -2.75 -1.15625q-1.015625 -1.15625 -1.015625 -3.15625l0 -0.234375q0 -1.234375 0.453125 -2.1875q0.453125 -0.96875 1.296875 -1.5q0.859375 -0.53125 2.015625 -0.53125q1.421875 0 2.359375 0.859375q0.9375 0.84375 1.0 2.203125l-1.359375 0q-0.0625 -0.828125 -0.625 -1.34375q-0.5625 -0.53125 -1.375 -0.53125q-1.109375 0 -1.71875 0.796875q-0.59375 0.78125 -0.59375 2.28125l0 0.28125q0 1.453125 0.59375 2.25q0.609375 0.78125 1.71875 0.78125zm4.609375 -3.28125q0 -1.234375 0.484375 -2.21875q0.484375 -1.0 1.359375 -1.53125q0.875 -0.546875 1.984375 -0.546875q1.734375 0 2.796875 1.203125q1.0625 1.1875 1.0625 3.171875l0 0.09375q0 1.234375 -0.46875 2.21875q-0.46875 0.984375 -1.359375 1.53125q-0.875 0.546875 -2.015625 0.546875q-1.71875 0 -2.78125 -1.1875q-1.0625 -1.203125 -1.0625 -3.171875l0 -0.109375zm1.453125 0.171875q0 1.40625 0.640625 2.265625q0.65625 0.84375 1.75 0.84375q1.109375 0 1.75 -0.859375q0.65625 -0.859375 0.65625 -2.421875q0 -1.390625 -0.671875 -2.25q-0.65625 -0.859375 -1.75 -0.859375q-1.0625 0 -1.71875 0.859375q-0.65625 0.84375 -0.65625 2.421875zm7.703125 -0.15625q0 -1.953125 0.921875 -3.125q0.921875 -1.1875 2.40625 -1.1875q1.484375 0 2.359375 1.015625l0 -4.40625l1.4375 0l0 12.0l-1.328125 0l-0.0625 -0.90625q-0.875 1.0625 -2.421875 1.0625q-1.46875 0 -2.390625 -1.203125q-0.921875 -1.203125 -0.921875 -3.140625l0 -0.109375zm1.4375 0.15625q0 1.4375 0.59375 2.25q0.59375 0.8125 1.640625 0.8125q1.375 0 2.015625 -1.234375l0 -3.875q-0.65625 -1.203125 -2.0 -1.203125q-1.0625 0 -1.65625 0.828125q-0.59375 0.8125 -0.59375 2.421875zm11.4453125 4.296875q-1.71875 0 -2.796875 -1.125q-1.078125 -1.140625 -1.078125 -3.03125l0 -0.265625q0 -1.25 0.46875 -2.234375q0.484375 -1.0 1.34375 -1.546875q0.875 -0.5625 1.875 -0.5625q1.65625 0 2.5625 1.09375q0.921875 1.078125 0.921875 3.09375l0 0.609375l-5.734375 0q0.03125 1.25 0.734375 2.015625q0.703125 0.765625 1.78125 0.765625q0.765625 0 1.296875 -0.3125q0.53125 -0.3125 0.921875 -0.828125l0.890625 0.6875q-1.0625 1.640625 -3.1875 1.640625zm-0.1875 -7.578125q-0.875 0 -1.46875 0.640625q-0.59375 0.625 -0.734375 1.78125l4.234375 0l0 -0.109375q-0.0625 -1.109375 -0.59375 -1.703125q-0.53125 -0.609375 -1.4375 -0.609375zm11.2421875 8.609375l-7.15625 0l0 -1.1875l7.15625 0l0 1.1875zm1.84375 -1.1875l0 -7.34375l-1.34375 0l0 -1.109375l1.34375 0l0 -0.875q0 -1.359375 0.71875 -2.09375q0.734375 -0.75 2.0625 -0.75q0.5 0 0.984375 0.140625l-0.078125 1.171875q-0.359375 -0.078125 -0.78125 -0.078125q-0.703125 0 -1.09375 0.421875q-0.375 0.40625 -0.375 1.171875l0 0.890625l1.8125 0l0 1.109375l-1.8125 0l0 7.34375l-1.4375 0zm8.9296875 -7.15625q-0.328125 -0.0625 -0.71875 -0.0625q-1.421875 0 -1.921875 1.21875l0 6.0l-1.453125 0l0 -8.453125l1.40625 0l0.03125 0.96875q0.703125 -1.125 2.015625 -1.125q0.421875 0 0.640625 0.109375l0 1.34375zm6.2265625 7.15625q-0.125 -0.25 -0.203125 -0.890625q-1.0 1.046875 -2.40625 1.046875q-1.25 0 -2.046875 -0.703125q-0.796875 -0.71875 -0.796875 -1.796875q0 -1.328125 1.0 -2.046875q1.0 -0.734375 2.828125 -0.734375l1.40625 0l0 -0.671875q0 -0.75 -0.453125 -1.203125q-0.453125 -0.453125 -1.34375 -0.453125q-0.765625 0 -1.296875 0.390625q-0.515625 0.390625 -0.515625 0.953125l-1.453125 0q0 -0.640625 0.4375 -1.21875q0.453125 -0.59375 1.21875 -0.9375q0.78125 -0.34375 1.703125 -0.34375q1.453125 0 2.28125 0.734375q0.828125 0.71875 0.859375 2.0l0 3.890625q0 1.171875 0.296875 1.859375l0 0.125l-1.515625 0zm-2.390625 -1.109375q0.671875 0 1.28125 -0.34375q0.609375 -0.359375 0.890625 -0.921875l0 -1.734375l-1.140625 0q-2.65625 0 -2.65625 1.5625q0 0.671875 0.453125 1.0625q0.453125 0.375 1.171875 0.375zm7.234375 -7.34375l0.046875 0.9375q0.921875 -1.09375 2.5 -1.09375q1.78125 0 2.421875 1.359375q0.42187Line truncated
<path fill="#000000" fill-opacity="0.0" d="m424.24933 677.7362l74.01578 0" fill-rule="evenodd"/>
<path stroke="#1155cc" stroke-width="2.0" stroke-linejoin="round" stroke-linecap="butt" d="m424.24933 677.7362l62.015778 0" fill-rule="evenodd"/>
<path fill="#1155cc" stroke="#1155cc" stroke-width="2.0" stroke-linecap="butt" d="m486.2651 681.0397l9.076172 -3.3034668l-9.076172 -3.3034668z" fill-rule="evenodd"/>
<path fill="#000000" fill-opacity="0.0" d="m509.0105 658.3504l179.18109 0l0 38.771667l-179.18109 0z" fill-rule="evenodd"/>
<path fill="#1155cc" d="m518.7605 678.4135q0 -1.953125 0.921875 -3.125q0.921875 -1.1875 2.40625 -1.1875q1.484375 0 2.359375 1.015625l0 -4.40625l1.4375 0l0 12.0l-1.328125 0l-0.0625 -0.90625q-0.875 1.0625 -2.421875 1.0625q-1.46875 0 -2.390625 -1.203125q-0.921875 -1.203125 -0.921875 -3.140625l0 -0.109375zm1.4375 0.15625q0 1.4375 0.59375 2.25q0.59375 0.8125 1.640625 0.8125q1.375 0 2.015625 -1.234375l0 -3.875q-0.65625 -1.203125 -2.0 -1.203125q-1.0625 0 -1.65625 0.828125q-0.59375 0.8125 -0.59375 2.421875zm11.4453125 4.296875q-1.71875 0 -2.796875 -1.125q-1.078125 -1.140625 -1.078125 -3.03125l0 -0.265625q0 -1.25 0.46875 -2.234375q0.484375 -1.0 1.34375 -1.546875q0.875 -0.5625 1.875 -0.5625q1.65625 0 2.5625 1.09375q0.921875 1.078125 0.921875 3.09375l0 0.609375l-5.734375 0q0.03125 1.25 0.734375 2.015625q0.703125 0.765625 1.78125 0.765625q0.765625 0 1.296875 -0.3125q0.53125 -0.3125 0.921875 -0.828125l0.890625 0.6875q-1.0625 1.640625 -3.1875 1.640625zm-0.1875 -7.578125q-0.875 0 -1.46875 0.640625q-0.59375 0.625 -0.734375 1.78125l4.234375 0l0 -0.109375q-0.0625 -1.109375 -0.59375 -1.703125q-0.53125 -0.609375 -1.4375 -0.609375zm8.5390625 6.390625q0.78125 0 1.359375 -0.46875q0.578125 -0.46875 0.640625 -1.171875l1.359375 0q-0.03125 0.734375 -0.5 1.390625q-0.453125 0.65625 -1.234375 1.046875q-0.765625 0.390625 -1.625 0.390625q-1.71875 0 -2.75 -1.15625q-1.015625 -1.15625 -1.015625 -3.15625l0 -0.234375q0 -1.234375 0.453125 -2.1875q0.453125 -0.96875 1.296875 -1.5q0.859375 -0.53125 2.015625 -0.53125q1.421875 0 2.359375 0.859375q0.9375 0.84375 1.0 2.203125l-1.359375 0q-0.0625 -0.828125 -0.625 -1.34375q-0.5625 -0.53125 -1.375 -0.53125q-1.109375 0 -1.71875 0.796875q-0.59375 0.78125 -0.59375 2.28125l0 0.28125q0 1.453125 0.59375 2.25q0.609375 0.78125 1.71875 0.78125zm4.609375 -3.28125q0 -1.234375 0.484375 -2.21875q0.484375 -1.0 1.359375 -1.53125q0.875 -0.546875 1.984375 -0.546875q1.734375 0 2.796875 1.203125q1.0625 1.1875 1.0625 3.171875l0 0.09375q0 1.234375 -0.46875 2.21875q-0.46875 0.984375 -1.359375 1.53125q-0.875 0.546875 -2.015625 0.546875q-1.71875 0 -2.78125 -1.1875q-1.0625 -1.203125 -1.0625 -3.171875l0 -0.109375zm1.453125 0.171875q0 1.40625 0.640625 2.265625q0.65625 0.84375 1.75 0.84375q1.109375 0 1.75 -0.859375q0.65625 -0.859375 0.65625 -2.421875q0 -1.390625 -0.671875 -2.25q-0.65625 -0.859375 -1.75 -0.859375q-1.0625 0 -1.71875 0.859375q-0.65625 0.84375 -0.65625 2.421875zm7.703125 -0.15625q0 -1.953125 0.921875 -3.125q0.921875 -1.1875 2.40625 -1.1875q1.484375 0 2.359375 1.015625l0 -4.40625l1.4375 0l0 12.0l-1.328125 0l-0.0625 -0.90625q-0.875 1.0625 -2.421875 1.0625q-1.46875 0 -2.390625 -1.203125q-0.921875 -1.203125 -0.921875 -3.140625l0 -0.109375zm1.4375 0.15625q0 1.4375 0.59375 2.25q0.59375 0.8125 1.640625 0.8125q1.375 0 2.015625 -1.234375l0 -3.875q-0.65625 -1.203125 -2.0 -1.203125q-1.0625 0 -1.65625 0.828125q-0.59375 0.8125 -0.59375 2.421875zm11.4453125 4.296875q-1.71875 0 -2.796875 -1.125q-1.078125 -1.140625 -1.078125 -3.03125l0 -0.265625q0 -1.25 0.46875 -2.234375q0.484375 -1.0 1.34375 -1.546875q0.875 -0.5625 1.875 -0.5625q1.65625 0 2.5625 1.09375q0.921875 1.078125 0.921875 3.09375l0 0.609375l-5.734375 0q0.03125 1.25 0.734375 2.015625q0.703125 0.765625 1.78125 0.765625q0.765625 0 1.296875 -0.3125q0.53125 -0.3125 0.921875 -0.828125l0.890625 0.6875q-1.0625 1.640625 -3.1875 1.640625zm-0.1875 -7.578125q-0.875 0 -1.46875 0.640625q-0.59375 0.625 -0.734375 1.78125l4.234375 0l0 -0.109375q-0.0625 -1.109375 -0.59375 -1.703125q-0.53125 -0.609375 -1.4375 -0.609375zm11.2421875 8.609375l-7.15625 0l0 -1.1875l7.15625 0l0 1.1875zm1.84375 -1.1875l0 -7.34375l-1.34375 0l0 -1.109375l1.34375 0l0 -0.875q0 -1.359375 0.71875 -2.09375q0.734375 -0.75 2.0625 -0.75q0.5 0 0.984375 0.140625l-0.078125 1.171875q-0.359375 -0.078125 -0.78125 -0.078125q-0.703125 0 -1.09375 0.421875q-0.375 0.40625 -0.375 1.171875l0 0.890625l1.8125 0l0 1.109375l-1.8125 0l0 7.34375l-1.4375 0zm8.9296875 -7.15625q-0.328125 -0.0625 -0.71875 -0.0625q-1.421875 0 -1.921875 1.21875l0 6.0l-1.453125 0l0 -8.453125l1.40625 0l0.03125 0.96875q0.703125 -1.125 2.015625 -1.125q0.421875 0 0.640625 0.109375l0 1.34375zm6.2265625 7.15625q-0.125 -0.25 -0.203125 -0.890625q-1.0 1.046875 -2.40625 1.046875q-1.25 0 -2.046875 -0.703125q-0.796875 -0.71875 -0.796875 -1.796875q0 -1.328125 1.0 -2.046875q1.0 -0.734375 2.828125 -0.734375l1.40625 0l0 -0.671875q0 -0.75 -0.453125 -1.203125q-0.453125 -0.453125 -1.34375 -0.453125q-0.765625 0 -1.296875 0.390625q-0.515625 0.390625 -0.515625 0.953125l-1.453125 0q0 -0.640625 0.4375 -1.21875q0.453125 -0.59375 1.21875 -0.9375q0.78125 -0.34375 1.703125 -0.34375q1.453125 0 2.28125 0.734375q0.828125 0.71875 0.859375 2.0l0 3.890625q0 1.171875 0.296875 1.859375l0 0.125l-1.515625 0zm-2.390625 -1.109375q0.671875 0 1.28125 -0.34375q0.609375 -0.359375 0.890625 -0.921875l0 -1.734375l-1.140625 0q-2.65625 0 -2.65625 1.5625q0 0.671875 0.453125 1.0625q0.453125 0.375 1.171875 0.375zm7.234375 -7.34375l0.046875 0.9375q0.921875 -1.09375 2.5 -1.09375q1.78125 0 2.421875 1.359375q0.42187Line truncated
<path fill="#000000" fill-opacity="0.0" d="m424.24933 715.4101l74.01578 0" fill-rule="evenodd"/>
<path stroke="#666666" stroke-width="2.0" stroke-linejoin="round" stroke-linecap="butt" d="m424.24933 715.4101l62.015778 0" fill-rule="evenodd"/>
<path fill="#666666" stroke="#666666" stroke-width="2.0" stroke-linecap="butt" d="m486.2651 718.71356l9.076172 -3.3034668l-9.076172 -3.3034668z" fill-rule="evenodd"/>
<path fill="#000000" fill-opacity="0.0" d="m509.0105 696.0243l179.18109 0l0 38.771667l-179.18109 0z" fill-rule="evenodd"/>
<path fill="#666666" d="m521.073 709.8843l0 2.046875l1.578125 0l0 1.109375l-1.578125 0l0 5.25q0 0.5 0.203125 0.765625q0.21875 0.25 0.71875 0.25q0.25 0 0.6875 -0.09375l0 1.171875q-0.5625 0.15625 -1.109375 0.15625q-0.96875 0 -1.46875 -0.578125q-0.484375 -0.59375 -0.484375 -1.671875l0 -5.25l-1.53125 0l0 -1.109375l1.53125 0l0 -2.046875l1.453125 0zm6.7734375 10.65625q-1.71875 0 -2.796875 -1.125q-1.078125 -1.140625 -1.078125 -3.03125l0 -0.265625q0 -1.25 0.46875 -2.234375q0.484375 -1.0 1.34375 -1.546875q0.875 -0.5625 1.875 -0.5625q1.65625 0 2.5625 1.09375q0.921875 1.078125 0.921875 3.09375l0 0.609375l-5.734375 0q0.03125 1.25 0.734375 2.015625q0.703125 0.765625 1.78125 0.765625q0.765625 0 1.296875 -0.3125q0.53125 -0.3125 0.921875 -0.828125l0.890625 0.6875q-1.0625 1.640625 -3.1875 1.640625zm-0.1875 -7.578125q-0.875 0 -1.46875 0.640625q-0.59375 0.625 -0.734375 1.78125l4.234375 0l0 -0.109375q-0.0625 -1.109375 -0.59375 -1.703125q-0.53125 -0.609375 -1.4375 -0.609375zm6.7265625 7.421875l-1.453125 0l0 -12.0l1.453125 0l0 12.0zm3.8828125 0l-1.453125 0l0 -12.0l1.453125 0l0 12.0zm8.3984375 1.1875l-7.15625 0l0 -1.1875l7.15625 0l0 1.1875zm2.484375 -9.640625l0.046875 0.9375q0.921875 -1.09375 2.5 -1.09375q1.78125 0 2.421875 1.359375q0.421875 -0.609375 1.09375 -0.984375q0.671875 -0.375 1.59375 -0.375q2.78125 0 2.828125 2.9375l0 5.671875l-1.4375 0l0 -5.578125q0 -0.90625 -0.421875 -1.359375q-0.40625 -0.453125 -1.390625 -0.453125q-0.796875 0 -1.328125 0.484375q-0.53125 0.484375 -0.625 1.296875l0 5.609375l-1.453125 0l0 -5.546875q0 -1.84375 -1.796875 -1.84375q-1.421875 0 -1.953125 1.21875l0 6.171875l-1.4375 0l0 -8.453125l1.359375 0zm16.179688 8.609375q-1.71875 0 -2.796875 -1.125q-1.078125 -1.140625 -1.078125 -3.03125l0 -0.265625q0 -1.25 0.46875 -2.234375q0.484375 -1.0 1.34375 -1.546875q0.875 -0.5625 1.875 -0.5625q1.65625 0 2.5625 1.09375q0.921875 1.078125 0.921875 3.09375l0 0.609375l-5.734375 0q0.03125 1.25 0.734375 2.015625q0.703125 0.765625 1.78125 0.765625q0.765625 0 1.296875 -0.3125q0.53125 -0.3125 0.921875 -0.828125l0.890625 0.6875q-1.0625 1.640625 -3.1875 1.640625zm-0.1875 -7.578125q-0.875 0 -1.46875 0.640625q-0.59375 0.625 -0.734375 1.78125l4.234375 0l0 -0.109375q-0.0625 -1.109375 -0.59375 -1.703125q-0.53125 -0.609375 -1.4375 -0.609375zm11.2421875 8.609375l-7.15625 0l0 -1.1875l7.15625 0l0 1.1875zm2.484375 -9.640625l0.046875 0.9375q0.921875 -1.09375 2.5 -1.09375q1.78125 0 2.421875 1.359375q0.421875 -0.609375 1.09375 -0.984375q0.671875 -0.375 1.59375 -0.375q2.78125 0 2.828125 2.9375l0 5.671875l-1.4375 0l0 -5.578125q0 -0.90625 -0.421875 -1.359375q-0.40625 -0.453125 -1.390625 -0.453125q-0.796875 0 -1.328125 0.484375q-0.53125 0.484375 -0.625 1.296875l0 5.609375l-1.453125 0l0 -5.546875q0 -1.84375 -1.796875 -1.84375q-1.421875 0 -1.953125 1.21875l0 6.171875l-1.4375 0l0 -8.453125l1.359375 0zm12.2890625 4.140625q0 -1.234375 0.484375 -2.21875q0.484375 -1.0 1.359375 -1.53125q0.875 -0.546875 1.984375 -0.546875q1.734375 0 2.796875 1.203125q1.0625 1.1875 1.0625 3.171875l0 0.09375q0 1.234375 -0.46875 2.21875q-0.46875 0.984375 -1.359375 1.53125q-0.875 0.546875 -2.015625 0.546875q-1.71875 0 -2.78125 -1.1875q-1.0625 -1.203125 -1.0625 -3.171875l0 -0.109375zm1.453125 0.171875q0 1.40625 0.640625 2.265625q0.65625 0.84375 1.75 0.84375q1.109375 0 1.75 -0.859375q0.65625 -0.859375 0.65625 -2.421875q0 -1.390625 -0.671875 -2.25q-0.65625 -0.859375 -1.75 -0.859375q-1.0625 0 -1.71875 0.859375q-0.65625 0.84375 -0.65625 2.421875zm12.140625 -3.015625q-0.328125 -0.0625 -0.71875 -0.0625q-1.421875 0 -1.921875 1.21875l0 6.0l-1.453125 0l0 -8.453125l1.40625 0l0.03125 0.96875q0.703125 -1.125 2.015625 -1.125q0.421875 0 0.640625 0.109375l0 1.34375zm4.6875 7.3125q-1.71875 0 -2.796875 -1.125q-1.078125 -1.140625 -1.078125 -3.03125l0 -0.265625q0 -1.25 0.46875 -2.234375q0.484375 -1.0 1.34375 -1.546875q0.875 -0.5625 1.875 -0.5625q1.65625 0 2.5625 1.09375q0.921875 1.078125 0.921875 3.09375l0 0.609375l-5.734375 0q0.03125 1.25 0.734375 2.015625q0.703125 0.765625 1.78125 0.765625q0.765625 0 1.296875 -0.3125q0.53125 -0.3125 0.921875 -0.828125l0.890625 0.6875q-1.0625 1.640625 -3.1875 1.640625zm-0.1875 -7.578125q-0.875 0 -1.46875 0.640625q-0.59375 0.625 -0.734375 1.78125l4.234375 0l0 -0.109375q-0.0625 -1.109375 -0.59375 -1.703125q-0.53125 -0.609375 -1.4375 -0.609375z" fill-rule="nonzero"/>
<path fill="#000000" fill-opacity="0.0" d="m232.11154 281.12686c-37.158127 0 -74.32414 84.06299 -74.31627 168.12598c0.007873535 84.06302 37.189636 168.126 74.37927 168.126" fill-rule="evenodd"/>
<path stroke="#38761d" stroke-width="2.0" stroke-linejoin="round" stroke-linecap="butt" d="m232.11154 281.12686c-37.158127 0 -74.32414 84.06299 -74.31627 168.12598c0.0039367676 42.031494 9.301346 84.06296 23.246475 115.58658c6.9725647 15.761841 15.107056 28.896667 23.822754 38.091064c4.3578644 4.597229 8.861008 8.20929 13.43689 10.672058c0.57199097 0.30786133 1.1450958 0.5977783 1.719223 0.86938477c0.14350891 0.067871094 0.28710938 0.13464355 0.43077087 0.20025635l0.029342651 0.013122559" fill-rule="evenodd"/>
<path fill="#38761d" stroke="#38761d" stroke-width="2.0" stroke-linecap="butt" d="m219.73924 617.90454l9.58609 -1.1820068l-8.103119 -5.2563477z" fill-rule="evenodd"/>
<path fill="#000000" fill-opacity="0.0" d="m188.76164 192.9738l56.472443 56.472443" fill-rule="evenodd"/>
<path stroke="#351c75" stroke-width="2.0" stroke-linejoin="round" stroke-linecap="butt" d="m188.76164 192.97382l47.987167 47.987167" fill-rule="evenodd"/>
<path fill="#351c75" stroke="#351c75" stroke-width="2.0" stroke-linecap="butt" d="m234.4129 243.29688l8.753738 4.0819397l-4.0819244 -8.753738z" fill-rule="evenodd"/>
<path fill="#000000" fill-opacity="0.0" d="m424.24933 753.084l74.01578 0" fill-rule="evenodd"/>
<path stroke="#351c75" stroke-width="2.0" stroke-linejoin="round" stroke-linecap="butt" d="m424.24933 753.084l62.015778 0" fill-rule="evenodd"/>
<path fill="#351c75" stroke="#351c75" stroke-width="2.0" stroke-linecap="butt" d="m486.2651 756.38745l9.076172 -3.3034668l-9.076172 -3.3034668z" fill-rule="evenodd"/>
<path fill="#000000" fill-opacity="0.0" d="m509.0105 733.6982l179.18109 0l0 38.771606l-179.18109 0z" fill-rule="evenodd"/>
<path fill="#351c75" d="m523.198 750.9019q-0.328125 -0.0625 -0.71875 -0.0625q-1.421875 0 -1.921875 1.21875l0 6.0l-1.453125 0l0 -8.453125l1.40625 0l0.03125 0.96875q0.703125 -1.125 2.015625 -1.125q0.421875 0 0.640625 0.109375l0 1.34375zm4.6875 7.3125q-1.71875 0 -2.796875 -1.125q-1.078125 -1.140625 -1.078125 -3.03125l0 -0.265625q0 -1.25 0.46875 -2.234375q0.484375 -1.0 1.34375 -1.546875q0.875 -0.5625 1.875 -0.5625q1.65625 0 2.5625 1.09375q0.921875 1.078125 0.921875 3.09375l0 0.609375l-5.734375 0q0.03125 1.25 0.734375 2.015625q0.703125 0.765625 1.78125 0.765625q0.765625 0 1.296875 -0.3125q0.53125 -0.3125 0.921875 -0.828125l0.890625 0.6875q-1.0625 1.640625 -3.1875 1.640625zm-0.1875 -7.578125q-0.875 0 -1.46875 0.640625q-0.59375 0.625 -0.734375 1.78125l4.234375 0l0 -0.109375q-0.0625 -1.109375 -0.59375 -1.703125q-0.53125 -0.609375 -1.4375 -0.609375zm10.0703125 5.171875q0 -0.578125 -0.4375 -0.90625q-0.4375 -0.328125 -1.546875 -0.5625q-1.09375 -0.234375 -1.734375 -0.5625q-0.640625 -0.328125 -0.953125 -0.78125q-0.3125 -0.453125 -0.3125 -1.078125q0 -1.03125 0.875 -1.75q0.890625 -0.71875 2.25 -0.71875q1.4375 0 2.328125 0.75q0.90625 0.734375 0.90625 1.890625l-1.453125 0q0 -0.59375 -0.515625 -1.015625q-0.5 -0.4375 -1.265625 -0.4375q-0.78125 0 -1.234375 0.34375q-0.4375 0.34375 -0.4375 0.890625q0 0.53125 0.40625 0.796875q0.421875 0.265625 1.5 0.515625q1.078125 0.234375 1.75 0.578125q0.671875 0.328125 1.0 0.796875q0.328125 0.46875 0.328125 1.15625q0 1.125 -0.90625 1.8125q-0.90625 0.6875 -2.359375 0.6875q-1.015625 0 -1.796875 -0.359375q-0.78125 -0.359375 -1.21875 -1.0q-0.4375 -0.65625 -0.4375 -1.40625l1.4375 0q0.046875 0.734375 0.578125 1.15625q0.546875 0.421875 1.4375 0.421875q0.828125 0 1.3125 -0.328125q0.5 -0.328125 0.5 -0.890625zm5.296875 -8.25l0 2.046875l1.578125 0l0 1.109375l-1.578125 0l0 5.25q0 0.5 0.203125 0.765625q0.21875 0.25 0.71875 0.25q0.25 0 0.6875 -0.09375l0 1.171875q-0.5625 0.15625 -1.109375 0.15625q-0.96875 0 -1.46875 -0.578125q-0.484375 -0.59375 -0.484375 -1.671875l0 -5.25l-1.53125 0l0 -1.109375l1.53125 0l0 -2.046875l1.453125 0zm8.4765625 10.5q-0.125 -0.25 -0.203125 -0.890625q-1.0 1.046875 -2.40625 1.046875q-1.25 0 -2.046875 -0.703125q-0.796875 -0.71875 -0.796875 -1.796875q0 -1.328125 1.0 -2.046875q1.0 -0.734375 2.828125 -0.734375l1.40625 0l0 -0.671875q0 -0.75 -0.453125 -1.203125q-0.453125 -0.453125 -1.34375 -0.453125q-0.765625 0 -1.296875 0.390625q-0.515625 0.390625 -0.515625 0.953125l-1.453125 0q0 -0.640625 0.4375 -1.21875q0.453125 -0.59375 1.21875 -0.9375q0.78125 -0.34375 1.703125 -0.34375q1.453125 0 2.28125 0.734375q0.828125 0.71875 0.859375 2.0l0 3.890625q0 1.171875 0.296875 1.859375l0 0.125l-1.515625 0zm-2.390625 -1.109375q0.671875 0 1.28125 -0.34375q0.609375 -0.359375 0.890625 -0.921875l0 -1.734375l-1.140625 0q-2.65625 0 -2.65625 1.5625q0 0.671875 0.453125 1.0625q0.453125 0.375 1.171875 0.375zm9.96875 -6.046875q-0.328125 -0.0625 -0.71875 -0.0625q-1.421875 0 -1.921875 1.21875l0 6.0l-1.453125 0l0 -8.453125l1.40625 0l0.03125 0.96875q0.703125 -1.125 2.015625 -1.125q0.421875 0 0.640625 0.109375l0 1.34375zm3.6796875 -3.34375l0 2.046875l1.578125 0l0 1.109375l-1.578125 0l0 5.25q0 0.5 0.203125 0.765625q0.21875 0.25 0.71875 0.25q0.25 0 0.6875 -0.09375l0 1.171875q-0.5625 0.15625 -1.109375 0.15625q-0.96875 0 -1.46875 -0.578125q-0.484375 -0.59375 -0.484375 -1.671875l0 -5.25l-1.53125 0l0 -1.109375l1.53125 0l0 -2.046875l1.453125 0zm9.3515625 11.6875l-7.15625 0l0 -1.1875l7.15625 0l0 1.1875zm1.84375 -1.1875l0 -7.34375l-1.34375 0l0 -1.109375l1.34375 0l0 -0.875q0 -1.359375 0.71875 -2.09375q0.734375 -0.75 2.0625 -0.75q0.5 0 0.984375 0.140625l-0.078125 1.171875q-0.359375 -0.078125 -0.78125 -0.078125q-0.703125 0 -1.09375 0.421875q-0.375 0.40625 -0.375 1.171875l0 0.890625l1.8125 0l0 1.109375l-1.8125 0l0 7.34375l-1.4375 0zm8.9296875 -7.15625q-0.328125 -0.0625 -0.71875 -0.0625q-1.421875 0 -1.921875 1.21875l0 6.0l-1.453125 0l0 -8.453125l1.40625 0l0.03125 0.96875q0.703125 -1.125 2.015625 -1.125q0.421875 0 0.640625 0.109375l0 1.34375zm6.2265625 7.15625q-0.125 -0.25 -0.203125 -0.890625q-1.0 1.046875 -2.40625 1.046875q-1.25 0 -2.046875 -0.703125q-0.796875 -0.71875 -0.796875 -1.796875q0 -1.328125 1.0 -2.046875q1.0 -0.734375 2.828125 -0.734375l1.40625 0l0 -0.671875q0 -0.75 -0.453125 -1.203125q-0.453125 -0.453125 -1.34375 -0.453125q-0.765625 0 -1.296875 0.390625q-0.515625 0.390625 -0.515625 0.953125l-1.453125 0q0 -0.640625 0.4375 -1.21875q0.453125 -0.59375 1.21875 -0.9375q0.78125 -0.34375 1.703125 -0.34375q1.453125 0 2.28125 0.734375q0.828125 0.71875 0.859375 2.0l0 3.890625q0 1.171875 0.296875 1.859375l0 0.125l-1.515625 0zm-2.390625 -1.109375q0.671875 0 1.28125 -0.34375q0.609375 -0.359375 0.890625 -0.921875l0 -1.734375l-1.140625 0q-2.65625 0 -2.65625 1.5625q0 0.671875 0.453125 1.0625q0.453125 0.375 1.171875 0.375zm7.234375 -7.34375l0.046875 0.9375q0.921875 -1.09375 2.5 -1.09375q1.78125 0 2.421875 1.359375q0.421875 -0.609375 1.09375 -0.984375q0.671875 -0.375 1.59375 -0.375q2.78125 0 2.828125 2.9375l0 5.671875l-1.4375 0l0 -5.57Line truncated
<path fill="#000000" fill-opacity="0.0" d="m276.9134 494.0516c0 24.788177 -19.656372 58.359528 -38.181107 49.576385c-18.52475 -8.783142 -35.917892 -59.920746 -38.181107 -106.89435c-2.263214 -46.973633 10.603485 -89.783264 22.338577 -106.89438c11.735107 -17.111115 22.338593 -8.523743 22.338593 -17.047485" fill-rule="evenodd"/>
<path stroke="#1155cc" stroke-width="2.0" stroke-linejoin="round" stroke-linecap="butt" d="m276.9134 494.05164c0 24.788147 -19.656372 58.359497 -38.181107 49.576355c-18.52475 -8.783142 -35.917892 -59.920715 -38.181107 -106.89435c-2.2632294 -46.973633 10.6035 -89.783264 22.338593 -106.89438c2.9337616 -4.2778015 5.796814 -6.9494324 8.441147 -8.683777c0.6610718 -0.43359375 1.3084717 -0.80859375 1.9399109 -1.135498c0.3157196 -0.16345215 0.62742615 -0.31484985 0.9348602 -0.4555359c0.1537323 -0.07034302 0.30636597 -0.13800049 0.457901 -0.20315552l0.4124298 -0.17184448" fill-rule="evenodd"/>
<path fill="#1155cc" stroke="#1155cc" stroke-width="2.0" stroke-linecap="butt" d="m236.83723 321.98425l5.9174957 -7.6336975l-9.439911 2.0440674z" fill-rule="evenodd"/>
<path fill="#000000" fill-opacity="0.0" d="m472.20947 144.68587c0 2.4825134 9.531769 9.491394 19.06128 4.965042c9.5295105 -4.526352 19.056763 -20.587952 19.06128 -36.649452c0.004486084 -16.061508 -9.513763 -32.12294 -19.029785 -36.649452c-9.516022 -4.526512 -19.029785 2.4818878 -19.029785 4.9637756" fill-rule="evenodd"/>
<path stroke="#666666" stroke-width="2.0" stroke-linejoin="round" stroke-linecap="butt" d="m472.20947 144.68585c0 2.4825287 9.531738 9.491409 19.06128 4.9650574c9.529541 -4.526367 19.056763 -20.587952 19.06128 -36.649452c0.004486084 -16.061508 -9.513794 -32.12294 -19.029785 -36.649452c-2.3790283 -1.13163 -4.7578735 -1.5423279 -6.9879456 -1.4830475c-0.55752563 0.014816284 -1.1057739 0.059005737 -1.642395 0.12865448l-0.18148804 0.025817871" fill-rule="evenodd"/>
<path fill="#666666" stroke="#666666" stroke-width="2.0" stroke-linecap="butt" d="m480.7582 72.21055l-5.9961243 7.572098l9.460541 -1.9463272z" fill-rule="evenodd"/>
<path fill="#000000" fill-opacity="0.0" d="m472.20947 312.81186c0 2.4825134 9.531769 9.491394 19.06128 4.965027c9.5295105 -4.5263367 19.056763 -20.587952 19.06128 -36.649445c0.004486084 -16.061523 -9.513763 -32.12294 -19.029785 -36.64946c-9.516022 -4.5265045 -19.029785 2.4818878 -19.029785 4.963791" fill-rule="evenodd"/>
<path stroke="#666666" stroke-width="2.0" stroke-linejoin="round" stroke-linecap="butt" d="m472.20947 312.81183c0 2.482544 9.531738 9.491425 19.06128 4.9650574c9.529541 -4.526367 19.056763 -20.587921 19.06128 -36.649445c0.004486084 -16.061523 -9.513794 -32.122925 -19.029785 -36.64946c-2.3790283 -1.1316223 -4.7578735 -1.5423279 -6.9879456 -1.4830475c-0.55752563 0.014801025 -1.1057739 0.059020996 -1.642395 0.12864685l-0.18148804 0.025817871" fill-rule="evenodd"/>
<path fill="#666666" stroke="#666666" stroke-width="2.0" stroke-linecap="butt" d="m480.7582 240.33653l-5.9961243 7.572098l9.460541 -1.9463348z" fill-rule="evenodd"/>
<path fill="#000000" fill-opacity="0.0" d="m472.20947 482.81842c0 2.4825134 9.531769 9.491394 19.06128 4.965027c9.5295105 -4.5263367 19.056763 -20.587952 19.06128 -36.649445c0.004486084 -16.061523 -9.513763 -32.122925 -19.029785 -36.649445c-9.516022 -4.52652 -19.029785 2.4818726 -19.029785 4.9637756" fill-rule="evenodd"/>
<path stroke="#666666" stroke-width="2.0" stroke-linejoin="round" stroke-linecap="butt" d="m472.20947 482.81842c0 2.4825134 9.531738 9.491364 19.06128 4.9650574c9.529541 -4.5263977 19.056763 -20.587982 19.06128 -36.649506c0.004486084 -16.061462 -9.513794 -32.122894 -19.029785 -36.649445c-2.3790283 -1.1315918 -4.7578735 -1.5422974 -6.9879456 -1.4830017c-0.55752563 0.014801025 -1.1057739 0.05899048 -1.642395 0.12863159l-0.18148804 0.025848389" fill-rule="evenodd"/>
<path fill="#666666" stroke="#666666" stroke-width="2.0" stroke-linecap="butt" d="m480.7582 410.3431l-5.9961243 7.5720825l9.460541 -1.9463196z" fill-rule="evenodd"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 67 KiB

+118
View File
@@ -0,0 +1,118 @@
# Image Decoders Call Sequence
As discussed in the [Image Decoders](./image-decoders.md) document, here's the
canonical sequence of API calls to decode an animated image (with N frames):
1. DIC (`decode_image_config`)
1. DFC (`decode_frame_config`) #0
1. DF (`decode_frame`) #0
1. DFC (`decode_frame_config`) #1
1. DF (`decode_frame`) #1
1. ...
1. DFC (`decode_frame_config`) #N-1
1. DF (`decode_frame`) #N-1
1. DFC (`decode_frame_config`) #N returning an `"@end of data"` status value.
The final DFC call returns `"@end of data"` even if the animation loops.
Decoding a still (non-animated) image is equivalent to N being 1.
These three methods (DIC, DFC, DF) are all
[coroutines](/doc/note/coroutines.md) and may return I/O related suspension
status values. Those coroutines should be resumed by calling the same method
again, before moving to the next one in the sequence.
Encountering an error (such as the input not being valid in that image file
format) is sticky (any further calls will return that same error).
## Implicit Calls
These three methods (DIC, DFC, DF) are all also optional in some sense.
Referring to the ordered list at the top of this page, any `decode_etc` call
jumps forward to the next matching method in that canonical sequence,
implicitly calling any jumped over method with the same `io_reader` but null
values for other arguments.
For example, starting with a freshly initialized image decoder, if it's a first
party image and you already know its width, height and pixel format (so you can
prepare a perfectly sized pixel buffer without having to call DIC or DFC), it
is valid to call DF, going straight to the DF #0 stage. This implicitly calls
DIC and DFC #0.
Even if you didn't know the width, height and pixel format, it is still valid
to call DF with a smaller-dimensioned pixel buffer (which just means the
decoded image will be clipped) or with a different pixel format (the decoder
will convert).
After that, it is valid to call DFC, going to the DFC #1 stage (or get "@end of
data" for still images), which would not make any implicit calls.
After that, it is valid to call DFC, going to the DFC #2 stage, implicitly
calling DF #1.
And so on.
For example, starting at the DF #N-1 stage, it is valid to call DF again, which
will return "@end of data" because it first implicitly calls DF #N, which
returns "@end of data".
Implicitly calling DF (skipping over the pixel data) is typically much faster
than explicitly calling DF (decompressing the pixel data). For example,
starting with a freshly initialized image decoder, if you just want to *count*
the number of animation frames, without needing each frame's decoded pixels,
just call DFC (and not DF) in a loop until "#end of data".
## State Machine
It's not part of Wuffs' public API, but Wuffs' standard library's image decoder
implementations all have a private `call_sequence` field to track this state
machine. Broadly speaking, an image decoder starts in an initial state (labeled
`0x00`). The DIC call moves to state `0x20`. Subsequent DFC and DF calls bounce
between states `0x40` and `0x20` until the last DFC moves the final state
`0x60`. These are the bold-labeled states in the left hand column of the
diagram below:
![Image Decoders Call Sequence
Diagram](./image-decoders-call-sequence-diagram.png)
The original Google Docs document for that diagram [is
here](https://docs.google.com/document/d/1bbH9cpgxsMP8M5U4NsTotr-wSlyH85tiDKSJSF1HVXc/edit?usp=sharing).
The italic-labeled states (whose numeric labels all have the `0x10` bit set) in
the right hand column are side-track states when [metadata](./metadata.md) is
encountered, and are discussed below. If the caller never opts in to seeing
metadata (opting in by calling `set_report_metadata`) then the decoder never
enters these `(base_value | 0x10)` states.
The `0x08` bit is used when calling `restart_frame`, discussed below. The low
three bits are reserved but currently unused.
The primary purposes of the `call_sequence` field is track when we've reached
"@end of data" and to reject method calls that occur out of sequence. Such
method calls result in the `"#bad call sequence"` error status value. For
example, a DIC call is illegal after a DIC, DFC or DF call. Similarly, a TMM
(`tell_me_more`) call is illegal unless the decoder is in a right hand column
state.
## Restarts
Image decoding typically runs sequentially: the first frame (#0) is decoded,
then the second (#1), then the third (#2), etc. However, decoding can sometimes
happen in random access instead of sequential order. Playing a looping
animation may require rewinding back to the first frame. Replaying an animation
may be able to re-use previousy cached frames at times, so a decoder may be
asked to jump ahead. While Wuffs is designed for sequential decoding (as it
does not assume that its input byte stream is rewindable or seekable), using
Wuffs to implement other graphics APIs can involve [random access to animation
frames](https://github.com/google/skia/blob/ee6f41262b2ef86b5f06b33473379ac887401451/include/codec/SkCodec.h#L314-L319).
The RF `restart_frame` method supports these usage patterns, setting up the
decoder so that it's just about to decode the I'th frame configuration (when
the `io_reader` is also placed at `io_position` previously returned by the I'th
DFC).
The RF method can only be called when the image configuration has already been
decoded. Equivalently, only when the `call_sequence` is at least `0x20`.
+6 -47
View File
@@ -61,7 +61,9 @@ will implicitly parse and verify the image header, before parsing the first
frame's header. Similarly, you can call only `decode_frame` N times, without
calling `decode_image_config` or `decode_frame_config`, if you already know
metadata like N and each frame's rectangle bounds by some other means (e.g.
this is a first party, statically known image).
this is a first party, statically known image). The [Image Decoders Call
Sequence](./image-decoders-call-sequence.md) document has more implementation
information.
Specifically, starting with an unknown (but re-windable) animated image, if you
want to just find N (i.e. count the number of frames), you can loop calling
@@ -89,52 +91,8 @@ associated stream will also need to be rewound.
## Metadata
Images can also contain metadata (e.g. color profiles, time stamps). By
default, Wuffs' image decoders skip over metadata, but calling
`set_report_metadata` will opt in to having `decode_image_config` return early
when encountering metadata in the file. Calling `set_report_metadata` can be
done multiple times, each with a different
[FourCC](/doc/note/base38-and-fourcc.md) code such as `0x49434350` "ICCP" or
`0x584D5020` "XMP ", to indicate what sorts of metadata the caller is
interested in. Conversely, when the parser encounters metadata (and returns a
"@metadata reported" [status](/doc/note/statuses.md)), call `tell_me_more` to
see what sort of metadata it is.
Some metadata is short and `tell_me_more` will also fill in its `minfo: nptr
more_information` out parameter with "parsed metadata". For example, Gamma
Correction metadata is a single numerical value and Primary Chromaticities
metadata is only eight numbers. From C++ code, call the `metadata_parsed__gama`
or `metadata_parsed__chrm` methods to retrieve these value.
Some metadata is long (or at least variable length) and needs processing by a
separate parser. For example, processing XMP metadata usually involves some
sort of XML parser, regardless of what particular image format that XMP
metadata was embedded in. Wuffs decoders will return "raw metadata" instead of
parsing it themselves. Raw metadata is further sub-divided into two categories:
"raw passthrough" and "raw transform". Either way, note that raw metadata might
also be arranged in multiple (non-contiguous) chunks of the source data.
"Raw passthrough" means that the bytes in the wire format can be sent "as is"
to the separate parser. Call `tell_me_more` in a loop (the `dst: io_writer`
argument will be ignored) and `metadata_raw_passthrough__range` to identify a
range (a chunk) of the input stream. Divert the bytes in that range to the
separate parser (which should advance the `io_buffer` to the end of that range)
and repeat the loop as long as `tell_me_more` returned a "$even more
information" status.
"Raw transform" means that the bytes in the wire format have to be further
processed (e.g. decompressed) before sending them on to the separate parser.
That processing is done by the `image_decoder` callee, not the caller. Pass a
writable `dst io_buffer` to `tell_me_more` (where writable means that it has a
positive `writer_length`) and implementations should fill in that buffer with
post-transformed (e.g. decompressed) data to send onwards. Like any
`io_transformer`-like coroutine, this should be in a loop, as it may suspend
with "$short read" and "$short write" statuses.
Either way, break the loop (after handling the `dst` and `minfo` out
parameters) when `tell_me_more` returns a NULL status, meaning ok, when the
metadata is complete. Afterwards, call the original action (e.g.
`decode_image_config`) again to resume after the "@metadata reported" detour.
The [Metadata](./metadata.md) document has more API information, applicable to
Wuffs' decoders but not specific to Wuffs' image decoders.
## API Listing
@@ -171,6 +129,7 @@ In Wuffs syntax, the `base.image_decoder` methods are:
- [example/gifplayer](/example/gifplayer)
- [example/imageviewer](/example/imageviewer)
- [example/sdl-imageviewer](/example/sdl-imageviewer)
- [script/print-average-pixel](/script/print-average-pixel.cc)
Examples in other repositories:
+48
View File
@@ -0,0 +1,48 @@
# Metadata
Files can also contain metadata (e.g. for image files, EXIF information, color
profiles and time stamps). By default, Wuffs' decoders skip over metadata, but
calling `set_report_metadata` will opt in to having `decode_etc` methods return
early when encountering metadata in the file. Calling `set_report_metadata` can
be done multiple times, each with a different
[FourCC](/doc/note/base38-and-fourcc.md) code such as `0x49434350` "ICCP" or
`0x584D5020` "XMP ", to indicate what sorts of metadata the caller is
interested in. Conversely, when the parser encounters metadata (and returns a
"@metadata reported" [status](/doc/note/statuses.md)), call `tell_me_more` to
see what sort of metadata it is.
Some metadata is short and `tell_me_more` will also fill in its `minfo: nptr
more_information` out parameter with "parsed metadata". For example, Gamma
Correction metadata is a single numerical value and Primary Chromaticities
metadata is only eight numbers. From C++ code, call the `metadata_parsed__gama`
or `metadata_parsed__chrm` methods to retrieve these value.
Some metadata is long (or at least variable length) and needs processing by a
separate parser. For example, processing XMP metadata usually involves some
sort of XML parser, regardless of what particular image format that XMP
metadata was embedded in. Wuffs decoders will return "raw metadata" instead of
parsing it themselves. Raw metadata is further sub-divided into two categories:
"raw passthrough" and "raw transform". Either way, note that raw metadata might
also be arranged in multiple (non-contiguous) chunks of the source data.
"Raw passthrough" means that the bytes in the wire format can be sent "as is"
to the separate parser. Call `tell_me_more` in a loop (the `dst: io_writer`
argument will be ignored) and `metadata_raw_passthrough__range` to identify a
range (a chunk) of the input stream. Divert the bytes in that range to the
separate parser (which should advance the `io_buffer` to the end of that range)
and repeat the loop as long as `tell_me_more` returned a "$even more
information" status.
"Raw transform" means that the bytes in the wire format have to be further
processed (e.g. decompressed) before sending them on to the separate parser.
That processing is done by the decoder callee, not the caller. Pass a writable
`dst io_buffer` to `tell_me_more` (where writable means that it has a positive
`writer_length`) and implementations should fill in that buffer with
post-transformed (e.g. decompressed) data to send onwards. Like any
`io_transformer`-like coroutine, this should be in a loop, as it may suspend
with "$short read" and "$short write" statuses.
Either way, break the loop (after handling the `dst` and `minfo` out
parameters) when `tell_me_more` returns a NULL status, meaning ok, when the
metadata is complete. Afterwards, call the original action (e.g. `decode_etc`)
again to resume after the "@metadata reported" detour.
+173 -150
View File
@@ -8178,9 +8178,8 @@ struct wuffs_gif__decoder__struct {
uint64_t f_metadata_io_position;
bool f_quirks[7];
bool f_delayed_num_decoded_frames;
bool f_end_of_data;
bool f_restarted;
bool f_previous_lzw_decode_ended_abruptly;
bool f_seen_header;
bool f_has_global_palette;
uint8_t f_interlace;
bool f_seen_num_animation_loops_value;
@@ -9649,6 +9648,7 @@ struct wuffs_png__decoder__struct {
bool f_seen_gama;
bool f_seen_iccp;
bool f_seen_idat;
bool f_seen_ihdr;
bool f_seen_plte;
bool f_seen_srgb;
bool f_seen_trns;
@@ -23507,7 +23507,7 @@ wuffs_bmp__decoder__decode_image_config(
self->private_impl.f_frame_config_io_position,
(self->private_impl.f_channel_masks[3] == 0));
}
self->private_impl.f_call_sequence = 3;
self->private_impl.f_call_sequence = 32;
ok:
self->private_impl.p_decode_image_config[0] = 0;
@@ -23574,7 +23574,8 @@ wuffs_bmp__decoder__decode_frame_config(
switch (coro_susp_point) {
WUFFS_BASE__COROUTINE_SUSPENSION_POINT_0;
if (self->private_impl.f_call_sequence < 3) {
if (self->private_impl.f_call_sequence == 32) {
} else if (self->private_impl.f_call_sequence < 32) {
if (a_src) {
a_src->meta.ri = ((size_t)(iop_a_src - a_src->data.ptr));
}
@@ -23586,13 +23587,13 @@ wuffs_bmp__decoder__decode_frame_config(
if (status.repr) {
goto suspend;
}
} else if (self->private_impl.f_call_sequence == 3) {
} else if (self->private_impl.f_call_sequence == 40) {
if (self->private_impl.f_frame_config_io_position != wuffs_base__u64__sat_add((a_src ? a_src->meta.pos : 0), ((uint64_t)(iop_a_src - io0_a_src)))) {
status = wuffs_base__make_status(wuffs_base__error__bad_restart);
goto exit;
}
} else if (self->private_impl.f_call_sequence == 4) {
self->private_impl.f_call_sequence = 255;
} else if (self->private_impl.f_call_sequence == 64) {
self->private_impl.f_call_sequence = 96;
status = wuffs_base__make_status(wuffs_base__note__end_of_data);
goto ok;
} else {
@@ -23615,7 +23616,7 @@ wuffs_bmp__decoder__decode_frame_config(
false,
4278190080);
}
self->private_impl.f_call_sequence = 4;
self->private_impl.f_call_sequence = 64;
ok:
self->private_impl.p_decode_frame_config[0] = 0;
@@ -23687,7 +23688,8 @@ wuffs_bmp__decoder__decode_frame(
switch (coro_susp_point) {
WUFFS_BASE__COROUTINE_SUSPENSION_POINT_0;
if (self->private_impl.f_call_sequence < 4) {
if (self->private_impl.f_call_sequence == 64) {
} else if (self->private_impl.f_call_sequence < 64) {
if (a_src) {
a_src->meta.ri = ((size_t)(iop_a_src - a_src->data.ptr));
}
@@ -23699,7 +23701,6 @@ wuffs_bmp__decoder__decode_frame(
if (status.repr) {
goto suspend;
}
} else if (self->private_impl.f_call_sequence == 4) {
} else {
status = wuffs_base__make_status(wuffs_base__note__end_of_data);
goto ok;
@@ -23799,7 +23800,7 @@ wuffs_bmp__decoder__decode_frame(
iop_a_src += self->private_data.s_decode_frame[0].scratch;
self->private_impl.f_pending_pad = 0;
}
self->private_impl.f_call_sequence = 255;
self->private_impl.f_call_sequence = 96;
ok:
self->private_impl.p_decode_frame[0] = 0;
@@ -24542,7 +24543,7 @@ wuffs_bmp__decoder__num_decoded_frame_configs(
return 0;
}
if (self->private_impl.f_call_sequence > 3) {
if (self->private_impl.f_call_sequence > 32) {
return 1;
}
return 0;
@@ -24561,7 +24562,7 @@ wuffs_bmp__decoder__num_decoded_frames(
return 0;
}
if (self->private_impl.f_call_sequence > 4) {
if (self->private_impl.f_call_sequence > 64) {
return 1;
}
return 0;
@@ -24584,13 +24585,13 @@ wuffs_bmp__decoder__restart_frame(
: wuffs_base__error__initialize_not_called);
}
if (self->private_impl.f_call_sequence < 3) {
if (self->private_impl.f_call_sequence < 32) {
return wuffs_base__make_status(wuffs_base__error__bad_call_sequence);
}
if (a_index != 0) {
return wuffs_base__make_status(wuffs_base__error__bad_argument);
}
self->private_impl.f_call_sequence = 3;
self->private_impl.f_call_sequence = 40;
self->private_impl.f_frame_config_io_position = a_io_position;
return wuffs_base__make_status(NULL);
}
@@ -31379,7 +31380,10 @@ wuffs_gif__decoder__decode_image_config(
switch (coro_susp_point) {
WUFFS_BASE__COROUTINE_SUSPENSION_POINT_0;
if (self->private_impl.f_call_sequence == 0) {
if (self->private_impl.f_call_sequence != 0) {
status = wuffs_base__make_status(wuffs_base__error__bad_call_sequence);
goto exit;
} else if ( ! self->private_impl.f_seen_header) {
WUFFS_BASE__COROUTINE_SUSPENSION_POINT(1);
status = wuffs_gif__decoder__decode_header(self, a_src);
if (status.repr) {
@@ -31390,9 +31394,7 @@ wuffs_gif__decoder__decode_image_config(
if (status.repr) {
goto suspend;
}
} else if (self->private_impl.f_call_sequence != 2) {
status = wuffs_base__make_status(wuffs_base__error__bad_call_sequence);
goto exit;
self->private_impl.f_seen_header = true;
}
WUFFS_BASE__COROUTINE_SUSPENSION_POINT(3);
status = wuffs_gif__decoder__decode_up_to_id_part1(self, a_src);
@@ -31422,7 +31424,7 @@ wuffs_gif__decoder__decode_image_config(
self->private_impl.f_frame_config_io_position,
v_ffio);
}
self->private_impl.f_call_sequence = 3;
self->private_impl.f_call_sequence = 32;
goto ok;
ok:
@@ -31511,7 +31513,7 @@ wuffs_gif__decoder__tell_me_more(
switch (coro_susp_point) {
WUFFS_BASE__COROUTINE_SUSPENSION_POINT_0;
if (self->private_impl.f_call_sequence != 1) {
if ((self->private_impl.f_call_sequence & 16) == 0) {
status = wuffs_base__make_status(wuffs_base__error__bad_call_sequence);
goto exit;
}
@@ -31582,7 +31584,7 @@ wuffs_gif__decoder__tell_me_more(
self->private_impl.f_metadata_io_position,
self->private_impl.f_metadata_io_position);
}
self->private_impl.f_call_sequence = 2;
self->private_impl.f_call_sequence &= 239;
self->private_impl.f_metadata_fourcc = 0;
self->private_impl.f_metadata_io_position = 0;
status = wuffs_base__make_status(NULL);
@@ -31717,16 +31719,17 @@ wuffs_gif__decoder__restart_frame(
: wuffs_base__error__initialize_not_called);
}
if (self->private_impl.f_call_sequence < 3) {
if (self->private_impl.f_call_sequence < 32) {
return wuffs_base__make_status(wuffs_base__error__bad_call_sequence);
} else if (a_io_position == 0) {
return wuffs_base__make_status(wuffs_base__error__bad_argument);
}
self->private_impl.f_delayed_num_decoded_frames = false;
self->private_impl.f_end_of_data = false;
self->private_impl.f_restarted = true;
self->private_impl.f_frame_config_io_position = a_io_position;
self->private_impl.f_num_decoded_frame_configs_value = a_index;
self->private_impl.f_num_decoded_frames_value = a_index;
wuffs_gif__decoder__reset_gc(self);
self->private_impl.f_call_sequence = 40;
return wuffs_base__make_status(NULL);
}
@@ -31781,50 +31784,64 @@ wuffs_gif__decoder__decode_frame_config(
self->private_impl.f_ignore_metadata = true;
self->private_impl.f_dirty_max_excl_y = 0;
if ( ! self->private_impl.f_end_of_data) {
if (self->private_impl.f_call_sequence == 0) {
if (a_src) {
a_src->meta.ri = ((size_t)(iop_a_src - a_src->data.ptr));
}
WUFFS_BASE__COROUTINE_SUSPENSION_POINT(1);
status = wuffs_gif__decoder__decode_image_config(self, NULL, a_src);
if (a_src) {
iop_a_src = a_src->data.ptr + a_src->meta.ri;
}
if (status.repr) {
goto suspend;
}
} else if (self->private_impl.f_call_sequence != 3) {
if (self->private_impl.f_call_sequence == 4) {
if (a_src) {
a_src->meta.ri = ((size_t)(iop_a_src - a_src->data.ptr));
}
WUFFS_BASE__COROUTINE_SUSPENSION_POINT(2);
status = wuffs_gif__decoder__skip_frame(self, a_src);
if (a_src) {
iop_a_src = a_src->data.ptr + a_src->meta.ri;
}
if (status.repr) {
goto suspend;
}
}
if (a_src) {
a_src->meta.ri = ((size_t)(iop_a_src - a_src->data.ptr));
}
WUFFS_BASE__COROUTINE_SUSPENSION_POINT(3);
status = wuffs_gif__decoder__decode_up_to_id_part1(self, a_src);
if (a_src) {
iop_a_src = a_src->data.ptr + a_src->meta.ri;
}
if (status.repr) {
goto suspend;
}
if ((self->private_impl.f_call_sequence & 16) != 0) {
status = wuffs_base__make_status(wuffs_base__error__bad_call_sequence);
goto exit;
} else if (self->private_impl.f_call_sequence == 32) {
} else if (self->private_impl.f_call_sequence < 32) {
if (a_src) {
a_src->meta.ri = ((size_t)(iop_a_src - a_src->data.ptr));
}
}
if (self->private_impl.f_end_of_data) {
WUFFS_BASE__COROUTINE_SUSPENSION_POINT(1);
status = wuffs_gif__decoder__decode_image_config(self, NULL, a_src);
if (a_src) {
iop_a_src = a_src->data.ptr + a_src->meta.ri;
}
if (status.repr) {
goto suspend;
}
} else if (self->private_impl.f_call_sequence == 40) {
if (self->private_impl.f_frame_config_io_position != wuffs_base__u64__sat_add((a_src ? a_src->meta.pos : 0), ((uint64_t)(iop_a_src - io0_a_src)))) {
status = wuffs_base__make_status(wuffs_base__error__bad_restart);
goto exit;
}
} else if (self->private_impl.f_call_sequence == 64) {
if (a_src) {
a_src->meta.ri = ((size_t)(iop_a_src - a_src->data.ptr));
}
WUFFS_BASE__COROUTINE_SUSPENSION_POINT(2);
status = wuffs_gif__decoder__skip_frame(self, a_src);
if (a_src) {
iop_a_src = a_src->data.ptr + a_src->meta.ri;
}
if (status.repr) {
goto suspend;
}
if (self->private_impl.f_call_sequence >= 96) {
status = wuffs_base__make_status(wuffs_base__note__end_of_data);
goto ok;
}
} else {
status = wuffs_base__make_status(wuffs_base__note__end_of_data);
goto ok;
}
if ((self->private_impl.f_num_decoded_frame_configs_value > 0) || (self->private_impl.f_call_sequence == 40)) {
if (a_src) {
a_src->meta.ri = ((size_t)(iop_a_src - a_src->data.ptr));
}
WUFFS_BASE__COROUTINE_SUSPENSION_POINT(3);
status = wuffs_gif__decoder__decode_up_to_id_part1(self, a_src);
if (a_src) {
iop_a_src = a_src->data.ptr + a_src->meta.ri;
}
if (status.repr) {
goto suspend;
}
if (self->private_impl.f_call_sequence >= 96) {
status = wuffs_base__make_status(wuffs_base__note__end_of_data);
goto ok;
}
}
v_background_color = self->private_impl.f_black_color_u32_argb_premul;
if ( ! self->private_impl.f_gc_has_transparent_index) {
v_background_color = self->private_impl.f_background_color_u32_argb_premul;
@@ -31856,7 +31873,7 @@ wuffs_gif__decoder__decode_frame_config(
v_background_color);
}
wuffs_base__u64__sat_add_indirect(&self->private_impl.f_num_decoded_frame_configs_value, 1);
self->private_impl.f_call_sequence = 4;
self->private_impl.f_call_sequence = 64;
ok:
self->private_impl.p_decode_frame_config[0] = 0;
@@ -31957,6 +31974,7 @@ wuffs_gif__decoder__skip_frame(
wuffs_base__u64__sat_add_indirect(&self->private_impl.f_num_decoded_frames_value, 1);
}
wuffs_gif__decoder__reset_gc(self);
self->private_impl.f_call_sequence = 32;
goto ok;
ok:
@@ -32013,12 +32031,16 @@ wuffs_gif__decoder__decode_frame(
WUFFS_BASE__COROUTINE_SUSPENSION_POINT_0;
self->private_impl.f_ignore_metadata = true;
if (self->private_impl.f_call_sequence != 4) {
if (self->private_impl.f_call_sequence == 64) {
} else if (self->private_impl.f_call_sequence < 64) {
WUFFS_BASE__COROUTINE_SUSPENSION_POINT(1);
status = wuffs_gif__decoder__decode_frame_config(self, NULL, a_src);
if (status.repr) {
goto suspend;
}
} else {
status = wuffs_base__make_status(wuffs_base__note__end_of_data);
goto ok;
}
if (self->private_impl.f_quirks[5] && ((self->private_impl.f_frame_rect_x0 == self->private_impl.f_frame_rect_x1) || (self->private_impl.f_frame_rect_y0 == self->private_impl.f_frame_rect_y1))) {
status = wuffs_base__make_status(wuffs_gif__error__bad_frame_size);
@@ -32036,8 +32058,8 @@ wuffs_gif__decoder__decode_frame(
}
wuffs_base__u64__sat_add_indirect(&self->private_impl.f_num_decoded_frames_value, 1);
wuffs_gif__decoder__reset_gc(self);
self->private_impl.f_call_sequence = 32;
goto ok;
ok:
self->private_impl.p_decode_frame[0] = 0;
goto exit;
@@ -32061,7 +32083,6 @@ wuffs_gif__decoder__decode_frame(
static wuffs_base__empty_struct
wuffs_gif__decoder__reset_gc(
wuffs_gif__decoder* self) {
self->private_impl.f_call_sequence = 5;
self->private_impl.f_gc_has_transparent_index = false;
self->private_impl.f_gc_transparent_index = 0;
self->private_impl.f_gc_disposal = 0;
@@ -32094,15 +32115,8 @@ wuffs_gif__decoder__decode_up_to_id_part1(
switch (coro_susp_point) {
WUFFS_BASE__COROUTINE_SUSPENSION_POINT_0;
if ( ! self->private_impl.f_restarted) {
if (self->private_impl.f_call_sequence != 2) {
self->private_impl.f_frame_config_io_position = wuffs_base__u64__sat_add((a_src ? a_src->meta.pos : 0), ((uint64_t)(iop_a_src - io0_a_src)));
}
} else if (self->private_impl.f_frame_config_io_position != wuffs_base__u64__sat_add((a_src ? a_src->meta.pos : 0), ((uint64_t)(iop_a_src - io0_a_src)))) {
status = wuffs_base__make_status(wuffs_base__error__bad_restart);
goto exit;
} else {
self->private_impl.f_restarted = false;
if ((self->private_impl.f_frame_config_io_position == 0) || (self->private_impl.f_num_decoded_frame_configs_value > 0)) {
self->private_impl.f_frame_config_io_position = wuffs_base__u64__sat_add((a_src ? a_src->meta.pos : 0), ((uint64_t)(iop_a_src - io0_a_src)));
}
while (true) {
{
@@ -32148,7 +32162,7 @@ wuffs_gif__decoder__decode_up_to_id_part1(
self->private_impl.f_delayed_num_decoded_frames = false;
wuffs_base__u64__sat_add_indirect(&self->private_impl.f_num_decoded_frames_value, 1);
}
self->private_impl.f_end_of_data = true;
self->private_impl.f_call_sequence = 96;
goto label__0__break;
}
}
@@ -32784,13 +32798,13 @@ wuffs_gif__decoder__decode_ae(
} else if (v_is_iccp && self->private_impl.f_report_metadata_iccp) {
self->private_impl.f_metadata_fourcc = 1229144912;
self->private_impl.f_metadata_io_position = wuffs_base__u64__sat_add((a_src ? a_src->meta.pos : 0), ((uint64_t)(iop_a_src - io0_a_src)));
self->private_impl.f_call_sequence = 1;
self->private_impl.f_call_sequence = 16;
status = wuffs_base__make_status(wuffs_base__note__metadata_reported);
goto ok;
} else if (v_is_xmp && self->private_impl.f_report_metadata_xmp) {
self->private_impl.f_metadata_fourcc = 1481461792;
self->private_impl.f_metadata_io_position = wuffs_base__u64__sat_add((a_src ? a_src->meta.pos : 0), ((uint64_t)(iop_a_src - io0_a_src)));
self->private_impl.f_call_sequence = 1;
self->private_impl.f_call_sequence = 16;
status = wuffs_base__make_status(wuffs_base__note__metadata_reported);
goto ok;
}
@@ -33105,7 +33119,7 @@ wuffs_gif__decoder__decode_id_part0(
self->private_impl.f_frame_rect_y1 += self->private_impl.f_frame_rect_y0;
self->private_impl.f_dst_x = self->private_impl.f_frame_rect_x0;
self->private_impl.f_dst_y = self->private_impl.f_frame_rect_y0;
if ((self->private_impl.f_call_sequence == 0) && ! self->private_impl.f_quirks[4]) {
if ((self->private_impl.f_num_decoded_frame_configs_value == 0) && ! self->private_impl.f_quirks[4]) {
self->private_impl.f_width = wuffs_base__u32__max(self->private_impl.f_width, self->private_impl.f_frame_rect_x1);
self->private_impl.f_height = wuffs_base__u32__max(self->private_impl.f_height, self->private_impl.f_frame_rect_y1);
}
@@ -36694,7 +36708,7 @@ wuffs_nie__decoder__decode_image_config(
16,
false);
}
self->private_impl.f_call_sequence = 3;
self->private_impl.f_call_sequence = 32;
goto ok;
ok:
@@ -36762,7 +36776,8 @@ wuffs_nie__decoder__decode_frame_config(
switch (coro_susp_point) {
WUFFS_BASE__COROUTINE_SUSPENSION_POINT_0;
if (self->private_impl.f_call_sequence < 3) {
if (self->private_impl.f_call_sequence == 32) {
} else if (self->private_impl.f_call_sequence < 32) {
if (a_src) {
a_src->meta.ri = ((size_t)(iop_a_src - a_src->data.ptr));
}
@@ -36774,13 +36789,13 @@ wuffs_nie__decoder__decode_frame_config(
if (status.repr) {
goto suspend;
}
} else if (self->private_impl.f_call_sequence == 3) {
} else if (self->private_impl.f_call_sequence == 40) {
if (16 != wuffs_base__u64__sat_add((a_src ? a_src->meta.pos : 0), ((uint64_t)(iop_a_src - io0_a_src)))) {
status = wuffs_base__make_status(wuffs_base__error__bad_restart);
goto exit;
}
} else if (self->private_impl.f_call_sequence == 4) {
self->private_impl.f_call_sequence = 255;
} else if (self->private_impl.f_call_sequence == 64) {
self->private_impl.f_call_sequence = 96;
status = wuffs_base__make_status(wuffs_base__note__end_of_data);
goto ok;
} else {
@@ -36803,7 +36818,7 @@ wuffs_nie__decoder__decode_frame_config(
false,
0);
}
self->private_impl.f_call_sequence = 4;
self->private_impl.f_call_sequence = 64;
ok:
self->private_impl.p_decode_frame_config[0] = 0;
@@ -36864,13 +36879,13 @@ wuffs_nie__decoder__decode_frame(
switch (coro_susp_point) {
WUFFS_BASE__COROUTINE_SUSPENSION_POINT_0;
if (self->private_impl.f_call_sequence < 4) {
if (self->private_impl.f_call_sequence == 64) {
} else if (self->private_impl.f_call_sequence < 64) {
WUFFS_BASE__COROUTINE_SUSPENSION_POINT(1);
status = wuffs_nie__decoder__decode_frame_config(self, NULL, a_src);
if (status.repr) {
goto suspend;
}
} else if (self->private_impl.f_call_sequence == 4) {
} else {
status = wuffs_base__make_status(wuffs_base__note__end_of_data);
goto ok;
@@ -36911,7 +36926,7 @@ wuffs_nie__decoder__decode_frame(
WUFFS_BASE__COROUTINE_SUSPENSION_POINT_MAYBE_SUSPEND(2);
}
label__0__break:;
self->private_impl.f_call_sequence = 255;
self->private_impl.f_call_sequence = 96;
ok:
self->private_impl.p_decode_frame[0] = 0;
@@ -37061,7 +37076,7 @@ wuffs_nie__decoder__num_decoded_frame_configs(
return 0;
}
if (self->private_impl.f_call_sequence > 3) {
if (self->private_impl.f_call_sequence > 32) {
return 1;
}
return 0;
@@ -37080,7 +37095,7 @@ wuffs_nie__decoder__num_decoded_frames(
return 0;
}
if (self->private_impl.f_call_sequence > 4) {
if (self->private_impl.f_call_sequence > 64) {
return 1;
}
return 0;
@@ -37103,13 +37118,13 @@ wuffs_nie__decoder__restart_frame(
: wuffs_base__error__initialize_not_called);
}
if (self->private_impl.f_call_sequence < 3) {
if (self->private_impl.f_call_sequence < 32) {
return wuffs_base__make_status(wuffs_base__error__bad_call_sequence);
}
if ((a_index != 0) || (a_io_position != 16)) {
return wuffs_base__make_status(wuffs_base__error__bad_argument);
}
self->private_impl.f_call_sequence = 3;
self->private_impl.f_call_sequence = 40;
return wuffs_base__make_status(NULL);
}
@@ -39576,16 +39591,10 @@ wuffs_png__decoder__decode_image_config(
switch (coro_susp_point) {
WUFFS_BASE__COROUTINE_SUSPENSION_POINT_0;
if (self->private_impl.f_call_sequence == 2) {
if (self->private_impl.f_metadata_fourcc != 0) {
self->private_impl.f_call_sequence = 1;
status = wuffs_base__make_status(wuffs_base__note__metadata_reported);
goto ok;
}
} else if (self->private_impl.f_call_sequence != 0) {
if (self->private_impl.f_call_sequence != 0) {
status = wuffs_base__make_status(wuffs_base__error__bad_call_sequence);
goto exit;
} else {
} else if ( ! self->private_impl.f_seen_ihdr) {
{
WUFFS_BASE__COROUTINE_SUSPENSION_POINT(1);
uint64_t t_0;
@@ -39718,6 +39727,11 @@ wuffs_png__decoder__decode_image_config(
status = wuffs_base__make_status(wuffs_png__error__bad_checksum);
goto exit;
}
self->private_impl.f_seen_ihdr = true;
} else if (self->private_impl.f_metadata_fourcc != 0) {
self->private_impl.f_call_sequence = 16;
status = wuffs_base__make_status(wuffs_base__note__metadata_reported);
goto ok;
}
while (true) {
while (((uint64_t)(io2_a_src - iop_a_src)) < 8) {
@@ -39775,7 +39789,7 @@ wuffs_png__decoder__decode_image_config(
}
label__2__break:;
if (self->private_impl.f_metadata_fourcc != 0) {
self->private_impl.f_call_sequence = 1;
self->private_impl.f_call_sequence = 16;
status = wuffs_base__make_status(wuffs_base__note__metadata_reported);
goto ok;
}
@@ -39840,7 +39854,7 @@ wuffs_png__decoder__decode_image_config(
self->private_impl.f_first_disposal = 0;
self->private_impl.f_first_overwrite_instead_of_blend = false;
}
self->private_impl.f_call_sequence = 3;
self->private_impl.f_call_sequence = 32;
ok:
self->private_impl.p_decode_image_config[0] = 0;
@@ -41801,10 +41815,11 @@ wuffs_png__decoder__decode_frame_config(
switch (coro_susp_point) {
WUFFS_BASE__COROUTINE_SUSPENSION_POINT_0;
if (self->private_impl.f_call_sequence == 255) {
status = wuffs_base__make_status(wuffs_base__note__end_of_data);
goto ok;
} else if (self->private_impl.f_call_sequence < 3) {
if ((self->private_impl.f_call_sequence & 16) != 0) {
status = wuffs_base__make_status(wuffs_base__error__bad_call_sequence);
goto exit;
} else if (self->private_impl.f_call_sequence == 32) {
} else if (self->private_impl.f_call_sequence < 32) {
if (a_src) {
a_src->meta.ri = ((size_t)(iop_a_src - a_src->data.ptr));
}
@@ -41816,12 +41831,12 @@ wuffs_png__decoder__decode_frame_config(
if (status.repr) {
goto suspend;
}
} else if (self->private_impl.f_call_sequence == 3) {
} else if (self->private_impl.f_call_sequence == 40) {
if (self->private_impl.f_frame_config_io_position != wuffs_base__u64__sat_add((a_src ? a_src->meta.pos : 0), ((uint64_t)(iop_a_src - io0_a_src)))) {
status = wuffs_base__make_status(wuffs_base__error__bad_restart);
goto exit;
}
} else if (self->private_impl.f_call_sequence == 4) {
} else if (self->private_impl.f_call_sequence == 64) {
if (a_src) {
a_src->meta.ri = ((size_t)(iop_a_src - a_src->data.ptr));
}
@@ -41833,10 +41848,13 @@ wuffs_png__decoder__decode_frame_config(
if (status.repr) {
goto suspend;
}
if (self->private_impl.f_call_sequence == 255) {
if (self->private_impl.f_call_sequence >= 96) {
status = wuffs_base__make_status(wuffs_base__note__end_of_data);
goto ok;
}
} else {
status = wuffs_base__make_status(wuffs_base__note__end_of_data);
goto ok;
}
if (self->private_impl.f_num_decoded_frame_configs_value == 0) {
self->private_impl.f_frame_rect_x0 = self->private_impl.f_first_rect_x0;
@@ -41964,7 +41982,7 @@ wuffs_png__decoder__decode_frame_config(
0);
}
wuffs_base__u32__sat_add_indirect(&self->private_impl.f_num_decoded_frame_configs_value, 1);
self->private_impl.f_call_sequence = 4;
self->private_impl.f_call_sequence = 64;
ok:
self->private_impl.p_decode_frame_config[0] = 0;
@@ -42121,9 +42139,9 @@ wuffs_png__decoder__skip_frame(
label__0__break:;
wuffs_base__u32__sat_add_indirect(&self->private_impl.f_num_decoded_frames_value, 1);
if (self->private_impl.f_num_decoded_frames_value < self->private_impl.f_num_animation_frames_value) {
self->private_impl.f_call_sequence = 5;
self->private_impl.f_call_sequence = 32;
} else {
self->private_impl.f_call_sequence = 255;
self->private_impl.f_call_sequence = 96;
}
ok:
@@ -42195,10 +42213,13 @@ wuffs_png__decoder__decode_frame(
switch (coro_susp_point) {
WUFFS_BASE__COROUTINE_SUSPENSION_POINT_0;
if (self->private_impl.f_call_sequence == 255) {
if ((self->private_impl.f_call_sequence & 16) != 0) {
status = wuffs_base__make_status(wuffs_base__error__bad_call_sequence);
goto exit;
} else if (self->private_impl.f_call_sequence >= 96) {
status = wuffs_base__make_status(wuffs_base__note__end_of_data);
goto ok;
} else if (self->private_impl.f_call_sequence != 4) {
} else if (self->private_impl.f_call_sequence != 64) {
if (a_src) {
a_src->meta.ri = ((size_t)(iop_a_src - a_src->data.ptr));
}
@@ -42391,9 +42412,9 @@ wuffs_png__decoder__decode_frame(
label__2__break:;
wuffs_base__u32__sat_add_indirect(&self->private_impl.f_num_decoded_frames_value, 1);
if (self->private_impl.f_num_decoded_frames_value < self->private_impl.f_num_animation_frames_value) {
self->private_impl.f_call_sequence = 5;
self->private_impl.f_call_sequence = 32;
} else {
self->private_impl.f_call_sequence = 255;
self->private_impl.f_call_sequence = 96;
}
ok:
@@ -42842,12 +42863,12 @@ wuffs_png__decoder__restart_frame(
: wuffs_base__error__initialize_not_called);
}
if (self->private_impl.f_call_sequence < 3) {
if (self->private_impl.f_call_sequence < 32) {
return wuffs_base__make_status(wuffs_base__error__bad_call_sequence);
} else if ((a_index >= ((uint64_t)(self->private_impl.f_num_animation_frames_value))) || ((a_index == 0) && (a_io_position != self->private_impl.f_first_config_io_position))) {
return wuffs_base__make_status(wuffs_base__error__bad_argument);
}
self->private_impl.f_call_sequence = 3;
self->private_impl.f_call_sequence = 40;
if (self->private_impl.f_interlace_pass >= 1) {
self->private_impl.f_interlace_pass = 1;
}
@@ -42960,7 +42981,7 @@ wuffs_png__decoder__tell_me_more(
switch (coro_susp_point) {
WUFFS_BASE__COROUTINE_SUSPENSION_POINT_0;
if (self->private_impl.f_call_sequence != 1) {
if ((self->private_impl.f_call_sequence & 16) == 0) {
status = wuffs_base__make_status(wuffs_base__error__bad_call_sequence);
goto exit;
}
@@ -43355,7 +43376,7 @@ wuffs_png__decoder__tell_me_more(
}
self->private_impl.f_metadata_is_zlib_compressed = true;
}
self->private_impl.f_call_sequence = 2;
self->private_impl.f_call_sequence &= 239;
status = wuffs_base__make_status(NULL);
goto ok;
}
@@ -43380,7 +43401,7 @@ wuffs_png__decoder__tell_me_more(
self->private_impl.f_metadata_x = 0;
self->private_impl.f_metadata_y = 0;
self->private_impl.f_metadata_z = 0;
self->private_impl.f_call_sequence = 2;
self->private_impl.f_call_sequence &= 239;
status = wuffs_base__make_status(NULL);
goto ok;
@@ -44371,7 +44392,7 @@ wuffs_tga__decoder__decode_image_config(
self->private_impl.f_frame_config_io_position,
self->private_impl.f_opaque);
}
self->private_impl.f_call_sequence = 3;
self->private_impl.f_call_sequence = 32;
goto ok;
ok:
@@ -44440,7 +44461,8 @@ wuffs_tga__decoder__decode_frame_config(
switch (coro_susp_point) {
WUFFS_BASE__COROUTINE_SUSPENSION_POINT_0;
if (self->private_impl.f_call_sequence < 3) {
if (self->private_impl.f_call_sequence == 32) {
} else if (self->private_impl.f_call_sequence < 32) {
if (a_src) {
a_src->meta.ri = ((size_t)(iop_a_src - a_src->data.ptr));
}
@@ -44452,13 +44474,13 @@ wuffs_tga__decoder__decode_frame_config(
if (status.repr) {
goto suspend;
}
} else if (self->private_impl.f_call_sequence == 3) {
} else if (self->private_impl.f_call_sequence == 40) {
if (self->private_impl.f_frame_config_io_position != wuffs_base__u64__sat_add((a_src ? a_src->meta.pos : 0), ((uint64_t)(iop_a_src - io0_a_src)))) {
status = wuffs_base__make_status(wuffs_base__error__bad_restart);
goto exit;
}
} else if (self->private_impl.f_call_sequence == 4) {
self->private_impl.f_call_sequence = 255;
} else if (self->private_impl.f_call_sequence == 64) {
self->private_impl.f_call_sequence = 96;
status = wuffs_base__make_status(wuffs_base__note__end_of_data);
goto ok;
} else {
@@ -44481,7 +44503,7 @@ wuffs_tga__decoder__decode_frame_config(
false,
4278190080);
}
self->private_impl.f_call_sequence = 4;
self->private_impl.f_call_sequence = 64;
ok:
self->private_impl.p_decode_frame_config[0] = 0;
@@ -44582,7 +44604,8 @@ wuffs_tga__decoder__decode_frame(
switch (coro_susp_point) {
WUFFS_BASE__COROUTINE_SUSPENSION_POINT_0;
if (self->private_impl.f_call_sequence < 4) {
if (self->private_impl.f_call_sequence == 64) {
} else if (self->private_impl.f_call_sequence < 64) {
if (a_src) {
a_src->meta.ri = ((size_t)(iop_a_src - a_src->data.ptr));
}
@@ -44594,7 +44617,6 @@ wuffs_tga__decoder__decode_frame(
if (status.repr) {
goto suspend;
}
} else if (self->private_impl.f_call_sequence == 4) {
} else {
status = wuffs_base__make_status(wuffs_base__note__end_of_data);
goto ok;
@@ -44821,7 +44843,7 @@ wuffs_tga__decoder__decode_frame(
goto label__resume__break;
}
label__resume__break:;
self->private_impl.f_call_sequence = 255;
self->private_impl.f_call_sequence = 96;
ok:
self->private_impl.p_decode_frame[0] = 0;
@@ -44902,7 +44924,7 @@ wuffs_tga__decoder__num_decoded_frame_configs(
return 0;
}
if (self->private_impl.f_call_sequence > 3) {
if (self->private_impl.f_call_sequence > 32) {
return 1;
}
return 0;
@@ -44921,7 +44943,7 @@ wuffs_tga__decoder__num_decoded_frames(
return 0;
}
if (self->private_impl.f_call_sequence > 4) {
if (self->private_impl.f_call_sequence > 64) {
return 1;
}
return 0;
@@ -44944,13 +44966,13 @@ wuffs_tga__decoder__restart_frame(
: wuffs_base__error__initialize_not_called);
}
if (self->private_impl.f_call_sequence < 3) {
if (self->private_impl.f_call_sequence < 32) {
return wuffs_base__make_status(wuffs_base__error__bad_call_sequence);
}
if (a_index != 0) {
return wuffs_base__make_status(wuffs_base__error__bad_argument);
}
self->private_impl.f_call_sequence = 3;
self->private_impl.f_call_sequence = 40;
self->private_impl.f_frame_config_io_position = a_io_position;
return wuffs_base__make_status(NULL);
}
@@ -45270,7 +45292,7 @@ wuffs_wbmp__decoder__decode_image_config(
self->private_impl.f_frame_config_io_position,
true);
}
self->private_impl.f_call_sequence = 3;
self->private_impl.f_call_sequence = 32;
goto ok;
ok:
@@ -45340,7 +45362,8 @@ wuffs_wbmp__decoder__decode_frame_config(
switch (coro_susp_point) {
WUFFS_BASE__COROUTINE_SUSPENSION_POINT_0;
if (self->private_impl.f_call_sequence < 3) {
if (self->private_impl.f_call_sequence == 32) {
} else if (self->private_impl.f_call_sequence < 32) {
if (a_src) {
a_src->meta.ri = ((size_t)(iop_a_src - a_src->data.ptr));
}
@@ -45352,13 +45375,13 @@ wuffs_wbmp__decoder__decode_frame_config(
if (status.repr) {
goto suspend;
}
} else if (self->private_impl.f_call_sequence == 3) {
} else if (self->private_impl.f_call_sequence == 40) {
if (self->private_impl.f_frame_config_io_position != wuffs_base__u64__sat_add((a_src ? a_src->meta.pos : 0), ((uint64_t)(iop_a_src - io0_a_src)))) {
status = wuffs_base__make_status(wuffs_base__error__bad_restart);
goto exit;
}
} else if (self->private_impl.f_call_sequence == 4) {
self->private_impl.f_call_sequence = 255;
} else if (self->private_impl.f_call_sequence == 64) {
self->private_impl.f_call_sequence = 96;
status = wuffs_base__make_status(wuffs_base__note__end_of_data);
goto ok;
} else {
@@ -45381,7 +45404,7 @@ wuffs_wbmp__decoder__decode_frame_config(
false,
4278190080);
}
self->private_impl.f_call_sequence = 4;
self->private_impl.f_call_sequence = 64;
ok:
self->private_impl.p_decode_frame_config[0] = 0;
@@ -45470,7 +45493,8 @@ wuffs_wbmp__decoder__decode_frame(
switch (coro_susp_point) {
WUFFS_BASE__COROUTINE_SUSPENSION_POINT_0;
if (self->private_impl.f_call_sequence < 4) {
if (self->private_impl.f_call_sequence == 64) {
} else if (self->private_impl.f_call_sequence < 64) {
if (a_src) {
a_src->meta.ri = ((size_t)(iop_a_src - a_src->data.ptr));
}
@@ -45482,7 +45506,6 @@ wuffs_wbmp__decoder__decode_frame(
if (status.repr) {
goto suspend;
}
} else if (self->private_impl.f_call_sequence == 4) {
} else {
status = wuffs_base__make_status(wuffs_base__note__end_of_data);
goto ok;
@@ -45545,7 +45568,7 @@ wuffs_wbmp__decoder__decode_frame(
v_dst_y += 1;
}
}
self->private_impl.f_call_sequence = 255;
self->private_impl.f_call_sequence = 96;
ok:
self->private_impl.p_decode_frame[0] = 0;
@@ -45623,7 +45646,7 @@ wuffs_wbmp__decoder__num_decoded_frame_configs(
return 0;
}
if (self->private_impl.f_call_sequence > 3) {
if (self->private_impl.f_call_sequence > 32) {
return 1;
}
return 0;
@@ -45642,7 +45665,7 @@ wuffs_wbmp__decoder__num_decoded_frames(
return 0;
}
if (self->private_impl.f_call_sequence > 4) {
if (self->private_impl.f_call_sequence > 64) {
return 1;
}
return 0;
@@ -45665,13 +45688,13 @@ wuffs_wbmp__decoder__restart_frame(
: wuffs_base__error__initialize_not_called);
}
if (self->private_impl.f_call_sequence < 3) {
if (self->private_impl.f_call_sequence < 32) {
return wuffs_base__make_status(wuffs_base__error__bad_call_sequence);
}
if (a_index != 0) {
return wuffs_base__make_status(wuffs_base__error__bad_argument);
}
self->private_impl.f_call_sequence = 3;
self->private_impl.f_call_sequence = 40;
self->private_impl.f_frame_config_io_position = a_io_position;
return wuffs_base__make_status(NULL);
}
+19 -40
View File
@@ -33,31 +33,8 @@ pub struct decoder? implements base.image_decoder(
width : base.u32[..= 0x7FFF_FFFF],
height : base.u32[..= 0x7FFF_FFFF],
// Call sequence states:
// - 0x00: initial state.
// - 0x03: image config decoded.
// - 0x04: frame config decoded.
// - 0xFF: end-of-data, usually after (the non-animated) frame decoded.
//
// State transitions:
//
// - 0x00 -> 0x03: via DIC
// - 0x00 -> 0x04: via DFC with implicit DIC
// - 0x00 -> 0xFF: via DF with implicit DIC and DFC
//
// - 0x03 -> 0x04: via DFC
// - 0x03 -> 0xFF: via DF with implicit DFC
//
// - 0x04 -> 0xFF: via DFC
// - 0x04 -> 0xFF: via DF
//
// - ???? -> 0x03: via RF for ???? > 0x00
//
// Where:
// - DF is decode_frame
// - DFC is decode_frame_config, implicit means nullptr args.dst
// - DIC is decode_image_config, implicit means nullptr args.dst
// - RF is restart_frame
// The call sequence state machine is discussed in
// (/doc/std/image-decoders-call-sequence.md).
call_sequence : base.u8,
top_down : base.bool,
@@ -115,7 +92,7 @@ pub func decoder.decode_image_config?(dst: nptr base.image_config, src: base.io_
var dst_pixfmt : base.u32
var byte_width : base.u32
if (this.call_sequence <> 0) or (this.io_redirect_fourcc == 1) {
if (this.call_sequence <> 0x00) or (this.io_redirect_fourcc == 1) {
return base."#bad call sequence"
} else if this.io_redirect_fourcc <> 0 {
return base."@I/O redirect"
@@ -389,18 +366,20 @@ pub func decoder.decode_image_config?(dst: nptr base.image_config, src: base.io_
first_frame_is_opaque: this.channel_masks[3] == 0)
}
this.call_sequence = 3
this.call_sequence = 0x20
}
pub func decoder.decode_frame_config?(dst: nptr base.frame_config, src: base.io_reader) {
if this.call_sequence < 3 {
if this.call_sequence == 0x20 {
// No-op.
} else if this.call_sequence < 0x20 {
this.decode_image_config?(dst: nullptr, src: args.src)
} else if this.call_sequence == 3 {
} else if this.call_sequence == 0x28 {
if this.frame_config_io_position <> args.src.position() {
return base."#bad restart"
}
} else if this.call_sequence == 4 {
this.call_sequence = 0xFF
} else if this.call_sequence == 0x40 {
this.call_sequence = 0x60
return base."@end of data"
} else {
return base."@end of data"
@@ -421,16 +400,16 @@ pub func decoder.decode_frame_config?(dst: nptr base.frame_config, src: base.io_
background_color: 0xFF00_0000)
}
this.call_sequence = 4
this.call_sequence = 0x40
}
pub func decoder.decode_frame?(dst: ptr base.pixel_buffer, src: base.io_reader, blend: base.pixel_blend, workbuf: slice base.u8, opts: nptr base.decode_frame_options) {
var status : base.status
if this.call_sequence < 4 {
this.decode_frame_config?(dst: nullptr, src: args.src)
} else if this.call_sequence == 4 {
if this.call_sequence == 0x40 {
// No-op.
} else if this.call_sequence < 0x40 {
this.decode_frame_config?(dst: nullptr, src: args.src)
} else {
return base."@end of data"
}
@@ -480,7 +459,7 @@ pub func decoder.decode_frame?(dst: ptr base.pixel_buffer, src: base.io_reader,
this.pending_pad = 0
}
this.call_sequence = 0xFF
this.call_sequence = 0x60
}
pri func decoder.swizzle_none!(dst: ptr base.pixel_buffer, src: base.io_reader) base.status {
@@ -1116,27 +1095,27 @@ pub func decoder.num_animation_loops() base.u32 {
}
pub func decoder.num_decoded_frame_configs() base.u64 {
if this.call_sequence > 3 {
if this.call_sequence > 0x20 {
return 1
}
return 0
}
pub func decoder.num_decoded_frames() base.u64 {
if this.call_sequence > 4 {
if this.call_sequence > 0x40 {
return 1
}
return 0
}
pub func decoder.restart_frame!(index: base.u64, io_position: base.u64) base.status {
if this.call_sequence < 3 {
if this.call_sequence < 0x20 {
return base."#bad call sequence"
}
if args.index <> 0 {
return base."#bad argument"
}
this.call_sequence = 3
this.call_sequence = 0x28
this.frame_config_io_position = args.io_position
return ok
}
+54 -84
View File
@@ -16,50 +16,13 @@ pub struct decoder? implements base.image_decoder(
width : base.u32,
height : base.u32,
// Call sequence states:
// - 0x00: initial state.
// - 0x01: metadata reported; image config decode is in progress.
// - 0x02: metadata finished; image config decode is in progress.
// - 0x03: image config decoded, including the first frame's bounds, but
// not the first frame's pixels.
// - 0x04: frame config decoded.
// - 0x05: frame decoded.
// The call sequence state machine is discussed in
// (/doc/std/image-decoders-call-sequence.md).
//
// GIF is unusual (distinguishing state 0x03 / state 0x05) in that the
// first frame's bounds can affect the overall image bounds (as per
// A GIF's first frame's bounds affects the overall image bounds (per
// test/data/artificial/gif-frame-out-of-bounds.gif.make-artificial.txt).
// Decoding the first frame's bounds is part of DIC even though,
// conceptually, it should be part of the first DFC.
//
// State transitions:
//
// - 0x00 -> 0x01: via DIC (metadata reported)
// - 0x00 -> 0x03: via DIC (metadata not reported)
// - 0x00 -> 0x04: via DFC with implicit DIC
// - 0x00 -> 0x05: via DF with implicit DIC and DFC
//
// - 0x01 -> 0x02: via TMM
//
// - 0x02 -> 0x01: via DIC (metadata reported)
// - 0x02 -> 0x03: via DIC (metadata not reported)
//
// - 0x03 -> 0x04: via DFC
// - 0x03 -> 0x05: via DF with implicit DFC
//
// - 0x04 -> 0x04: via DFC with implicit DF
// - 0x04 -> 0x05: via DF
//
// - 0x05 -> 0x04: via DFC
// - 0x05 -> 0x05: via DF with implicit DFC
//
// - ???? -> 0x05: via RF for ???? > 0x00
//
// Where:
// - DF is decode_frame, implicit means skip_frame
// - DFC is decode_frame_config, implicit means nullptr args.dst
// - DIC is decode_image_config, implicit means nullptr args.dst
// - RF is restart_frame
// - TMM is tell_me_more
// Decoding the first frame's bounds is part of decode_image_config even
// though it's conceptually part of the first decode_frame_config.
call_sequence : base.u8,
ignore_metadata : base.bool,
@@ -71,9 +34,8 @@ pub struct decoder? implements base.image_decoder(
quirks : array[QUIRKS_COUNT] base.bool,
delayed_num_decoded_frames : base.bool,
end_of_data : base.bool,
restarted : base.bool,
previous_lzw_decode_ended_abruptly : base.bool,
seen_header : base.bool,
has_global_palette : base.bool,
@@ -128,7 +90,7 @@ pub struct decoder? implements base.image_decoder(
)
pub func decoder.set_quirk_enabled!(quirk: base.u32, enabled: base.bool) {
if (this.call_sequence == 0) and (args.quirk >= QUIRKS_BASE) {
if (this.call_sequence == 0x00) and (args.quirk >= QUIRKS_BASE) {
args.quirk -= QUIRKS_BASE
if args.quirk < QUIRKS_COUNT {
this.quirks[args.quirk] = args.enabled
@@ -139,17 +101,16 @@ pub func decoder.set_quirk_enabled!(quirk: base.u32, enabled: base.bool) {
pub func decoder.decode_image_config?(dst: nptr base.image_config, src: base.io_reader) {
var ffio : base.bool
if this.call_sequence == 0 {
if this.call_sequence <> 0x00 {
return base."#bad call sequence"
} else if not this.seen_header {
this.decode_header?(src: args.src)
this.decode_lsd?(src: args.src)
} else if this.call_sequence <> 2 {
return base."#bad call sequence"
this.seen_header = true
}
this.decode_up_to_id_part1?(src: args.src)
// TODO: if this.end_of_data, return an error and/or set dst to zero?
ffio = not this.gc_has_transparent_index
if not this.quirks[QUIRK_HONOR_BACKGROUND_COLOR - QUIRKS_BASE] {
ffio = ffio and
@@ -176,7 +137,7 @@ pub func decoder.decode_image_config?(dst: nptr base.image_config, src: base.io_
first_frame_is_opaque: ffio)
}
this.call_sequence = 3
this.call_sequence = 0x20
}
pub func decoder.set_report_metadata!(fourcc: base.u32, report: base.bool) {
@@ -190,7 +151,7 @@ pub func decoder.set_report_metadata!(fourcc: base.u32, report: base.bool) {
pub func decoder.tell_me_more?(dst: base.io_writer, minfo: nptr base.more_information, src: base.io_reader) {
var chunk_length : base.u64
if this.call_sequence <> 1 {
if (this.call_sequence & 0x10) == 0 {
return base."#bad call sequence"
}
if this.metadata_fourcc == 0 {
@@ -267,7 +228,7 @@ pub func decoder.tell_me_more?(dst: base.io_writer, minfo: nptr base.more_inform
y: this.metadata_io_position,
z: this.metadata_io_position)
}
this.call_sequence = 2
this.call_sequence &= 0xEF
this.metadata_fourcc = 0
this.metadata_io_position = 0
return ok
@@ -319,16 +280,17 @@ pub func decoder.workbuf_len() base.range_ii_u64 {
}
pub func decoder.restart_frame!(index: base.u64, io_position: base.u64) base.status {
if this.call_sequence < 3 {
if this.call_sequence < 0x20 {
return base."#bad call sequence"
} else if args.io_position == 0 {
return base."#bad argument"
}
this.delayed_num_decoded_frames = false
this.end_of_data = false
this.restarted = true
this.frame_config_io_position = args.io_position
this.num_decoded_frame_configs_value = args.index
this.num_decoded_frames_value = args.index
this.reset_gc!()
this.call_sequence = 0x28
return ok
}
@@ -340,21 +302,30 @@ pub func decoder.decode_frame_config?(dst: nptr base.frame_config, src: base.io_
this.dirty_max_excl_y = 0
if not this.end_of_data {
if this.call_sequence == 0 {
this.decode_image_config?(dst: nullptr, src: args.src)
} else if this.call_sequence <> 3 {
if this.call_sequence == 4 {
this.skip_frame?(src: args.src)
}
this.decode_up_to_id_part1?(src: args.src)
if (this.call_sequence & 0x10) <> 0 {
return base."#bad call sequence"
} else if this.call_sequence == 0x20 {
// No-op.
} else if this.call_sequence < 0x20 {
this.decode_image_config?(dst: nullptr, src: args.src)
} else if this.call_sequence == 0x28 {
if this.frame_config_io_position <> args.src.position() {
return base."#bad restart"
}
} else if this.call_sequence == 0x40 {
this.skip_frame?(src: args.src)
if this.call_sequence >= 0x60 {
return base."@end of data"
}
} else {
return base."@end of data"
}
// This is a new "if", not an "else", because the calls above can modify
// this.end_of_data.
if this.end_of_data {
return base."@end of data"
if (this.num_decoded_frame_configs_value > 0) or (this.call_sequence == 0x28) {
this.decode_up_to_id_part1?(src: args.src)
if this.call_sequence >= 0x60 {
return base."@end of data"
}
}
background_color = this.black_color_u32_argb_premul
@@ -396,7 +367,7 @@ pub func decoder.decode_frame_config?(dst: nptr base.frame_config, src: base.io_
}
this.num_decoded_frame_configs_value ~sat+= 1
this.call_sequence = 4
this.call_sequence = 0x40
}
pri func decoder.skip_frame?(src: base.io_reader) {
@@ -424,13 +395,18 @@ pri func decoder.skip_frame?(src: base.io_reader) {
this.num_decoded_frames_value ~sat+= 1
}
this.reset_gc!()
this.call_sequence = 0x20
}
// TODO: honor args.opts.
pub func decoder.decode_frame?(dst: ptr base.pixel_buffer, src: base.io_reader, blend: base.pixel_blend, workbuf: slice base.u8, opts: nptr base.decode_frame_options) {
this.ignore_metadata = true
if this.call_sequence <> 4 {
if this.call_sequence == 0x40 {
// No-op.
} else if this.call_sequence < 0x40 {
this.decode_frame_config?(dst: nullptr, src: args.src)
} else {
return base."@end of data"
}
if this.quirks[QUIRK_REJECT_EMPTY_FRAME - QUIRKS_BASE] and
((this.frame_rect_x0 == this.frame_rect_x1) or (this.frame_rect_y0 == this.frame_rect_y1)) {
@@ -441,10 +417,10 @@ pub func decoder.decode_frame?(dst: ptr base.pixel_buffer, src: base.io_reader,
this.num_decoded_frames_value ~sat+= 1
this.reset_gc!()
this.call_sequence = 0x20
}
pri func decoder.reset_gc!() {
this.call_sequence = 5
// The Image Descriptor is mandatory, but the Graphic Control extension is
// optional. Reset the GC related fields for the next decode_frame call.
this.gc_has_transparent_index = false
@@ -456,14 +432,8 @@ pri func decoder.reset_gc!() {
pri func decoder.decode_up_to_id_part1?(src: base.io_reader) {
var block_type : base.u8
if not this.restarted {
if this.call_sequence <> 2 {
this.frame_config_io_position = args.src.position()
}
} else if this.frame_config_io_position <> args.src.position() {
return base."#bad restart"
} else {
this.restarted = false
if (this.frame_config_io_position == 0) or (this.num_decoded_frame_configs_value > 0) {
this.frame_config_io_position = args.src.position()
}
while true {
@@ -494,7 +464,7 @@ pri func decoder.decode_up_to_id_part1?(src: base.io_reader) {
this.delayed_num_decoded_frames = false
this.num_decoded_frames_value ~sat+= 1
}
this.end_of_data = true
this.call_sequence = 0x60
break
}
} endwhile
@@ -698,13 +668,13 @@ pri func decoder.decode_ae?(src: base.io_reader) {
} else if is_iccp and this.report_metadata_iccp {
this.metadata_fourcc = 'ICCP'be
this.metadata_io_position = args.src.position()
this.call_sequence = 1
this.call_sequence = 0x10
return base."@metadata reported"
} else if is_xmp and this.report_metadata_xmp {
this.metadata_fourcc = 'XMP 'be
this.metadata_io_position = args.src.position()
this.call_sequence = 1
this.call_sequence = 0x10
return base."@metadata reported"
}
@@ -759,7 +729,7 @@ pri func decoder.decode_gc?(src: base.io_reader) {
//
// See the spec section 20 "Image Descriptor" on page 11.
//
// The code is split into three parts (part0, part 1 and part12 because
// The code is split into three parts (part0, part 1 and part2 because
// determining the overall image's width and height also requires decoding the
// first frame's bounds (part0), but doesn't require decoding the first frame's
// pixels (the other two parts). Decoding the actual pixels is split into two
@@ -782,7 +752,7 @@ pri func decoder.decode_id_part0?(src: base.io_reader) {
// and the bottom right extent of the first frame. See
// test/data/artificial/gif-frame-out-of-bounds.gif.make-artificial.txt for
// more discussion.
if (this.call_sequence == 0) and (not this.quirks[QUIRK_IMAGE_BOUNDS_ARE_STRICT - QUIRKS_BASE]) {
if (this.num_decoded_frame_configs_value == 0) and (not this.quirks[QUIRK_IMAGE_BOUNDS_ARE_STRICT - QUIRKS_BASE]) {
this.width = this.width.max(a: this.frame_rect_x1)
this.height = this.height.max(a: this.frame_rect_y1)
}
+19 -40
View File
@@ -24,31 +24,8 @@ pub struct decoder? implements base.image_decoder(
width : base.u32[..= 0x7FFF_FFFF],
height : base.u32[..= 0x7FFF_FFFF],
// Call sequence states:
// - 0x00: initial state.
// - 0x03: image config decoded.
// - 0x04: frame config decoded.
// - 0xFF: end-of-data, usually after (the non-animated) frame decoded.
//
// State transitions:
//
// - 0x00 -> 0x03: via DIC
// - 0x00 -> 0x04: via DFC with implicit DIC
// - 0x00 -> 0xFF: via DF with implicit DIC and DFC
//
// - 0x03 -> 0x04: via DFC
// - 0x03 -> 0xFF: via DF with implicit DFC
//
// - 0x04 -> 0xFF: via DFC
// - 0x04 -> 0xFF: via DF
//
// - ???? -> 0x03: via RF for ???? > 0x00
//
// Where:
// - DF is decode_frame
// - DFC is decode_frame_config, implicit means nullptr args.dst
// - DIC is decode_image_config, implicit means nullptr args.dst
// - RF is restart_frame
// The call sequence state machine is discussed in
// (/doc/std/image-decoders-call-sequence.md).
call_sequence : base.u8,
dst_x : base.u32,
@@ -64,7 +41,7 @@ pub func decoder.set_quirk_enabled!(quirk: base.u32, enabled: base.bool) {
pub func decoder.decode_image_config?(dst: nptr base.image_config, src: base.io_reader) {
var a : base.u32
if this.call_sequence <> 0 {
if this.call_sequence <> 0x00 {
return base."#bad call sequence"
}
@@ -108,18 +85,20 @@ pub func decoder.decode_image_config?(dst: nptr base.image_config, src: base.io_
first_frame_is_opaque: false)
}
this.call_sequence = 3
this.call_sequence = 0x20
}
pub func decoder.decode_frame_config?(dst: nptr base.frame_config, src: base.io_reader) {
if this.call_sequence < 3 {
if this.call_sequence == 0x20 {
// No-op.
} else if this.call_sequence < 0x20 {
this.decode_image_config?(dst: nullptr, src: args.src)
} else if this.call_sequence == 3 {
} else if this.call_sequence == 0x28 {
if 16 <> args.src.position() {
return base."#bad restart"
}
} else if this.call_sequence == 4 {
this.call_sequence = 0xFF
} else if this.call_sequence == 0x40 {
this.call_sequence = 0x60
return base."@end of data"
} else {
return base."@end of data"
@@ -140,16 +119,16 @@ pub func decoder.decode_frame_config?(dst: nptr base.frame_config, src: base.io_
background_color: 0x0000_0000)
}
this.call_sequence = 4
this.call_sequence = 0x40
}
pub func decoder.decode_frame?(dst: ptr base.pixel_buffer, src: base.io_reader, blend: base.pixel_blend, workbuf: slice base.u8, opts: nptr base.decode_frame_options) {
var status : base.status
if this.call_sequence < 4 {
this.decode_frame_config?(dst: nullptr, src: args.src)
} else if this.call_sequence == 4 {
if this.call_sequence == 0x40 {
// No-op.
} else if this.call_sequence < 0x40 {
this.decode_frame_config?(dst: nullptr, src: args.src)
} else {
return base."@end of data"
}
@@ -177,7 +156,7 @@ pub func decoder.decode_frame?(dst: ptr base.pixel_buffer, src: base.io_reader,
yield? base."$short read"
} endwhile
this.call_sequence = 0xFF
this.call_sequence = 0x60
}
pri func decoder.swizzle!(dst: ptr base.pixel_buffer, src: base.io_reader) base.status {
@@ -246,27 +225,27 @@ pub func decoder.num_animation_loops() base.u32 {
}
pub func decoder.num_decoded_frame_configs() base.u64 {
if this.call_sequence > 3 {
if this.call_sequence > 0x20 {
return 1
}
return 0
}
pub func decoder.num_decoded_frames() base.u64 {
if this.call_sequence > 4 {
if this.call_sequence > 0x40 {
return 1
}
return 0
}
pub func decoder.restart_frame!(index: base.u64, io_position: base.u64) base.status {
if this.call_sequence < 3 {
if this.call_sequence < 0x20 {
return base."#bad call sequence"
}
if (args.index <> 0) or (args.io_position <> 16) {
return base."#bad argument"
}
this.call_sequence = 3
this.call_sequence = 0x28
return ok
}
+35 -70
View File
@@ -33,49 +33,8 @@ pub struct decoder? implements base.image_decoder(
overall_workbuf_length : base.u64[..= 0x0007_FFFF_F100_0007],
pass_workbuf_length : base.u64[..= 0x0007_FFFF_F100_0007],
// Call sequence states:
// - 0x00: initial state.
// - 0x01: metadata reported; image config decode is in progress.
// - 0x02: metadata finished; image config decode is in progress.
// - 0x03: image config decoded.
// - 0x04: frame config decoded.
// - 0x05: frame decoded.
// - 0xFF: end-of-data, after the final frame decoded.
//
// State transitions:
//
// - 0x00 -> 0x01: via DIC (metadata reported)
// - 0x00 -> 0x03: via DIC (metadata not reported)
// - 0x00 -> 0x04: via DFC with implicit DIC
// - 0x00 -> 0x05: via DF with implicit DIC and DFC
// - 0x00 -> 0xFF: via DF with implicit DIC and DFC
//
// - 0x01 -> 0x02: via TMM
//
// - 0x02 -> 0x01: via DIC (metadata reported)
// - 0x02 -> 0x03: via DIC (metadata not reported)
//
// - 0x03 -> 0x04: via DFC
// - 0x03 -> 0x05: via DF with implicit DFC
// - 0x03 -> 0xFF: via DF with implicit DFC
//
// - 0x04 -> 0x04: via DFC with implicit DF
// - 0x04 -> 0x05: via DF
// - 0x04 -> 0xFF: via DFC with implicit DF
// - 0x04 -> 0xFF: via DF
//
// - 0x05 -> 0x04: via DFC
// - 0x05 -> 0x05: via DF with implicit DFC
// - 0x05 -> 0xFF: via DF with implicit DFC
//
// - ???? -> 0x03: via RF for ???? > 0x00
//
// Where:
// - DF is decode_frame, implicit means skip_frame
// - DFC is decode_frame_config, implicit means nullptr args.dst
// - DIC is decode_image_config, implicit means nullptr args.dst
// - RF is restart_frame
// - TMM is tell_me_more
// The call sequence state machine is discussed in
// (/doc/std/image-decoders-call-sequence.md).
call_sequence : base.u8,
report_metadata_chrm : base.bool,
@@ -99,6 +58,7 @@ pub struct decoder? implements base.image_decoder(
seen_gama : base.bool,
seen_iccp : base.bool,
seen_idat : base.bool,
seen_ihdr : base.bool,
seen_plte : base.bool,
seen_srgb : base.bool,
seen_trns : base.bool,
@@ -209,14 +169,9 @@ pub func decoder.decode_image_config?(dst: nptr base.image_config, src: base.io_
var checksum_want : base.u32
var status : base.status
if this.call_sequence == 2 {
if this.metadata_fourcc <> 0 {
this.call_sequence = 1
return base."@metadata reported"
}
} else if this.call_sequence <> 0 {
if this.call_sequence <> 0x00 {
return base."#bad call sequence"
} else {
} else if not this.seen_ihdr {
magic = args.src.read_u64le?()
if magic <> '\x89PNG\x0D\x0A\x1A\x0A'le {
return "#bad header"
@@ -255,6 +210,10 @@ pub func decoder.decode_image_config?(dst: nptr base.image_config, src: base.io_
if (not this.ignore_checksum) and (checksum_have <> checksum_want) {
return "#bad checksum"
}
this.seen_ihdr = true
} else if this.metadata_fourcc <> 0 {
this.call_sequence = 0x10
return base."@metadata reported"
}
// Read up until an IDAT or fdAT chunk.
@@ -318,7 +277,7 @@ pub func decoder.decode_image_config?(dst: nptr base.image_config, src: base.io_
// If we have metadata, delay reading (skipping) the ancillary chunk's
// CRC-32 checksum until the end of tell_me_more.
if this.metadata_fourcc <> 0 {
this.call_sequence = 1
this.call_sequence = 0x10
return base."@metadata reported"
}
@@ -359,7 +318,7 @@ pub func decoder.decode_image_config?(dst: nptr base.image_config, src: base.io_
this.first_overwrite_instead_of_blend = false
}
this.call_sequence = 3
this.call_sequence = 0x20
}
pri func decoder.decode_ihdr?(src: base.io_reader) {
@@ -969,19 +928,23 @@ pri func decoder.decode_trns?(src: base.io_reader) {
}
pub func decoder.decode_frame_config?(dst: nptr base.frame_config, src: base.io_reader) {
if this.call_sequence == 0xFF {
return base."@end of data"
} else if this.call_sequence < 3 {
if (this.call_sequence & 0x10) <> 0 {
return base."#bad call sequence"
} else if this.call_sequence == 0x20 {
// No-op.
} else if this.call_sequence < 0x20 {
this.decode_image_config?(dst: nullptr, src: args.src)
} else if this.call_sequence == 3 {
} else if this.call_sequence == 0x28 {
if this.frame_config_io_position <> args.src.position() {
return base."#bad restart"
}
} else if this.call_sequence == 4 {
} else if this.call_sequence == 0x40 {
this.skip_frame?(src: args.src)
if this.call_sequence == 0xFF {
if this.call_sequence >= 0x60 {
return base."@end of data"
}
} else {
return base."@end of data"
}
if this.num_decoded_frame_configs_value == 0 {
@@ -1028,7 +991,7 @@ pub func decoder.decode_frame_config?(dst: nptr base.frame_config, src: base.io_
}
this.num_decoded_frame_configs_value ~sat+= 1
this.call_sequence = 4
this.call_sequence = 0x40
}
pri func decoder.skip_frame?(src: base.io_reader) {
@@ -1099,9 +1062,9 @@ pri func decoder.skip_frame?(src: base.io_reader) {
this.num_decoded_frames_value ~sat+= 1
if this.num_decoded_frames_value < this.num_animation_frames_value {
this.call_sequence = 5
this.call_sequence = 0x20
} else {
this.call_sequence = 0xFF
this.call_sequence = 0x60
}
}
@@ -1111,9 +1074,11 @@ pub func decoder.decode_frame?(dst: ptr base.pixel_buffer, src: base.io_reader,
var pass_width : base.u32[..= 0x00FF_FFFF]
var pass_height : base.u32[..= 0x00FF_FFFF]
if this.call_sequence == 0xFF {
if (this.call_sequence & 0x10) <> 0 {
return base."#bad call sequence"
} else if this.call_sequence >= 0x60 {
return base."@end of data"
} else if this.call_sequence <> 4 {
} else if this.call_sequence <> 0x40 {
this.decode_frame_config?(dst: nullptr, src: args.src)
}
@@ -1243,9 +1208,9 @@ pub func decoder.decode_frame?(dst: ptr base.pixel_buffer, src: base.io_reader,
this.num_decoded_frames_value ~sat+= 1
if this.num_decoded_frames_value < this.num_animation_frames_value {
this.call_sequence = 5
this.call_sequence = 0x20
} else {
this.call_sequence = 0xFF
this.call_sequence = 0x60
}
}
@@ -1374,13 +1339,13 @@ pub func decoder.num_decoded_frames() base.u64 {
}
pub func decoder.restart_frame!(index: base.u64, io_position: base.u64) base.status {
if this.call_sequence < 3 {
if this.call_sequence < 0x20 {
return base."#bad call sequence"
} else if (args.index >= (this.num_animation_frames_value as base.u64)) or
((args.index == 0) and (args.io_position <> this.first_config_io_position)) {
return base."#bad argument"
}
this.call_sequence = 3
this.call_sequence = 0x28
if this.interlace_pass >= 1 {
this.interlace_pass = 1
}
@@ -1415,7 +1380,7 @@ pub func decoder.tell_me_more?(dst: base.io_writer, minfo: nptr base.more_inform
var r_mark : base.u64
var zlib_status : base.status
if this.call_sequence <> 1 {
if (this.call_sequence & 0x10) == 0 {
return base."#bad call sequence"
}
if this.metadata_fourcc == 0 {
@@ -1677,7 +1642,7 @@ pub func decoder.tell_me_more?(dst: base.io_writer, minfo: nptr base.more_inform
this.metadata_is_zlib_compressed = true
}
this.call_sequence = 2
this.call_sequence &= 0xEF
return ok
}
break.goto_done
@@ -1696,7 +1661,7 @@ pub func decoder.tell_me_more?(dst: base.io_writer, minfo: nptr base.more_inform
this.metadata_y = 0
this.metadata_z = 0
this.call_sequence = 2
this.call_sequence &= 0xEF
return ok
}
+19 -40
View File
@@ -22,31 +22,8 @@ pub struct decoder? implements base.image_decoder(
width : base.u32[..= 0xFFFF],
height : base.u32[..= 0xFFFF],
// Call sequence states:
// - 0x00: initial state.
// - 0x03: image config decoded.
// - 0x04: frame config decoded.
// - 0xFF: end-of-data, usually after (the non-animated) frame decoded.
//
// State transitions:
//
// - 0x00 -> 0x03: via DIC
// - 0x00 -> 0x04: via DFC with implicit DIC
// - 0x00 -> 0xFF: via DF with implicit DIC and DFC
//
// - 0x03 -> 0x04: via DFC
// - 0x03 -> 0xFF: via DF with implicit DFC
//
// - 0x04 -> 0xFF: via DFC
// - 0x04 -> 0xFF: via DF
//
// - ???? -> 0x03: via RF for ???? > 0x00
//
// Where:
// - DF is decode_frame
// - DFC is decode_frame_config, implicit means nullptr args.dst
// - DIC is decode_image_config, implicit means nullptr args.dst
// - RF is restart_frame
// The call sequence state machine is discussed in
// (/doc/std/image-decoders-call-sequence.md).
call_sequence : base.u8,
header_id_length : base.u8,
@@ -82,7 +59,7 @@ pub func decoder.decode_image_config?(dst: nptr base.image_config, src: base.io_
var c5 : base.u32[..= 0x1F]
var i : base.u32
if this.call_sequence <> 0 {
if this.call_sequence <> 0x00 {
return base."#bad call sequence"
}
@@ -245,18 +222,20 @@ pub func decoder.decode_image_config?(dst: nptr base.image_config, src: base.io_
first_frame_is_opaque: this.opaque)
}
this.call_sequence = 3
this.call_sequence = 0x20
}
pub func decoder.decode_frame_config?(dst: nptr base.frame_config, src: base.io_reader) {
if this.call_sequence < 3 {
if this.call_sequence == 0x20 {
// No-op.
} else if this.call_sequence < 0x20 {
this.decode_image_config?(dst: nullptr, src: args.src)
} else if this.call_sequence == 3 {
} else if this.call_sequence == 0x28 {
if this.frame_config_io_position <> args.src.position() {
return base."#bad restart"
}
} else if this.call_sequence == 4 {
this.call_sequence = 0xFF
} else if this.call_sequence == 0x40 {
this.call_sequence = 0x60
return base."@end of data"
} else {
return base."@end of data"
@@ -277,7 +256,7 @@ pub func decoder.decode_frame_config?(dst: nptr base.frame_config, src: base.io_
background_color: 0xFF00_0000)
}
this.call_sequence = 4
this.call_sequence = 0x40
}
pub func decoder.decode_frame?(dst: ptr base.pixel_buffer, src: base.io_reader, blend: base.pixel_blend, workbuf: slice base.u8, opts: nptr base.decode_frame_options) {
@@ -302,10 +281,10 @@ pub func decoder.decode_frame?(dst: ptr base.pixel_buffer, src: base.io_reader,
var c : base.u32
var c5 : base.u32[..= 0x1F]
if this.call_sequence < 4 {
this.decode_frame_config?(dst: nullptr, src: args.src)
} else if this.call_sequence == 4 {
if this.call_sequence == 0x40 {
// No-op.
} else if this.call_sequence < 0x40 {
this.decode_frame_config?(dst: nullptr, src: args.src)
} else {
return base."@end of data"
}
@@ -545,7 +524,7 @@ pub func decoder.decode_frame?(dst: ptr base.pixel_buffer, src: base.io_reader,
break.resume
} endwhile.resume
this.call_sequence = 0xFF
this.call_sequence = 0x60
}
pub func decoder.frame_dirty_rect() base.rect_ie_u32 {
@@ -561,27 +540,27 @@ pub func decoder.num_animation_loops() base.u32 {
}
pub func decoder.num_decoded_frame_configs() base.u64 {
if this.call_sequence > 3 {
if this.call_sequence > 0x20 {
return 1
}
return 0
}
pub func decoder.num_decoded_frames() base.u64 {
if this.call_sequence > 4 {
if this.call_sequence > 0x40 {
return 1
}
return 0
}
pub func decoder.restart_frame!(index: base.u64, io_position: base.u64) base.status {
if this.call_sequence < 3 {
if this.call_sequence < 0x20 {
return base."#bad call sequence"
}
if args.index <> 0 {
return base."#bad argument"
}
this.call_sequence = 3
this.call_sequence = 0x28
this.frame_config_io_position = args.io_position
return ok
}
+19 -40
View File
@@ -20,31 +20,8 @@ pub struct decoder? implements base.image_decoder(
width : base.u32,
height : base.u32,
// Call sequence states:
// - 0x00: initial state.
// - 0x03: image config decoded.
// - 0x04: frame config decoded.
// - 0xFF: end-of-data, usually after (the non-animated) frame decoded.
//
// State transitions:
//
// - 0x00 -> 0x03: via DIC
// - 0x00 -> 0x04: via DFC with implicit DIC
// - 0x00 -> 0xFF: via DF with implicit DIC and DFC
//
// - 0x03 -> 0x04: via DFC
// - 0x03 -> 0xFF: via DF with implicit DFC
//
// - 0x04 -> 0xFF: via DFC
// - 0x04 -> 0xFF: via DF
//
// - ???? -> 0x03: via RF for ???? > 0x00
//
// Where:
// - DF is decode_frame
// - DFC is decode_frame_config, implicit means nullptr args.dst
// - DIC is decode_image_config, implicit means nullptr args.dst
// - RF is restart_frame
// The call sequence state machine is discussed in
// (/doc/std/image-decoders-call-sequence.md).
call_sequence : base.u8,
frame_config_io_position : base.u64,
@@ -62,7 +39,7 @@ pub func decoder.decode_image_config?(dst: nptr base.image_config, src: base.io_
var x32 : base.u32
var x64 : base.u64
if this.call_sequence <> 0 {
if this.call_sequence <> 0x00 {
return base."#bad call sequence"
}
@@ -116,18 +93,20 @@ pub func decoder.decode_image_config?(dst: nptr base.image_config, src: base.io_
first_frame_is_opaque: true)
}
this.call_sequence = 3
this.call_sequence = 0x20
}
pub func decoder.decode_frame_config?(dst: nptr base.frame_config, src: base.io_reader) {
if this.call_sequence < 3 {
if this.call_sequence == 0x20 {
// No-op.
} else if this.call_sequence < 0x20 {
this.decode_image_config?(dst: nullptr, src: args.src)
} else if this.call_sequence == 3 {
} else if this.call_sequence == 0x28 {
if this.frame_config_io_position <> args.src.position() {
return base."#bad restart"
}
} else if this.call_sequence == 4 {
this.call_sequence = 0xFF
} else if this.call_sequence == 0x40 {
this.call_sequence = 0x60
return base."@end of data"
} else {
return base."@end of data"
@@ -148,7 +127,7 @@ pub func decoder.decode_frame_config?(dst: nptr base.frame_config, src: base.io_
background_color: 0xFF00_0000)
}
this.call_sequence = 4
this.call_sequence = 0x40
}
pub func decoder.decode_frame?(dst: ptr base.pixel_buffer, src: base.io_reader, blend: base.pixel_blend, workbuf: slice base.u8, opts: nptr base.decode_frame_options) {
@@ -164,10 +143,10 @@ pub func decoder.decode_frame?(dst: ptr base.pixel_buffer, src: base.io_reader,
var src : array[1] base.u8
var c : base.u8
if this.call_sequence < 4 {
this.decode_frame_config?(dst: nullptr, src: args.src)
} else if this.call_sequence == 4 {
if this.call_sequence == 0x40 {
// No-op.
} else if this.call_sequence < 0x40 {
this.decode_frame_config?(dst: nullptr, src: args.src)
} else {
return base."@end of data"
}
@@ -246,7 +225,7 @@ pub func decoder.decode_frame?(dst: ptr base.pixel_buffer, src: base.io_reader,
} endwhile
}
this.call_sequence = 0xFF
this.call_sequence = 0x60
}
pub func decoder.frame_dirty_rect() base.rect_ie_u32 {
@@ -262,27 +241,27 @@ pub func decoder.num_animation_loops() base.u32 {
}
pub func decoder.num_decoded_frame_configs() base.u64 {
if this.call_sequence > 3 {
if this.call_sequence > 0x20 {
return 1
}
return 0
}
pub func decoder.num_decoded_frames() base.u64 {
if this.call_sequence > 4 {
if this.call_sequence > 0x40 {
return 1
}
return 0
}
pub func decoder.restart_frame!(index: base.u64, io_position: base.u64) base.status {
if this.call_sequence < 3 {
if this.call_sequence < 0x20 {
return base."#bad call sequence"
}
if args.index <> 0 {
return base."#bad argument"
}
this.call_sequence = 3
this.call_sequence = 0x28
this.frame_config_io_position = args.io_position
return ok
}