@@ -136,7 +136,7 @@ pub fn apply_gain_map_rgb10(
136136 gain_map : GainMap ,
137137 weight : f32 ,
138138) -> Result < ( ) , ForgeError > {
139- apply_gain_map :: < u16 , 3 , 3 , 1024 , 8192 , 10 > (
139+ apply_gain_map :: < u16 , 3 , 3 , 65536 , 8192 , 10 > (
140140 image,
141141 dst_image,
142142 image_icc_profile,
@@ -174,7 +174,7 @@ pub fn apply_gain_map_rgba10(
174174 gain_map : GainMap ,
175175 weight : f32 ,
176176) -> Result < ( ) , ForgeError > {
177- apply_gain_map :: < u16 , 4 , 3 , 1024 , 8192 , 10 > (
177+ apply_gain_map :: < u16 , 4 , 3 , 65536 , 8192 , 10 > (
178178 image,
179179 dst_image,
180180 image_icc_profile,
@@ -212,7 +212,7 @@ pub fn apply_gain_map_rgb12(
212212 gain_map : GainMap ,
213213 weight : f32 ,
214214) -> Result < ( ) , ForgeError > {
215- apply_gain_map :: < u16 , 3 , 3 , 4096 , 16384 , 12 > (
215+ apply_gain_map :: < u16 , 3 , 3 , 65536 , 16384 , 12 > (
216216 image,
217217 dst_image,
218218 image_icc_profile,
@@ -250,7 +250,7 @@ pub fn apply_gain_map_rgba12(
250250 gain_map : GainMap ,
251251 weight : f32 ,
252252) -> Result < ( ) , ForgeError > {
253- apply_gain_map :: < u16 , 4 , 3 , 4096 , 16384 , 12 > (
253+ apply_gain_map :: < u16 , 4 , 3 , 65536 , 16384 , 12 > (
254254 image,
255255 dst_image,
256256 image_icc_profile,
@@ -412,13 +412,13 @@ where
412412 . ok_or ( ForgeError :: InvalidIcc ) ?;
413413
414414 let image_linearize_map_r = img_profile
415- . build_r_linearize_table :: < LIN_DEPTH > ( )
415+ . build_r_linearize_table :: < LIN_DEPTH , BIT_DEPTH > ( )
416416 . map_err ( |_| ForgeError :: InvalidIcc ) ?;
417417 let image_linearize_map_g = img_profile
418- . build_g_linearize_table :: < LIN_DEPTH > ( )
418+ . build_g_linearize_table :: < LIN_DEPTH , BIT_DEPTH > ( )
419419 . map_err ( |_| ForgeError :: InvalidIcc ) ?;
420420 let image_linearize_map_b = img_profile
421- . build_b_linearize_table :: < LIN_DEPTH > ( )
421+ . build_b_linearize_table :: < LIN_DEPTH , BIT_DEPTH > ( )
422422 . map_err ( |_| ForgeError :: InvalidIcc ) ?;
423423
424424 let gain_map_icc_profile = ( if gain_map. use_base_cg {
@@ -429,13 +429,13 @@ where
429429 . ok_or ( ForgeError :: InvalidGainMapConfiguration ) ?;
430430
431431 let gain_image_linearize_map_r = gain_map_icc_profile
432- . build_r_linearize_table :: < LIN_DEPTH > ( )
432+ . build_r_linearize_table :: < LIN_DEPTH , BIT_DEPTH > ( )
433433 . map_err ( |_| ForgeError :: InvalidIcc ) ?;
434434 let gain_image_linearize_map_g = gain_map_icc_profile
435- . build_g_linearize_table :: < LIN_DEPTH > ( )
435+ . build_g_linearize_table :: < LIN_DEPTH , BIT_DEPTH > ( )
436436 . map_err ( |_| ForgeError :: InvalidIcc ) ?;
437437 let gain_image_linearize_map_b = gain_map_icc_profile
438- . build_b_linearize_table :: < LIN_DEPTH > ( )
438+ . build_b_linearize_table :: < LIN_DEPTH , BIT_DEPTH > ( )
439439 . map_err ( |_| ForgeError :: InvalidIcc ) ?;
440440
441441 let mut linearized_image_content = vec ! [ 0f32 ; image. width * N ] ;
0 commit comments