Implement arithmetic coding with 12-bit precision

This actually works and apparently always has worked.  It only failed
because the libjpeg code, which did not originally support arithmetic
coding, assumed that optimize_coding should always be TRUE for 12-bit
data precision.
This commit is contained in:
DRC
2023-01-26 13:11:58 -06:00
parent fc01f4673b
commit 96bc40c1b3
19 changed files with 68 additions and 52 deletions

View File

@@ -133,8 +133,8 @@ public class TJTransform extends Rectangle {
* generated by this particular transform. Progressive entropy coding will
* generally improve compression relative to baseline entropy coding (the
* default), but it will reduce decompression performance considerably.
* Implies {@link #OPT_OPTIMIZE}. Can be combined with
* {@link #OPT_ARITHMETIC}.
* Can be combined with {@link #OPT_ARITHMETIC}. Implies
* {@link #OPT_OPTIMIZE} unless {@link #OPT_ARITHMETIC} is also specified.
*/
public static final int OPT_PROGRESSIVE = (1 << 5);
/**