0 Replies Latest reply on Mar 21, 2017 5:42 PM by runtimeterror

    How to mix RowInterleaveFactor with SubTileBlockSize?

    runtimeterror

      My image tile is laid out as follows:

      p00 p01 p02 p03

      p10 p11 p12 p13

      p20 p21 p22 p23

      p30 p31 p32 p33

       

      When using a RowInterleaveFactor = 2, the order within the file becomes:

      p00 p01 p02 p03 p20 p21 p22 p23 p10 p11 p12 p13 p30 p31 p32 p33

       

      When using a SubTileBlockSize = (2, 2), the order within the file becomes:

      p00 p01 p10 p11 p02 p03 p12 p13 p20 p21 p30 p31 p22 p23 p32 p33

      (This is neat, if you want to use a 4-channel predictor for compressing Bayer-patterned data)

       

      When combining both (why-ever), the order of their application matters:

      Row-interleaving first temporarily results in:

      p00 p01 p02 p03

      p20 p21 p22 p23

      p10 p11 p12 p13

      p30 p31 p32 p33

      Sub-tiling afterwards:

      p00 p01 p20 p21 p02 p03 p22 p23 p10 p11 p30 p31 p12 p13 p32 p33

       

      But sub-tiling first temporarily results in something like:

      p00 p01 p10 p11

      p02 p03 p12 p13

      p20 p21 p30 p31

      p22 p23 p32 p33

      Row-interleaving afterwards:

      p00 p01 p10 p11 p20 p21 p30 p31 p02 p03 p12 p13 p22 p23 p32 p33

      (this feels plain wrong!)

       

      Which result is expected? Don't get me wrong on this: I don't see a single reason to combine both methods, but a conforming reader has to cope with this case since it's not forbidden by the specification.

       

      Bonus question: What happens if the dimensions given in RowInterleaveFactor or SubTileBlockSize (or their product, if combining is allowed) cannot equally divide the tiles' dimensions? This also should be forbidden IMHO.