software/scaling/extensions: add inline attributes

This commit is contained in:
meh 2015-10-14 17:49:35 +02:00
parent 838ace388c
commit 5f76845334

View File

@ -3,12 +3,14 @@ use ::{Picture, decoder, Error, frame};
use super::{Context, Flags, flag};
impl<'a> Picture<'a> {
#[inline]
pub fn scaler(&self, width: u32, height: u32, flags: Flags) -> Result<Context, Error> {
Context::get(self.format(), self.width(), self.height(),
self.format(), width, height,
flags)
}
#[inline]
pub fn converter(&self, format: format::Pixel) -> Result<Context, Error> {
Context::get(self.format(), self.width(), self.height(),
format, self.width(), self.height(),
@ -17,12 +19,14 @@ impl<'a> Picture<'a> {
}
impl frame::Video {
#[inline]
pub fn scaler(&self, width: u32, height: u32, flags: Flags) -> Result<Context, Error> {
Context::get(self.format(), self.width(), self.height(),
self.format(), width, height,
flags)
}
#[inline]
pub fn converter(&self, format: format::Pixel) -> Result<Context, Error> {
Context::get(self.format(), self.width(), self.height(),
format, self.width(), self.height(),
@ -32,12 +36,14 @@ impl frame::Video {
impl decoder::Video {
#[inline]
pub fn scaler(&self, width: u32, height: u32, flags: Flags) -> Result<Context, Error> {
Context::get(self.format(), self.width(), self.height(),
self.format(), width, height,
flags)
}
#[inline]
pub fn converter(&self, format: format::Pixel) -> Result<Context, Error> {
Context::get(self.format(), self.width(), self.height(),
format, self.width(), self.height(),