Skip to content

Image decoders feature support #9542

Description

@NicolasHug

Just opening this for ref

  Legend: Y = supported · — = not applicable / no code path · N = explicitly unsupported (raises) · warn = accepted but ignored with a warning

  ┌───────────────────────────────┬───────────────────┬───────────────────────────┬────────────────────────────┬────────────┬────────────────┬──────────────────┬───────────────────┬─────────────────────┐
  │            Feature            │ decode_jpeg (CPU) │ decode_jpeg (CUDA nvJPEG) │ decode_jpeg (CUDA rocJPEG) │ decode_png │  decode_webp   │    decode_gif    │    decode_avif    │     decode_heic     │
  ├───────────────────────────────┼───────────────────┼───────────────────────────┼────────────────────────────┼────────────┼────────────────┼──────────────────┼───────────────────┼─────────────────────┤
  │ Format                        │ JPEG              │ JPEG                      │ JPEG                       │ PNG        │ WebP           │ GIF              │ AVIF              │ HEIC                │
  ├───────────────────────────────┼───────────────────┼───────────────────────────┼────────────────────────────┼────────────┼────────────────┼──────────────────┼───────────────────┼─────────────────────┤
  │ In this repo?                 │ Y                 │ Y                         │ Y                          │ Y          │ Y              │ Y                │ No (external pkg) │ No (external pkg)   │
  ├───────────────────────────────┼───────────────────┼───────────────────────────┼────────────────────────────┼────────────┼────────────────┼──────────────────┼───────────────────┼─────────────────────┤
  │ Underlying lib                │ libjpeg           │ nvJPEG                    │ rocJPEG                    │ libpng     │ libwebp        │ vendored giflib  │ libavif           │ libheif             │
  ├───────────────────────────────┼───────────────────┼───────────────────────────┼────────────────────────────┼────────────┼────────────────┼──────────────────┼───────────────────┼─────────────────────┤
  │ Mode: UNCHANGED               │ Y                 │ Y                         │ Y                          │ Y          │ Y              │ — (always RGB)   │ Y                 │ Y                   │
  ├───────────────────────────────┼───────────────────┼───────────────────────────┼────────────────────────────┼────────────┼────────────────┼──────────────────┼───────────────────┼─────────────────────┤
  │ Mode: GRAY                    │ Y                 │ Y                         │ Y                          │ Y          │ warn→unchanged │ —                │ N (→unchanged)    │ N (→unchanged)      │
  ├───────────────────────────────┼───────────────────┼───────────────────────────┼────────────────────────────┼────────────┼────────────────┼──────────────────┼───────────────────┼─────────────────────┤
  │ Mode: GRAY_ALPHA              │ N (raise)         │ N (raise)                 │ N (raise)                  │ Y          │ warn→unchanged │ —                │ N (→unchanged)    │ N (→unchanged)      │
  ├───────────────────────────────┼───────────────────┼───────────────────────────┼────────────────────────────┼────────────┼────────────────┼──────────────────┼───────────────────┼─────────────────────┤
  │ Mode: RGB                     │ Y                 │ Y                         │ Y                          │ Y          │ Y              │ —                │ Y                 │ Y                   │
  ├───────────────────────────────┼───────────────────┼───────────────────────────┼────────────────────────────┼────────────┼────────────────┼──────────────────┼───────────────────┼─────────────────────┤
  │ Mode: RGB_ALPHA (RGBA)        │ N (raise)         │ N (raise)                 │ N (raise)                  │ Y          │ Y              │ —                │ Y                 │ Y                   │
  ├───────────────────────────────┼───────────────────┼───────────────────────────┼────────────────────────────┼────────────┼────────────────┼──────────────────┼───────────────────┼─────────────────────┤
  │ CPU                           │ Y                 │ —                         │ —                          │ Y          │ Y              │ Y                │ Y                 │ Y                   │
  ├───────────────────────────────┼───────────────────┼───────────────────────────┼────────────────────────────┼────────────┼────────────────┼──────────────────┼───────────────────┼─────────────────────┤
  │ CUDA / GPU                    │ —                 │ Y (NVIDIA)                │ Y (AMD)                    │ —          │ —              │ —                │ —                 │ —                   │
  ├───────────────────────────────┼───────────────────┼───────────────────────────┼────────────────────────────┼────────────┼────────────────┼──────────────────┼───────────────────┼─────────────────────┤
  │ Alpha channel                 │ — (n/a)           │ — (n/a)                   │ — (n/a)                    │ Y          │ Y              │ compositing only │ Y                 │ Y                   │
  ├───────────────────────────────┼───────────────────┼───────────────────────────┼────────────────────────────┼────────────┼────────────────┼──────────────────┼───────────────────┼─────────────────────┤
  │ 16-bit / >8-bit output        │ — (8-bit only)    │ 8-bit only                │ 8-bit only                 │ Y (uint16) │ 8-bit only     │ 8-bit only       │ Y (10/12→uint16)  │ Y (10/12/16→uint16) │
  ├───────────────────────────────┼───────────────────┼───────────────────────────┼────────────────────────────┼────────────┼────────────────┼──────────────────┼───────────────────┼─────────────────────┤
  │ Batch (list input)            │ list (loops)      │ Y (true HW batch)         │ Y                          │ No         │ No             │ No               │ No                │ No                  │
  ├───────────────────────────────┼───────────────────┼───────────────────────────┼────────────────────────────┼────────────┼────────────────┼──────────────────┼───────────────────┼─────────────────────┤
  │ Multi-frame / animation       │ —                 │ —                         │ —                          │ —          │ N (rejected)   │ Y (4-D N,C,H,W)  │ N (errors >1 img) │ primary image only  │
  ├───────────────────────────────┼───────────────────┼───────────────────────────┼────────────────────────────┼────────────┼────────────────┼──────────────────┼───────────────────┼─────────────────────┤
  │ apply_exif_orientation        │ Y                 │ No                        │ No                         │ Y          │ No             │ No               │ No                │ No                  │
  ├───────────────────────────────┼───────────────────┼───────────────────────────┼────────────────────────────┼────────────┼────────────────┼──────────────────┼───────────────────┼─────────────────────┤
  │ Auto-detected by decode_image │ Y                 │ (via CPU)                 │ —                          │ Y          │ Y              │ Y                │ No                │ No                  │
  ├───────────────────────────────┼───────────────────┼───────────────────────────┼────────────────────────────┼────────────┼────────────────┼──────────────────┼───────────────────┼─────────────────────┤
  │ Platform                      │ all               │ all + NVIDIA              │ all + AMD                  │ all        │ all            │ all              │ Linux-only, beta  │ Linux-only, beta    │
  └───────────────────────────────┴───────────────────┴───────────────────────────┴────────────────────────────┴────────────┴────────────────┴──────────────────┴───────────────────┴─────────────────────┘

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions