Skip to content

Commit 2ee9f7a

Browse files
committed
Add NLT support
1 parent af25ab0 commit 2ee9f7a

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/lib/OpenEXRCore/internal_ht.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,7 @@ internal_exr_undo_ht (
7474

7575
for (uint32_t p = 0; p < width; p++)
7676
{
77-
ojph::si32 c = cur_line->i32[p];
78-
79-
*channel_pixels++ = (int16_t) (c < 0 ? -32769 - c : c);
77+
*channel_pixels++ = (int16_t) (cur_line->i32[p]);
8078
}
8179
}
8280

@@ -122,6 +120,9 @@ internal_exr_apply_ht (exr_encode_pipeline_t* encode)
122120
cod.set_block_dims (128, 32);
123121
cod.set_num_decomposition (5);
124122

123+
ojph::param_nlt nlt = cs.access_nlt();
124+
nlt.set_type3_transformation(65535, true);
125+
125126
ojph::mem_outfile output;
126127

127128
output.open ();
@@ -149,10 +150,7 @@ internal_exr_apply_ht (exr_encode_pipeline_t* encode)
149150

150151
for (uint32_t p = 0; p < width; p++)
151152
{
152-
ojph::si32 c =
153-
static_cast<const ojph::si32> (*channel_pixels++);
154-
155-
cur_line->i32[p] = c < 0 ? -32769 - c : c;
153+
cur_line->i32[p] = static_cast<const ojph::si32> (*channel_pixels++);
156154
}
157155

158156
cur_line = cs.exchange (cur_line, next_comp);

0 commit comments

Comments
 (0)