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

📄 placev.f,v

📁 lpc10-15为美军2400bps语音压缩标准的C语音源代码。
💻 F,V
字号:
head	1.6;access;symbols;locks; strict;comment	@* @;1.6date	96.03.19.20.42.19;	author jaf;	state Exp;branches;next	1.5;1.5date	96.03.19.18.37.56;	author jaf;	state Exp;branches;next	1.4;1.4date	96.03.15.16.38.33;	author jaf;	state Exp;branches;next	1.3;1.3date	96.03.15.16.36.13;	author jaf;	state Exp;branches;next	1.2;1.2date	96.03.12.23.56.01;	author jaf;	state Exp;branches;next	1.1;1.1date	96.02.07.14.48.39;	author jaf;	state Exp;branches;next	;desc@@1.6log@Added some conditions satisfied by the output values in VWIN.@text@*********************************************************************	PLACEV Version 48** $Log: placev.f,v $* Revision 1.5  1996/03/19  18:37:56  jaf* Strengthened the specification of which indices of VWIN are read and* written.** Revision 1.4  1996/03/15  16:38:33  jaf* One tiny comment added.** Revision 1.3  1996/03/15  16:36:13  jaf* Added comments giving In/Out status of arguments.** Revision 1.2  1996/03/12  23:56:01  jaf* Comments added explaining that none of the local variables of this* subroutine need to be saved from one invocation to the next.** Revision 1.1  1996/02/07 14:48:39  jaf* Initial revision*********************************************************************** Input:*  OSBUF	Buffer which holds sorted indexes of onsets*       	I believe that only indices 1 through OSPTR-1 can be read.*  OSLEN*  OSPTR	Free pointer into OSBUF*  AF*  LFRAME*  MINWIN*  MAXWIN*  DVWINL*  DVWINH	(This argument is never used.  Should it be?)* Input/Output:*  VWIN		Buffer of Voicing Window Positions (Modified)*       	Index (2,AF-1) is read.*       	Indices (1,AF) and (2,AF) are written,*       	and then possibly read.*       	All other indices are unused.*               In all cases, the final values will satsify the condition:*               VWIN(2,AF)-VWIN(1,AF)+1 .LE. MAXWIN*               I'm not certain yet, but they may also satisfy:*               MINWIN .LE. VWIN(2,AF)-VWIN(1,AF)+1* Output:*  OBOUND	This variable is set by this procedure and used*		in placing analysis windows (PLACEA).  Bit 1*		indicates whether an onset bounds the left side*		of the voicing window, and bit 2 indicates whether*		an onset bounds the right side of the voicing window.** This subroutine has no local state.*	SUBROUTINE PLACEV( OSBUF, OSPTR, OSLEN, OBOUND, VWIN, AF,     1   LFRAME, MINWIN, MAXWIN, DVWINL, DVWINH )*       Arguments	INTEGER OSLEN, OSBUF(OSLEN), OSPTR, OBOUND, AF, VWIN(2,AF)	INTEGER LFRAME, MINWIN, MAXWIN, DVWINL, DVWINH*       Local variables that need not be saved*   Variables*    LRANGE, HRANGE  Range in which window is placed*    OSPTR1     OSPTR excluding samples in 3F	INTEGER LRANGE, HRANGE, I, Q, OSPTR1	LOGICAL CRIT*       Local state*       None*   Voicing Window Placement**         __________________ __________________ ______________*        |                  |                  |*        |        1F        |        2F        |        3F ...*        |__________________|__________________|______________**    Previous |*      Window |*  ...________|**             |                                |*      ------>| This window's placement range  |<------*             |                                |**   There are three cases.  Note that these are different from those*   given in the LPC-10e phase 1 report.**   1.  If there are no onsets in this range, then the voicing window*   is centered in the pitch window.  If such a placement is not within*   the window's placement range, then the window is placed in the left-*   most portion of the placement range.  Its length is always MAXWIN.**   2.  If the first onset is in 2F and there is sufficient room to place*   the window immediately before this onset, then the window is placed*   there, and its length is set to the maximum possible under these*   constraints.**	"Critical Region Exception":  If there is another onset in 2F*	such that a window can be placed between the two onsets, the*	window is placed there (ie, as in case 3).**   3.  Otherwise, the window is placed immediately after the onset.  The *   window's length*   is the longest length that can fit in the range under these constraints,*   except that the window may be shortened even further to avoid overlapping*   other onsets in the placement range.  In any case, the window's length*   is at least MINWIN.**   Note that the values of MINWIN and LFRAME must be chosen such*   that case 2 = false implies case 3 = true.   This means that*   MINWIN <= LFRAME/2.  If this were not the case, then a fourth case*   would have to be added for when the window cannot fit either before*   or after the onset.**   Note also that onsets which weren't in 2F last time may be in 1F this*   time, due to the filter delays in computing onsets.  The result is that*   occasionally a voicing window will overlap that onset.  The only way*   to circumvent this problem is to add more delay in processing input*   speech.  In the trade-off between delay and window-placement, window*   placement lost.* Compute the placement range	LRANGE = MAX(VWIN(2,AF-1)+1, (AF-2)*LFRAME+1)	HRANGE = AF*LFRAME* Compute OSPTR1, so the following code only looks at relevant onsets.	DO OSPTR1 = OSPTR-1, 1, -1	   IF (OSBUF (OSPTR1) .LE. HRANGE) GOTO 90	END DO90	OSPTR1 = OSPTR1 + 1* Check for case 1 first (fast case):	IF ((OSPTR1 .LE. 1) .OR. (OSBUF(OSPTR1-1) .LT. LRANGE)) THEN	   VWIN(1,AF) = MAX(VWIN(2,AF-1)+1, DVWINL)	   VWIN(2,AF) = VWIN(1,AF) + MAXWIN - 1	   OBOUND = 0	ELSE* Search backward in OSBUF for first onset in range.* This code relies on the above check being performed first.	   DO Q = OSPTR1-1, 1, -1	      IF (OSBUF(Q) .LT. LRANGE) GOTO 100	   END DO100	   Q = Q + 1* Check for case 2 (placement before onset):* Check for critical region exception:	   DO I = Q+1, OSPTR1-1	      IF (OSBUF(I) - OSBUF(Q) .GE. MINWIN) THEN	         CRIT = .TRUE.	         GOTO 105	      END IF	   END DO	   CRIT = .FALSE.105	   CONTINUE	   IF (.NOT. CRIT .AND.     1        OSBUF(Q) .GT. MAX((AF-1)*LFRAME, LRANGE+MINWIN-1)) THEN	      VWIN(2,AF) = OSBUF(Q) - 1	      VWIN(1,AF) = MAX (LRANGE, VWIN(2,AF)-MAXWIN+1)	      OBOUND = 2* Case 3 (placement after onset)	   ELSE	      VWIN(1,AF) = OSBUF(Q)110	      Q = Q + 1	      IF (Q .GE. OSPTR1) GO TO 120	      IF (OSBUF(Q) .GT. VWIN(1,AF) + MAXWIN) GO TO 120	      IF (OSBUF(Q) .LT. VWIN(1,AF) + MINWIN) GO TO 110	      VWIN(2,AF) = OSBUF(Q) - 1	      OBOUND = 3	      RETURN120	      VWIN(2,AF) = MIN(VWIN(1,AF) + MAXWIN - 1, HRANGE)	      OBOUND = 1	   END IF	END IF	RETURN	END@1.5log@Strengthened the specification of which indices of VWIN are read andwritten.@text@d6 4d45 4@1.4log@One tiny comment added.@text@d6 3d37 2a38 2*       	Index (2,AF-1) can be read.*       	Indices (1,AF) and (2,AF) can be written,@1.3log@Added comments giving In/Out status of arguments.@text@d6 3d44 2@1.2log@Comments added explaining that none of the local variables of thissubroutine need to be saved from one invocation to the next.@text@d6 4a15 2	SUBROUTINE PLACEV( OSBUF, OSPTR, OSLEN, OBOUND, VWIN, AF,     1   LFRAME, MINWIN, MAXWIN, DVWINL, DVWINH )d17 20a36 5*   Arguments*    OSBUF	Buffer which holds sorted indexes of onsets*    OSPTR	Free pointer into OSBUF*    VWIN	Buffer of Voicing Window Positions (Modified)*    OBOUND	This variable is set by this procedure and usedd41 6a46 3*   Variables*    LRANGE, HRANGE  Range in which window is placed*    OSPTR1     OSPTR excluding samaples in 3Fd51 5a55 4*       Local variables*       *       None of these need to have their values saved from one*       invocation to the next.d59 5@1.1log@Initial revision@text@d5 4a8 1* $Log$d30 6@

⌨️ 快捷键说明

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