software/scaling/extensions: add inline attributes
This commit is contained in:
parent
838ace388c
commit
5f76845334
@ -3,12 +3,14 @@ use ::{Picture, decoder, Error, frame};
|
|||||||
use super::{Context, Flags, flag};
|
use super::{Context, Flags, flag};
|
||||||
|
|
||||||
impl<'a> Picture<'a> {
|
impl<'a> Picture<'a> {
|
||||||
|
#[inline]
|
||||||
pub fn scaler(&self, width: u32, height: u32, flags: Flags) -> Result<Context, Error> {
|
pub fn scaler(&self, width: u32, height: u32, flags: Flags) -> Result<Context, Error> {
|
||||||
Context::get(self.format(), self.width(), self.height(),
|
Context::get(self.format(), self.width(), self.height(),
|
||||||
self.format(), width, height,
|
self.format(), width, height,
|
||||||
flags)
|
flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
pub fn converter(&self, format: format::Pixel) -> Result<Context, Error> {
|
pub fn converter(&self, format: format::Pixel) -> Result<Context, Error> {
|
||||||
Context::get(self.format(), self.width(), self.height(),
|
Context::get(self.format(), self.width(), self.height(),
|
||||||
format, self.width(), self.height(),
|
format, self.width(), self.height(),
|
||||||
@ -17,12 +19,14 @@ impl<'a> Picture<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl frame::Video {
|
impl frame::Video {
|
||||||
|
#[inline]
|
||||||
pub fn scaler(&self, width: u32, height: u32, flags: Flags) -> Result<Context, Error> {
|
pub fn scaler(&self, width: u32, height: u32, flags: Flags) -> Result<Context, Error> {
|
||||||
Context::get(self.format(), self.width(), self.height(),
|
Context::get(self.format(), self.width(), self.height(),
|
||||||
self.format(), width, height,
|
self.format(), width, height,
|
||||||
flags)
|
flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
pub fn converter(&self, format: format::Pixel) -> Result<Context, Error> {
|
pub fn converter(&self, format: format::Pixel) -> Result<Context, Error> {
|
||||||
Context::get(self.format(), self.width(), self.height(),
|
Context::get(self.format(), self.width(), self.height(),
|
||||||
format, self.width(), self.height(),
|
format, self.width(), self.height(),
|
||||||
@ -32,12 +36,14 @@ impl frame::Video {
|
|||||||
|
|
||||||
|
|
||||||
impl decoder::Video {
|
impl decoder::Video {
|
||||||
|
#[inline]
|
||||||
pub fn scaler(&self, width: u32, height: u32, flags: Flags) -> Result<Context, Error> {
|
pub fn scaler(&self, width: u32, height: u32, flags: Flags) -> Result<Context, Error> {
|
||||||
Context::get(self.format(), self.width(), self.height(),
|
Context::get(self.format(), self.width(), self.height(),
|
||||||
self.format(), width, height,
|
self.format(), width, height,
|
||||||
flags)
|
flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
pub fn converter(&self, format: format::Pixel) -> Result<Context, Error> {
|
pub fn converter(&self, format: format::Pixel) -> Result<Context, Error> {
|
||||||
Context::get(self.format(), self.width(), self.height(),
|
Context::get(self.format(), self.width(), self.height(),
|
||||||
format, self.width(), self.height(),
|
format, self.width(), self.height(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user