Skip to content

Commit 518bd86

Browse files
committed
0.20211223: MacOS support
1 parent 2c99166 commit 518bd86

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
21
APPNAME ?= jpegqs
3-
CFLAGS ?= -Wall -O2 -fopenmp -DAPPNAME=$(APPNAME)
2+
MPFLAGS ?= -fopenmp
3+
CFLAGS ?= -Wall -O2 $(MPFLAGS) -DAPPNAME=$(APPNAME)
44
LIBS ?= -ljpeg -lm
55
SRCS = src
66

7-
ifeq ($(shell uname --machine), x86_64)
7+
ifneq ($(shell uname --machine), i386)
88
CFLAGS += -fPIC
99
endif
1010

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ If you do not want to use SSE, type:
6969
make CFLAGS="-fopenmp -O2 -mno-sse2"
7070
```
7171

72+
If you do not want to use OPENMP (MacOS), type:
73+
```sh
74+
make MPFLAGS=
75+
```
76+
7277
### With libjpeg 6b form sources
7378
```sh
7479
wget https://www.ijg.org/files/jpegsrc.v6b.tar.gz

src/libjpegqs.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@
2121

2222
void quantsmooth_init(JQS_PARAMS jqsparams)
2323
{
24-
int i, l0, l1, p0, p1;
24+
int i, l0, l1, x, y, p0, p1;
25+
float *tab, bcoef;
2526
JCOEF coef[DCTSIZE2];
2627

2728
range_limit_init();
2829

2930
for (i = 0; i < DCTSIZE2; i++)
3031
{
31-
float *tab = quantsmooth_tables[i];
32-
float bcoef = jqsparams.border;
33-
int x, y, p0, p1;
32+
tab = quantsmooth_tables[i];
33+
bcoef = jqsparams.border;
3434
memset(coef, 0, sizeof(coef));
3535
coef[i] = 1;
3636
idct_fslow(coef, tab);

0 commit comments

Comments
 (0)