home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Audio 4.94 - Over 11,000 Files
/
audio-11000.iso
/
msdos
/
sndbords
/
proaudio
/
pcmtlsrc
/
tpcm.arj
/
PCMF7.ASM
< prev
next >
Wrap
Assembly Source File
|
1992-07-29
|
25KB
|
813 lines
;$Author: BCRANE $
;$Date: 29 Jul 1992 16:57:56 $
;$Header: W:/sccs/sdkapp/pcmf7.asv 1.0 29 Jul 1992 16:57:56 BCRANE $
;$Log: W:/sccs/sdkapp/pcmf7.asv $
;
; Rev 1.0 29 Jul 1992 16:57:56 BCRANE
; Initial revision.
;$Logfile: W:/sccs/sdkapp/pcmf7.asv $
;$Modtimes$
;$Revision: 1.0 $
;$Workfile: pcmf7.asm $
.model compact, c
PCMBUFLEN equ 1024
HORZDIMS equ 320
VERTDIMS equ 200
DSPWIDTH equ 256
HORZMARG equ (HORZDIMS - DSPWIDTH) / 2
SKIPFACTOR equ PCMBUFLEN / DSPWIDTH
public dspfilter
public filter7
extrn OURSTATFLAG:far
extrn OURDMABUF:far
extrn SBSIZE:far
extrn PCMBUFDIVS:far
pushall macro
push ax
push bx
push cx
push dx
push si
push di
push es
push ds
endm
popall macro
pop ds
pop es
pop di
pop si
pop dx
pop cx
pop bx
pop ax
endm
.code
;; video buffer positioning variables
xpos dw 0
timesin dw 0
ovb dd DSPWIDTH * 8 * 2 dup (0)
ovbpel db DSPWIDTH * 8 * 2 dup (0)
;; Results for the filter7 routine
result dw 8 dup (0)
input dw 0 ;; for filter7 routine
output dw 0
dspfilter proc
pushall
mov bx, seg OURSTATFLAG
mov es, bx
mov bx, offset OURSTATFLAG
dec word ptr es:[bx]
jns @F
mov word ptr es:[bx], 0
@@: cmp cs:[xpos], DSPWIDTH
jb @F
mov cs:[xpos], 0
@@:
mov bx, seg OURDMABUF
mov es, bx
mov bx, offset OURDMABUF
mov si, es:[bx][2]
mov ds, si
mov si, es:[bx][0]
mov bx, offset SBSIZE
mov ax, es:[bx]
mov bx, offset PCMBUFDIVS
mov dx, es:[bx]
dec dx
mov cx, cs:[timesin]
inc cs:[timesin]
and cx, dx
jcxz timesout
@@: add si, ax
loop @B
timesout:
cmp ax, DSPWIDTH
jb @F
mov ax, DSPWIDTH
@@: mov cx, ax ; count of pels to process
nextpel:
rept SKIPFACTOR
lodsb ; PCM data byte
xor al, 80h
mov byte ptr cs:input, al ; for filter7
call filter7 ; calculate result[0] through result[12]
endm
loop nextpel
mov cx, cs:[xpos] ; cx= current xpos
mov bx, cx ; offset into dd table
shl bx, 1 ; *2
shl bx, 1 ; *4 for dd
shl bx, 1 ; *2
shl bx, 1 ; *4
shl bx, 1 ; *8 for # of filters
irp dummy,<0,2,4,6,8,10,12>
push bx ; save pointer to table
mov ax, word ptr cs:[ovb][bx][2] ; last es for restoring pel
or ax, ax ; valid seg?
jz @F ; no, skip
mov es, ax
mov di, word ptr cs:[ovb][bx][0] ; es:di points to pel
push bx ; save ovb pointer
shr bx, 1 ; convert to byte index
shr bx, 1
mov al, byte ptr cs:[ovbpel][bx] ; get last color
pop bx ; restore ovb pointer
mov byte ptr es:[di][HORZMARG], al ; restore color to pel
@@:
mov ax, cs:[result][dummy] ; band result
; xor ax, ax
; mov al, ah
; cbw
; xor ah, ah
; sar ax, 1 ; make within display range
; sar ax, 1 ; make within display range
add ax, VERTDIMS * (dummy+ 1) / 14 ; middle of screen
mov bx, HORZDIMS ; width of screen
imul bx ; dx:ax points to video buffer (not seg:off)
mov bx, ax
shl dx, 1 ; adjust segment
shl dx, 1
shl dx, 1
shl dx, 1
add dx, 0A000h ; video buffer
mov es, dx ; segment in video buffer
add bx, cs:[xpos] ; es:bx is video buffer + xpos
mov dl, byte ptr es:[bx][HORZMARG]
mov al, byte ptr 0FFh
mov byte ptr es:[bx][HORZMARG], al
mov ax, bx ; save current bx
pop bx ; restore pointer to last pel table
mov word ptr cs:[ovb][bx][0], ax ; store current es:bx
mov ax, es
mov word ptr cs:[ovb][bx][2], ax
push bx
shr bx, 1
shr bx, 1
mov byte ptr cs:[ovbpel][bx], dl
pop bx
add bx, 4 ; point to next ovb entry
endm
inc cs:[xpos] ; next x position
popall
retf
dspfilter endp
;;***********************************************************************
;;*
;;* This filter bank recognizer consists of seven filter banks which
;;* are uniformly spaced covering frequency band between 200 - 3500 Hz.
;;*
;;* One interesting note says that filter banks performance degrades for
;;* filter banks with too few filters or too many filters for nonover-
;;* lapping filter banks. Reason is that for small number of filters the
;;* system gives very poor frequency resolution leading to an inability
;;* to discriminate between words and otherwise with large number of fil-
;;* ters cause too narrow the bandwidth that these filters often measuring
;;* noise instead of speech. The later case is especially pronounced for
;;* the female talker (with high pitch) since the speech harmonics are
;;* widely spaced and some bands in this case are backgroung noise.
;;*
;;*
;;***********************************************************************
;; Assume the ADC has only 8 bit, and also this variable is useful for all
;; filter bank operation as current sample
;;;input dw 0
;; Define threshold for detecting the start and end points
k1 equ 2
k2 equ 5 ;These values are tentative
k3 equ 15
k4 equ 4
;; Define the zero crossing threshold so that number of counts will correspond
;; to the possible fricatives which starts at the beginning of each word.
zc_cnt1 dw 0
zc_cnt2 dw 0
;; These are for get rid of the DC component
x1 dw 0
x2 dw 0
;; Bandpass filter 1
y11 dw 0 ;one sample delay
y12 dw 0 ;two sample delay
;; Bandpass filter 2
y21 dw 0
y22 dw 0
;; Bandpass filter 3
y31 dw 0
y32 dw 0
;; Bandpass filter 4
y41 dw 0
y42 dw 0
;; Bandpass filter 5
y51 dw 0
y52 dw 0
;; Bandpass filter 6
y61 dw 0
y62 dw 0
;; Bandpass filter 7
y71 dw 0
y72 dw 0
filter7 PROC
pushall
mov ax,cs
mov ds,ax
mov es,ax
assume ds:_text
; /*\
;---|*|------------------=================================------------------------
;---|*|------------------====< Start of Main Loop >=======------------------------
;---|*|------------------=================================------------------------
; \*/
;
;
;;***********************************************************************************
;;*
;;* The total filter bank is seven for simplification. All are two-pole band-
;;* pass filter. The first coefficient of the filter is in table1 and second coeff.
;;* is in table2. All the second coefficients are same constant.
;;* Each sample is processed through one multiply tables and have one computed
;;* sum which will be accumulated along the whole frame. Each frame is consists of
;;* 128 to 256 samples (the optimal value is to be tested). So the whole frame
;;* is about 16 ms to 20 ms long.
;;*
;;***********************************************************************************
;; Assume the input is stored in ax
;; Initially bx,dx are zero and ax stores the input
waiting:
mov input,ax ;
mov bx,x2 ;
sub input,bx ; get rid of DC offset
;;
;;The bx retains the last value to compute the "input" for the main loop
;;which is without DC.
mov bx,x1 ;
mov x2,bx ;
mov x1,ax ;
;;*********************************************************************************
;;*
;;* Use of the registers and memory parameters for each filter bank
;;*
;;* (1) x?0 :: is the input
;;* x?1 :: is the delay-1 term
;;* x?2 :: is the delay-2 term
;;*
;;* (2) AX,BX are the primary registers for handling filter bank operation
;;* then the results are stored in these memory locations
;;*
;;*
;;* Note: In Z8 version, both r11 & r13 are checked for the sign of its value since
;;* value of r13 is passed over by r11.
;;*
;;***********************************************************************************
;;The bandpass filter, the formula describes :
;;
;; y(n)=x(n)+2*COS(theta)*r*y(n-1)-r^2*y(n-2)
;;
;;All filter banks have second coeff. positive. So the subtract is always
;;performed for the second coeff. That is clearly coded in the first part
;;of the following code. But since first coeff. changes sign for each filter
;;bank.
;;
filter_1:
;; Pointing to the entry of table for the first coefficient
lea si,table1 ;Use SI pointing to first coefficient
lea di,table2 ;Use DI pointing to second coefficient
mov ax,input ;get input value
mov bx,y12 ;take in the delayed-2 term
or bx,bx ;check the sign of the delayed-2 term
js filt_10 ;jump on sign set
mov dx,word ptr [si+bx] ;load the multiply value
sub ax,dx ;if bx>=0 subtract the result
jmp filt_11
filt_10:
add si,80h*2 ;add 128(d) to address another half table
mov dx,word ptr [si+bx] ;otherwise bx < 0
add ax,dx ;add the result
filt_11:
mov ax,y11 ;Pass delay-1 to delay-2 for next cycle
mov y12,ax ;
or ax,ax ;check negative or positive
js filt_12 ;if delay-1 is negative do addition
mov dx,word ptr [si+bx] ;multiply by coeficient
sub ax,dx ;otherwise subtract the result
jmp filt_13 ;
filt_12: ;negative
add si,80h*2 ;if delay-1 is minus then point to negative entries
mov dx,word ptr [si+bx] ;
add ax,dx ;add to the result
filt_13:
mov y11,ax
mov ax,input
;;
;;Get the absolute value of the filter bank output
;;
lea di,table3 ;DI pointing to absolute value table
add ax,di
mov dx,word ptr [di] ;get absolute value
add ax,dx ;use "ax" to hold whole value of sum
add result[0], ax
;;
;;Note the second coeff. for this filter bank is negative
;;
filter_2:
lea si,table1+100h*2 ;pointing to next multiply table
mov ax,input ;
mov bx,y22 ;
or bx,bx
js filt_20 ;
mov dx,word ptr [si+bx] ; multiply by 2nd coeff.
sub ax,dx ; if r13>=0 subtract the result
jmp filt_21 ;
filt_20:
add si,80h*2 ;
mov dx,word ptr [si+bx] ; otherwise r13<0
add ax,dx ; add the result
filt_21: ; ;
mov ax,y21 ;
mov y22,ax ;
or ax,ax ;
js filt_22 ;
mov dx,word ptr [si+bx] ;
sub ax,dx ;
jmp filt_23 ;
filt_22:
add si,80h*2 ; pointing the negative entries
mov dx,word ptr [si+bx] ;
add ax,dx ;
filt_23:
mov y21,ax
mov ax,input
lea di,table3 ;
add ax,di ;
mov dx,word ptr [di] ;
add ax,dx ;
add result[2], ax
;;
;;Note that this table1 coefficient3 for the filter is negative
;;
filter_3:
lea si,table1+200h
mov ax,input ;
mov bx,y32
or bx,bx ;
js filt_30 ;
mov dx,word ptr [si+bx] ; multiply by 2nd coeff.
sub ax,dx ; if r13>=0, subtract the result
jmp filt_31 ;
filt_30:
add si,80h*2 ;
mov dx,word ptr [si+bx] ; otherwise r13<0
add ax,dx ; add the result
filt_31: ;
mov ax,y31 ;
mov y32,ax ;
or ax,ax ;
js filt_32 ;
mov dx,word ptr [si+bx] ;
sub ax,dx ;
jmp filt_33 ;
filt_32:
add si,80h*2 ; pointing the negative entries
mov dx,word ptr [si+bx] ;
add ax,dx ;
filt_33:
mov y21,ax ;
mov ax,input ;
lea di,table3 ;DI pointing to absolute value table
add ax,di
mov dx,word ptr [di] ;get absolute value
add ax,dx ;use "ax" to hold whole value of sum
add result[4], ax
;;
;;table1 coefficient4 for the filter is zero. So in this case,delay-1 term is
;;always zero, the result is the sum of delay-2 and input
;;
filter_4:
lea si,table1+300h ;
mov ax,input ;
mov bx,y42 ;
or bx,bx ;
js filt_40 ;
mov dx,word ptr [si+bx] ;2nd coefficient table
sub ax,dx ;
jmp filt_41 ;
filt_40: ;
add si,80h*2 ;
mov dx,word ptr [si+bx] ;
add ax,dx ;
filt_41:
mov y41,ax ;
mov ax,input ;
mov ax,input ;
mov y41,ax ;
lea di,table3 ;DI pointing to absolute value table
add ax,di
mov dx,word ptr [di] ;get absolute value
add ax,dx ;use "ax" to hold whole value of sum
add result[6], ax
;;
;;table1 coefficient5 for the filter is positive
;;
filter_5:
lea si,table1+400h ;
mov ax,input ;
mov bx,y52 ;
or bx,bx ;
js filt_50 ;
mov dx,word ptr [si+bx] ;multiply by 2nd coeff.
add ax,dx ;if r13>=0 add the result
jmp filt_51 ;
filt_50:
add si,80h*2 ;otherwise r13<0 modify the table
mov dx,word ptr [si+bx] ;pointer
sub ax,dx ;
filt_51: ;subtract the result
mov ax,y51 ;
mov y52,ax ;
or ax,ax ;
js filt_52 ;
mov dx,word ptr [si+bx] ;
add ax,dx ;
jmp filt_53 ;
filt_52:
add si,80h*2 ;
mov dx,word ptr [si+bx] ;
sub ax,dx ;
filt_53:
mov y51,ax
mov ax,input
lea di,table3 ;DI pointing to absolute value table
add ax,di
mov dx,word ptr [di] ;get absolute value
add ax,dx ;use "ax" to hold whole value of sum
add result[8], ax
;;
;;table1 coefficient6 for the filter is positive
;;
filter_6:
lea si,table1+500h ;
mov ax,input ;
mov bx,y62 ;
or bx,bx ;
js filt_60 ;
mov dx,word ptr [si+bx] ;multiply by 2nd coeff.
add ax,dx ;if r13>=0 add the result
jmp filt_61 ;
filt_60:
add si,80h*2 ;otherwise r13<0 modify the table
mov dx,word ptr [si+bx] ;pointer
sub ax,dx ;
filt_61: ;subtract the result
mov ax,y61 ;
mov y62,ax ;
or ax,ax ;
js filt_62 ;
mov dx,word ptr [si+bx] ;
add ax,dx ;
jmp filt_63 ;
filt_62:
add si,80h*2 ;
mov dx,word ptr [si+bx] ;
sub ax,dx ;
filt_63:
mov y61,ax
mov ax,input
lea di,table3 ;DI pointing to absolute value table
add ax,di
mov dx,word ptr [di] ;get absolute value
add ax,dx ;use "ax" to hold whole value of sum
add result[10], ax
;
;table1 coefficient7 for the filter is positive
;
filter_7:
lea si,table1+600h ;
mov ax,input ;
mov bx,y72 ;
or bx,bx ;
js filt_70 ;
mov dx,word ptr [si+bx] ;multiply by 2nd coeff.
add ax,dx ;if r13>=0 add the result
jmp filt_71 ;
filt_70:
add si,80h*2 ;otherwise r13<0 modify the table
mov dx,word ptr [si+bx] ;pointer
sub ax,dx ;
filt_71: ;subtract the result
mov ax,y71 ;
mov y72,ax ;
or ax,ax ;
js filt_72 ;
mov dx,word ptr [si+bx] ;
add ax,dx ;
jmp filt_73 ;
filt_72:
add si,80h*2 ;
mov dx,word ptr [si+bx] ;
sub ax,dx ;
filt_73:
mov y71,ax
mov ax,input
lea di,table3 ;DI pointing to absolute value table
add ax,di
mov dx,word ptr [di] ;get absolute value
add ax,dx ;use "ax" to hold whole value of sum
add result[12], ax
popall
ret
filter7 endp
;;*******************************************************************
;;*
;;* Start of the multiply table
;;*
;;* Note: 1) The use of multiply table will speed up all the operation
;;* considerably vs the multiply instruction.
;;* 2) The original derivation can come up seven tables for the
;;* first coefficient and one table for the second coefficient
;;* since the second coefficient is always constant. But the fouth
;;* first coefficient is zero so the operation regards it is skipped.
;;*
;;* 2) The following tables describe what original coefficients from
;;* these basic biquad bandpass filters look like based on the roughly
;;* seven bands division on zero to pie range.
;;*
;;* The formula for the biquad bandpass filter is :
;;*
;;* Y(Z)/X(Z) = 1/(1 - 2*COS(theta)*r^(-1)*Z^(-1) + r^(-2)*Z^(-2))
;;* theta is roughly about 23 degree.
;;*
;;* {-1.700, 0.8464},
;;* {-1.301, 0.8464},
;;* {-0.704, 0.8464},
;;* { 0.0, 0.8464},
;;* { 0.704, 0.8464},
;;* { 1.301, 0.8464},
;;* { 1.700, 0.8464}};
;;*
;;*
;;* 3) Each multiply table is 256*2 bytes apart. So for these seven
;;* filter banks operation, 256*2 bytes offset is added each times
;;* when one filter bank operation is completed.
;;*
;;*
;;*******************************************************************
table1 label word
DW 2, 3, 5, 7, 9,10,12,14,15,17,19,20,22,24,26,27
DW 29,31,32,34,36,37,39,41,43,44,46,48,49,51,53,54
DW 56,58,60,61,63,65,66,68,70,71,73,75,77,78,80,82
DW 83,85,87,88,90,92,94,95,97,99,100,102,104,105,107,109
DW 111,112,114,116,117,119,121,122,124,126,128,129,131,133,134,136
DW 138,139,141,143,145,146,148,150,151,153,155,156,158,160,162,163
DW 165,167,168,170,172,173,175,177,179,180,182,184,185,187,189,190
DW 192,194,196,197,199,201,202,204,206,207,209,211,213,214,216,218
DW 215,213,212,210,208,206,205,203,201,200,198,196,195,193,191,189
DW 188,186,184,183,181,179,178,176,174,172,171,169,167,166,164,1
DW 161,159,157,155,154,152,150,149,147,145,144,142,140,138,137,135
DW 133,132,130,128,127,125,123,121,120,118,116,115,113,111,110,108
DW 106,104,103,101,99,98,96,94,93,91,89,87,86,84,82,81
DW 79,77,76,74,72,70,69,67,65,64,62,60,59,57,55,53
DW 52,50,48,47,45,43,42,40,38,36,35,33,31,30,28,26
DW 25,23,21,19,18,16,14,13,11,9,8,6,4,2,1,0
;for filter bank #2
DW 1, 3, 4, 5, 7, 8, 9,10,12,13,14,16,17,18,20,21
DW 22,23,25,26,27,29,30,31,33,34,35,36,38,39,40,42
DW 43,44,46,47,48,49,51,52,53,55,56,57,59,60,61,62
DW 64,65,66,68,69,70,72,73,74,75,77,78,79,81,82,83
DW 85,86,87,88,90,91,92,94,95,96,98,99,100,101,103,104
DW 105,107,108,109,111,112,113,114,116,117,118,120,121,122,124,125
DW 126,127,129,130,131,133,134,135,137,138,139,141,142,143,144,146
DW 147,148,150,151,152,154,155,156,157,159,160,161,163,164,165,167
DW 145,146,147,149,150,151,153,154,155,156,158,159,160,162,163,164
DW 124,125,126,128,129,130,132,133,134,136,137,138,140,141,142,143
DW 103,104,106,107,108,110,111,112,113,115,116,117,119,120,121,123
DW 82,84,85,86,87,89,90,91,93,94,95,97,98,99,100,102
DW 61,63,64,65,67,68,69,71,72,73,74,76,77,78,80,81
DW 41,42,43,45,46,47,48,50,51,52,54,55,56,58,59,60
DW 20,21,22,24,25,26,28,29,30,32,33,34,35,37,38,39
DW 0, 0, 2, 3, 4, 6, 7, 8, 9,11,12,13,15,16,17,19
;for filter bank #3
DW 1, 1, 2, 3, 4, 4, 5, 6, 6, 7, 8, 8, 9,10,11,11
DW 12,13,13,14,15,15,16,17,18,18,19,20,20,21,22,23
DW 23,24,25,25,26,27,27,28,29,30,30,31,32,32,33,34
DW 34,35,36,37,37,38,39,39,40,41,42,42,43,44,44,45
DW 46,46,47,48,49,49,50,51,51,52,53,54,54,55,56,56
DW 57,58,58,59,60,61,61,62,63,63,64,65,65,66,67,68
DW 68,69,70,70,71,72,73,73,74,75,75,76,77,77,78,79
DW 80,80,81,82,82,83,84,84,85,86,87,87,88,89,89,90
DW 88,88,87,86,86,85,84,83,83,82,81,81,80,79,79,78
DW 77,76,76,75,74,74,73,72,72,71,70,69,69,68,67,67
DW 66,65,64,64,63,62,62,61,60,60,59,58,57,57,56,55
DW 55,54,53,53,52,51,50,50,49,48,48,47,46,45,45,44
DW 43,43,42,41,41,40,39,38,38,37,36,36,35,34,33,33
DW 32,31,31,30,29,29,28,27,26,26,25,24,24,23,22,22
DW 21,20,19,19,18,17,17,16,15,14,14,13,12,12,11,10
DW 10,9, 8, 7, 7, 6, 5, 5, 4, 3, 3, 2, 1, 0, 0, 0
;for filter bank #4
DW 0, 1, 1, 2, 3, 4, 4, 5, 6, 6, 7, 8, 8, 9, 10, 11
DW 11,12,13,13,14,15,15,16,17,18,18,19,20,20,21,22
DW 23,23,24,25,25,26,27,27,28,29,30,30,31,32,32,33
DW 34,34,35,36,37,37,38,39,39,40,41,42,42,43,44,44
DW 45,46,46,47,48,49,49,50,51,51,52,53,54,54,55,56
DW 56,57,58,58,59,60,61,61,62,63,63,64,65,65,66,67
DW 68,68,69,70,70,71,72,73,73,74,75,75,76,77,77,78
DW 79,80,80,81,82,82,83,84,84,85,86,87,87,88,89,89
DW 89,88,88,87,86,86,85,84,83,83,82,81,81,80,79,79
DW 78,77,76,76,75,74,74,73,72,72,71,70,69,69,68,67
DW 67,66,65,64,64,63,62,62,61,60,60,59,58,57,57,56
DW 55,55,54,53,53,52,51,50,50,49,48,48,47,46,45,45
DW 44,43,43,42,41,41,40,39,38,38,37,36,36,35,34,33
DW 33,32,31,31,30,29,29,28,27,26,26,25,24,24,23,22
DW 22,21,20,19,19,18,17,17,16,15,14,14,13,12,12,11
DW 10,10,9 ,8 ,7 ,7 ,6 ,5 ,5 ,4 ,3 ,3 ,2 ,1 ,0 ,0
;for filter bank #5
DW 0, 1, 3, 4, 5, 7, 8, 9,10,12,13,14,16,17,18,20
DW 21,22,23,25,26,27,29,30,31,33,34,35,36,38,39,40
DW 42,43,44,46,47,48,49,51,52,53,55,56,57,59,60,61
DW 62,64,65,66,68,69,70,72,73,74,75,77,78,79,81,82
DW 83,85,86,87,88,90,91,92,94,95,96,98,99,100,101,103
DW 104,105,107,108,109,111,112,113,114,116,117,118,120,121,122,124
DW 125,126,127,129,130,131,133,134,135,137,138,139,141,142,143,144
DW 146,147,148,150,151,152,154,155,156,157,159,160,161,163,164,165
DW 166,164,163,162,160,159,158,156,155,154,153,151,150,149,147,146
DW 145,143,142,141,140,138,137,136,134,133,132,130,129,128,126,125
DW 124,123,121,120,119,117,116,115,113,112,111,110,108,107,106,104
DW 103,102,100,99,98,97,95,94,93,91,90,89,87,86,85,84
DW 82,81,80,78,77,76,74,73,72,71,69,68,67,65,64,63
DW 61,60,59,58,56,55,54,52,51,50,48,47,46,45,43,42
DW 41,39,38,37,35,34,33,32,30,29,28,26,25,24,22,21
DW 20,19,17,16,15,13,12,11,9,8,7,6,4,3,2, 0
;for filter bank #6
DW 0, 2, 3, 5, 7, 9,10,12,14,15,17,19,20,22,24,26
DW 27,29,31,32,34,36,37,39,41,43,44,46,48,49,51,53
DW 54,56,58,60,61,63,65,66,68,70,71,73,75,77,78,80
DW 82,83,85,87,88,90,92,94,95,97,99,100,102,104,105,107
DW 109,111,112,114,116,117,119,121,122,124,126,128,129,131,133,134
DW 136,138,139,141,143,145,146,148,150,151,153,155,156,158,160,162
DW 163,165,167,168,170,172,173,175,177,179,180,182,184,185,187,189
DW 190,192,194,196,197,199,201,202,204,206,207,209,211,213,214,216
DW 217,215,213,212,210,208,206,205,203,201,200,198,196,195,193,191
DW 189,188,186,184,183,181,179,178,176,174,172,171,169,167,166,164
DW 162,161,159,157,155,154,152,150,149,147,145,144,142,140,138,137
DW 135,133,132,130,128,127,125,123,121,120,118,116,115,113,111,110
DW 108,106,104,103,101,99,98,96,94,93,91,89,87,86,84,82
DW 81,79,77,76,74,72,70,69,67,65,64,62,60,59,57,55
DW 53,52,50,48,47,45,43,42,40,38,36,35,33,31,30,28
DW 26,25,23,21,19,18,16,14,13,11,9,8,6,4,2,1
;for all filter banks
table2 label word
DW 0, 1, 2, 3, 3, 4, 5, 6, 7, 8, 8, 9,10,11,12,13
DW 14,14,15,16,17,18,19,19,20,21,22,23,24,25,25,26
DW 27,28,29,30,30,31,32,33,34,35,36,36,37,38,39,40
DW 41,41,42,43,44,45,46,47,47,48,49,50,51,52,52,53
DW 54,55,56,57,58,58,59,60,61,62,63,63,64,65,66,67
DW 68,69,69,70,71,72,73,74,74,75,76,77,78,79,80,80
DW 81,82,83,84,85,85,86,87,88,89,90,91,91,92,93,94
DW 95,96,96,97,98,99,100,101,102,102,103,104,105,106,107,107
DW 107,106,106,105,104,103,102,101,101,100,99,98,97,96,95,95
DW 94,93,92,91,90,90,89,88,87,86,85,84,84,83,82,81
DW 80,79,79,78,77,76,75,74,73,73,72,71,70,69,68,68
DW 67,66,65,64,63,62,62,61,60,59,58,57,57,56,55,54
DW 53,52,51,51,50,49,48,47,46,46,45,44,43,42,41,40
DW 40,39,38,37,36,35,35,34,33,32,31,30,29,29,28,27
DW 26,25,24,24,23,22,21,20,19,18,18,17,16,15,14,13
DW 13,12,11,10,9,8,7,7,6,5,4,3,2,2,1, 0
;for all filter banks
table3 label word
DW 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
DW 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31
DW 32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47
DW 48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63
DW 64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79
DW 80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95
DW 96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111
DW 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127
;;******************************
;;*
;;* End of the multiply table
;;*
;;******************************
addaxbydi proc
push di
@@: add ax, VERTDIMS*2
sub di, 2
jnz @B
pop di
ret
addaxbydi endp
end