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 995744c commit b7f9ea7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/apps/ojph_compress/ojph_compress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -936,10 +936,12 @@ int main(int argc, char * argv[]) {

}
if (all_the_same)
nlt.set_type3_transformation(ojph::param_nlt::ALL_COMPS, true);
nlt.set_nonlinear_transform(ojph::param_nlt::ALL_COMPS,
ojph::param_nlt::OJPH_NLT_BINARY_COMPLEMENT_NLT);
else
for (ojph::ui32 c = 0; c < num_comps; ++c)
nlt.set_type3_transformation(c, true);
nlt.set_nonlinear_transform(c,
ojph::param_nlt::OJPH_NLT_BINARY_COMPLEMENT_NLT);
}

if (dims.w != 0 || dims.h != 0)
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 @@ -355,7 +355,8 @@ int main(int argc, char *argv[]) {
is_signeds[c] = siz.is_signed(c);
bool nlt_is_signed;
ojph::ui8 nlt_bit_depth;
has_nlt_type3[c] = nlt.get_type3_transformation(c, nlt_bit_depth, nlt_is_signed);
ojph::ui8 nl_type;
has_nlt_type3[c] = nlt.get_nonlinear_transform(c, nlt_bit_depth, nlt_is_signed, nl_type);

if (true == has_nlt_type3[c] && (nlt_bit_depth != siz.get_bit_depth(c) || nlt_is_signed != siz.is_signed(c)))
{
Expand Down

0 comments on commit b7f9ea7

Please sign in to comment.