pub struct Codec;Expand description
JPEG codec marker used by J2K’s generic CUDA decode traits.
Implementations§
Source§impl Codec
impl Codec
Sourcepub fn diagnose_tile_rgb8_chunked_entropy_with_session(
input: &[u8],
config: CudaJpegChunkedEntropyConfig,
session: &mut CudaSession,
) -> Result<CudaJpegChunkedEntropyReport, Error>
pub fn diagnose_tile_rgb8_chunked_entropy_with_session( input: &[u8], config: CudaJpegChunkedEntropyConfig, session: &mut CudaSession, ) -> Result<CudaJpegChunkedEntropyReport, Error>
Run experimental chunked JPEG entropy self-sync diagnostics for a 4:2:0 RGB8 tile.
This does not decode pixels and does not affect production CUDA routing.
Sourcepub fn decode_tile_rgb8_into_cuda_buffer_with_session(
input: &[u8],
output: &CudaDeviceBuffer,
pitch_bytes: usize,
session: &mut CudaSession,
) -> Result<CudaSurfaceStats, Error>
pub fn decode_tile_rgb8_into_cuda_buffer_with_session( input: &[u8], output: &CudaDeviceBuffer, pitch_bytes: usize, session: &mut CudaSession, ) -> Result<CudaSurfaceStats, Error>
Decode one full JPEG tile to caller-owned CUDA RGB8 memory using a session.
This is a strict J2K-owned CUDA-kernel path and currently supports full-tile RGB8 fast 4:2:0, 4:2:2, and 4:4:4 YCbCr JPEG inputs.
Sourcepub fn decode_tiles_to_device_with_session(
inputs: &[&[u8]],
fmt: PixelFormat,
backend: BackendRequest,
session: &mut CudaSession,
) -> Result<Vec<Surface>, Error>
pub fn decode_tiles_to_device_with_session( inputs: &[&[u8]], fmt: PixelFormat, backend: BackendRequest, session: &mut CudaSession, ) -> Result<Vec<Surface>, Error>
Decode many JPEG tiles to J2K surfaces using a caller-owned CUDA session.
Trait Implementations§
impl Copy for Codec
impl Eq for Codec
Source§impl ImageCodec for Codec
impl ImageCodec for Codec
impl StructuralPartialEq for Codec
Source§impl TileBatchDecodeDevice for Codec
impl TileBatchDecodeDevice for Codec
Source§type Context = DecoderContext
type Context = DecoderContext
Codec-specific context cached across tiles.
Source§type DeviceSurface = Surface
type DeviceSurface = Surface
Device surface returned by decode calls.
Source§fn decode_tile_to_device<'a>(
ctx: &mut DecoderContext<Self::Context>,
pool: &mut Self::Pool,
input: &'a [u8],
fmt: PixelFormat,
backend: BackendRequest,
) -> Result<Self::DeviceSurface, Self::Error>
fn decode_tile_to_device<'a>( ctx: &mut DecoderContext<Self::Context>, pool: &mut Self::Pool, input: &'a [u8], fmt: PixelFormat, backend: BackendRequest, ) -> Result<Self::DeviceSurface, Self::Error>
Decode one tile to the requested backend.
Source§fn decode_tile_region_to_device<'a>(
ctx: &mut DecoderContext<Self::Context>,
pool: &mut Self::Pool,
input: &'a [u8],
fmt: PixelFormat,
roi: Rect,
backend: BackendRequest,
) -> Result<Self::DeviceSurface, Self::Error>
fn decode_tile_region_to_device<'a>( ctx: &mut DecoderContext<Self::Context>, pool: &mut Self::Pool, input: &'a [u8], fmt: PixelFormat, roi: Rect, backend: BackendRequest, ) -> Result<Self::DeviceSurface, Self::Error>
Decode one tile region to the requested backend.
Source§fn decode_tile_scaled_to_device<'a>(
ctx: &mut DecoderContext<Self::Context>,
pool: &mut Self::Pool,
input: &'a [u8],
fmt: PixelFormat,
scale: Downscale,
backend: BackendRequest,
) -> Result<Self::DeviceSurface, Self::Error>
fn decode_tile_scaled_to_device<'a>( ctx: &mut DecoderContext<Self::Context>, pool: &mut Self::Pool, input: &'a [u8], fmt: PixelFormat, scale: Downscale, backend: BackendRequest, ) -> Result<Self::DeviceSurface, Self::Error>
Decode one tile at reduced resolution to the requested backend.
Source§fn decode_tile_region_scaled_to_device<'a>(
ctx: &mut DecoderContext<Self::Context>,
pool: &mut Self::Pool,
input: &'a [u8],
fmt: PixelFormat,
roi: Rect,
scale: Downscale,
backend: BackendRequest,
) -> Result<Self::DeviceSurface, Self::Error>
fn decode_tile_region_scaled_to_device<'a>( ctx: &mut DecoderContext<Self::Context>, pool: &mut Self::Pool, input: &'a [u8], fmt: PixelFormat, roi: Rect, scale: Downscale, backend: BackendRequest, ) -> Result<Self::DeviceSurface, Self::Error>
Decode one tile region at reduced resolution to the requested backend.
Source§impl TileBatchDecodeManyDevice for Codec
impl TileBatchDecodeManyDevice for Codec
Source§type Context = DecoderContext
type Context = DecoderContext
Codec-specific context cached across tiles.
Source§type DeviceSurface = Surface
type DeviceSurface = Surface
Device surface returned by decode calls.
Source§fn decode_tiles_to_device(
ctx: &mut DecoderContext<Self::Context>,
pool: &mut Self::Pool,
inputs: &[&[u8]],
fmt: PixelFormat,
backend: BackendRequest,
) -> Result<Vec<Self::DeviceSurface>, Self::Error>
fn decode_tiles_to_device( ctx: &mut DecoderContext<Self::Context>, pool: &mut Self::Pool, inputs: &[&[u8]], fmt: PixelFormat, backend: BackendRequest, ) -> Result<Vec<Self::DeviceSurface>, Self::Error>
Decode many full tiles to the requested backend, preserving input order.
Source§impl TileBatchDecodeSubmit for Codec
impl TileBatchDecodeSubmit for Codec
Source§type Context = DecoderContext
type Context = DecoderContext
Codec-specific context cached across tiles.
Source§type Session = CudaSession
type Session = CudaSession
Mutable session state shared across submissions.
Source§type DeviceSurface = Surface
type DeviceSurface = Surface
Device surface returned by completed submissions.
Source§type SubmittedSurface = ReadySubmission<Surface, Error>
type SubmittedSurface = ReadySubmission<Surface, Error>
Submission handle type.
Source§fn submit_tile_to_device(
ctx: &mut DecoderContext<Self::Context>,
session: &mut Self::Session,
pool: &mut Self::Pool,
input: &[u8],
fmt: PixelFormat,
backend: BackendRequest,
) -> Result<Self::SubmittedSurface, Self::Error>
fn submit_tile_to_device( ctx: &mut DecoderContext<Self::Context>, session: &mut Self::Session, pool: &mut Self::Pool, input: &[u8], fmt: PixelFormat, backend: BackendRequest, ) -> Result<Self::SubmittedSurface, Self::Error>
Submit one full tile to the requested backend.
Source§fn submit_tile_region_to_device(
ctx: &mut DecoderContext<Self::Context>,
session: &mut Self::Session,
pool: &mut Self::Pool,
input: &[u8],
fmt: PixelFormat,
roi: Rect,
backend: BackendRequest,
) -> Result<Self::SubmittedSurface, Self::Error>
fn submit_tile_region_to_device( ctx: &mut DecoderContext<Self::Context>, session: &mut Self::Session, pool: &mut Self::Pool, input: &[u8], fmt: PixelFormat, roi: Rect, backend: BackendRequest, ) -> Result<Self::SubmittedSurface, Self::Error>
Submit one tile region to the requested backend.
Source§fn submit_tile_scaled_to_device(
ctx: &mut DecoderContext<Self::Context>,
session: &mut Self::Session,
pool: &mut Self::Pool,
input: &[u8],
fmt: PixelFormat,
scale: Downscale,
backend: BackendRequest,
) -> Result<Self::SubmittedSurface, Self::Error>
fn submit_tile_scaled_to_device( ctx: &mut DecoderContext<Self::Context>, session: &mut Self::Session, pool: &mut Self::Pool, input: &[u8], fmt: PixelFormat, scale: Downscale, backend: BackendRequest, ) -> Result<Self::SubmittedSurface, Self::Error>
Submit one tile at reduced resolution to the requested backend.
Source§fn submit_tile_region_scaled_to_device(
ctx: &mut DecoderContext<Self::Context>,
session: &mut Self::Session,
pool: &mut Self::Pool,
input: &[u8],
fmt: PixelFormat,
roi: Rect,
scale: Downscale,
backend: BackendRequest,
) -> Result<Self::SubmittedSurface, Self::Error>
fn submit_tile_region_scaled_to_device( ctx: &mut DecoderContext<Self::Context>, session: &mut Self::Session, pool: &mut Self::Pool, input: &[u8], fmt: PixelFormat, roi: Rect, scale: Downscale, backend: BackendRequest, ) -> Result<Self::SubmittedSurface, Self::Error>
Submit one tile region at reduced resolution to the requested backend.
Source§fn submit_tile_request_to_device<'a>(
ctx: &mut DecoderContext<Self::Context>,
session: &mut Self::Session,
pool: &mut Self::Pool,
input: &'a [u8],
fmt: PixelFormat,
backend: BackendRequest,
request: DecodeRequest,
) -> Result<Self::SubmittedSurface, Self::Error>
fn submit_tile_request_to_device<'a>( ctx: &mut DecoderContext<Self::Context>, session: &mut Self::Session, pool: &mut Self::Pool, input: &'a [u8], fmt: PixelFormat, backend: BackendRequest, request: DecodeRequest, ) -> Result<Self::SubmittedSurface, Self::Error>
Submit one tile for a normalized full/ROI/scaled request.
Auto Trait Implementations§
impl Freeze for Codec
impl RefUnwindSafe for Codec
impl Send for Codec
impl Sync for Codec
impl Unpin for Codec
impl UnsafeUnpin for Codec
impl UnwindSafe for Codec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more