⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 makefile.unx

📁 ITU-T G.191中包含的G.722语音压缩编解码程序
💻 UNX
字号:
# -----------------------------------------------------------------------------#	Unix makefile for compiling and testing the G.722 implementation#	The executable must be defined by variable DEMO below. #	31.July.95 - Makefile implemented by <simao@ctd.comsat.com># -----------------------------------------------------------------------------#       This makefile can test the implementation of the G.722 with#       the test sequences in binary form when they are provided by#       the user and are stored in directory bin under this#       module. The presumed file names are:#        bt1c1.xmt   bt2r2.cod   bt3l1.rc1   bt3l2.rc2   bt3l3.rc3   #        bt1c2.xmt   bt3h1.rc0   bt3l1.rc2   bt3l2.rc3   #        bt1d3.cod   bt3h2.rc0   bt3l1.rc3   bt3l3.rc1   #        bt2r1.cod   bt3h3.rc0   bt3l2.rc1   bt3l3.rc2      #       These files are not provided in the UGST#       distribution. This testing option can be exercised by the makefile#       using the target "test-tv". ##       Provided is though a speech file that must yield#       identical results to the reference files provided. Please make#       sure that all the binary speech files have the proper byte#       ordering for your system. The ZIP file provided will contain#       big endian (workstation format, high byte first) data#       files. This testing option can be exercised by the makefile#       using the target "test" (make test).#       <simao># NOTE: you need to get (purchase) the G.722 test vectors from the ITU in #       order to perform the (optional) compliance test.# -----------------------------------------------------------------------------#*************************************************************************# FRANCE TELECOM/CNET ITU-T ANSI C G.722 program to be included in       # ITU-T UGST software package Tool                                       #*************************************************************************#  Version 2.00 du 07/01/90 ; Compatible C ANSI ; TURBO C V2              #  Copyright CNET Lannion A TSS/CMC    J-P PETIT Tel 33 96 05 39 41       #                                                Fax 33 96 05 13 16       #                                     Email petitjp@lannion.cnet.fr         #  Last revision 14/03/95 ; use ITU-T ANSI C basic fixed point operators  #  Software tested on PC/MS DOS and Borland C/C++ 3.1                     #                  on DEC Alpha WS, UNIX, cc compiler                     #*************************************************************************# ------------------------------------------------# Choose compiler. Sun: use cc. HP: gotta use gcc# ------------------------------------------------GCC = gcc#CC_OPT = -g -I../utl -Wall # For gccCC_OPT = -g -I../utl # For cc# ------------------------------------#  Lists of files# ------------------------------------G722_OBJ =  operg722.o funcg722.o g722.oREF_FILES = bin/codsp.cod   bin/codspw.cod  bin/inpsp.bin   bin/outsp1.bin \	    bin/outsp2.bin  bin/outsp3.binPRC_FILES = prc/inpsp.bs    prc/outsp.e-d   prc/outsp.md1   prc/outsp.md2 \	    prc/outsp.md3   prc/temp.cod    prc/temp1.out   prc/temp2.out \	    prc/temp3.out# ------------------------------------------------# Choose an archiving utility: #       - public domain unzip, or [PC/Unix/VMS]#       - shareware pkunzip [PC only]# ------------------------------------------------#UNZIP = -pkunzip -dUNZIP = unzip -o# ------------------------------------------------# Choose a file comparison utility: #       - cf compares, #       - sub shows the difference of the different samples# Default is cf.# ------------------------------------------------DIFF = cf -q#DIFF = sub#DIFF_OPT = 256 1 30# ------------------------------------# Demo executables# ------------------------------------TSTCG722=./tstcg722 # exercise G.722 encoder digital test sequences TSTDG722=./tstdg722 # exercise G.722 decoder digital test sequences ENCG722=./encg722   # encode a 16kHz/16 bit linear speech/music file                    # in a 64 kbit/s G.722 data format DECG722=./decg722   # decode a 64 kbit/s G.722 bitstreamDEMO=./g722demo -q  # run both the encoder and the decoder# ------------------------------------------------# Generic rules# ------------------------------------------------.c.o:	$(CC) $(CC_OPT) -c $<# ------------------------------------# Targets # ------------------------------------all:: g722demo # tstcg722 tstdg722 encg722 decg722clean:	$(RM) *.o   cleantest:	$(RM) $(PRC_FILES) $(REF_FILES)veryclean: clean cleantest	$(RM) g722demo tstcg722 tstdg722 encg722 decg722# ------------------------------------# Dependencies and rules # ------------------------------------g722demo: 	g722demo.o $(G722_OBJ)	$(CC) $(CC_OPT) -o g722demo g722demo.o $(G722_OBJ) -lmencg722:  	encg722.o $(G722_OBJ)	$(CC) $(CC_OPT) -o encg722 encg722.o $(G722_OBJ)decg722:  	decg722.o $(G722_OBJ)	$(CC) $(CC_OPT) -o decg722 decg722.o $(G722_OBJ)tstcg722: 	tstcg722.o operg722.o funcg722.o	$(CC) $(CC_OPT) -o tstcg722 tstcg722.o operg722.o funcg722.otstdg722: 	tstdg722.o operg722.o funcg722.o	$(CC) $(CC_OPT) -o tstdg722 tstdg722.o operg722.o funcg722.og722demo.o: 	g722demo.ctstcg722.o: 	tstcg722.c operg722.o: 	operg722.c funcg722.o: 	funcg722.c tstdg722.o: 	tstdg722.c encg722.o:  	encg722.cdecg722.o:  	decg722.cg722.o:		g722.c# -------------------------------------# Test codec with provided speech file# -------------------------------------#test: run-demo comp-demotest: proc compproc: run-democomp: comp-demobin/outsp3.bin: bin/codspw.codbin/codspw.cod: tst-g722.zip	$(UNZIP) tst-g722.zip \*.\*	swapover -if little $(REF_FILES)run-demo: bin/codspw.cod	$(DEMO) -enc bin/inpsp.bin prc/inpsp.bs	$(DEMO) -dec -mode 1 bin/codspw.cod prc/outsp.md1	$(DEMO) -dec -mode 2 bin/codspw.cod prc/outsp.md2	$(DEMO) -dec -mode 3 bin/codspw.cod prc/outsp.md3	$(DEMO) bin/inpsp.bin prc/outsp.e-dcomp-demo: bin/outsp3.bin	$(DIFF) prc/inpsp.bs  bin/codspw.cod 64	$(DIFF) prc/outsp.md1 bin/outsp1.bin 64 	$(DIFF) prc/outsp.md2 bin/outsp2.bin 64 	$(DIFF) prc/outsp.md3 bin/outsp3.bin 64	$(DIFF) prc/outsp.md1 prc/outsp.e-d 64# ------------------------------------# Test codec with test sequences# ------------------------------------#test-tv: run-tv comp-tvtest-tv: proc-tv comp-tvproc-tv: tv-step1 tv-step2 tv-step3tv-step1: tstcg722#	Should run without any error indication. 	$(TSTCG722) bin/bt1c1.xmt bin/bt2r1.cod 	$(TSTCG722) bin/bt1c2.xmt bin/bt2r2.cod tv-step2: tstdg722#	Should run without any error indication. #	Files .rc0 indicate the codec mode of operation	$(TSTDG722) bin/bt2r1.cod bin/bt3l1.rc1 bin/bt3h1.rc0 	$(TSTDG722) bin/bt2r1.cod bin/bt3l1.rc2 bin/bt3h1.rc0 	$(TSTDG722) bin/bt2r1.cod bin/bt3l1.rc3 bin/bt3h1.rc0 	$(TSTDG722) bin/bt2r2.cod bin/bt3l2.rc1 bin/bt3h2.rc0 	$(TSTDG722) bin/bt2r2.cod bin/bt3l2.rc2 bin/bt3h2.rc0 	$(TSTDG722) bin/bt2r2.cod bin/bt3l2.rc3 bin/bt3h2.rc0 	$(TSTDG722) bin/bt1d3.cod bin/bt3l3.rc1 bin/bt3h3.rc0 	$(TSTDG722) bin/bt1d3.cod bin/bt3l3.rc2 bin/bt3h3.rc0 	$(TSTDG722) bin/bt1d3.cod bin/bt3l3.rc3 bin/bt3h3.rc0 tv-step3: encg722 decg722	$(ENCG722) bin/inpsp.bin prc/temp.cod 	$(DECG722) bin/codspw.cod prc/temp1.out 1 	$(DECG722) bin/codspw.cod prc/temp2.out 2 	$(DECG722) bin/codspw.cod prc/temp3.out 3 comp-tv:#	Files must be identical. 	$(DIFF) prc/temp.cod bin/codspw.cod 64	$(DIFF) prc/temp1.out bin/outsp1.bin 64	$(DIFF) prc/temp2.out bin/outsp2.bin 64	$(DIFF) prc/temp3.out bin/outsp3.bin 64

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -