j2k-cuda 0.11.0

CUDA adapter for resident HTJ2K decode/encode and shared JPEG 2000 stages
Documentation
// SPDX-License-Identifier: MIT OR Apache-2.0
// @generated by `cargo xtask promotion-codegen`; do not edit by hand.

use j2k_core::{CompressedPayloadKind as Payload, CompressedTransferSyntax as Syntax, PixelFormat};

use crate::routing::promotion::{PromotionCell, PromotionOperation as Operation};

const CUDA_PART1: &str = "ded1eb045f9673e5bbe64dc873be3ba227ecb61ec11b6c9ad53653dbcc993f44";
const CUDA_PART15: &str = "77370c83710ebf578139ad0bfa2608ffad989d83faec8d5eee213691290c0088";

pub(crate) const SOURCE_EVIDENCE: &[&str] = &[CUDA_PART1, CUDA_PART15];

const fn cell(
    surface: (u16, PixelFormat),
    transfer_syntax: Syntax,
    payload_kind: Payload,
    operation: Operation,
    minimum: (u32, u32),
    minimum_count: usize,
    source_evidence: &'static str,
) -> PromotionCell {
    PromotionCell {
        source_components: surface.0,
        format: surface.1,
        transfer_syntax,
        payload_kind,
        operation,
        minimum_width: minimum.0,
        minimum_height: minimum.1,
        minimum_count,
        source_evidence,
    }
}

pub(crate) const PROMOTION_CELLS: &[PromotionCell] = &[
    cell(
        (3, PixelFormat::Rgb8),
        Syntax::Jpeg2000Lossless,
        Payload::Jpeg2000Codestream,
        Operation::Full,
        (256, 149),
        1,
        CUDA_PART1,
    ),
    cell(
        (3, PixelFormat::Rgb8),
        Syntax::Jpeg2000Lossless,
        Payload::Jpeg2000Codestream,
        Operation::Region,
        (128, 74),
        1,
        CUDA_PART1,
    ),
    cell(
        (3, PixelFormat::Rgb8),
        Syntax::Jpeg2000Lossless,
        Payload::Jpeg2000Codestream,
        Operation::ScaledHalf,
        (1296, 972),
        1,
        CUDA_PART1,
    ),
    cell(
        (3, PixelFormat::Rgb8),
        Syntax::Jpeg2000Lossy,
        Payload::Jpeg2000Codestream,
        Operation::Full,
        (640, 480),
        1,
        CUDA_PART1,
    ),
    cell(
        (3, PixelFormat::Rgb8),
        Syntax::Jpeg2000Lossy,
        Payload::Jpeg2000Codestream,
        Operation::Region,
        (320, 240),
        1,
        CUDA_PART1,
    ),
    cell(
        (3, PixelFormat::Rgb8),
        Syntax::Jpeg2000Lossy,
        Payload::Jpeg2000Codestream,
        Operation::ScaledHalf,
        (320, 240),
        1,
        CUDA_PART1,
    ),
    cell(
        (1, PixelFormat::Gray8),
        Syntax::Jpeg2000Lossless,
        Payload::Jpeg2000Codestream,
        Operation::Full,
        (640, 480),
        1,
        CUDA_PART1,
    ),
    cell(
        (1, PixelFormat::Gray8),
        Syntax::Jpeg2000Lossy,
        Payload::Jpeg2000Codestream,
        Operation::Full,
        (3323, 891),
        1,
        CUDA_PART1,
    ),
    cell(
        (1, PixelFormat::Gray8),
        Syntax::Jpeg2000Lossy,
        Payload::Jpeg2000Codestream,
        Operation::Region,
        (1661, 445),
        1,
        CUDA_PART1,
    ),
    cell(
        (1, PixelFormat::Gray8),
        Syntax::Jpeg2000Lossy,
        Payload::Jpeg2000Codestream,
        Operation::ScaledHalf,
        (1662, 446),
        1,
        CUDA_PART1,
    ),
    cell(
        (3, PixelFormat::Rgb8),
        Syntax::Jpeg2000Lossless,
        Payload::Jpeg2000Codestream,
        Operation::Repeated,
        (256, 149),
        16,
        CUDA_PART1,
    ),
    cell(
        (3, PixelFormat::Rgb8),
        Syntax::Jpeg2000Lossy,
        Payload::Jpeg2000Codestream,
        Operation::Repeated,
        (256, 149),
        16,
        CUDA_PART1,
    ),
    cell(
        (1, PixelFormat::Gray8),
        Syntax::Jpeg2000Lossless,
        Payload::Jpeg2000Codestream,
        Operation::Repeated,
        (640, 480),
        16,
        CUDA_PART1,
    ),
    cell(
        (1, PixelFormat::Gray8),
        Syntax::Jpeg2000Lossy,
        Payload::Jpeg2000Codestream,
        Operation::Repeated,
        (3323, 891),
        16,
        CUDA_PART1,
    ),
    cell(
        (3, PixelFormat::Rgb8),
        Syntax::HtJpeg2000Lossy,
        Payload::Jpeg2000Codestream,
        Operation::Full,
        (640, 480),
        1,
        CUDA_PART15,
    ),
    cell(
        (3, PixelFormat::Rgb8),
        Syntax::HtJpeg2000Lossy,
        Payload::Jpeg2000Codestream,
        Operation::Region,
        (320, 240),
        1,
        CUDA_PART15,
    ),
    cell(
        (3, PixelFormat::Rgb8),
        Syntax::HtJpeg2000Lossy,
        Payload::Jpeg2000Codestream,
        Operation::ScaledHalf,
        (320, 240),
        1,
        CUDA_PART15,
    ),
    cell(
        (3, PixelFormat::Rgb8),
        Syntax::HtJpeg2000Lossy,
        Payload::Jpeg2000Codestream,
        Operation::Repeated,
        (640, 480),
        16,
        CUDA_PART15,
    ),
    cell(
        (3, PixelFormat::Rgb8),
        Syntax::HtJpeg2000Lossless,
        Payload::JphFile,
        Operation::Full,
        (768, 512),
        1,
        CUDA_PART15,
    ),
    cell(
        (3, PixelFormat::Rgb8),
        Syntax::HtJpeg2000Lossless,
        Payload::JphFile,
        Operation::Region,
        (384, 256),
        1,
        CUDA_PART15,
    ),
    cell(
        (3, PixelFormat::Rgb8),
        Syntax::HtJpeg2000Lossless,
        Payload::JphFile,
        Operation::ScaledHalf,
        (384, 256),
        1,
        CUDA_PART15,
    ),
    cell(
        (3, PixelFormat::Rgb8),
        Syntax::HtJpeg2000Lossless,
        Payload::JphFile,
        Operation::Repeated,
        (768, 512),
        16,
        CUDA_PART15,
    ),
];