AVIR
High-quality pro image resizing library
 
Loading...
Searching...
No Matches
avir::CLancIR::CResizeScanline Class Reference

Scanline resizing positions class. More...

#include <lancir.h>

Public Member Functions

void reset ()
 Object's reset function.
 
void update (const int SrcLen0, const int DstLen0, const double o0, CResizeFilters &rf, float *const sp=NULL)
 Scanline positions update function.
 
void updateSPO (CResizeFilters &rf, float *const sp)
 Scanline pixel offsets update function.
 

Public Attributes

int padl
 Left-padding (in pixels) required for source scanline.
 
int padr
 Right-padding (in pixels) required for source scanline.
 
CResizePospos
 Source scanline positions (offsets) and filters for each destination pixel position.
 

Protected Attributes

int DstLen
 Current DstLen.
 
double o
 Current o.
 
int poslen
 Allocated pos buffer's length.
 
int SrcLen
 Current SrcLen.
 

Detailed Description

Scanline resizing positions class.

Class contains resizing positions, and prepares source scanline positions for resize filtering. The public variables become available after the update() function call.

Member Function Documentation

◆ reset()

void avir::CLancIR::CResizeScanline::reset ( )

Object's reset function.

Function "resets" this object so that the next update() call fully updates the position buffer. Reset is necessary if the corresponding CResizeFilters object was updated.

◆ update()

void avir::CLancIR::CResizeScanline::update ( const int SrcLen0,
const int DstLen0,
const double o0,
CResizeFilters & rf,
float *const sp = NULL )

Scanline positions update function.

Function updates resizing positions, updates padl, padr, and pos buffer.

Parameters
SrcLen0Source image scanline length, used to create a scanline buffer without length pre-calculation.
DstLen0Destination image scanline length.
o0Initial source image offset.
rfResizing filters object.
spA pointer to scanline buffer, to use for absolute scanline positioning, can be NULL.

◆ updateSPO()

void avir::CLancIR::CResizeScanline::updateSPO ( CResizeFilters & rf,
float *const sp )

Scanline pixel offsets update function.

Function updates pos buffer's spo (scanline pixel offset) values.

Parameters
rfResizing filters object.
spA pointer to scanline buffer, to use for absolute scanline positioning, can be NULL.