@@ -98,7 +98,7 @@ namespace ojph {
9898 // allocate line_buf
9999 ui32 width = band_rect.siz .w + 1 ;
100100 const param_siz* szp = codestream->get_siz ();
101- ui32 precision = cdp->propose_implementation_precision (szp);
101+ ui32 precision = cdp->propose_precision (szp, comp_num );
102102 if (precision <= 32 )
103103 allocator->pre_alloc_data <si32>(width, 1 );
104104 else
@@ -141,7 +141,8 @@ namespace ojph {
141141 if (dfs != NULL )
142142 dfs = dfs->get_dfs (cdp->get_dfs_index ());
143143 }
144- param_qcd* qcd = codestream->access_qcd (parent->get_comp_num ());
144+ ui32 comp_num = parent->get_comp_num ();
145+ param_qcd* qcd = codestream->access_qcd (comp_num);
145146 ui32 num_decomps = cdp->get_num_decompositions ();
146147 this ->K_max = qcd->get_Kmax (dfs, num_decomps, this ->res_num , band_num);
147148 if (!reversible)
@@ -198,7 +199,7 @@ namespace ojph {
198199 // allocate line_buf
199200 ui32 width = band_rect.siz .w + 1 ;
200201 const param_siz* szp = codestream->get_siz ();
201- ui32 precision = cdp->propose_implementation_precision (szp);
202+ ui32 precision = cdp->propose_precision (szp, comp_num );
202203 if (precision <= 32 )
203204 lines->wrap (allocator->post_alloc_data <si32>(width, 1 ), width, 1 );
204205 else
0 commit comments