Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

  1. #include "scale.h"
  2. #include "../xBRZ/xbrz.h"
  3. #include <string.h>
  4.  
  5. void xbrz_scale(void* src, void* dst, int width, int height, int scale)
  6. {
  7.     if(scale==1) {
  8.         memcpy(dst, src, width*height*4);
  9.     } else if (scale>1 && scale <= 6) {
  10.         xbrz::scale(scale, (const uint32_t*)src, (uint32_t*)dst, width, height, xbrz::ColorFormat::ARGB);
  11.     } else {
  12.         xbrz::nearestNeighborScale((const uint32_t*)src, width, height, (uint32_t*)dst, width*scale, height*scale);
  13.     }
  14. }