require libjxl 0.7+

This commit is contained in:
John Cupitt 2022-08-14 17:32:40 +01:00
parent 332d3a9093
commit 0029b3c416
3 changed files with 3 additions and 22 deletions

View File

@ -7,6 +7,7 @@ master
- jp2ksave defaults to chroma subsample off, and jp2 write
- don't minimise sink_screen input after expose ... improves caching during
interactive use
- require libjxl 0.7+
24/7/22 started 8.13.1
- fix im7 feature detection in meson

View File

@ -229,11 +229,7 @@ vips_foreign_save_jxl_build( VipsObject *object )
VipsForeignSaveJxl *jxl = (VipsForeignSaveJxl *) object;
VipsImage **t = (VipsImage **) vips_object_local_array( object, 5 );
#ifdef HAVE_LIBJXL_0_7
JxlEncoderFrameSettings *frame_settings;
#else
JxlEncoderOptions *frame_settings;
#endif
JxlEncoderStatus status;
VipsImage *in;
VipsBandFormat format;
@ -284,9 +280,7 @@ vips_foreign_save_jxl_build( VipsObject *object )
return( -1 );
in = t[0];
#ifdef HAVE_LIBJXL_JXLENCODERINITBASICINFO
JxlEncoderInitBasicInfo( &jxl->info );
#endif
switch( in->BandFmt ) {
case VIPS_FORMAT_UCHAR:
@ -419,7 +413,6 @@ vips_foreign_save_jxl_build( VipsObject *object )
if( vips_image_wio_input( in ) )
return( -1 );
#ifdef HAVE_LIBJXL_0_7
frame_settings = JxlEncoderFrameSettingsCreate( jxl->encoder, NULL );
JxlEncoderFrameSettingsSetOption( frame_settings,
JXL_ENC_FRAME_SETTING_DECODING_SPEED, jxl->tier );
@ -427,13 +420,6 @@ vips_foreign_save_jxl_build( VipsObject *object )
JxlEncoderFrameSettingsSetOption( frame_settings,
JXL_ENC_FRAME_SETTING_EFFORT, jxl->effort );
JxlEncoderSetFrameLossless( frame_settings, jxl->lossless );
#else
frame_settings = JxlEncoderOptionsCreate( jxl->encoder, NULL );
JxlEncoderOptionsSetDecodingSpeed( frame_settings, jxl->tier );
JxlEncoderOptionsSetDistance( frame_settings, jxl->distance );
JxlEncoderOptionsSetEffort( frame_settings, jxl->effort );
JxlEncoderOptionsSetLossless( frame_settings, jxl->lossless );
#endif
#ifdef DEBUG
vips_foreign_save_jxl_print_info( &jxl->info );

View File

@ -468,8 +468,8 @@ if libheif_dep.found()
endif
endif
libjxl_dep = dependency('libjxl', version: '>=0.5', required: get_option('jpeg-xl'))
libjxl_threads_dep = dependency('libjxl_threads', version: '>=0.5', required: get_option('jpeg-xl'))
libjxl_dep = dependency('libjxl', version: '>=0.7', required: get_option('jpeg-xl'))
libjxl_threads_dep = dependency('libjxl_threads', version: '>=0.7', required: get_option('jpeg-xl'))
libjxl_found = libjxl_dep.found() and libjxl_threads_dep.found()
libjxl_module = false
if libjxl_found
@ -481,12 +481,6 @@ if libjxl_found
libvips_deps += libjxl_threads_dep
endif
cfg_var.set('HAVE_LIBJXL', '1')
if cc.has_function('JxlEncoderInitBasicInfo', prefix: '#include <jxl/encode.h>', dependencies: libjxl_dep)
cfg_var.set('HAVE_LIBJXL_JXLENCODERINITBASICINFO', '1')
endif
if libjxl_dep.version().version_compare('>=0.7')
cfg_var.set('HAVE_LIBJXL_0_7', '1')
endif
endif
libpoppler_dep = dependency('poppler-glib', version: '>=0.16.0', required: get_option('poppler'))