jxl: remove support for never-implemented JXL_TYPE_UINT32 (#2813)

This commit is contained in:
Lovell Fuller 2022-05-21 09:49:31 +01:00 committed by John Cupitt
parent 36cc50500b
commit e522b4ff90
2 changed files with 3 additions and 23 deletions

View File

@ -349,10 +349,6 @@ vips_foreign_load_jxl_print_format( JxlPixelFormat *format )
printf( "JXL_TYPE_UINT16" ); printf( "JXL_TYPE_UINT16" );
break; break;
case JXL_TYPE_UINT32:
printf( "JXL_TYPE_UINT32" );
break;
case JXL_TYPE_FLOAT: case JXL_TYPE_FLOAT:
printf( "JXL_TYPE_FLOAT" ); printf( "JXL_TYPE_FLOAT" );
break; break;
@ -421,10 +417,6 @@ vips_foreign_load_jxl_set_header( VipsForeignLoadJxl *jxl, VipsImage *out )
format = VIPS_FORMAT_USHORT; format = VIPS_FORMAT_USHORT;
break; break;
case JXL_TYPE_UINT32:
format = VIPS_FORMAT_UINT;
break;
case JXL_TYPE_FLOAT: case JXL_TYPE_FLOAT:
format = VIPS_FORMAT_FLOAT; format = VIPS_FORMAT_FLOAT;
break; break;
@ -550,8 +542,6 @@ vips_foreign_load_jxl_header( VipsForeignLoad *load )
if( jxl->info.exponent_bits_per_sample > 0 || if( jxl->info.exponent_bits_per_sample > 0 ||
jxl->info.alpha_exponent_bits > 0 ) jxl->info.alpha_exponent_bits > 0 )
jxl->format.data_type = JXL_TYPE_FLOAT; jxl->format.data_type = JXL_TYPE_FLOAT;
else if( jxl->info.bits_per_sample > 16 )
jxl->format.data_type = JXL_TYPE_UINT32;
else if( jxl->info.bits_per_sample > 8 ) else if( jxl->info.bits_per_sample > 8 )
jxl->format.data_type = JXL_TYPE_UINT16; jxl->format.data_type = JXL_TYPE_UINT16;
else else

View File

@ -178,10 +178,6 @@ vips_foreign_save_jxl_print_format( JxlPixelFormat *format )
printf( "JXL_TYPE_UINT16" ); printf( "JXL_TYPE_UINT16" );
break; break;
case JXL_TYPE_UINT32:
printf( "JXL_TYPE_UINT32" );
break;
case JXL_TYPE_FLOAT: case JXL_TYPE_FLOAT:
printf( "JXL_TYPE_FLOAT" ); printf( "JXL_TYPE_FLOAT" );
break; break;
@ -278,12 +274,6 @@ vips_foreign_save_jxl_build( VipsObject *object )
jxl->format.data_type = JXL_TYPE_UINT16; jxl->format.data_type = JXL_TYPE_UINT16;
break; break;
case VIPS_FORMAT_UINT:
jxl->info.bits_per_sample = 32;
jxl->info.exponent_bits_per_sample = 0;
jxl->format.data_type = JXL_TYPE_UINT32;
break;
case VIPS_FORMAT_FLOAT: case VIPS_FORMAT_FLOAT:
jxl->info.bits_per_sample = 32; jxl->info.bits_per_sample = 32;
jxl->info.exponent_bits_per_sample = 8; jxl->info.exponent_bits_per_sample = 8;
@ -441,9 +431,9 @@ vips_foreign_save_jxl_build( VipsObject *object )
/* Type promotion for save ... unsigned ints + float + double. /* Type promotion for save ... unsigned ints + float + double.
*/ */
static int bandfmt_jpeg[10] = { static int bandfmt_jxl[10] = {
/* UC C US S UI I F X D DX */ /* UC C US S UI I F X D DX */
UC, UC, US, US, UI, UI, F, F, F, F UC, UC, US, US, F, F, F, F, F, F
}; };
static void static void
@ -465,7 +455,7 @@ vips_foreign_save_jxl_class_init( VipsForeignSaveJxlClass *class )
foreign_class->suffs = vips__jxl_suffs; foreign_class->suffs = vips__jxl_suffs;
save_class->saveable = VIPS_SAVEABLE_ANY; save_class->saveable = VIPS_SAVEABLE_ANY;
save_class->format_table = bandfmt_jpeg; save_class->format_table = bandfmt_jxl;
VIPS_ARG_INT( class, "tier", 10, VIPS_ARG_INT( class, "tier", 10,
_( "Tier" ), _( "Tier" ),