JxlEncoderFrameSettingId

Enum JxlEncoderFrameSettingId 

Source
#[repr(C)]
pub enum JxlEncoderFrameSettingId {
Show 41 variants Effort = 0, DecodingSpeed = 1, Resampling = 2, ExtraChannelResampling = 3, AlreadyDownsampled = 4, PhotonNoise = 5, Noise = 6, Dots = 7, Patches = 8, Epf = 9, Gaborish = 10, Modular = 11, KeepInvisible = 12, GroupOrder = 13, GroupOrderCenterX = 14, GroupOrderCenterY = 15, Responsive = 16, ProgressiveAc = 17, QprogressiveAc = 18, ProgressiveDc = 19, ChannelColorsGlobalPercent = 20, ChannelColorsGroupPercent = 21, PaletteColors = 22, LossyPalette = 23, ColorTransform = 24, ModularColorSpace = 25, ModularGroupSize = 26, ModularPredictor = 27, ModularMaTreeLearningPercent = 28, ModularNbPrevChannels = 29, JpegReconCfl = 30, IndexBox = 31, BrotliEffort = 32, JpegCompressBoxes = 33, Buffering = 34, JpegKeepExif = 35, JpegKeepXmp = 36, JpegKeepJumbf = 37, UseFullImageHeuristics = 38, DisablePerceptualHeuristics = 39, FillEnum = 65_535,
}
Expand description

Id of encoder options for a frame. This includes options such as setting encoding effort/speed or overriding the use of certain coding tools, for this frame. This does not include non-frame related encoder options such as for boxes.

Variants§

§

Effort = 0

Sets encoder effort/speed level without affecting decoding speed. Valid values are, from faster to slower speed: 1:lightning 2:thunder 3:falcon 4:cheetah 5:hare 6:wombat 7:squirrel 8:kitten 9:tortoise 10:glacier. Default: squirrel (7).

§

DecodingSpeed = 1

Sets the decoding speed tier for the provided options. Minimum is 0 (slowest to decode, best quality/density), and maximum is 4 (fastest to decode, at the cost of some quality/density). Default is 0.

§

Resampling = 2

Sets resampling option. If enabled, the image is downsampled before compression, and upsampled to original size in the decoder. Integer option, use -1 for the default behavior (resampling only applied for low quality), 1 for no downsampling (1x1), 2 for 2x2 downsampling, 4 for 4x4 downsampling, 8 for 8x8 downsampling.

§

ExtraChannelResampling = 3

Similar to Self::Resampling, but for extra channels. Integer option, use -1 for the default behavior (depends on encoder implementation), 1 for no downsampling (1x1), 2 for 2x2 downsampling, 4 for 4x4 downsampling, 8 for 8x8 downsampling.

§

AlreadyDownsampled = 4

Indicates the frame added with JxlEncoderAddImageFrame is already downsampled by the downsampling factor set with Self::Resampling. The input frame must then be given in the downsampled resolution, not the full image resolution. The downsampled resolution is given by ceil(xsize / resampling), ceil(ysize / resampling) with xsize and ysize the dimensions given in the basic info, and resampling the factor set with Self::Resampling. Use 0 to disable, 1 to enable. Default value is 0.

§

PhotonNoise = 5

Adds noise to the image emulating photographic film noise, the higher the given number, the grainier the image will be. As an example, a value of 100 gives low noise whereas a value of 3200 gives a lot of noise. The default value is 0.

§

Noise = 6

Enables adaptive noise generation. This setting is not recommended for use, please use Self::PhotonNoise instead. Use -1 for the default (encoder chooses), 0 to disable, 1 to enable.

§

Dots = 7

Enables or disables dots generation. Use -1 for the default (encoder chooses), 0 to disable, 1 to enable.

§

Patches = 8

Enables or disables patches generation. Use -1 for the default (encoder chooses), 0 to disable, 1 to enable.

§

Epf = 9

Edge preserving filter level, -1 to 3. Use -1 for the default (encoder chooses), 0 to 3 to set a strength.

§

Gaborish = 10

Enables or disables the gaborish filter. Use -1 for the default (encoder chooses), 0 to disable, 1 to enable.

§

Modular = 11

Enables modular encoding. Use -1 for default (encoder chooses), 0 to enforce VarDCT mode (e.g. for photographic images), 1 to enforce modular mode (e.g. for lossless images).

§

KeepInvisible = 12

Enables or disables preserving color of invisible pixels. Use -1 for the default (1 if lossless, 0 if lossy), 0 to disable, 1 to enable.

§

GroupOrder = 13

Determines the order in which 256x256 regions are stored in the codestream for progressive rendering. Use -1 for the encoder default, 0 for scanline order, 1 for center-first order.

§

GroupOrderCenterX = 14

Determines the horizontal position of center for the center-first group order. Use -1 to automatically use the middle of the image, 0..xsize to specifically set it.

§

GroupOrderCenterY = 15

Determines the center for the center-first group order. Use -1 to automatically use the middle of the image, 0..ysize to specifically set it.

§

Responsive = 16

Enables or disables progressive encoding for modular mode. Use -1 for the encoder default, 0 to disable, 1 to enable.

§

ProgressiveAc = 17

Set the progressive mode for the AC coefficients of VarDCT, using spectral progression from the DCT coefficients. Use -1 for the encoder default, 0 to disable, 1 to enable.

§

QprogressiveAc = 18

Set the progressive mode for the AC coefficients of VarDCT, using quantization of the least significant bits. Use -1 for the encoder default, 0 to disable, 1 to enable.

§

ProgressiveDc = 19

Set the progressive mode using lower-resolution DC images for VarDCT. Use -1 for the encoder default, 0 to disable, 1 to have an extra 64x64 lower resolution pass, 2 to have a 512x512 and 64x64 lower resolution pass.

§

ChannelColorsGlobalPercent = 20

Use Global channel palette if the amount of colors is smaller than this percentage of range. Use 0-100 to set an explicit percentage, -1 to use the encoder default. Used for modular encoding.

§

ChannelColorsGroupPercent = 21

Use Local (per-group) channel palette if the amount of colors is smaller than this percentage of range. Use 0-100 to set an explicit percentage, -1 to use the encoder default. Used for modular encoding.

§

PaletteColors = 22

Use color palette if amount of colors is smaller than or equal to this amount, or -1 to use the encoder default. Used for modular encoding.

§

LossyPalette = 23

Enables or disables delta palette. Use -1 for the default (encoder chooses), 0 to disable, 1 to enable. Used in modular mode.

§

ColorTransform = 24

Color transform for internal encoding: -1 = default, 0=XYB, 1=none (RGB), 2=YCbCr. The XYB setting performs the forward XYB transform. None and YCbCr both perform no transform, but YCbCr is used to indicate that the encoded data losslessly represents YCbCr values.

§

ModularColorSpace = 25

Reversible color transform for modular encoding: -1=default, 0-41=RCT index, e.g. index 0 = none, index 6 = YCoCg. If this option is set to a non-default value, the RCT will be globally applied to the whole frame. The default behavior is to try several RCTs locally per modular group, depending on the speed and distance setting.

§

ModularGroupSize = 26

Group size for modular encoding: -1=default, 0=128, 1=256, 2=512, 3=1024.

§

ModularPredictor = 27

Predictor for modular encoding. -1 = default, 0=zero, 1=left, 2=top, 3=avg0, 4=select, 5=gradient, 6=weighted, 7=topright, 8=topleft, 9=leftleft, 10=avg1, 11=avg2, 12=avg3, 13=toptop predictive average 14=mix 5 and 6, 15=mix everything.

§

ModularMaTreeLearningPercent = 28

Fraction of pixels used to learn MA trees as a percentage. -1 = default, 0 = no MA and fast decode, 50 = default value, 100 = all, values above 100 are also permitted. Higher values use more encoder memory.

§

ModularNbPrevChannels = 29

Number of extra (previous-channel) MA tree properties to use. -1 = default, 0-11 = valid values. Recommended values are in the range 0 to 3, or 0 to amount of channels minus 1 (including all extra channels, and excluding color channels when using VarDCT mode). Higher value gives slower encoding and slower decoding.

§

JpegReconCfl = 30

Enable or disable CFL (chroma-from-luma) for lossless JPEG recompression. -1 = default, 0 = disable CFL, 1 = enable CFL.

§

IndexBox = 31

Prepare the frame for indexing in the frame index box. 0 = ignore this frame (same as not setting a value), 1 = index this frame within the Frame Index Box. If any frames are indexed, the first frame needs to be indexed, too. If the first frame is not indexed, and a later frame is attempted to be indexed, JxlEncoderStatus::Error will occur. If non-keyframes, i.e., frames with cropping, blending or patches are attempted to be indexed, JxlEncoderStatus::Error will occur.

§

BrotliEffort = 32

Sets brotli encode effort for use in JPEG recompression and compressed metadata boxes (brob). Can be -1 (default) or 0 (fastest) to 11 (slowest). Default is based on the general encode effort in case of JPEG recompression, and 4 for brob boxes.

§

JpegCompressBoxes = 33

Enables or disables brotli compression of metadata boxes derived from a JPEG frame when using JxlEncoderAddJPEGFrame. This has no effect on boxes added using JxlEncoderAddBox. -1 = default, 0 = disable compression, 1 = enable compression.

§

Buffering = 34

Control what kind of buffering is used, when using chunked image frames. -1 = default (let the encoder decide) 0 = buffers everything, basically the same as non-streamed code path (mainly for testing) 1 = buffers everything for images that are smaller than 2048 x 2048, and uses streaming input and output for larger images 2 = uses streaming input and output for all images that are larger than one group, i.e. 256 x 256 pixels by default 3 = currently same as 2

When using streaming input and output the encoder minimizes memory usage at the cost of compression density. Also note that images produced with streaming mode might not be progressively decodeable.

§

JpegKeepExif = 35

Keep or discard Exif metadata boxes derived from a JPEG frame when using JxlEncoderAddJPEGFrame. This has no effect on boxes added using JxlEncoderAddBox. When JxlEncoderStoreJPEGMetadata is set to 1, this option cannot be set to 0. Even when Exif metadata is discarded, the orientation will still be applied. 0 = discard Exif metadata, 1 = keep Exif metadata (default).

§

JpegKeepXmp = 36

Keep or discard XMP metadata boxes derived from a JPEG frame when using JxlEncoderAddJPEGFrame. This has no effect on boxes added using JxlEncoderAddBox. When JxlEncoderStoreJPEGMetadata is set to 1, this option cannot be set to 0. 0 = discard XMP metadata, 1 = keep XMP metadata (default).

§

JpegKeepJumbf = 37

Keep or discard JUMBF metadata boxes derived from a JPEG frame when using JxlEncoderAddJPEGFrame. This has no effect on boxes added using JxlEncoderAddBox. 0 = discard JUMBF metadata, 1 = keep JUMBF metadata (default).

§

UseFullImageHeuristics = 38

If this mode is disabled, the encoder will not make any image quality decisions that are computed based on the full image, but stored only once (e.g. the X quant multiplier in the frame header). Used mainly for testing equivalence of streaming and non-streaming code. 0 = disabled, 1 = enabled (default)

§

DisablePerceptualHeuristics = 39

Disable perceptual optimizations. 0 = optimizations enabled (default), 1 = optimizations disabled.

§

FillEnum = 65_535

Enum value not to be used as an option. This value is added to force the C compiler to have the enum to take a known size.

Trait Implementations§

Source§

impl Clone for JxlEncoderFrameSettingId

Source§

fn clone(&self) -> JxlEncoderFrameSettingId

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for JxlEncoderFrameSettingId

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Hash for JxlEncoderFrameSettingId

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for JxlEncoderFrameSettingId

Source§

fn eq(&self, other: &JxlEncoderFrameSettingId) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for JxlEncoderFrameSettingId

Source§

impl Eq for JxlEncoderFrameSettingId

Source§

impl StructuralPartialEq for JxlEncoderFrameSettingId

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.