Skip to content

Commit

Permalink
AVX2 is done. Bug fix for SPqcd.
Browse files Browse the repository at this point in the history
  • Loading branch information
aous72 committed Nov 7, 2024
1 parent e803914 commit b33083a
Show file tree
Hide file tree
Showing 3 changed files with 269 additions and 78 deletions.
7 changes: 5 additions & 2 deletions src/core/codestream/ojph_params_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -646,12 +646,15 @@ namespace ojph {
ui8 decode_SPqcd(ui8 v) const
{
if (old_SPqcd) return (ui8)(v >> reversible_SPqcd_shift); // old
else return (ui8)((v << 6) | (v >> 3)); // new
else {
v = v & 0b11111011;
return (ui8)((v << 5) | (v >> 3)); // new
}
}
ui8 encode_SPqcd(ui8 v) const
{
if (old_SPqcd) return (ui8)(v << reversible_SPqcd_shift); // old
else return (ui8)((v >> 6) | (v << 3)); // new
else return (ui8)((v >> 5) | (v << 3)); // new
}
protected:
ui16 Lqcd;
Expand Down
6 changes: 3 additions & 3 deletions src/core/transform/ojph_colour.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,9 @@ namespace ojph {
#ifndef OJPH_DISABLE_AVX2
if (get_cpu_ext_level() >= X86_CPU_EXT_LEVEL_AVX2)
{
//rev_convert = avx2_rev_convert;
//rev_convert_nlt_type3 = avx2_rev_convert_nlt_type3;
// rct_forward = avx2_rct_forward;
rev_convert = avx2_rev_convert;
rev_convert_nlt_type3 = avx2_rev_convert_nlt_type3;
rct_forward = avx2_rct_forward;
rct_backward = avx2_rct_backward;
}
#endif // !OJPH_DISABLE_AVX2
Expand Down
Loading

0 comments on commit b33083a

Please sign in to comment.