opencodecs 0.1.13__tar.gz → 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (410) hide show
  1. opencodecs-0.2.0/3rdparty/VENDOR.toml +216 -0
  2. opencodecs-0.2.0/3rdparty/bcdec/LICENSE +52 -0
  3. opencodecs-0.2.0/3rdparty/bcdec/README.md +46 -0
  4. {opencodecs-0.1.13 → opencodecs-0.2.0}/3rdparty/bcdec/bcdec.h +47 -18
  5. opencodecs-0.2.0/3rdparty/bitshuffle/LICENSE +21 -0
  6. opencodecs-0.2.0/3rdparty/bitshuffle/README.rst +282 -0
  7. opencodecs-0.2.0/3rdparty/bitshuffle/bitshuffle.c +284 -0
  8. opencodecs-0.2.0/3rdparty/bitshuffle/bitshuffle.h +205 -0
  9. {opencodecs-0.1.13 → opencodecs-0.2.0}/3rdparty/bitshuffle/bitshuffle_core.c +2 -2
  10. opencodecs-0.2.0/3rdparty/bitshuffle/bitshuffle_core.h +182 -0
  11. opencodecs-0.2.0/3rdparty/bitshuffle/bitshuffle_internals.h +81 -0
  12. opencodecs-0.2.0/3rdparty/bitshuffle/iochain.h +93 -0
  13. opencodecs-0.2.0/3rdparty/cfitsio/License.txt +25 -0
  14. opencodecs-0.2.0/3rdparty/cfitsio/fits_hcompress.c +1872 -0
  15. {opencodecs-0.1.13 → opencodecs-0.2.0}/3rdparty/cfitsio/fits_hdecompress.c +17 -3
  16. opencodecs-0.2.0/3rdparty/cfitsio/fits_hdecompress_api.h +26 -0
  17. opencodecs-0.2.0/3rdparty/cfitsio/fitsio2.h +50 -0
  18. {opencodecs-0.1.13 → opencodecs-0.2.0}/3rdparty/cfitsio/pliocomp.c +11 -2
  19. {opencodecs-0.1.13 → opencodecs-0.2.0}/3rdparty/cfitsio/ricecomp.c +21 -0
  20. opencodecs-0.2.0/3rdparty/cfitsio/ricecomp.h +39 -0
  21. opencodecs-0.2.0/3rdparty/libspng/LICENSE +25 -0
  22. {opencodecs-0.1.13 → opencodecs-0.2.0}/3rdparty/libspng/spng.c +82 -45
  23. opencodecs-0.2.0/3rdparty/libspng/spng.h +537 -0
  24. opencodecs-0.2.0/3rdparty/oc_eer/LICENSE +21 -0
  25. opencodecs-0.2.0/3rdparty/oc_eer/oc_eer.c +140 -0
  26. opencodecs-0.2.0/3rdparty/oc_eer/oc_eer.h +83 -0
  27. opencodecs-0.2.0/3rdparty/oc_giflzw/LICENSE +21 -0
  28. opencodecs-0.2.0/3rdparty/oc_giflzw/oc_giflzw.c +214 -0
  29. opencodecs-0.2.0/3rdparty/oc_giflzw/oc_giflzw.h +70 -0
  30. opencodecs-0.2.0/3rdparty/oc_tifflzw/LICENSE +21 -0
  31. {opencodecs-0.1.13 → opencodecs-0.2.0}/3rdparty/oc_tifflzw/oc_tifflzw.c +151 -0
  32. {opencodecs-0.1.13 → opencodecs-0.2.0}/3rdparty/oc_tifflzw/oc_tifflzw.h +28 -0
  33. opencodecs-0.2.0/3rdparty/qoi/LICENSE +21 -0
  34. opencodecs-0.2.0/3rdparty/qoi/qoi.h +649 -0
  35. {opencodecs-0.1.13 → opencodecs-0.2.0}/3rdparty/rgbe/rgbe.c +188 -17
  36. opencodecs-0.2.0/3rdparty/rgbe/rgbe.h +182 -0
  37. opencodecs-0.2.0/3rdparty/rgbe/rgbe.txt +60 -0
  38. opencodecs-0.2.0/3rdparty/vendor_hashes.json +20 -0
  39. {opencodecs-0.1.13 → opencodecs-0.2.0}/CHANGES.rst +439 -2
  40. opencodecs-0.2.0/LICENSE +35 -0
  41. opencodecs-0.2.0/MANIFEST.in +49 -0
  42. {opencodecs-0.1.13 → opencodecs-0.2.0}/PKG-INFO +98 -9
  43. opencodecs-0.1.13/src/opencodecs.egg-info/PKG-INFO → opencodecs-0.2.0/README.md +70 -33
  44. opencodecs-0.2.0/THIRD-PARTY.md +187 -0
  45. {opencodecs-0.1.13 → opencodecs-0.2.0}/pyproject.toml +64 -6
  46. {opencodecs-0.1.13 → opencodecs-0.2.0}/setup.py +126 -35
  47. opencodecs-0.2.0/src/opencodecs/__init__.py +345 -0
  48. opencodecs-0.2.0/src/opencodecs/_avif_codec.py +194 -0
  49. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_b2nd_codec.py +24 -3
  50. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_bcn_codec.py +93 -9
  51. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_blosc2_codec.py +29 -3
  52. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_bmp_codec.py +119 -19
  53. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_cms_codec.py +2 -2
  54. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_czi_codec.py +26 -23
  55. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_czi_reader.py +6 -8
  56. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_czi_writer.py +23 -2
  57. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_deflate_codec.py +1 -1
  58. opencodecs-0.2.0/src/opencodecs/_dicom.py +714 -0
  59. opencodecs-0.2.0/src/opencodecs/_dicom_codec.py +98 -0
  60. opencodecs-0.2.0/src/opencodecs/_dicom_pyramid.py +242 -0
  61. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_dicomrle_codec.py +39 -10
  62. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_dicomweb.py +42 -23
  63. opencodecs-0.2.0/src/opencodecs/_dm.py +436 -0
  64. opencodecs-0.2.0/src/opencodecs/_dm_codec.py +78 -0
  65. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_eer_reader.py +105 -7
  66. opencodecs-0.2.0/src/opencodecs/_emd.py +208 -0
  67. opencodecs-0.2.0/src/opencodecs/_emd_codec.py +63 -0
  68. opencodecs-0.2.0/src/opencodecs/_ets.py +383 -0
  69. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_fits.py +32 -45
  70. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_fits_codec.py +20 -5
  71. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_fits_compressed.py +21 -2
  72. opencodecs-0.2.0/src/opencodecs/_gif_codec.py +215 -0
  73. opencodecs-0.2.0/src/opencodecs/_gzip_codec.py +117 -0
  74. opencodecs-0.2.0/src/opencodecs/_h5_common.py +44 -0
  75. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_hdf5_codec.py +66 -20
  76. opencodecs-0.2.0/src/opencodecs/_heif_codec.py +182 -0
  77. opencodecs-0.2.0/src/opencodecs/_htj2k_pyramid.py +56 -0
  78. opencodecs-0.2.0/src/opencodecs/_imaris.py +286 -0
  79. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_jpeg2k_codec.py +28 -1
  80. opencodecs-0.2.0/src/opencodecs/_jpeg2k_pyramid.py +50 -0
  81. opencodecs-0.2.0/src/opencodecs/_jpeg_pyramid.py +92 -0
  82. opencodecs-0.2.0/src/opencodecs/_jxl_codec.py +181 -0
  83. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_lif_codec.py +74 -49
  84. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_lif_native.py +26 -4
  85. opencodecs-0.2.0/src/opencodecs/_mozjpeg_pyramid.py +25 -0
  86. opencodecs-0.2.0/src/opencodecs/_mrc.py +392 -0
  87. opencodecs-0.2.0/src/opencodecs/_mrc_codec.py +90 -0
  88. opencodecs-0.2.0/src/opencodecs/_mrc_writer.py +120 -0
  89. opencodecs-0.2.0/src/opencodecs/_n5.py +275 -0
  90. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_nd2_codec.py +6 -17
  91. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_ndtiff.py +10 -10
  92. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_ndtiff_writer.py +38 -4
  93. opencodecs-0.2.0/src/opencodecs/_nifti.py +348 -0
  94. opencodecs-0.2.0/src/opencodecs/_nifti_codec.py +87 -0
  95. opencodecs-0.2.0/src/opencodecs/_nifti_writer.py +108 -0
  96. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_none_codec.py +1 -1
  97. opencodecs-0.2.0/src/opencodecs/_nrrd.py +324 -0
  98. opencodecs-0.2.0/src/opencodecs/_nrrd_codec.py +57 -0
  99. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_numpy_codec.py +14 -4
  100. opencodecs-0.2.0/src/opencodecs/_numpy_reader.py +153 -0
  101. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_oib_codec.py +16 -16
  102. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_oib_native.py +71 -21
  103. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_oir_codec.py +13 -2
  104. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_packints_codec.py +25 -19
  105. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_predictor_codec.py +108 -26
  106. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_pyramid_build.py +1 -1
  107. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_rcomp_codec.py +1 -1
  108. opencodecs-0.2.0/src/opencodecs/_scaled_pyramid.py +171 -0
  109. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_tiff_codec.py +316 -98
  110. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_tiff_writer.py +14 -2
  111. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_vsi_codec.py +18 -2
  112. opencodecs-0.2.0/src/opencodecs/_vsi_pyramid.py +264 -0
  113. opencodecs-0.2.0/src/opencodecs/_webp_codec.py +177 -0
  114. opencodecs-0.2.0/src/opencodecs/_zfp_codec.py +159 -0
  115. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/codecs/__init__.py +49 -3
  116. opencodecs-0.2.0/src/opencodecs/codecs/_aec.pyx +365 -0
  117. opencodecs-0.2.0/src/opencodecs/codecs/_avif.pyx +683 -0
  118. opencodecs-0.2.0/src/opencodecs/codecs/_b2nd.pyx +384 -0
  119. opencodecs-0.2.0/src/opencodecs/codecs/_bcdec.pyx +362 -0
  120. opencodecs-0.2.0/src/opencodecs/codecs/_bitshuffle.pyx +208 -0
  121. opencodecs-0.2.0/src/opencodecs/codecs/_blosc2.pyx +391 -0
  122. opencodecs-0.2.0/src/opencodecs/codecs/_bmp.pyx +335 -0
  123. opencodecs-0.2.0/src/opencodecs/codecs/_brotli.pyx +228 -0
  124. opencodecs-0.2.0/src/opencodecs/codecs/_brunsli.pyx +158 -0
  125. opencodecs-0.2.0/src/opencodecs/codecs/_bytetools.pyx +294 -0
  126. opencodecs-0.2.0/src/opencodecs/codecs/_charls.pyx +268 -0
  127. opencodecs-0.2.0/src/opencodecs/codecs/_deflate.pyx +388 -0
  128. opencodecs-0.2.0/src/opencodecs/codecs/_eer.pyx +171 -0
  129. opencodecs-0.2.0/src/opencodecs/codecs/_gif.pyx +1181 -0
  130. opencodecs-0.2.0/src/opencodecs/codecs/_hcomp.pyx +176 -0
  131. opencodecs-0.2.0/src/opencodecs/codecs/_heif.pyx +648 -0
  132. opencodecs-0.2.0/src/opencodecs/codecs/_isal.pyx +183 -0
  133. opencodecs-0.2.0/src/opencodecs/codecs/_jpeg.pyx +438 -0
  134. opencodecs-0.2.0/src/opencodecs/codecs/_jpeg2k.pyx +863 -0
  135. opencodecs-0.2.0/src/opencodecs/codecs/_jxl.pyx +2597 -0
  136. opencodecs-0.2.0/src/opencodecs/codecs/_lerc.pyx +318 -0
  137. opencodecs-0.2.0/src/opencodecs/codecs/_lz4.pyx +234 -0
  138. opencodecs-0.2.0/src/opencodecs/codecs/_mozjpeg.pyx +351 -0
  139. opencodecs-0.2.0/src/opencodecs/codecs/_ndtiff.pyx +165 -0
  140. opencodecs-0.2.0/src/opencodecs/codecs/_openjph.pyx +359 -0
  141. opencodecs-0.2.0/src/opencodecs/codecs/_pcodec.pyx +239 -0
  142. opencodecs-0.2.0/src/opencodecs/codecs/_plio.pyx +111 -0
  143. opencodecs-0.2.0/src/opencodecs/codecs/_png.pyx +465 -0
  144. opencodecs-0.2.0/src/opencodecs/codecs/_qoi.pyx +172 -0
  145. opencodecs-0.2.0/src/opencodecs/codecs/_rcomp.pyx +271 -0
  146. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/codecs/_registry.py +48 -0
  147. opencodecs-0.2.0/src/opencodecs/codecs/_rgbe.pyx +241 -0
  148. opencodecs-0.2.0/src/opencodecs/codecs/_snappy.pyx +191 -0
  149. opencodecs-0.2.0/src/opencodecs/codecs/_sperr.pyx +278 -0
  150. opencodecs-0.2.0/src/opencodecs/codecs/_sz3.pyx +264 -0
  151. opencodecs-0.2.0/src/opencodecs/codecs/_tiff.pyx +1011 -0
  152. opencodecs-0.2.0/src/opencodecs/codecs/_uhdr.pyx +1809 -0
  153. opencodecs-0.2.0/src/opencodecs/codecs/_webp.pyx +349 -0
  154. opencodecs-0.2.0/src/opencodecs/codecs/_zfp.pyx +595 -0
  155. opencodecs-0.2.0/src/opencodecs/codecs/_zstd.pyx +255 -0
  156. opencodecs-0.2.0/src/opencodecs/codecs/avif.pxd +140 -0
  157. opencodecs-0.2.0/src/opencodecs/codecs/b2nd.pxd +53 -0
  158. opencodecs-0.2.0/src/opencodecs/codecs/b2nd_helpers.c +272 -0
  159. opencodecs-0.2.0/src/opencodecs/codecs/b2nd_helpers.h +127 -0
  160. opencodecs-0.2.0/src/opencodecs/codecs/bcdec.pxd +31 -0
  161. opencodecs-0.2.0/src/opencodecs/codecs/bitshuffle.pxd +37 -0
  162. opencodecs-0.2.0/src/opencodecs/codecs/blosc2.pxd +80 -0
  163. opencodecs-0.2.0/src/opencodecs/codecs/brotli.pxd +55 -0
  164. opencodecs-0.2.0/src/opencodecs/codecs/brunsli.pxd +26 -0
  165. opencodecs-0.2.0/src/opencodecs/codecs/charls.pxd +65 -0
  166. opencodecs-0.2.0/src/opencodecs/codecs/eer.pxd +22 -0
  167. opencodecs-0.2.0/src/opencodecs/codecs/giflib.pxd +132 -0
  168. opencodecs-0.2.0/src/opencodecs/codecs/heif.pxd +171 -0
  169. opencodecs-0.2.0/src/opencodecs/codecs/heif_shim.h +35 -0
  170. opencodecs-0.2.0/src/opencodecs/codecs/isal_shim.c +123 -0
  171. opencodecs-0.2.0/src/opencodecs/codecs/lerc.pxd +61 -0
  172. opencodecs-0.2.0/src/opencodecs/codecs/libaec.pxd +53 -0
  173. opencodecs-0.2.0/src/opencodecs/codecs/libjxl.pxd +346 -0
  174. opencodecs-0.2.0/src/opencodecs/codecs/libuhdr.pxd +198 -0
  175. opencodecs-0.2.0/src/opencodecs/codecs/lz4.pxd +89 -0
  176. opencodecs-0.2.0/src/opencodecs/codecs/mozjpeg.pxd +81 -0
  177. opencodecs-0.2.0/src/opencodecs/codecs/openjpeg.pxd +189 -0
  178. opencodecs-0.2.0/src/opencodecs/codecs/openjph.pxd +46 -0
  179. opencodecs-0.2.0/src/opencodecs/codecs/openjph_shim.cpp +451 -0
  180. opencodecs-0.2.0/src/opencodecs/codecs/openjph_shim.h +121 -0
  181. opencodecs-0.2.0/src/opencodecs/codecs/pcodec.pxd +55 -0
  182. opencodecs-0.2.0/src/opencodecs/codecs/qoi.pxd +31 -0
  183. opencodecs-0.2.0/src/opencodecs/codecs/rgbe.pxd +67 -0
  184. opencodecs-0.2.0/src/opencodecs/codecs/snappy.pxd +41 -0
  185. opencodecs-0.2.0/src/opencodecs/codecs/sperr.pxd +67 -0
  186. opencodecs-0.2.0/src/opencodecs/codecs/spng.pxd +97 -0
  187. opencodecs-0.2.0/src/opencodecs/codecs/sz3c.pxd +46 -0
  188. opencodecs-0.2.0/src/opencodecs/codecs/turbojpeg.pxd +98 -0
  189. opencodecs-0.2.0/src/opencodecs/codecs/webp.pxd +128 -0
  190. opencodecs-0.2.0/src/opencodecs/codecs/webp_shim.c +83 -0
  191. opencodecs-0.2.0/src/opencodecs/codecs/webp_shim.h +45 -0
  192. opencodecs-0.2.0/src/opencodecs/codecs/zfp.pxd +87 -0
  193. opencodecs-0.2.0/src/opencodecs/codecs/zlib_h.pxd +24 -0
  194. opencodecs-0.2.0/src/opencodecs/codecs/zstd.pxd +53 -0
  195. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/core/_io_helpers.py +18 -2
  196. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/core/_optional_backend.py +1 -1
  197. opencodecs-0.2.0/src/opencodecs/core/_sidecar_header.py +54 -0
  198. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/core/codec.py +152 -6
  199. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/core/io.py +220 -5
  200. opencodecs-0.2.0/src/opencodecs/core/parallel.py +125 -0
  201. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/parallel.py +1 -1
  202. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/tiff_reader.py +1 -1
  203. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/uhdr.py +36 -4
  204. opencodecs-0.1.13/README.md → opencodecs-0.2.0/src/opencodecs.egg-info/PKG-INFO +122 -7
  205. opencodecs-0.2.0/src/opencodecs.egg-info/SOURCES.txt +375 -0
  206. opencodecs-0.2.0/src/opencodecs.egg-info/requires.txt +41 -0
  207. opencodecs-0.2.0/tests/test_avif_sequence.py +175 -0
  208. opencodecs-0.2.0/tests/test_bcn_bands.py +139 -0
  209. opencodecs-0.2.0/tests/test_blosc2_partial.py +164 -0
  210. opencodecs-0.2.0/tests/test_capability_manifest.py +386 -0
  211. opencodecs-0.2.0/tests/test_chunked_means_cheap.py +252 -0
  212. opencodecs-0.2.0/tests/test_codec_registry.py +69 -0
  213. opencodecs-0.2.0/tests/test_corpus_manifest.py +104 -0
  214. opencodecs-0.2.0/tests/test_corpus_native_fixtures.py +298 -0
  215. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_corpus_png.py +42 -17
  216. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_coverage_push.py +16 -2
  217. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_czi_pyramid.py +30 -1
  218. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_czi_writer.py +29 -0
  219. opencodecs-0.2.0/tests/test_decode_releases_gil.py +124 -0
  220. opencodecs-0.2.0/tests/test_delta_parity.py +190 -0
  221. opencodecs-0.2.0/tests/test_dicom.py +192 -0
  222. opencodecs-0.2.0/tests/test_dicom_encodings.py +286 -0
  223. opencodecs-0.2.0/tests/test_dicom_parallel.py +151 -0
  224. opencodecs-0.2.0/tests/test_dicom_wsi_pyramid.py +162 -0
  225. opencodecs-0.2.0/tests/test_dm.py +136 -0
  226. opencodecs-0.2.0/tests/test_dm_offsets.py +92 -0
  227. opencodecs-0.2.0/tests/test_dm_synthetic.py +123 -0
  228. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_eer.py +211 -52
  229. opencodecs-0.2.0/tests/test_eer_parallel.py +126 -0
  230. opencodecs-0.2.0/tests/test_emd.py +156 -0
  231. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_fits.py +56 -0
  232. opencodecs-0.2.0/tests/test_fits_parallel.py +121 -0
  233. opencodecs-0.2.0/tests/test_gzip_presized.py +88 -0
  234. opencodecs-0.2.0/tests/test_hdf5_parallel.py +111 -0
  235. opencodecs-0.2.0/tests/test_hdf5_remote.py +119 -0
  236. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_heif_avif_features.py +124 -0
  237. opencodecs-0.2.0/tests/test_heif_multi_image.py +139 -0
  238. opencodecs-0.2.0/tests/test_htj2k_conformance.py +164 -0
  239. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_http_byte_savings.py +13 -2
  240. opencodecs-0.2.0/tests/test_imaris.py +229 -0
  241. opencodecs-0.2.0/tests/test_jpeg2k_region.py +161 -0
  242. opencodecs-0.2.0/tests/test_lif_indexing.py +84 -0
  243. opencodecs-0.2.0/tests/test_mrc.py +305 -0
  244. opencodecs-0.2.0/tests/test_mrc_mrcz_http.py +143 -0
  245. opencodecs-0.2.0/tests/test_mrc_nifti_writers.py +174 -0
  246. opencodecs-0.2.0/tests/test_n5.py +222 -0
  247. opencodecs-0.2.0/tests/test_nifti.py +228 -0
  248. opencodecs-0.2.0/tests/test_nrrd.py +185 -0
  249. opencodecs-0.2.0/tests/test_nrrd_slices.py +104 -0
  250. opencodecs-0.2.0/tests/test_offset_readers.py +167 -0
  251. opencodecs-0.2.0/tests/test_oib_indexing.py +107 -0
  252. opencodecs-0.2.0/tests/test_rcomp_truncated_input.py +58 -0
  253. opencodecs-0.2.0/tests/test_reader_contract.py +426 -0
  254. opencodecs-0.2.0/tests/test_reader_source_kinds.py +406 -0
  255. opencodecs-0.2.0/tests/test_reader_streaming.py +150 -0
  256. opencodecs-0.2.0/tests/test_reference_parity.py +411 -0
  257. opencodecs-0.2.0/tests/test_rgbe.py +262 -0
  258. opencodecs-0.2.0/tests/test_scaled_pyramid.py +479 -0
  259. opencodecs-0.2.0/tests/test_sidecar_header.py +109 -0
  260. opencodecs-0.2.0/tests/test_streaming_means_streaming.py +86 -0
  261. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_tiff_codec_encode.py +93 -0
  262. opencodecs-0.2.0/tests/test_tiff_parallel_decode.py +183 -0
  263. opencodecs-0.2.0/tests/test_tiff_read_path.py +195 -0
  264. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_uhdr.py +37 -4
  265. opencodecs-0.2.0/tests/test_url_sources.py +91 -0
  266. opencodecs-0.2.0/tests/test_vendor_provenance.py +74 -0
  267. opencodecs-0.2.0/tests/test_version_consistency.py +44 -0
  268. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_vsi_oir.py +192 -1
  269. opencodecs-0.2.0/tests/test_vsi_pyramid.py +320 -0
  270. opencodecs-0.2.0/tests/test_webp_animation.py +218 -0
  271. opencodecs-0.2.0/tests/test_writer_contract.py +307 -0
  272. opencodecs-0.2.0/tests/test_zfp_blocks.py +168 -0
  273. opencodecs-0.1.13/3rdparty/imcd_eer/eer.c +0 -197
  274. opencodecs-0.1.13/3rdparty/imcd_eer/eer.h +0 -62
  275. opencodecs-0.1.13/3rdparty/imcd_lzw/lzw.c +0 -186
  276. opencodecs-0.1.13/3rdparty/imcd_lzw/lzw.h +0 -48
  277. opencodecs-0.1.13/MANIFEST.in +0 -26
  278. opencodecs-0.1.13/src/opencodecs/__init__.py +0 -194
  279. opencodecs-0.1.13/src/opencodecs/_avif_codec.py +0 -79
  280. opencodecs-0.1.13/src/opencodecs/_ets.py +0 -184
  281. opencodecs-0.1.13/src/opencodecs/_gif_codec.py +0 -107
  282. opencodecs-0.1.13/src/opencodecs/_gzip_codec.py +0 -64
  283. opencodecs-0.1.13/src/opencodecs/_heif_codec.py +0 -73
  284. opencodecs-0.1.13/src/opencodecs/_jxl_codec.py +0 -95
  285. opencodecs-0.1.13/src/opencodecs/_webp_codec.py +0 -62
  286. opencodecs-0.1.13/src/opencodecs/_zfp_codec.py +0 -76
  287. opencodecs-0.1.13/src/opencodecs/codecs/_bcdec.c +0 -34288
  288. opencodecs-0.1.13/src/opencodecs/codecs/_bitshuffle.c +0 -29805
  289. opencodecs-0.1.13/src/opencodecs/codecs/_bmp.c +0 -33293
  290. opencodecs-0.1.13/src/opencodecs/codecs/_bytetools.c +0 -28876
  291. opencodecs-0.1.13/src/opencodecs/codecs/_deflate.c +0 -31197
  292. opencodecs-0.1.13/src/opencodecs/codecs/_eer.c +0 -30556
  293. opencodecs-0.1.13/src/opencodecs/codecs/_hcomp.c +0 -30638
  294. opencodecs-0.1.13/src/opencodecs/codecs/_lz4.c +0 -29832
  295. opencodecs-0.1.13/src/opencodecs/codecs/_ndtiff.c +0 -27926
  296. opencodecs-0.1.13/src/opencodecs/codecs/_plio.c +0 -30037
  297. opencodecs-0.1.13/src/opencodecs/codecs/_png.c +0 -35024
  298. opencodecs-0.1.13/src/opencodecs/codecs/_qoi.c +0 -31927
  299. opencodecs-0.1.13/src/opencodecs/codecs/_rcomp.c +0 -33214
  300. opencodecs-0.1.13/src/opencodecs/codecs/_rgbe.c +0 -31943
  301. opencodecs-0.1.13/src/opencodecs/codecs/_tiff.c +0 -41625
  302. opencodecs-0.1.13/src/opencodecs/codecs/_zstd.c +0 -29732
  303. opencodecs-0.1.13/src/opencodecs.egg-info/SOURCES.txt +0 -205
  304. opencodecs-0.1.13/src/opencodecs.egg-info/requires.txt +0 -21
  305. opencodecs-0.1.13/tests/test_rgbe.py +0 -106
  306. {opencodecs-0.1.13 → opencodecs-0.2.0}/3rdparty/bitshuffle/iochain.c +0 -0
  307. {opencodecs-0.1.13 → opencodecs-0.2.0}/bench/build_libjxl.sh +0 -0
  308. {opencodecs-0.1.13 → opencodecs-0.2.0}/patches/libjxl/README.md +0 -0
  309. {opencodecs-0.1.13 → opencodecs-0.2.0}/setup.cfg +0 -0
  310. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_aec_codec.py +0 -0
  311. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_bitshuffle_codec.py +0 -0
  312. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_brotli_codec.py +0 -0
  313. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_brunsli_codec.py +0 -0
  314. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_byteshuffle_codec.py +0 -0
  315. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_bz2_codec.py +0 -0
  316. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_hdf5_http.py +0 -0
  317. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_htj2k_codec.py +0 -0
  318. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_jpeg_codec.py +0 -0
  319. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_jpegls_codec.py +0 -0
  320. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_lerc_codec.py +0 -0
  321. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_lz4_codec.py +0 -0
  322. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_lzma_codec.py +0 -0
  323. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_mozjpeg_codec.py +0 -0
  324. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_nd2_native.py +0 -0
  325. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_ndtiff_pyramid.py +0 -0
  326. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_ole2.py +0 -0
  327. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_ome_xml.py +0 -0
  328. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_omezarr.py +0 -0
  329. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_omezarr_writer.py +0 -0
  330. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_pcodec_codec.py +0 -0
  331. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_png_codec.py +0 -0
  332. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_qoi_codec.py +0 -0
  333. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_quantize_codec.py +0 -0
  334. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_rgbe.py +0 -0
  335. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_rgbe_codec.py +0 -0
  336. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_snappy_codec.py +0 -0
  337. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_sperr_codec.py +0 -0
  338. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_sz3_codec.py +0 -0
  339. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_tiff_http.py +0 -0
  340. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_tiff_pyramid.py +0 -0
  341. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_ultrahdr_codec.py +0 -0
  342. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_zarr_codecs.py +0 -0
  343. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/_zstd_codec.py +0 -0
  344. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/core/__init__.py +0 -0
  345. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/core/color.py +0 -0
  346. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/core/errors.py +0 -0
  347. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/core/pyramid.py +0 -0
  348. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/core/segment_compression.py +0 -0
  349. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/jxl.py +0 -0
  350. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/tifffile_patch.py +0 -0
  351. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs/zarr.py +0 -0
  352. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs.egg-info/dependency_links.txt +0 -0
  353. {opencodecs-0.1.13 → opencodecs-0.2.0}/src/opencodecs.egg-info/top_level.txt +0 -0
  354. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_auto_pyramid.py +0 -0
  355. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_bcdec.py +0 -0
  356. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_brunsli.py +0 -0
  357. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_charls.py +0 -0
  358. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_core_codec_api.py +0 -0
  359. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_corpus.py +0 -0
  360. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_corpus_codec_decode.py +0 -0
  361. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_corpus_other.py +0 -0
  362. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_corpus_tiff.py +0 -0
  363. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_corpus_vendors.py +0 -0
  364. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_coverage_final.py +0 -0
  365. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_coverage_finishing.py +0 -0
  366. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_coverage_last.py +0 -0
  367. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_coverage_more.py +0 -0
  368. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_czi_fixture.py +0 -0
  369. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_data_source.py +0 -0
  370. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_deflate.py +0 -0
  371. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_dicomweb.py +0 -0
  372. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_edge_cases.py +0 -0
  373. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_encode_comprehensive.py +0 -0
  374. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_error_handling.py +0 -0
  375. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_gif.py +0 -0
  376. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_hdf5_http.py +0 -0
  377. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_hdf5_local.py +0 -0
  378. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_http_prefetch.py +0 -0
  379. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_http_unified.py +0 -0
  380. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_io_chunked.py +0 -0
  381. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_isal.py +0 -0
  382. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_jxl.py +0 -0
  383. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_lif_native.py +0 -0
  384. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_live_archives.py +0 -0
  385. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_mozjpeg.py +0 -0
  386. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_native_parity.py +0 -0
  387. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_nd2_native.py +0 -0
  388. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_ndtiff.py +0 -0
  389. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_oib_native.py +0 -0
  390. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_ome_xml.py +0 -0
  391. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_omezarr.py +0 -0
  392. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_omezarr_sharded_range.py +0 -0
  393. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_open_pyramid.py +0 -0
  394. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_openjph.py +0 -0
  395. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_optional_backend.py +0 -0
  396. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_parallel_jxl.py +0 -0
  397. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_phase4_filters.py +0 -0
  398. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_phase5_icc.py +0 -0
  399. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_phase6_codecs.py +0 -0
  400. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_phase7_cms.py +0 -0
  401. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_snappy.py +0 -0
  402. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_tier1_scientific.py +0 -0
  403. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_tiff_http.py +0 -0
  404. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_tiff_native.py +0 -0
  405. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_tiff_pyramid.py +0 -0
  406. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_tiff_reader.py +0 -0
  407. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_tiff_writer.py +0 -0
  408. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_tifffile_patch.py +0 -0
  409. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_unified_api.py +0 -0
  410. {opencodecs-0.1.13 → opencodecs-0.2.0}/tests/test_zarr_adapters.py +0 -0
@@ -0,0 +1,216 @@
1
+ # Provenance for the source vendored under 3rdparty/.
2
+ #
3
+ # Why this file exists: vendored code drifts silently. Nothing tells you
4
+ # upstream fixed something. That is not hypothetical here, it is how
5
+ # PLIO shipped a decoder that died with SIGBUS on malformed input, long
6
+ # after upstream cfitsio had added the bounds checks that prevent it.
7
+ #
8
+ # ci/check_vendor_drift.py reads this to answer two different questions:
9
+ #
10
+ # 1. Have WE changed the file since vendoring it? (offline, from
11
+ # local_sha256; a test enforces this so an accidental edit to a
12
+ # vendored file cannot pass unnoticed.)
13
+ # 2. Has UPSTREAM changed it since? (online: re-fetch at the pinned
14
+ # ref, and look for newer releases.)
15
+ #
16
+ # `modified = true` means we deliberately diverge from upstream, and the
17
+ # note says why. Those are the files where a blind upstream update would
18
+ # lose something.
19
+
20
+ schema = 1
21
+
22
+ # ---------------------------------------------------------------------
23
+ # Our own code. Listed so the "is every vendored file accounted for?"
24
+ # check can pass, and so nobody mistakes it for somebody else's work.
25
+ # ---------------------------------------------------------------------
26
+
27
+ [[component]]
28
+ name = "oc_eer"
29
+ upstream = "none"
30
+ note = "Written for opencodecs. Clean-room EER decoder; no upstream."
31
+
32
+ [[component]]
33
+ name = "oc_tifflzw"
34
+ upstream = "none"
35
+ note = "Written for opencodecs. TIFF 6.0 LZW encoder; no upstream."
36
+
37
+ [[component]]
38
+ name = "oc_giflzw"
39
+ upstream = "none"
40
+ note = "Written for opencodecs. GIF LZW; no upstream."
41
+
42
+ # ---------------------------------------------------------------------
43
+ # Third-party source with a live upstream.
44
+ # ---------------------------------------------------------------------
45
+
46
+ [[component]]
47
+ name = "bcdec"
48
+ repo = "iOrange/bcdec"
49
+ ref = "80859ed3b7afb1c527a2a99d70c61457bea72d0c"
50
+ license = "MIT OR Unlicense"
51
+ note = """Single-header BCn decoder. bcdec publishes no tags, so the ref \
52
+ is a commit: that is what makes `check` able to say anything, since a \
53
+ moving branch gives it nothing fixed to compare against. This commit is \
54
+ v0.985, "fixed potential unaligned reads" -- taken because the previous \
55
+ pin predated it and the fix is a real portability one, replacing \
56
+ multi-byte casts with byte-wise readers."""
57
+ [[component.file]]
58
+ local = "3rdparty/bcdec/bcdec.h"
59
+ upstream = "bcdec.h"
60
+ modified = true
61
+ note = """Upstream at the pinned commit, plus one six-line comment on \
62
+ the BC4/BC5 signed path and trailing whitespace stripped. Verified by \
63
+ reconstruction: our file with that comment removed and trailing \
64
+ whitespace normalized is byte-identical to upstream."""
65
+
66
+ [[component]]
67
+ name = "bitshuffle"
68
+ repo = "kiyo-masui/bitshuffle"
69
+ ref = "0.5.2"
70
+ license = "MIT"
71
+ note = """The two core files track upstream master rather than the 0.5.2 \
72
+ tag, because 0.5.2 predates Masui's rewritten NEON bit transpose \
73
+ (neonmovemask_bulk) and the MSVC may_alias typedef. Those are upstream \
74
+ work, not ours and not a third party's; an earlier reading of this file \
75
+ said otherwise and was wrong. The other five files are pristine 0.5.2."""
76
+ [[component.file]]
77
+ local = "3rdparty/bitshuffle/bitshuffle_core.c"
78
+ upstream = "src/bitshuffle_core.c"
79
+ ref = "526440a16baf"
80
+ modified = true
81
+ note = """Upstream master at 526440a16baf plus exactly three \
82
+ (uint8_t) narrowing casts, at the two bit-transpose stores and the \
83
+ uint64 branch of bshuf_write_uint64_BE. They silence MSVC C4244; the \
84
+ truncation is intended in all three, the value is masked to a byte \
85
+ already. Re-derived from upstream in 2026-09 so this delta is three \
86
+ lines that can be read, rather than a file nobody could account for. \
87
+ Worth sending upstream."""
88
+ [[component.file]]
89
+ local = "3rdparty/bitshuffle/bitshuffle_core.h"
90
+ upstream = "src/bitshuffle_core.h"
91
+ ref = "526440a16baf"
92
+ modified = true
93
+ note = """Upstream master, except the BSHUF_VERSION macros, which \
94
+ upstream left at 0.4.0 on master; ours say 0.5.2 to match the released \
95
+ version the rest of this directory tracks."""
96
+ [[component.file]]
97
+ local = "3rdparty/bitshuffle/iochain.c"
98
+ upstream = "src/iochain.c"
99
+ [[component.file]]
100
+ local = "3rdparty/bitshuffle/iochain.h"
101
+ upstream = "src/iochain.h"
102
+ [[component.file]]
103
+ local = "3rdparty/bitshuffle/bitshuffle.c"
104
+ upstream = "src/bitshuffle.c"
105
+ [[component.file]]
106
+ local = "3rdparty/bitshuffle/bitshuffle.h"
107
+ upstream = "src/bitshuffle.h"
108
+ [[component.file]]
109
+ local = "3rdparty/bitshuffle/bitshuffle_internals.h"
110
+ upstream = "src/bitshuffle_internals.h"
111
+
112
+ [[component]]
113
+ name = "cfitsio"
114
+ repo = "HEASARC/cfitsio"
115
+ ref = "cfitsio-4.7.0"
116
+ license = "NASA permissive"
117
+ note = """The component that motivated this file. pliocomp.c was behind \
118
+ upstream by the commit that added its srclen bounds checks, and the \
119
+ stale copy crashed. Re-check on every cfitsio release."""
120
+ [[component.file]]
121
+ local = "3rdparty/cfitsio/pliocomp.c"
122
+ upstream = "pliocomp.c"
123
+ [[component.file]]
124
+ local = "3rdparty/cfitsio/fits_hcompress.c"
125
+ upstream = "fits_hcompress.c"
126
+ [[component.file]]
127
+ local = "3rdparty/cfitsio/fits_hdecompress.c"
128
+ upstream = "fits_hdecompress.c"
129
+ ref = "cfitsio-4.6.4"
130
+ modified = true
131
+ note = """4.6.4, one release behind the rest of this directory. Checked: \
132
+ 4.6.4 -> 4.7.0 changed only comments describing the `na` parameter, so there \
133
+ is no fix being missed. Bump with the next real change.
134
+
135
+ One local patch, three lines: the file-scope `nextchar`, `buffer2` and \
136
+ `bits_to_go` are marked thread-local. They are the bit reader's position, \
137
+ not shared configuration, and cfitsio never intended two decodes to \
138
+ overlap -- but the tiles of one compressed FITS HDU are independent \
139
+ codestreams and we decode them on a thread pool, which corrupts that state \
140
+ and returns status=414 on every tile after the first. Single-threaded \
141
+ behavior is unchanged. Carry the patch forward on any update; the macro is \
142
+ OC_THREAD_LOCAL, defined next to the min/max compatibility defines."""
143
+ [[component.file]]
144
+ local = "3rdparty/cfitsio/ricecomp.c"
145
+ upstream = "ricecomp.c"
146
+ modified = true
147
+ note = """Keeps the error-code return convention an earlier vendoring \
148
+ introduced, because our binding depends on it, with upstream's \
149
+ buffer-size guard applied on top. A blind update would break the \
150
+ binding; port the fix, do not overwrite."""
151
+ # These three live in this directory but are opencodecs code, not
152
+ # cfitsio's. ours = true means the drift check tracks them for
153
+ # accidental edits but never compares them to upstream.
154
+ [[component.file]]
155
+ local = "3rdparty/cfitsio/fitsio2.h"
156
+ ours = true
157
+ note = """A 50-line stub standing in for the cfitsio internals the two \
158
+ hcompress sources reference (LONGLONG, ffpmsg, FFLOCK), so they build \
159
+ without dragging in the rest of the library."""
160
+ [[component.file]]
161
+ local = "3rdparty/cfitsio/fits_hdecompress_api.h"
162
+ ours = true
163
+ note = "Declares the decode entry points for our binding; cfitsio ships none."
164
+ [[component.file]]
165
+ local = "3rdparty/cfitsio/ricecomp.h"
166
+ ours = true
167
+ note = """Declares the Rice entry points and the negative error codes \
168
+ ricecomp.c returns. Rewritten 2026-09: the drift audit found the \
169
+ previous copy byte-identical to the one in imagecodecs, which is not \
170
+ upstream cfitsio's file but a third project's, and this repository is \
171
+ meant to carry none of it."""
172
+
173
+ [[component]]
174
+ name = "libspng"
175
+ repo = "randy408/libspng"
176
+ ref = "v0.7.4"
177
+ license = "BSD-2-Clause"
178
+ [[component.file]]
179
+ local = "3rdparty/libspng/spng.c"
180
+ upstream = "spng/spng.c"
181
+ modified = true
182
+ note = """Carries three opencodecs changes: the grayscale-defilter \
183
+ patch, the filter_sum_* family (one function per filter instead of a \
184
+ switch inside the per-byte loop), and the matching filter_scanline_* \
185
+ family. The last two are the same transformation applied to the two \
186
+ halves of the encode filter path; both are branch hoisting, and both \
187
+ produce byte-identical output to the code they replaced."""
188
+ [[component.file]]
189
+ local = "3rdparty/libspng/spng.h"
190
+ upstream = "spng/spng.h"
191
+
192
+ [[component]]
193
+ name = "qoi"
194
+ repo = "phoboslab/qoi"
195
+ ref = "4ab68bbd20618a663255625160c40875713f5485"
196
+ license = "MIT"
197
+ note = """Single header, frozen format. qoi publishes no tags, so the \
198
+ ref is a commit rather than a version -- a moving branch would leave \
199
+ `check` with nothing fixed to compare against."""
200
+ [[component.file]]
201
+ local = "3rdparty/qoi/qoi.h"
202
+ upstream = "qoi.h"
203
+ modified = true
204
+ note = """Identical to upstream at the pinned commit except for \
205
+ trailing whitespace on line 583, where upstream has two tabs on an \
206
+ otherwise empty line."""
207
+
208
+ [[component]]
209
+ name = "rgbe"
210
+ upstream = "none"
211
+ license = "no formal grant; see 3rdparty/rgbe/rgbe.txt"
212
+ note = """No upstream to track. The Radiance format was frozen in 1991 \
213
+ and every maintained implementation descends from Bruce Walter's 1995 \
214
+ reference. This copy carries fixes from Mentey and Gohlke plus \
215
+ opencodecs changes to the exponent conversion and resolution-line \
216
+ parsing. See THIRD-PARTY.md; do not drop the credited fixes."""
@@ -0,0 +1,52 @@
1
+ This software is available under 2 licenses -- choose whichever you prefer.
2
+
3
+ ------------------------------------------------------------------------------
4
+ ALTERNATIVE A - MIT License
5
+
6
+ Copyright (c) 2022 Sergii Kudlai
7
+
8
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
9
+ this software and associated documentation files (the "Software"), to deal in
10
+ the Software without restriction, including without limitation the rights to
11
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
12
+ of the Software, and to permit persons to whom the Software is furnished to do
13
+ so, subject to the following conditions:
14
+
15
+ The above copyright notice and this permission notice shall be included in all
16
+ copies or substantial portions of the Software.
17
+
18
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
+ SOFTWARE.
25
+
26
+ ------------------------------------------------------------------------------
27
+ ALTERNATIVE B - The Unlicense
28
+
29
+ This is free and unencumbered software released into the public domain.
30
+
31
+ Anyone is free to copy, modify, publish, use, compile, sell, or
32
+ distribute this software, either in source code form or as a compiled
33
+ binary, for any purpose, commercial or non-commercial, and by any
34
+ means.
35
+
36
+ In jurisdictions that recognize copyright laws, the author or authors
37
+ of this software dedicate any and all copyright interest in the
38
+ software to the public domain. We make this dedication for the benefit
39
+ of the public at large and to the detriment of our heirs and
40
+ successors. We intend this dedication to be an overt act of
41
+ relinquishment in perpetuity of all present and future rights to this
42
+ software under copyright law.
43
+
44
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
45
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
46
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
47
+ IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
48
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
49
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
50
+ OTHER DEALINGS IN THE SOFTWARE.
51
+
52
+ For more information, please refer to <https://unlicense.org>
@@ -0,0 +1,46 @@
1
+ # bcdec
2
+ Small header-only C library to decompress any BC compressed image inspired by incredible stb libaries (<http://nothings.org/stb>)
3
+
4
+ Written by Sergii *"iOrange"* Kudlai in 2022.
5
+
6
+ This library provides functions to decompress blocks of BC compressed images.
7
+
8
+ This library does not allocate memory and is trying to use as less stack as possible.
9
+
10
+ The library was never optimized specifically for speed but for the overall size.
11
+ It has zero external dependencies and is not using any runtime functions.
12
+
13
+ ### Supported BC formats:
14
+ - BC1 (also known as DXT1) + it's "binary alpha" variant BC1A (DXT1A)
15
+ - BC2 (also known as DXT3)
16
+ - BC3 (also known as DXT5)
17
+ - BC4 (also known as ATI1N)
18
+ - BC5 (also known as ATI2N)
19
+ - BC6H (HDR format)
20
+ - BC7
21
+
22
+ ---
23
+
24
+ BC1/BC2/BC3/BC7 are expected to decompress into 4\*4 RGBA blocks 8bit per component (32bit pixel)
25
+ BC4/BC5 are expected to decompress into 4\*4 R/RG blocks 8bit per component (8bit and 16bit pixel)
26
+ BC6H is expected to decompress into 4*4 RGB blocks of either 32bit float or 16bit "half" per
27
+ component (96bit or 48bit pixel)
28
+
29
+ ---
30
+
31
+ You will also find included test program that converts compressed DDS files into TGA/HDR.
32
+ It is a good start to learn on how to use the **bcdec** library.
33
+ It comes with some test images in the *test_images* folder and a batch script *test_bcdec.bat* to run over them.
34
+
35
+ ---
36
+
37
+ Used HDRI image "Lythwood Room" from <https://polyhaven.com/a/lythwood_room> licensed under CC0 license.
38
+
39
+ ---
40
+
41
+ ### CREDITS:
42
+ - Aras Pranckevičius (@aras-p)
43
+ - BC1/BC3 decoders optimizations (up to 3x the speed)
44
+ - BC6H/BC7 bits pulling routines optimizations
45
+ - optimized BC6H by moving unquantize out of the loop
46
+ - Split BC6H decompression function into 'half' and 'float' variants
@@ -1,12 +1,14 @@
1
- /* bcdec.h - v0.97
1
+ /* bcdec.h - v0.985
2
2
  provides functions to decompress blocks of BC compressed images
3
3
  written by Sergii "iOrange" Kudlai in 2022
4
4
 
5
5
  This library does not allocate memory and is trying to use as less stack as possible
6
6
 
7
- The library was never optimized specifically for speed but for the overall size
7
+ This library was never optimized specifically for speed but for the overall size
8
8
  it has zero external dependencies and is not using any runtime functions
9
9
 
10
+ This library was writtem by humans and will never contain any LLM-generated code
11
+
10
12
  Supported BC formats:
11
13
  BC1 (also known as DXT1) + it's "binary alpha" variant BC1A (DXT1A)
12
14
  BC2 (also known as DXT3)
@@ -41,6 +43,7 @@
41
43
 
42
44
  bugfixes:
43
45
  @linkmauve
46
+ @wkjarosz
44
47
 
45
48
  LICENSE: See end of file for license information.
46
49
  */
@@ -49,7 +52,7 @@
49
52
  #define BCDEC_HEADER_INCLUDED
50
53
 
51
54
  #define BCDEC_VERSION_MAJOR 0
52
- #define BCDEC_VERSION_MINOR 98
55
+ #define BCDEC_VERSION_MINOR 985
53
56
 
54
57
  /* if BCDEC_STATIC causes problems, try defining BCDECDEF to 'inline' or 'static inline' */
55
58
  #ifndef BCDECDEF
@@ -119,6 +122,22 @@ BCDECDEF void bcdec_bc7(const void* compressedBlock, void* decompressedBlock, in
119
122
 
120
123
  #ifdef BCDEC_IMPLEMENTATION
121
124
 
125
+ static unsigned short bcdec__getu16le(const void* s) {
126
+ unsigned short l = (unsigned short)((const unsigned char*)s)[0];
127
+ unsigned short h = (unsigned short)((const unsigned char*)s)[1];
128
+ return l | (h << 8);
129
+ }
130
+ static unsigned int bcdec__getu32le(const void* s) {
131
+ unsigned int l = bcdec__getu16le(s);
132
+ unsigned int h = bcdec__getu16le((const unsigned char*)s + 2);
133
+ return l | (h << 16);
134
+ }
135
+ static unsigned long long bcdec__getu64le(const void* s) {
136
+ unsigned long long l = bcdec__getu32le(s);
137
+ unsigned long long h = bcdec__getu32le((const unsigned char*)s + 4);
138
+ return l | (h << 32);
139
+ }
140
+
122
141
  static void bcdec__color_block(const void* compressedBlock, void* decompressedBlock, int destinationPitch, int onlyOpaqueMode) {
123
142
  unsigned short c0, c1;
124
143
  unsigned int refColors[4]; /* 0xAABBGGRR */
@@ -127,8 +146,8 @@ static void bcdec__color_block(const void* compressedBlock, void* decompressedBl
127
146
  int i, j, idx;
128
147
  unsigned int r0, g0, b0, r1, g1, b1, r, g, b;
129
148
 
130
- c0 = ((unsigned short*)compressedBlock)[0];
131
- c1 = ((unsigned short*)compressedBlock)[1];
149
+ c0 = bcdec__getu16le(compressedBlock);
150
+ c1 = bcdec__getu16le((const unsigned char*)compressedBlock + 2);
132
151
 
133
152
  /* Unpack 565 ref colors */
134
153
  r0 = (c0 >> 11) & 0x1F;
@@ -173,7 +192,7 @@ static void bcdec__color_block(const void* compressedBlock, void* decompressedBl
173
192
  refColors[3] = 0x00000000;
174
193
  }
175
194
 
176
- colorIndices = ((unsigned int*)compressedBlock)[1];
195
+ colorIndices = bcdec__getu32le((const unsigned char*)compressedBlock + 4);
177
196
 
178
197
  /* Fill out the decompressed color block */
179
198
  dstColors = (unsigned char*)decompressedBlock;
@@ -189,18 +208,22 @@ static void bcdec__color_block(const void* compressedBlock, void* decompressedBl
189
208
  }
190
209
 
191
210
  static void bcdec__sharp_alpha_block(const void* compressedBlock, void* decompressedBlock, int destinationPitch) {
192
- unsigned short* alpha;
211
+ unsigned short alpha;
212
+ const unsigned char* alphaPtr;
193
213
  unsigned char* decompressed;
194
214
  int i, j;
195
215
 
196
- alpha = (unsigned short*)compressedBlock;
216
+ alphaPtr = (const unsigned char*)compressedBlock;
197
217
  decompressed = (unsigned char*)decompressedBlock;
198
218
 
199
219
  for (i = 0; i < 4; ++i) {
220
+ alpha = bcdec__getu16le(alphaPtr);
221
+
200
222
  for (j = 0; j < 4; ++j) {
201
- decompressed[j * 4] = ((alpha[i] >> (4 * j)) & 0x0F) * 17;
223
+ decompressed[j * 4] = ((alpha >> (4 * j)) & 0x0F) * 17;
202
224
  }
203
225
 
226
+ alphaPtr += 2;
204
227
  decompressed += destinationPitch;
205
228
  }
206
229
  }
@@ -211,7 +234,7 @@ static void bcdec__smooth_alpha_block(const void* compressedBlock, void* decompr
211
234
  int i, j;
212
235
  unsigned long long block, indices;
213
236
 
214
- block = *(unsigned long long*)compressedBlock;
237
+ block = bcdec__getu64le(compressedBlock);
215
238
  decompressed = (unsigned char*)decompressedBlock;
216
239
 
217
240
  alpha[0] = block & 0xFF;
@@ -258,7 +281,7 @@ static void bcdec__bc4_block(const void* compressedBlock, void* decompressedBloc
258
281
  static int aWeights4[4] = { 13107, 26215, 39321, 52429 };
259
282
  static int aWeights6[6] = { 9363, 18724, 28086, 37450, 46812, 56173 };
260
283
 
261
- block = *(unsigned long long*)compressedBlock;
284
+ block = bcdec__getu64le(compressedBlock);
262
285
 
263
286
  if (isSigned) {
264
287
  alpha[0] = (char)(block & 0xFF);
@@ -290,10 +313,16 @@ static void bcdec__bc4_block(const void* compressedBlock, void* decompressedBloc
290
313
 
291
314
  indices = block >> 16;
292
315
  if (isSigned) {
293
- sblock = (char*)decompressedBlock;
316
+ /* Kept identical to upstream. This is the BC4/BC5 SNORM path,
317
+ values -127..127, and an earlier vendoring had a plain char
318
+ cast here. That turns out to be equivalent, because sblock is
319
+ signed char* so the value round-trips on both signed-char and
320
+ unsigned-char targets (verified with -funsigned-char), but
321
+ matching upstream byte for byte keeps future diffs honest. */
322
+ sblock = (signed char*)decompressedBlock;
294
323
  for (i = 0; i < 4; ++i) {
295
324
  for (j = 0; j < 4; ++j) {
296
- sblock[j * pixelSize] = (char)alpha[indices & 0x07];
325
+ sblock[j * pixelSize] = (signed char)alpha[indices & 0x07];
297
326
  indices >>= 3;
298
327
  }
299
328
  sblock += destinationPitch;
@@ -316,7 +345,7 @@ static void bcdec__bc4_block_float(const void* compressedBlock, void* decompress
316
345
  int i, j;
317
346
  unsigned long long block, indices;
318
347
 
319
- block = *(unsigned long long*)compressedBlock;
348
+ block = bcdec__getu64le(compressedBlock);
320
349
  decompressed = (float*)decompressedBlock;
321
350
 
322
351
  if (isSigned) {
@@ -600,8 +629,8 @@ BCDECDEF void bcdec_bc6h_half(const void* compressedBlock, void* decompressedBlo
600
629
 
601
630
  decompressed = (unsigned short*)decompressedBlock;
602
631
 
603
- bstream.low = ((unsigned long long*)compressedBlock)[0];
604
- bstream.high = ((unsigned long long*)compressedBlock)[1];
632
+ bstream.low = bcdec__getu64le(compressedBlock);
633
+ bstream.high = bcdec__getu64le((const unsigned char*)compressedBlock + 8);
605
634
 
606
635
  r[0] = r[1] = r[2] = r[3] = 0;
607
636
  g[0] = g[1] = g[2] = g[3] = 0;
@@ -1237,8 +1266,8 @@ BCDECDEF void bcdec_bc7(const void* compressedBlock, void* decompressedBlock, in
1237
1266
 
1238
1267
  decompressed = (unsigned char*)decompressedBlock;
1239
1268
 
1240
- bstream.low = ((unsigned long long*)compressedBlock)[0];
1241
- bstream.high = ((unsigned long long*)compressedBlock)[1];
1269
+ bstream.low = bcdec__getu64le(compressedBlock);
1270
+ bstream.high = bcdec__getu64le((const unsigned char*)compressedBlock + 8);
1242
1271
 
1243
1272
  for (mode = 0; mode < 8 && (0 == bcdec__bitstream_read_bit(&bstream)); ++mode);
1244
1273
 
@@ -0,0 +1,21 @@
1
+ Bitshuffle - Filter for improving compression of typed binary data.
2
+
3
+ Copyright (c) 2014 Kiyoshi Masui (kiyo@physics.ubc.ca)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.