require libjxl 0.7+
This commit is contained in:
parent
332d3a9093
commit
0029b3c416
@ -7,6 +7,7 @@ master
|
|||||||
- jp2ksave defaults to chroma subsample off, and jp2 write
|
- jp2ksave defaults to chroma subsample off, and jp2 write
|
||||||
- don't minimise sink_screen input after expose ... improves caching during
|
- don't minimise sink_screen input after expose ... improves caching during
|
||||||
interactive use
|
interactive use
|
||||||
|
- require libjxl 0.7+
|
||||||
|
|
||||||
24/7/22 started 8.13.1
|
24/7/22 started 8.13.1
|
||||||
- fix im7 feature detection in meson
|
- fix im7 feature detection in meson
|
||||||
|
@ -229,11 +229,7 @@ vips_foreign_save_jxl_build( VipsObject *object )
|
|||||||
VipsForeignSaveJxl *jxl = (VipsForeignSaveJxl *) object;
|
VipsForeignSaveJxl *jxl = (VipsForeignSaveJxl *) object;
|
||||||
VipsImage **t = (VipsImage **) vips_object_local_array( object, 5 );
|
VipsImage **t = (VipsImage **) vips_object_local_array( object, 5 );
|
||||||
|
|
||||||
#ifdef HAVE_LIBJXL_0_7
|
|
||||||
JxlEncoderFrameSettings *frame_settings;
|
JxlEncoderFrameSettings *frame_settings;
|
||||||
#else
|
|
||||||
JxlEncoderOptions *frame_settings;
|
|
||||||
#endif
|
|
||||||
JxlEncoderStatus status;
|
JxlEncoderStatus status;
|
||||||
VipsImage *in;
|
VipsImage *in;
|
||||||
VipsBandFormat format;
|
VipsBandFormat format;
|
||||||
@ -284,9 +280,7 @@ vips_foreign_save_jxl_build( VipsObject *object )
|
|||||||
return( -1 );
|
return( -1 );
|
||||||
in = t[0];
|
in = t[0];
|
||||||
|
|
||||||
#ifdef HAVE_LIBJXL_JXLENCODERINITBASICINFO
|
|
||||||
JxlEncoderInitBasicInfo( &jxl->info );
|
JxlEncoderInitBasicInfo( &jxl->info );
|
||||||
#endif
|
|
||||||
|
|
||||||
switch( in->BandFmt ) {
|
switch( in->BandFmt ) {
|
||||||
case VIPS_FORMAT_UCHAR:
|
case VIPS_FORMAT_UCHAR:
|
||||||
@ -419,7 +413,6 @@ vips_foreign_save_jxl_build( VipsObject *object )
|
|||||||
if( vips_image_wio_input( in ) )
|
if( vips_image_wio_input( in ) )
|
||||||
return( -1 );
|
return( -1 );
|
||||||
|
|
||||||
#ifdef HAVE_LIBJXL_0_7
|
|
||||||
frame_settings = JxlEncoderFrameSettingsCreate( jxl->encoder, NULL );
|
frame_settings = JxlEncoderFrameSettingsCreate( jxl->encoder, NULL );
|
||||||
JxlEncoderFrameSettingsSetOption( frame_settings,
|
JxlEncoderFrameSettingsSetOption( frame_settings,
|
||||||
JXL_ENC_FRAME_SETTING_DECODING_SPEED, jxl->tier );
|
JXL_ENC_FRAME_SETTING_DECODING_SPEED, jxl->tier );
|
||||||
@ -427,13 +420,6 @@ vips_foreign_save_jxl_build( VipsObject *object )
|
|||||||
JxlEncoderFrameSettingsSetOption( frame_settings,
|
JxlEncoderFrameSettingsSetOption( frame_settings,
|
||||||
JXL_ENC_FRAME_SETTING_EFFORT, jxl->effort );
|
JXL_ENC_FRAME_SETTING_EFFORT, jxl->effort );
|
||||||
JxlEncoderSetFrameLossless( frame_settings, jxl->lossless );
|
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
|
#ifdef DEBUG
|
||||||
vips_foreign_save_jxl_print_info( &jxl->info );
|
vips_foreign_save_jxl_print_info( &jxl->info );
|
||||||
|
10
meson.build
10
meson.build
@ -468,8 +468,8 @@ if libheif_dep.found()
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
libjxl_dep = dependency('libjxl', 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.5', 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_found = libjxl_dep.found() and libjxl_threads_dep.found()
|
||||||
libjxl_module = false
|
libjxl_module = false
|
||||||
if libjxl_found
|
if libjxl_found
|
||||||
@ -481,12 +481,6 @@ if libjxl_found
|
|||||||
libvips_deps += libjxl_threads_dep
|
libvips_deps += libjxl_threads_dep
|
||||||
endif
|
endif
|
||||||
cfg_var.set('HAVE_LIBJXL', '1')
|
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
|
endif
|
||||||
|
|
||||||
libpoppler_dep = dependency('poppler-glib', version: '>=0.16.0', required: get_option('poppler'))
|
libpoppler_dep = dependency('poppler-glib', version: '>=0.16.0', required: get_option('poppler'))
|
||||||
|
Loading…
Reference in New Issue
Block a user