diff options
author | Gautam Ramakrishnan <gautamramk@gmail.com> | 2020-08-28 00:15:35 +0530 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-08-30 16:18:37 +0200 |
commit | f0e33119e4fa1cf1705c16affa5daa6f0b487b48 (patch) | |
tree | a838ae94bbb6da351e1b498140ff083de98c3526 /libavcodec/jpeg2000.h | |
parent | 3c06045a8b584a8d569547c2f4d108588cce6a37 (diff) |
libavcodec/j2kenc: Support for multiple layers
This patch allows setting a compression ratio and to
set multiple layers. The user has to input a compression
ratio for each layer.
The per layer compression ration can be set as follows:
-layer_rates "r1,r2,...rn"
for to create 'n' layers.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/jpeg2000.h')
-rw-r--r-- | libavcodec/jpeg2000.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libavcodec/jpeg2000.h b/libavcodec/jpeg2000.h index ad58b1ae88..a7ba8aa7f3 100644 --- a/libavcodec/jpeg2000.h +++ b/libavcodec/jpeg2000.h @@ -162,10 +162,19 @@ typedef struct Jpeg2000Pass { int flushed_len; } Jpeg2000Pass; +typedef struct Jpeg2000Layer { + uint8_t *data_start; + int data_len; + int npasses; + double disto; + int cum_passes; +} Jpeg2000Layer; + typedef struct Jpeg2000Cblk { uint8_t npasses; uint8_t ninclpasses; // number coding of passes included in codestream uint8_t nonzerobits; + uint8_t incl; uint16_t length; uint16_t *lengthinc; uint8_t nb_lengthinc; @@ -176,6 +185,7 @@ typedef struct Jpeg2000Cblk { int nb_terminationsinc; int *data_start; Jpeg2000Pass *passes; + Jpeg2000Layer *layers; int coord[2][2]; // border coordinates {{x0, x1}, {y0, y1}} } Jpeg2000Cblk; // code block |