Skip to content

Commit

Permalink
4.3.8: Transform: PixArt: HQX
Browse files Browse the repository at this point in the history
  • Loading branch information
zvezdochiot committed May 7, 2021
1 parent 55aede6 commit 795fc70
Show file tree
Hide file tree
Showing 6 changed files with 11,763 additions and 75 deletions.
2 changes: 1 addition & 1 deletion src/transform/pixart-scaler/pixart-scaler.pro
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
HEADERS = pixart_scaler.h
SOURCES = pixart_scaler.cpp xbr.cpp scaler_scalex.cpp
SOURCES = pixart_scaler.cpp scaler_xbr.c scaler_hqx.c scaler_scalex.c

TARGET = $$qtLibraryTarget(pixart-scaler)
DESTDIR = ../..
Expand Down
3 changes: 3 additions & 0 deletions src/transform/pixart-scaler/pixart_scaler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ void FilterPlugin:: UpcaleX(int method, int n/*factor*/)
scaler_scalex((uint*)src, (uint*)dst, w, h, n);
break;
case 1:
hqx((uint*)src, (uint*)dst, w, h, n);
break;
case 2:
xbr_filter((uint*)src, (uint*)dst, w, h, n);
break;
default:
Expand Down
17 changes: 14 additions & 3 deletions src/transform/pixart-scaler/pixart_scaler.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,27 @@ class UpscaleDialog : public QDialog
QGridLayout *gridLayout;
QLabel *labelMethod;
QComboBox *comboMethod;
QStringList itemsMethod = { "ScaleX", "xBr"};
QStringList itemsMethod = { "ScaleX", "HQX", "xBr"};
QLabel *labelMult;
QSpinBox *spinMult;
QDialogButtonBox *buttonBox;

UpscaleDialog(QWidget *parent);
};

#ifdef __cplusplus
extern "C" {
#endif

// XBR scaler
void xbr_filter( uint32_t *src, uint32_t *dst, int inWidth, int inHeight, int scaleFactor);
void xbr_filter( uint32_t *src, uint32_t *dst, int inWidth, int inHeight, int scaleFactor);

// HQX scaler
void hqx(uint32_t * sp, uint32_t * dp, int Xres, int Yres, int scalefactor);

// ScaleX scaler
void scaler_scalex(uint32_t * sp, uint32_t * dp, int Xres, int Yres, int scalefactor);
void scaler_scalex(uint32_t * sp, uint32_t * dp, int Xres, int Yres, int scalefactor);

#ifdef __cplusplus
}
#endif
Loading

1 comment on commit 795fc70

@zvezdochiot
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.