Skip to content

Conversation

@ATrivialAtomic
Copy link
Contributor

Hi there @MartinPulec!

Submitting this PR to make a few additional changes to cmpto_j2k vcomp/vdec:

vdec/cmpto_j2k

  • Use cmpto_j2k_dec_cstream_get_ext_img_info to get lossiness information from the cstream while probing the internal format. If successful, print the image lossiness type. Otherwise, warn the user that the query was unsuccessful and continue since this does not affect the decoder's ability to decode an image.

vcomp/cmpto_j2k

  • If :lossless is requested, only call cmpto_j2k_enc_cfg_set_lossless since quantization is ignored in the case of a lossless compression. Otherwise, call cmpto_j2k_enc_cfg_set_quantization.
  • Only check quality val is between 0.0 and 1.0 when no :lossless.
  • Notify the user that :quality=# is ignored when :lossless is used.

If able to get the ext info, show J2K codestream lossiness type. Otherwise, throw a warning, but continue on since it shouldn't affect the ability to decode.
If a lossless cstream is requested, quantization isn't needed.  Notify the user that quality is ignored when :lossless selected.
@MartinPulec MartinPulec merged commit ff9d9ef into CESNET:master Jun 2, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants