opj_encoder_set_extra_options(): add a GUARD_BITS=value option 1403/head
authorEven Rouault <even.rouault@spatialys.com>
Sun, 23 Jan 2022 16:53:55 +0000 (17:53 +0100)
committerEven Rouault <even.rouault@spatialys.com>
Sun, 23 Jan 2022 16:54:44 +0000 (17:54 +0100)
commit1de5fc6c51617f49515ef80708dd074432a27a6a
tree218a72739c1fdb4708ebf581a90ea4492c23cae5
parent241e9e8efeb6750ef4202a61b3a436628e4f6d23
opj_encoder_set_extra_options(): add a GUARD_BITS=value option

and add a -GuardBits option to opj_compress.

The recently-released SMPTE DCP Bv2.1 Application Profile (link below)
says that the number of guard bits in the QCD marker shall be 1 for 2K
content and 2 for 4K content. This change allows the number of guard bits
to be configured, so that users of openjpeg have the control they need to meet the specification.

https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=9161348

This is an alternative implementation of https://github.com/uclouvain/openjpeg/pull/1388
that keeps ABI unchanged.
src/bin/jp2/opj_compress.c
src/lib/openjp2/j2k.c
src/lib/openjp2/j2k.h
src/lib/openjp2/openjpeg.h