@@ -439,56 +439,6 @@ vips_foreign_load_jxl_print_format(JxlPixelFormat *format)
439
439
printf (" endianness = %d\n" , format -> endianness );
440
440
printf (" align = %zd\n" , format -> align );
441
441
}
442
-
443
- static const char *
444
- vips_foreign_load_jxl_blend_mode (JxlBlendMode blendmode )
445
- {
446
- switch (blendmode ) {
447
- case JXL_BLEND_REPLACE :
448
- return "JXL_BLEND_REPLACE" ;
449
-
450
- case JXL_BLEND_ADD :
451
- return "JXL_BLEND_ADD" ;
452
-
453
- case JXL_BLEND_BLEND :
454
- return "JXL_BLEND_BLEND" ;
455
-
456
- case JXL_BLEND_MULADD :
457
- return "JXL_BLEND_MULADD" ;
458
-
459
- case JXL_BLEND_MUL :
460
- return "JXL_BLEND_MUL" ;
461
-
462
- default :
463
- return "<unknown JxlBlendMode" ;
464
- }
465
- }
466
-
467
- static void
468
- vips_foreign_load_jxl_print_frame_header (JxlFrameHeader * h )
469
- {
470
- printf ("JxlFrameHeader:\n" );
471
- printf (" duration = %u\n" , h -> duration );
472
- printf (" timecode = %u\n" , h -> timecode );
473
- printf (" name_length = %u\n" , h -> name_length );
474
- printf (" is_last = %s\n" , h -> is_last ? "TRUE" : "FALSE" );
475
- printf (" layer_info.have_crop = %s\n" ,
476
- h -> layer_info .have_crop ? "TRUE" : "FALSE" );
477
- printf (" layer_info.crop_x0 = %d\n" , h -> layer_info .crop_x0 );
478
- printf (" layer_info.crop_y0 = %d\n" , h -> layer_info .crop_y0 );
479
- printf (" layer_info.xsize = %u\n" , h -> layer_info .xsize );
480
- printf (" layer_info.ysize = %u\n" , h -> layer_info .ysize );
481
- printf (" layer_info.blend_info.blendmode = %s\n" ,
482
- vips_foreign_load_jxl_blend_mode (h -> layer_info .blend_info .blendmode ));
483
- printf (" layer_info.blend_info.source = %u\n" ,
484
- h -> layer_info .blend_info .source );
485
- printf (" layer_info.blend_info.alpha = %u\n" ,
486
- h -> layer_info .blend_info .alpha );
487
- printf (" layer_info.blend_info.clamp = %s\n" ,
488
- h -> layer_info .blend_info .clamp ? "TRUE" : "FALSE" );
489
- printf (" layer_info.save_as_reference = %u\n" ,
490
- h -> layer_info .save_as_reference );
491
- }
492
442
#endif /*DEBUG*/
493
443
494
444
static JxlDecoderStatus
@@ -505,9 +455,9 @@ vips_foreign_load_jxl_process(VipsForeignLoadJxl *jxl)
505
455
size_t bytes_remaining ;
506
456
int bytes_read ;
507
457
508
- #ifdef DEBUG_VERBOSE
458
+ #ifdef DEBUG
509
459
printf ("vips_foreign_load_jxl_process: reading ...\n" );
510
- #endif /*DEBUG_VERBOSE */
460
+ #endif /*DEBUG */
511
461
512
462
bytes_remaining = JxlDecoderReleaseInput (jxl -> decoder );
513
463
bytes_read = vips_foreign_load_jxl_fill_input (jxl , bytes_remaining );
@@ -548,7 +498,6 @@ vips_foreign_load_jxl_read_frame(VipsForeignLoadJxl *jxl, VipsImage *frame,
548
498
#ifdef DEBUG_VERBOSE
549
499
printf ("vips_foreign_load_jxl_read_frame: skipping %d frames\n" , skip );
550
500
#endif /*DEBUG_VERBOSE*/
551
-
552
501
JxlDecoderSkipFrames (jxl -> decoder , skip );
553
502
jxl -> frame_no += skip ;
554
503
}
@@ -873,7 +822,8 @@ vips_foreign_load_jxl_header(VipsForeignLoad *load)
873
822
do {
874
823
switch ((status = vips_foreign_load_jxl_process (jxl ))) {
875
824
case JXL_DEC_ERROR :
876
- vips_foreign_load_jxl_error (jxl , "JxlDecoderProcessInput" );
825
+ vips_foreign_load_jxl_error (jxl ,
826
+ "JxlDecoderProcessInput" );
877
827
return -1 ;
878
828
879
829
case JXL_DEC_BOX :
@@ -957,7 +907,8 @@ vips_foreign_load_jxl_header(VipsForeignLoad *load)
957
907
& jxl -> format ,
958
908
#endif
959
909
JXL_COLOR_PROFILE_TARGET_DATA , & jxl -> icc_size )) {
960
- vips_foreign_load_jxl_error (jxl , "JxlDecoderGetICCProfileSize" );
910
+ vips_foreign_load_jxl_error (jxl ,
911
+ "JxlDecoderGetICCProfileSize" );
961
912
return -1 ;
962
913
}
963
914
@@ -986,10 +937,6 @@ vips_foreign_load_jxl_header(VipsForeignLoad *load)
986
937
return -1 ;
987
938
}
988
939
989
- #ifdef DEBUG
990
- vips_foreign_load_jxl_print_frame_header (& h );
991
- #endif /*DEBUG*/
992
-
993
940
if (jxl -> info .have_animation ) {
994
941
// tick duration in seconds
995
942
double tick = (double ) jxl -> info .animation .tps_denominator /
@@ -1063,7 +1010,8 @@ vips_foreign_load_jxl_load(VipsForeignLoad *load)
1063
1010
1064
1011
JxlDecoderRewind (jxl -> decoder );
1065
1012
if (JxlDecoderSubscribeEvents (jxl -> decoder ,
1066
- JXL_DEC_FRAME | JXL_DEC_FULL_IMAGE )) {
1013
+ JXL_DEC_FRAME |
1014
+ JXL_DEC_FULL_IMAGE )) {
1067
1015
vips_foreign_load_jxl_error (jxl ,
1068
1016
"JxlDecoderSubscribeEvents" );
1069
1017
return -1 ;
0 commit comments