]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/jpeg2000.h
atrac3plus: Convert to the new bitstream reader
[ffmpeg] / libavcodec / jpeg2000.h
index 00bfcdda813bb2005c515aec50e4013761146896..b96b7e22914569dfe416ab9e075c2aa3b421240a 100644 (file)
@@ -151,11 +151,6 @@ typedef struct Jpeg2000QuantStyle {
     uint8_t nguardbits;    // number of guard bits
 } Jpeg2000QuantStyle;
 
-typedef struct Jpeg2000Pass {
-    uint16_t rate;
-    int64_t disto;
-} Jpeg2000Pass;
-
 typedef struct Jpeg2000Cblk {
     uint8_t npasses;
     uint8_t ninclpasses; // number coding of passes included in codestream
@@ -165,7 +160,6 @@ typedef struct Jpeg2000Cblk {
     uint8_t lblock;
     uint8_t zero;
     uint8_t data[8192];
-    Jpeg2000Pass passes[100];
     uint16_t coord[2][2]; // border coordinates {{x0, x1}, {y0, y1}}
 } Jpeg2000Cblk; // code block
 
@@ -178,12 +172,11 @@ typedef struct Jpeg2000Prec {
     uint16_t coord[2][2]; // border coordinates {{x0, x1}, {y0, y1}}
 } Jpeg2000Prec; // precinct
 
-/* TODO: stepsize can be float or integer depending on
- * reversible or irreversible transformation. */
 typedef struct Jpeg2000Band {
     uint16_t coord[2][2]; // border coordinates {{x0, x1}, {y0, y1}}
     uint16_t log2_cblk_width, log2_cblk_height;
-    float stepsize; // quantization stepsize
+    int i_stepsize; // quantization stepsize
+    float f_stepsize; // quantization stepsize
     Jpeg2000Prec *prec;
 } Jpeg2000Band; // subband
 
@@ -195,13 +188,11 @@ typedef struct Jpeg2000ResLevel {
     Jpeg2000Band *band;
 } Jpeg2000ResLevel; // resolution level
 
-/* TODO: data can be float of integer depending of reversible/irreversible
- * transformation.
- */
 typedef struct Jpeg2000Component {
     Jpeg2000ResLevel *reslevel;
     DWTContext dwt;
-    float *data;
+    float *f_data;
+    int *i_data;
     uint16_t coord[2][2];   // border coordinates {{x0, x1}, {y0, y1}} -- can be reduced with lowres option
     uint16_t coord_o[2][2]; // border coordinates {{x0, x1}, {y0, y1}} -- original values from jpeg2000 headers
 } Jpeg2000Component;