Visual C++ build
This commit is contained in:
216
win/Makefile
Executable file
216
win/Makefile
Executable file
@@ -0,0 +1,216 @@
|
||||
vpath %.c simd
|
||||
vpath %.asm simd
|
||||
|
||||
include win/Makerules
|
||||
|
||||
TARGETS = jpeg62.dll \
|
||||
jpeg.lib \
|
||||
jpeg-static.lib \
|
||||
cjpeg.exe \
|
||||
djpeg.exe \
|
||||
jpegtran.exe \
|
||||
rdjpgcom.exe \
|
||||
wrjpgcom.exe \
|
||||
turbojpeg.dll \
|
||||
turbojpeg.lib \
|
||||
turbojpeg-static.lib \
|
||||
jpgtest.exe \
|
||||
jpegut.exe
|
||||
|
||||
LOBJS = jcapimin.obj \
|
||||
jcapistd.obj \
|
||||
jccoefct.obj \
|
||||
jccolor.obj \
|
||||
jcdctmgr.obj \
|
||||
jchuff.obj \
|
||||
jcinit.obj \
|
||||
jcmainct.obj \
|
||||
jcmarker.obj \
|
||||
jcmaster.obj \
|
||||
jcomapi.obj \
|
||||
jcparam.obj \
|
||||
jcphuff.obj \
|
||||
jcprepct.obj \
|
||||
jcsample.obj \
|
||||
jctrans.obj \
|
||||
jdapimin.obj \
|
||||
jdapistd.obj \
|
||||
jdatadst.obj \
|
||||
jdatasrc.obj \
|
||||
jdcoefct.obj \
|
||||
jdcolor.obj \
|
||||
jddctmgr.obj \
|
||||
jdhuff.obj \
|
||||
jdinput.obj \
|
||||
jdmainct.obj \
|
||||
jdmarker.obj \
|
||||
jdmaster.obj \
|
||||
jdmerge.obj \
|
||||
jdphuff.obj \
|
||||
jdpostct.obj \
|
||||
jdsample.obj \
|
||||
jdtrans.obj \
|
||||
jerror.obj \
|
||||
jfdctflt.obj \
|
||||
jfdctfst.obj \
|
||||
jfdctint.obj \
|
||||
jidctflt.obj \
|
||||
jidctfst.obj \
|
||||
jidctint.obj \
|
||||
jidctred.obj \
|
||||
jquant1.obj \
|
||||
jquant2.obj \
|
||||
jutils.obj \
|
||||
jmemmgr.obj \
|
||||
jmemnobs.obj
|
||||
|
||||
ifeq ($(WITH_SIMD), yes)
|
||||
|
||||
SIMD_OBJS = jsimd_i386.obj \
|
||||
jsimdcpu.obj \
|
||||
jccolmmx.obj \
|
||||
jdcolmmx.obj \
|
||||
jcsammmx.obj \
|
||||
jdsammmx.obj \
|
||||
jdmermmx.obj \
|
||||
jcqntmmx.obj \
|
||||
jfmmxfst.obj \
|
||||
jfmmxint.obj \
|
||||
jimmxred.obj \
|
||||
jimmxint.obj \
|
||||
jimmxfst.obj \
|
||||
jcqnt3dn.obj \
|
||||
jf3dnflt.obj \
|
||||
ji3dnflt.obj \
|
||||
jcqntsse.obj \
|
||||
jfsseflt.obj \
|
||||
jisseflt.obj \
|
||||
jccolss2.obj \
|
||||
jdcolss2.obj \
|
||||
jcsamss2.obj \
|
||||
jdsamss2.obj \
|
||||
jdmerss2.obj \
|
||||
jcqnts2i.obj \
|
||||
jfss2fst.obj \
|
||||
jfss2int.obj \
|
||||
jiss2red.obj \
|
||||
jiss2int.obj \
|
||||
jiss2fst.obj \
|
||||
jcqnts2f.obj \
|
||||
jiss2flt.obj
|
||||
|
||||
LOBJS := $(LOBJS) $(SIMD_OBJS)
|
||||
|
||||
else
|
||||
|
||||
LOBJS := $(LOBJS) jsimd_none.obj
|
||||
|
||||
endif
|
||||
|
||||
OBJS := $(LOBJS) \
|
||||
cdjpeg.obj \
|
||||
cjpeg.obj \
|
||||
djpeg.obj \
|
||||
jpegtran.obj \
|
||||
rdbmp.obj \
|
||||
rdcolmap.obj \
|
||||
rdgif.obj \
|
||||
rdjpgcom.obj \
|
||||
rdppm.obj \
|
||||
rdtarga.obj \
|
||||
rdswitch.obj \
|
||||
rdtarga.obj \
|
||||
transupp.obj \
|
||||
wrbmp.obj \
|
||||
wrgif.obj \
|
||||
wrppm.obj \
|
||||
wrtarga.obj \
|
||||
wrjpgcom.obj \
|
||||
turbojpegl.obj \
|
||||
jpgtest.obj \
|
||||
jpegut.obj \
|
||||
bmp.obj
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
clean:
|
||||
-$(RM) $(TARGETS) $(OBJS)
|
||||
|
||||
HDRS := $(wildcard *.h)
|
||||
$(OBJS): $(HDRS)
|
||||
|
||||
ifeq ($(WITH_SIMD), yes)
|
||||
SIMD_HDRS := $(wildcard simd/*.inc)
|
||||
$(SIMD_OBJS): $(SIMD_HDRS)
|
||||
endif
|
||||
|
||||
|
||||
|
||||
jpeg-static.lib: $(LOBJS)
|
||||
$(AR) -out:$@ $^
|
||||
|
||||
jpeg62.dll jpeg.lib: $(LOBJS) win/jpeg.def
|
||||
$(LINK) $(LDFLAGS) -dll -out:jpeg62.dll -implib:jpeg.lib -def:win/jpeg.def \
|
||||
$(LOBJS)
|
||||
|
||||
cjpeg.exe: cdjpeg.obj cjpeg.obj rdbmp.obj rdgif.obj rdppm.obj rdswitch.obj \
|
||||
rdtarga.obj jpeg.lib
|
||||
$(LINK) $(LDFLAGS) -out:$@ $^
|
||||
|
||||
djpeg.exe: cdjpeg.obj djpeg.obj rdcolmap.obj rdswitch.obj wrbmp.obj wrgif.obj \
|
||||
wrppm.obj wrtarga.obj jpeg.lib
|
||||
$(LINK) $(LDFLAGS) -out:$@ $^
|
||||
|
||||
jpegtran.exe: cdjpeg.obj jpegtran.obj rdswitch.obj transupp.obj jpeg.lib
|
||||
$(LINK) $(LDFLAGS) -out:$@ $^
|
||||
|
||||
rdjpgcom.exe: rdjpgcom.obj jpeg.lib
|
||||
$(LINK) $(LDFLAGS) -out:$@ $^
|
||||
|
||||
wrjpgcom.exe: wrjpgcom.obj jpeg.lib
|
||||
$(LINK) $(LDFLAGS) -out:$@ $^
|
||||
|
||||
|
||||
turbojpeg-static.lib: turbojpegl.obj $(LOBJS)
|
||||
$(AR) -out:$@ $^
|
||||
|
||||
turbojpeg.dll turbojpeg.lib: turbojpegl.obj $(LOBJS)
|
||||
$(LINK) $(LDFLAGS) -dll -out:turbojpeg.dll -implib:turbojpeg.lib $^
|
||||
|
||||
|
||||
jpgtest.exe: jpgtest.obj bmp.obj turbojpeg.lib
|
||||
$(LINK) $(LDFLAGS) -out:$@ $^
|
||||
|
||||
jpegut.exe: jpegut.obj turbojpeg.lib
|
||||
$(LINK) $(LDFLAGS) -out:$@ $^
|
||||
|
||||
|
||||
test: testclean cjpeg.exe djpeg.exe jpegtran.exe
|
||||
jpegut
|
||||
djpeg -dct int -ppm -outfile testout.ppm testorig.jpg
|
||||
djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg
|
||||
cjpeg -dct int -outfile testout.jpg testimg.ppm
|
||||
djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg
|
||||
cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm
|
||||
jpegtran -outfile testoutt.jpg testprog.jpg
|
||||
cmp testimg.ppm testout.ppm
|
||||
cmp testimg.bmp testout.bmp
|
||||
cmp testimg.jpg testout.jpg
|
||||
cmp testimg.ppm testoutp.ppm
|
||||
cmp testimgp.jpg testoutp.jpg
|
||||
cmp testorig.jpg testoutt.jpg
|
||||
|
||||
testclean:
|
||||
$(RM) testout*
|
||||
$(RM) *_GRAYQ[0-9]*.bmp
|
||||
$(RM) *_GRAYQ[0-9]*.ppm
|
||||
$(RM) *_GRAYQ[0-9]*.jpg
|
||||
$(RM) *_420Q[0-9]*.bmp
|
||||
$(RM) *_420Q[0-9]*.ppm
|
||||
$(RM) *_420Q[0-9]*.jpg
|
||||
$(RM) *_422Q[0-9]*.bmp
|
||||
$(RM) *_422Q[0-9]*.ppm
|
||||
$(RM) *_422Q[0-9]*.jpg
|
||||
$(RM) *_444Q[0-9]*.bmp
|
||||
$(RM) *_444Q[0-9]*.ppm
|
||||
$(RM) *_444Q[0-9]*.jpg
|
||||
39
win/Makerules
Executable file
39
win/Makerules
Executable file
@@ -0,0 +1,39 @@
|
||||
CC = "cl" -nologo
|
||||
CXX = "cl" -EHsc -nologo
|
||||
AR = "link" -lib -nologo
|
||||
LINK = "link" -nologo
|
||||
ifeq ($(DEBUG), yes)
|
||||
LINK = "link" -nologo -debug
|
||||
endif
|
||||
ifeq ($(NASM),)
|
||||
NASM = nasm
|
||||
endif
|
||||
|
||||
CFLAGS = -W3 -wd4996 -Iwin -I. -DDLLDEFINE
|
||||
CDEFINES = -DWIN32 -D_CRT_SECURE_NO_DEPRECATE
|
||||
NAFLAGS = -fwin32 -DWIN32 -Iwin/
|
||||
ifeq ($(DEBUG), yes)
|
||||
CFLAGS := $(CFLAGS) -Od -MTd -Zi
|
||||
NAFLAGS := $(NAFLAGS) -g
|
||||
else
|
||||
CFLAGS := $(CFLAGS) -O2 -MT
|
||||
endif
|
||||
|
||||
WITH_SIMD = yes
|
||||
|
||||
ifeq ($(WITH_SIMD), yes)
|
||||
CFLAGS := $(CFLAGS) -DWITH_SIMD
|
||||
endif
|
||||
|
||||
|
||||
%.obj: %.c
|
||||
$(CC) $(CFLAGS) -c $< -Fo$@
|
||||
|
||||
%.obj: %.cxx
|
||||
$(CXX) $(CXXFLAGS) -c $< -Fo$@
|
||||
|
||||
%.obj: %.asm
|
||||
$(NASM) $(NAFLAGS) -Isimd/ -o $@ $<
|
||||
|
||||
%.lib: %.obj
|
||||
$(AR) -out:$@ $<
|
||||
103
win/jpeg.def
Executable file
103
win/jpeg.def
Executable file
@@ -0,0 +1,103 @@
|
||||
; h:\mingw\3.3.1\bin\dlltool.exe --output-def=jpeg.def jcapimin.o jcapistd.o jctrans.o jcparam.o jdatadst.o jcinit.o jcmaster.o jcmarker.o jcmainct.o jcprepct.o jccoefct.o jccolor.o jcsample.o jchuff.o jcphuff.o jcdctmgr.o jfdctfst.o jfdctflt.o jfdctint.o jdapimin.o jdapistd.o jdtrans.o jdatasrc.o jdmaster.o jdinput.o jdmarker.o jdhuff.o jdphuff.o jdmainct.o jdcoefct.o jdpostct.o jddctmgr.o jidctfst.o jidctflt.o jidctint.o jidctred.o jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o jcomapi.o jutils.o jerror.o jmemmgr.o jmemnobs.o jpeg-dllversion.o jpeg-dll-res.o
|
||||
EXPORTS
|
||||
jcopy_block_row @ 1 ;
|
||||
jcopy_sample_rows @ 2 ;
|
||||
jdiv_round_up @ 3 ;
|
||||
jinit_1pass_quantizer @ 4 ;
|
||||
jinit_2pass_quantizer @ 5 ;
|
||||
jinit_c_coef_controller @ 6 ;
|
||||
jinit_c_main_controller @ 7 ;
|
||||
jinit_c_master_control @ 8 ;
|
||||
jinit_c_prep_controller @ 9 ;
|
||||
jinit_color_converter @ 10 ;
|
||||
jinit_color_deconverter @ 11 ;
|
||||
jinit_compress_master @ 12 ;
|
||||
jinit_d_coef_controller @ 13 ;
|
||||
jinit_d_main_controller @ 14 ;
|
||||
jinit_d_post_controller @ 15 ;
|
||||
jinit_downsampler @ 16 ;
|
||||
jinit_forward_dct @ 17 ;
|
||||
jinit_huff_decoder @ 18 ;
|
||||
jinit_huff_encoder @ 19 ;
|
||||
jinit_input_controller @ 20 ;
|
||||
jinit_inverse_dct @ 21 ;
|
||||
jinit_marker_reader @ 22 ;
|
||||
jinit_marker_writer @ 23 ;
|
||||
jinit_master_decompress @ 24 ;
|
||||
jinit_memory_mgr @ 25 ;
|
||||
jinit_merged_upsampler @ 26 ;
|
||||
jinit_phuff_decoder @ 27 ;
|
||||
jinit_phuff_encoder @ 28 ;
|
||||
jinit_upsampler @ 29 ;
|
||||
jpeg_CreateCompress @ 30 ;
|
||||
jpeg_CreateDecompress @ 31 ;
|
||||
jpeg_abort @ 32 ;
|
||||
jpeg_abort_compress @ 33 ;
|
||||
jpeg_abort_decompress @ 34 ;
|
||||
jpeg_add_quant_table @ 35 ;
|
||||
jpeg_alloc_huff_table @ 36 ;
|
||||
jpeg_alloc_quant_table @ 37 ;
|
||||
jpeg_calc_output_dimensions @ 38 ;
|
||||
jpeg_consume_input @ 39 ;
|
||||
jpeg_copy_critical_parameters @ 40 ;
|
||||
jpeg_default_colorspace @ 41 ;
|
||||
jpeg_destroy @ 42 ;
|
||||
jpeg_destroy_compress @ 43 ;
|
||||
jpeg_destroy_decompress @ 44 ;
|
||||
jpeg_fdct_float @ 45 ;
|
||||
jpeg_fdct_ifast @ 46 ;
|
||||
jpeg_fdct_islow @ 47 ;
|
||||
jpeg_fill_bit_buffer @ 48 ;
|
||||
jpeg_finish_compress @ 49 ;
|
||||
jpeg_finish_decompress @ 50 ;
|
||||
jpeg_finish_output @ 51 ;
|
||||
jpeg_free_large @ 52 ;
|
||||
jpeg_free_small @ 53 ;
|
||||
jpeg_gen_optimal_table @ 54 ;
|
||||
jpeg_get_large @ 55 ;
|
||||
jpeg_get_small @ 56 ;
|
||||
jpeg_has_multiple_scans @ 57 ;
|
||||
jpeg_huff_decode @ 58 ;
|
||||
jpeg_idct_1x1 @ 59 ;
|
||||
jpeg_idct_2x2 @ 60 ;
|
||||
jpeg_idct_4x4 @ 61 ;
|
||||
jpeg_idct_float @ 62 ;
|
||||
jpeg_idct_ifast @ 63 ;
|
||||
jpeg_idct_islow @ 64 ;
|
||||
jpeg_input_complete @ 65 ;
|
||||
jpeg_make_c_derived_tbl @ 66 ;
|
||||
jpeg_make_d_derived_tbl @ 67 ;
|
||||
jpeg_mem_available @ 68 ;
|
||||
jpeg_mem_init @ 69 ;
|
||||
jpeg_mem_term @ 70 ;
|
||||
jpeg_new_colormap @ 71 ;
|
||||
jpeg_open_backing_store @ 72 ;
|
||||
jpeg_quality_scaling @ 73 ;
|
||||
jpeg_read_coefficients @ 74 ;
|
||||
jpeg_read_header @ 75 ;
|
||||
jpeg_read_raw_data @ 76 ;
|
||||
jpeg_read_scanlines @ 77 ;
|
||||
jpeg_resync_to_restart @ 78 ;
|
||||
jpeg_save_markers @ 79 ;
|
||||
jpeg_set_colorspace @ 80 ;
|
||||
jpeg_set_defaults @ 81 ;
|
||||
jpeg_set_linear_quality @ 82 ;
|
||||
jpeg_set_marker_processor @ 83 ;
|
||||
jpeg_set_quality @ 84 ;
|
||||
jpeg_simple_progression @ 85 ;
|
||||
jpeg_start_compress @ 86 ;
|
||||
jpeg_start_decompress @ 87 ;
|
||||
jpeg_start_output @ 88 ;
|
||||
jpeg_std_error @ 89 ;
|
||||
jpeg_stdio_dest @ 90 ;
|
||||
jpeg_stdio_src @ 91 ;
|
||||
jpeg_suppress_tables @ 92 ;
|
||||
jpeg_write_coefficients @ 93 ;
|
||||
jpeg_write_m_byte @ 94 ;
|
||||
jpeg_write_m_header @ 95 ;
|
||||
jpeg_write_marker @ 96 ;
|
||||
jpeg_write_raw_data @ 97 ;
|
||||
jpeg_write_scanlines @ 98 ;
|
||||
jpeg_write_tables @ 99 ;
|
||||
jround_up @ 100 ;
|
||||
jzero_far @ 101 ;
|
||||
69
win/jsimdcfg.inc
Executable file
69
win/jsimdcfg.inc
Executable file
@@ -0,0 +1,69 @@
|
||||
;
|
||||
; Automatically generated include file from jsimdcfg.inc.h
|
||||
;
|
||||
;
|
||||
; -- jpeglib.h
|
||||
;
|
||||
%define DCTSIZE 8
|
||||
%define DCTSIZE2 64
|
||||
;
|
||||
; -- jmorecfg.h
|
||||
;
|
||||
%define RGB_RED 0
|
||||
%define RGB_GREEN 1
|
||||
%define RGB_BLUE 2
|
||||
%define RGB_PIXELSIZE 3
|
||||
; Representation of a single sample (pixel element value).
|
||||
; On this SIMD implementation, this must be 'unsigned char'.
|
||||
;
|
||||
%define JSAMPLE byte ; unsigned char
|
||||
%define SIZEOF_JSAMPLE SIZEOF_BYTE ; sizeof(JSAMPLE)
|
||||
%define CENTERJSAMPLE 128
|
||||
; Representation of a DCT frequency coefficient.
|
||||
; On this SIMD implementation, this must be 'short'.
|
||||
;
|
||||
%define JCOEF word ; short
|
||||
%define SIZEOF_JCOEF SIZEOF_WORD ; sizeof(JCOEF)
|
||||
; Datatype used for image dimensions.
|
||||
; On this SIMD implementation, this must be 'unsigned int'.
|
||||
;
|
||||
%define JDIMENSION dword ; unsigned int
|
||||
%define SIZEOF_JDIMENSION SIZEOF_DWORD ; sizeof(JDIMENSION)
|
||||
%define JSAMPROW POINTER ; JSAMPLE * (jpeglib.h)
|
||||
%define JSAMPARRAY POINTER ; JSAMPROW * (jpeglib.h)
|
||||
%define JSAMPIMAGE POINTER ; JSAMPARRAY * (jpeglib.h)
|
||||
%define JCOEFPTR POINTER ; JCOEF * (jpeglib.h)
|
||||
%define SIZEOF_JSAMPROW SIZEOF_POINTER ; sizeof(JSAMPROW)
|
||||
%define SIZEOF_JSAMPARRAY SIZEOF_POINTER ; sizeof(JSAMPARRAY)
|
||||
%define SIZEOF_JSAMPIMAGE SIZEOF_POINTER ; sizeof(JSAMPIMAGE)
|
||||
%define SIZEOF_JCOEFPTR SIZEOF_POINTER ; sizeof(JCOEFPTR)
|
||||
;
|
||||
; -- jdct.h
|
||||
;
|
||||
; A forward DCT routine is given a pointer to a work area of type DCTELEM[];
|
||||
; the DCT is to be performed in-place in that buffer.
|
||||
; To maximize parallelism, Type DCTELEM is changed to short (originally, int).
|
||||
;
|
||||
%define DCTELEM word ; short
|
||||
%define SIZEOF_DCTELEM SIZEOF_WORD ; sizeof(DCTELEM)
|
||||
%define float FP32 ; float
|
||||
%define SIZEOF_FAST_FLOAT SIZEOF_FP32 ; sizeof(float)
|
||||
; To maximize parallelism, Type short is changed to short.
|
||||
;
|
||||
%define ISLOW_MULT_TYPE word ; must be short
|
||||
%define SIZEOF_ISLOW_MULT_TYPE SIZEOF_WORD ; sizeof(ISLOW_MULT_TYPE)
|
||||
%define IFAST_MULT_TYPE word ; must be short
|
||||
%define SIZEOF_IFAST_MULT_TYPE SIZEOF_WORD ; sizeof(IFAST_MULT_TYPE)
|
||||
%define IFAST_SCALE_BITS 2 ; fractional bits in scale factors
|
||||
%define FLOAT_MULT_TYPE FP32 ; must be float
|
||||
%define SIZEOF_FLOAT_MULT_TYPE SIZEOF_FP32 ; sizeof(FLOAT_MULT_TYPE)
|
||||
;
|
||||
; -- jsimd.h
|
||||
;
|
||||
%define JSIMD_NONE 0x00
|
||||
%define JSIMD_MMX 0x01
|
||||
%define JSIMD_3DNOW 0x02
|
||||
%define JSIMD_SSE 0x04
|
||||
%define JSIMD_SSE2 0x08
|
||||
; Short forms of external names for systems with brain-damaged linkers.
|
||||
;
|
||||
Reference in New Issue
Block a user