@@ -442,7 +442,8 @@ namespace ojph {
442442 }
443443
444444 // check the progression order matches downsampling
445- if (SGCod.prog_order == 2 || SGCod.prog_order == 3 )
445+ if (SGCod.prog_order == OJPH_PO_RPCL ||
446+ SGCod.prog_order == OJPH_PO_PCRL)
446447 {
447448 ui32 num_comps = siz.get_num_components ();
448449 for (ui32 i = 0 ; i < num_comps; ++i)
@@ -606,33 +607,8 @@ namespace ojph {
606607 }
607608
608609 void set_delta (float delta) { base_delta = delta; }
610+ void check_validity (const param_siz& siz, const param_cod& cod);
609611
610- void check_validity (const param_siz& siz, const param_cod& cod)
611- {
612- ui32 num_decomps = cod.get_num_decompositions ();
613- num_subbands = 1 + 3 * num_decomps;
614- if (cod.get_wavelet_kern () == param_cod::DWT_REV53)
615- {
616- ui32 bit_depth = 0 ;
617- for (ui32 i = 0 ; i < siz.get_num_components (); ++i)
618- bit_depth = ojph_max (bit_depth, siz.get_bit_depth (i));
619- set_rev_quant (num_decomps, bit_depth,
620- cod.is_employing_color_transform ());
621- }
622- else if (cod.get_wavelet_kern () == param_cod::DWT_IRV97)
623- {
624- if (base_delta == -1 .0f ) {
625- ui32 bit_depth = 0 ;
626- for (ui32 i = 0 ; i < siz.get_num_components (); ++i)
627- bit_depth =
628- ojph_max (bit_depth, siz.get_bit_depth (i) + siz.is_signed (i));
629- base_delta = 1 .0f / (float )(1 << bit_depth);
630- }
631- set_irrev_quant (num_decomps);
632- }
633- else
634- assert (0 );
635- }
636612 ui32 get_num_guard_bits () const ;
637613 ui32 get_MAGBp () const ;
638614 ui32 get_Kmax (const param_dfs* dfs, ui32 num_decompositions,
0 commit comments