Skip to content

Commit

Permalink
update to new api interface for NLT
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldsmith committed Jan 20, 2025
1 parent 4d42984 commit 0e8e6bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/apps/ojph_compress/ojph_compress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1152,7 +1152,8 @@ int main(int argc, char * argv[]) {
codestream.request_tlm_marker(tlm_marker);

ojph::param_nlt nlt = codestream.access_nlt();
nlt.set_type3_transformation(65535, true);
nlt.set_nonlinear_transform(ojph::param_nlt::ALL_COMPS,
ojph::param_nlt::OJPH_NLT_BINARY_COMPLEMENT_NLT);

if (dims.w != 0 || dims.h != 0)
OJPH_WARN(0x01000071,
Expand Down
3 changes: 2 additions & 1 deletion src/apps/ojph_expand/ojph_expand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,8 @@ int main(int argc, char *argv[]) {
{
bool nlt_is_signed;
ojph::ui8 nlt_bit_depth;
has_nlt[c] = nlt.get_type3_transformation(c, nlt_bit_depth, nlt_is_signed);
ojph::ui8 nl_type;
bool result = nlt.get_nonlinear_transform(c, nlt_bit_depth, nlt_is_signed, nl_type);

fprintf(stderr, "comp = %d has_nlt = %s ",
c, has_nlt[c] ? "true" : "false");
Expand Down

0 comments on commit 0e8e6bf

Please sign in to comment.