pub struct Codec;Expand description
Marker type implementing tile-batch CUDA surface decode traits.
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 = J2kContext
type Context = J2kContext
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 = J2kContext
type Context = J2kContext
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 = J2kContext
type Context = J2kContext
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