cosmetic changes
This commit is contained in:
parent
6b8fa86b73
commit
2bbbcf6f58
@ -27,6 +27,16 @@ cglobal FLAC__lpc_compute_autocorrelation_asm
|
||||
; **********************************************************************
|
||||
;
|
||||
; void FLAC__lpc_compute_autocorrelation_asm(const real data[], unsigned data_len, unsigned lag, real autoc[])
|
||||
; {
|
||||
; real d;
|
||||
; unsigned i;
|
||||
;
|
||||
; while(lag--) {
|
||||
; for(i = lag, d = 0.0; i < data_len; i++)
|
||||
; d += data[i] * data[i - lag];
|
||||
; autoc[lag] = d;
|
||||
; }
|
||||
; }
|
||||
;
|
||||
FLAC__lpc_compute_autocorrelation_asm:
|
||||
|
||||
@ -53,6 +63,48 @@ FLAC__lpc_compute_autocorrelation_asm:
|
||||
xor eax, eax ; eax == i-lag
|
||||
fldz ; ST = d <- 0.0
|
||||
.inner_loop:
|
||||
cmp ebx, ecx
|
||||
jae short .inner_end
|
||||
fld qword [esi + ebx * 8] ; ST = data[i] d
|
||||
fmul qword [esi + eax * 8] ; ST = data[i]*data[i-lag] d
|
||||
faddp st1 ; d += data[i]*data[i-lag] ST = d
|
||||
inc eax
|
||||
inc ebx
|
||||
cmp ebx, ecx
|
||||
jae short .inner_end
|
||||
fld qword [esi + ebx * 8] ; ST = data[i] d
|
||||
fmul qword [esi + eax * 8] ; ST = data[i]*data[i-lag] d
|
||||
faddp st1 ; d += data[i]*data[i-lag] ST = d
|
||||
inc eax
|
||||
inc ebx
|
||||
cmp ebx, ecx
|
||||
jae short .inner_end
|
||||
fld qword [esi + ebx * 8] ; ST = data[i] d
|
||||
fmul qword [esi + eax * 8] ; ST = data[i]*data[i-lag] d
|
||||
faddp st1 ; d += data[i]*data[i-lag] ST = d
|
||||
inc eax
|
||||
inc ebx
|
||||
cmp ebx, ecx
|
||||
jae short .inner_end
|
||||
fld qword [esi + ebx * 8] ; ST = data[i] d
|
||||
fmul qword [esi + eax * 8] ; ST = data[i]*data[i-lag] d
|
||||
faddp st1 ; d += data[i]*data[i-lag] ST = d
|
||||
inc eax
|
||||
inc ebx
|
||||
cmp ebx, ecx
|
||||
jae short .inner_end
|
||||
fld qword [esi + ebx * 8] ; ST = data[i] d
|
||||
fmul qword [esi + eax * 8] ; ST = data[i]*data[i-lag] d
|
||||
faddp st1 ; d += data[i]*data[i-lag] ST = d
|
||||
inc eax
|
||||
inc ebx
|
||||
cmp ebx, ecx
|
||||
jae short .inner_end
|
||||
fld qword [esi + ebx * 8] ; ST = data[i] d
|
||||
fmul qword [esi + eax * 8] ; ST = data[i]*data[i-lag] d
|
||||
faddp st1 ; d += data[i]*data[i-lag] ST = d
|
||||
inc eax
|
||||
inc ebx
|
||||
cmp ebx, ecx
|
||||
jae short .inner_end
|
||||
fld qword [esi + ebx * 8] ; ST = data[i] d
|
||||
@ -78,17 +130,3 @@ FLAC__lpc_compute_autocorrelation_asm:
|
||||
ret
|
||||
|
||||
end
|
||||
; void FLAC__lpc_compute_autocorrelation_asm(const real data[], unsigned data_len, unsigned lag, real autoc[])
|
||||
; {
|
||||
; real d;
|
||||
; unsigned i;
|
||||
;
|
||||
; assert(lag > 0);
|
||||
; assert(lag <= data_len);
|
||||
;
|
||||
; while(lag--) {
|
||||
; for(i = lag, d = 0.0; i < data_len; i++)
|
||||
; d += data[i] * data[i - lag];
|
||||
; autoc[lag] = d;
|
||||
; }
|
||||
; }
|
||||
|
Loading…
Reference in New Issue
Block a user