]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/jpeg2000dec.c
avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for AVC chroma mc functions
[ffmpeg] / libavcodec / jpeg2000dec.c
index aecc6ebe0231a80488618b6e7444a631df8aaf30..d86aa25b4cfe509359eae1167801d3190cc42c23 100644 (file)
@@ -60,7 +60,7 @@ typedef struct Jpeg2000Tile {
     uint8_t             properties[4];
     Jpeg2000CodingStyle codsty[4];
     Jpeg2000QuantStyle  qntsty[4];
-    Jpeg2000TilePart    tile_part[4];
+    Jpeg2000TilePart    tile_part[6];
     uint16_t tp_idx;                    // Tile-part index
 } Jpeg2000Tile;
 
@@ -261,7 +261,7 @@ static int get_siz(Jpeg2000DecoderContext *s)
 
     if (ncomponents > 4) {
         avpriv_request_sample(s->avctx, "Support for %d components",
-                              s->ncomponents);
+                              ncomponents);
         return AVERROR_PATCHWELCOME;
     }
 
@@ -1330,7 +1330,10 @@ static int jpeg2000_decode_tile(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile,
             }
         }
     } else {
-        int precision = picture->format == AV_PIX_FMT_XYZ12 ? 16 : s->precision;
+        int precision = picture->format == AV_PIX_FMT_XYZ12 ||
+                        picture->format == AV_PIX_FMT_RGB48 ||
+                        picture->format == AV_PIX_FMT_RGBA64 ||
+                        picture->format == AV_PIX_FMT_GRAY16 ? 16 : s->precision;
 
         for (compno = 0; compno < s->ncomponents; compno++) {
             Jpeg2000Component *comp = tile->comp + compno;