@@ -2728,33 +2728,30 @@ def write_geotiff_gpu(data: xr.DataArray | cupy.ndarray | np.ndarray,
27282728 ``'packbits'``, ``'zstd'``, ``'lz4'``, ``'jpeg2000'`` (alias
27292729 ``'j2k'``), or ``'lerc'``.
27302730
2731- ``'zstd'`` (default) and ``'deflate'`` compress on the GPU via
2732- nvCOMP batch compression -- the fastest paths and the reason to
2733- use this entry point.
2734-
2735- ``'jpeg'`` uses nvJPEG when libnvjpeg is loadable and falls
2736- back to Pillow otherwise. Unlike ``to_geotiff`` (which rejects
2737- ``compression='jpeg'`` at runtime because its CPU encoder omits
2738- the required TIFF JPEGTables tag (347)), this GPU entry point
2739- emits self-contained JFIF tiles. The two writers therefore
2740- disagree about JPEG-in-TIFF interop: files produced here decode
2741- fine through this library's own reader but may not round-trip
2742- through GDAL/rasterio/libtiff readers that require the
2743- JPEGTables tag. Treat ``write_geotiff_gpu(..., compression=
2744- 'jpeg')`` as "experimental, internal-reader only" until the
2745- JPEGTables fix lands.
2746-
2747- ``'jpeg2000'`` / ``'j2k'`` attempt an nvJPEG2K GPU encode first
2748- and fall back to the CPU encoder (``glymur``) when libnvjpeg2k
2749- is unavailable. The GPU and CPU paths are NOT byte-for-byte
2750- identical (different libraries, different default parameters);
2751- if you need exact CPU-writer parity, use ``to_geotiff`` instead.
2752-
2753- ``'lerc'``, ``'lzw'``, ``'packbits'``, and ``'lz4'`` have no
2754- nvCOMP/CUDA accelerator and fall through to the CPU encoder for
2755- parity with ``to_geotiff`` (LERC is byte-stable across CPU/CPU
2756- because there is only one encoder; the others are likewise
2757- identical bytes).
2731+ Routing per codec:
2732+
2733+ - ``'zstd'`` (default) and ``'deflate'``: nvCOMP batch
2734+ compression on the GPU -- the fastest paths and the reason to
2735+ use this entry point.
2736+ - ``'jpeg'``: nvJPEG when libnvjpeg is loadable, Pillow
2737+ otherwise. Note that ``to_geotiff`` rejects
2738+ ``compression='jpeg'`` at runtime because its CPU encoder
2739+ omits the required TIFF JPEGTables tag (347); this GPU entry
2740+ point instead emits self-contained JFIF tiles. The two
2741+ writers therefore disagree about JPEG-in-TIFF interop. Files
2742+ produced here decode through this library's own reader but
2743+ may not round-trip through GDAL, rasterio, or libtiff
2744+ readers that require the JPEGTables tag. Treat the JPEG path
2745+ as experimental and internal-reader-only until the
2746+ JPEGTables fix lands.
2747+ - ``'jpeg2000'`` and ``'j2k'``: nvJPEG2K GPU encode when
2748+ available, glymur CPU encode otherwise. The two paths are
2749+ not byte-for-byte identical (different libraries, different
2750+ default parameters); use ``to_geotiff`` if you need exact
2751+ CPU-writer parity.
2752+ - ``'lerc'``, ``'lzw'``, ``'packbits'``, and ``'lz4'``: no
2753+ nvCOMP/CUDA accelerator, so these fall through to the CPU
2754+ encoder for byte-stable parity with ``to_geotiff``.
27582755 compression_level : int or None
27592756 Compression effort level. Accepted for API compatibility but
27602757 currently ignored -- nvCOMP does not expose level control.
0 commit comments