make autosubsample more consistent

always disable subsample for Q>=90, and update docs too
This commit is contained in:
John Cupitt 2021-03-27 15:16:38 +00:00
parent a16c0c0d78
commit 595f5a1b71
4 changed files with 5 additions and 5 deletions

View File

@ -370,7 +370,7 @@ vips_foreign_save_heif_build( VipsObject *object )
chroma = heif->subsample_mode == VIPS_FOREIGN_SUBSAMPLE_OFF ||
( heif->subsample_mode == VIPS_FOREIGN_SUBSAMPLE_AUTO &&
heif->Q > 90 ) ? "444" : "420";
heif->Q >= 90 ) ? "444" : "420";
error = heif_encoder_set_parameter_string( heif->encoder,
"chroma", chroma );
if( error.code &&
@ -727,7 +727,7 @@ vips_foreign_save_heif_target_init( VipsForeignSaveHeifTarget *target )
* Use @speed to control the CPU effort spent improving compression.
* This is currently only applicable to AV1 encoders, defaults to 5.
*
* Chroma subsampling is normally automatically disabled for Q > 90. You can
* Chroma subsampling is normally automatically disabled for Q >= 90. You can
* force the subsampling mode with @subsample_mode.
*
* See also: vips_image_write_to_file(), vips_heifload().

View File

@ -1076,7 +1076,7 @@ vips_foreign_save_jp2k_target_init( VipsForeignSaveJp2kTarget *target )
*
* Use @tile_width and @tile_height to set the tile size. The default is 512.
*
* Chroma subsampling is normally automatically disabled for Q > 90. You can
* Chroma subsampling is normally automatically disabled for Q >= 90. You can
* force the subsampling mode with @subsample_mode.
*
* This operation always writes a pyramid.

View File

@ -557,7 +557,7 @@ vips_foreign_save_jpeg_mime_init( VipsForeignSaveJpegMime *mime )
* If @strip is set, no EXIF data, IPTC data, ICC profile or XMP metadata is
* written into the output file.
*
* Chroma subsampling is normally automatically disabled for Q > 90. You can
* Chroma subsampling is normally automatically disabled for Q >= 90. You can
* force the subsampling mode with @subsample_mode.
*
* If @trellis_quant is set and the version of libjpeg supports it

View File

@ -372,7 +372,7 @@ int vips_openslideload_source( VipsSource *source, VipsImage **out, ... )
/**
* VipsForeignSubsample:
* @VIPS_FOREIGN_SUBSAMPLE_AUTO: prevent subsampling when quality > 90
* @VIPS_FOREIGN_SUBSAMPLE_AUTO: prevent subsampling when quality >= 90
* @VIPS_FOREIGN_SUBSAMPLE_ON: always perform subsampling
* @VIPS_FOREIGN_SUBSAMPLE_OFF: never perform subsampling
*