digiKam
Digikam::DImgScale Namespace Reference

Functions

int * dimgCalcApoints (int s, int d, int up)
 
DImgScaleInfo * dimgCalcScaleInfo (const DImg &img, int sw, int sh, int dw, int dh, bool aa)
 
int * dimgCalcXPoints (int sw, int dw)
 
uint ** dimgCalcYPoints (uint *const src, int sw, int sh, int dh)
 
ullong ** dimgCalcYPoints16 (ullong *const src, int sw, int sh, int dh)
 
void dimgSampleRGBA (DImgScaleInfo *const isi, uint *const dest, int dxx, int dyy, int dw, int dh, int dow)
 
void dimgSampleRGBA (DImgScaleInfo *const isi, uint *const dest, int dxx, int dyy, int dw, int dh, int dow, int clip_dx, int clip_dy, int clip_dw, int clip_dh)
 
void dimgSampleRGBA16 (DImgScaleInfo *const isi, ullong *const dest, int dxx, int dyy, int dw, int dh, int dow)
 
void dimgSampleRGBA16 (DImgScaleInfo *const isi, ullong *const dest, int dxx, int dyy, int dw, int dh, int dow, int clip_dx, int clip_dy, int clip_dw, int clip_dh)
 
void dimgScaleAARGB (DImgScaleInfo *const isi, uint *const dest, int dxx, int dyy, int dw, int dh, int dow, int sow)
 
void dimgScaleAARGB (DImgScaleInfo *const isi, uint *const dest, int dxx, int dyy, int dw, int dh, int dow, int sow, int clip_dx, int clip_dy, int clip_dw, int clip_dh)
 
void dimgScaleAARGB16 (DImgScaleInfo *const isi, ullong *const dest, int dxx, int dyy, int dw, int dh, int dow, int sow)
 
void dimgScaleAARGB16 (DImgScaleInfo *const isi, ullong *const dest, int dxx, int dyy, int dw, int dh, int dow, int sow, int clip_dx, int clip_dy, int clip_dw, int clip_dh)
 
void dimgScaleAARGBA (DImgScaleInfo *const isi, uint *const dest, int dxx, int dyy, int dw, int dh, int dow, int sow)
 
void dimgScaleAARGBA (DImgScaleInfo *const isi, uint *const dest, int dxx, int dyy, int dw, int dh, int dow, int sow, int clip_dx, int clip_dy, int clip_dw, int clip_dh)
 
void dimgScaleAARGBA16 (DImgScaleInfo *const isi, ullong *const dest, int dxx, int dyy, int dw, int dh, int dow, int sow)
 
void dimgScaleAARGBA16 (DImgScaleInfo *const isi, ullong *const dest, int dxx, int dyy, int dw, int dh, int dow, int sow, int clip_dx, int clip_dy, int clip_dw, int clip_dh)
 

Function Documentation

◆ dimgCalcApoints()

int * Digikam::DImgScale::dimgCalcApoints ( int  s,
int  d,
int  up 
)

Referenced by dimgCalcScaleInfo().

◆ dimgCalcScaleInfo()

DImgScaleInfo * Digikam::DImgScale::dimgCalcScaleInfo ( const DImg img,
int  sw,
int  sh,
int  dw,
int  dh,
bool  aa 
)

◆ dimgCalcXPoints()

int * Digikam::DImgScale::dimgCalcXPoints ( int  sw,
int  dw 
)

Referenced by dimgCalcScaleInfo().

◆ dimgCalcYPoints()

uint ** Digikam::DImgScale::dimgCalcYPoints ( uint *const  src,
int  sw,
int  sh,
int  dh 
)

Referenced by dimgCalcScaleInfo().

◆ dimgCalcYPoints16()

ullong ** Digikam::DImgScale::dimgCalcYPoints16 ( ullong *const  src,
int  sw,
int  sh,
int  dh 
)

Referenced by dimgCalcScaleInfo().

◆ dimgSampleRGBA() [1/2]

void Digikam::DImgScale::dimgSampleRGBA ( DImgScaleInfo *const  isi,
uint *const  dest,
int  dxx,
int  dyy,
int  dw,
int  dh,
int  dow 
)

For internal scale by pixel sampling only not smoothed in 8 bits RGBA. Arguments: isi: scale info dest: destination image data dxx: destination x location corresponding to start x of source section dyy: destination y location corresponding to start y of source section dw: destination width dh: destination height dow: destination scanline width

◆ dimgSampleRGBA() [2/2]

void Digikam::DImgScale::dimgSampleRGBA ( DImgScaleInfo *const  isi,
uint *const  dest,
int  dxx,
int  dyy,
int  dw,
int  dh,
int  dow,
int  clip_dx,
int  clip_dy,
int  clip_dw,
int  clip_dh 
)

For internal scale by pixel sampling only not smoothed by area sampling in 8 bits RGBA. Arguments: isi: scale info dest: destination image data dxx: destination x location corresponding to start x of source section dyy: destination y location corresponding to start y of source section dw: destination width dh: destination height dow: destination scanline width clip_dx: clipped destination x location corresponding to start x clip_dy: clipped destination y location corresponding to start y clip_dw: clipped destination width clip_dh: clipped destination height

◆ dimgSampleRGBA16() [1/2]

void Digikam::DImgScale::dimgSampleRGBA16 ( DImgScaleInfo *const  isi,
ullong *const  dest,
int  dxx,
int  dyy,
int  dw,
int  dh,
int  dow 
)

For internal scale by pixel sampling only not smoothed in 16 bits RGBA. Arguments: isi: scale info dest: destination image data dxx: destination x location corresponding to start x of source section dyy: destination y location corresponding to start y of source section dw: destination width dh: destination height dow: destination scanline width

◆ dimgSampleRGBA16() [2/2]

void Digikam::DImgScale::dimgSampleRGBA16 ( DImgScaleInfo *const  isi,
ullong *const  dest,
int  dxx,
int  dyy,
int  dw,
int  dh,
int  dow,
int  clip_dx,
int  clip_dy,
int  clip_dw,
int  clip_dh 
)

For internal scale by pixel sampling only not smoothed by area sampling in 16 bits RGBA Arguments: isi: scale info dest: destination image data dxx: destination x location corresponding to start x of source section dyy: destination y location corresponding to start y of source section dw: destination width dh: destination height dow: destination scanline width clip_dx: clipped destination x location corresponding to start x clip_dy: clipped destination y location corresponding to start y clip_dw: clipped destination width clip_dh: clipped destination height

◆ dimgScaleAARGB() [1/2]

void Digikam::DImgScale::dimgScaleAARGB ( DImgScaleInfo *const  isi,
uint *const  dest,
int  dxx,
int  dyy,
int  dw,
int  dh,
int  dow,
int  sow 
)

For internal scale in 8 bits RGB, ignore the Alpha byte

Arguments: isi: scale info dest: destination image data dxx: destination x location corresponding to start x of source section dyy: destination y location corresponding to start y of source section dw: destination width dh: destination height dow: destination scanline width sow: source scanline width

Referenced by Digikam::DImg::smoothScaleClipped(), and Digikam::DImg::smoothScaleSection().

◆ dimgScaleAARGB() [2/2]

void Digikam::DImgScale::dimgScaleAARGB ( DImgScaleInfo *const  isi,
uint *const  dest,
int  dxx,
int  dyy,
int  dw,
int  dh,
int  dow,
int  sow,
int  clip_dx,
int  clip_dy,
int  clip_dw,
int  clip_dh 
)

For internal scale by area sampling in 8 bits RGB, ignore the Alpha byte Arguments: isi: scale info dest: destination image data dxx: destination x location corresponding to start x of source section dyy: destination y location corresponding to start y of source section dw: destination width dh: destination height dow: destination scanline width sow: source scanline width clip_dx: clipped destination x location corresponding to start x clip_dy: clipped destination y location corresponding to start y clip_dw: clipped destination width clip_dh: clipped destination height

fully optimized (i think) - only change of algorithm can help if we're scaling down horizontally & vertically

References A_VAL, B_VAL, G_VAL, INV_XAP, INV_YAP, R_VAL, XAP, and YAP.

◆ dimgScaleAARGB16() [1/2]

void Digikam::DImgScale::dimgScaleAARGB16 ( DImgScaleInfo *const  isi,
ullong *const  dest,
int  dxx,
int  dyy,
int  dw,
int  dh,
int  dow,
int  sow 
)

For internal scale in 16 bits RGB, ignore the Alpha byte Arguments: isi: scale info dest: destination image data dxx: destination x location corresponding to start x of source section dyy: destination y location corresponding to start y of source section dw: destination width dh: destination height dow: destination scanline width sow: source scanline width

Referenced by Digikam::DImg::smoothScaleClipped(), and Digikam::DImg::smoothScaleSection().

◆ dimgScaleAARGB16() [2/2]

void Digikam::DImgScale::dimgScaleAARGB16 ( DImgScaleInfo *const  isi,
ullong *const  dest,
int  dxx,
int  dyy,
int  dw,
int  dh,
int  dow,
int  sow,
int  clip_dx,
int  clip_dy,
int  clip_dw,
int  clip_dh 
)

For internal scale by area sampling in 16 bits RGB, ignore the Alpha byte Arguments: isi: scale info dest: destination image data dxx: destination x location corresponding to start x of source section dyy: destination y location corresponding to start y of source section dw: destination width dh: destination height dow: destination scanline width sow: source scanline width clip_dx: clipped destination x location corresponding to start x clip_dy: clipped destination y location corresponding to start y clip_dw: clipped destination width clip_dh: clipped destination height

References A_VAL16, B_VAL16, G_VAL16, INV_XAP, INV_YAP, R_VAL16, XAP, and YAP.

◆ dimgScaleAARGBA() [1/2]

void Digikam::DImgScale::dimgScaleAARGBA ( DImgScaleInfo *const  isi,
uint *const  dest,
int  dxx,
int  dyy,
int  dw,
int  dh,
int  dow,
int  sow 
)

For internal scale in 8 bits RGBA Arguments: isi: scale info dest: destination image data dxx: destination x location corresponding to start x of source section dyy: destination y location corresponding to start y of source section dw: destination width dh: destination height dow: destination scanline width sow: source scanline width

Referenced by Digikam::DImg::smoothScaleClipped(), and Digikam::DImg::smoothScaleSection().

◆ dimgScaleAARGBA() [2/2]

void Digikam::DImgScale::dimgScaleAARGBA ( DImgScaleInfo *const  isi,
uint *const  dest,
int  dxx,
int  dyy,
int  dw,
int  dh,
int  dow,
int  sow,
int  clip_dx,
int  clip_dy,
int  clip_dw,
int  clip_dh 
)

For internal scale by area sampling in 8 bits RGBA Arguments: isi: scale info dest: destination image data dxx: destination x location corresponding to start x of source section dyy: destination y location corresponding to start y of source section dw: destination width dh: destination height dow: destination scanline width sow: source scanline width clip_dx: clipped destination x location corresponding to start x clip_dy: clipped destination y location corresponding to start y clip_dw: clipped destination width clip_dh: clipped destination height

'Correct' version, with math units prepared for MMXification: The operation 'b = (b * c) >> 16' translates to pmulhw, so the operation 'b = (b * c) >> d' would translate to psllw (16 - d), mmb; pmulh mmc, mmb

References A_VAL, B_VAL, G_VAL, INV_XAP, INV_YAP, R_VAL, XAP, and YAP.

◆ dimgScaleAARGBA16() [1/2]

void Digikam::DImgScale::dimgScaleAARGBA16 ( DImgScaleInfo *const  isi,
ullong *const  dest,
int  dxx,
int  dyy,
int  dw,
int  dh,
int  dow,
int  sow 
)

For internal scale in 16 bits RGBA Arguments: isi: scale info dest: destination image data dxx: destination x location corresponding to start x of source section dyy: destination y location corresponding to start y of source section dw: destination width dh: destination height dow: destination scanline width sow: source scanline width

Referenced by Digikam::DImg::smoothScaleClipped(), and Digikam::DImg::smoothScaleSection().

◆ dimgScaleAARGBA16() [2/2]

void Digikam::DImgScale::dimgScaleAARGBA16 ( DImgScaleInfo *const  isi,
ullong *const  dest,
int  dxx,
int  dyy,
int  dw,
int  dh,
int  dow,
int  sow,
int  clip_dx,
int  clip_dy,
int  clip_dw,
int  clip_dh 
)

For internal scale by area sampling in 16 bits RGBA Arguments: isi: scale info dest: destination image data dxx: destination x location corresponding to start x of source section dyy: destination y location corresponding to start y of source section dw: destination width dh: destination height dow: destination scanline width sow: source scanline width clip_dx: clipped destination x location corresponding to start x clip_dy: clipped destination y location corresponding to start y clip_dw: clipped destination width clip_dh: clipped destination height

'Correct' version, with math units prepared for MMXification: The operation 'b = (b * c) >> 16' translates to pmulhw, so the operation 'b = (b * c) >> d' would translate to psllw (16 - d), mmb; pmulh mmc, mmb

References A_VAL16, B_VAL16, G_VAL16, INV_XAP, INV_YAP, R_VAL16, XAP, and YAP.