Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

482 lines
17 KiB

  1. //
  2. // ITU-T G.723 Floating Point Speech Coder ANSI C Source Code. Version 1.00
  3. // copyright (c) 1995, AudioCodes, DSP Group, France Telecom,
  4. // Universite de Sherbrooke, Intel Corporation. All rights reserved.
  5. //
  6. #include "timer.h"
  7. #include "ctiming.h"
  8. #include "opt.h"
  9. #include <stdlib.h>
  10. #include <stdio.h>
  11. #include <memory.h>
  12. #include "typedef.h"
  13. #include "cst_lbc.h"
  14. #include "tab_lbc.h"
  15. #include "decod.h"
  16. #include "util_lbc.h"
  17. #include "lpc.h"
  18. #include "lsp.h"
  19. #include "exc_lbc.h"
  20. #ifdef LOG_DECODE_TIMINGS_ON // { LOG_DECODE_TIMINGS_ON
  21. #pragma message ("Current log decode timing computations handle 2057 frames max")
  22. void OutputDecodeTimingStatistics(char * szFileName, DEC_TIMING_INFO * pDecTimingInfo, unsigned long dwFrameCount);
  23. void OutputDecTimingDetail(FILE * pFile, DEC_TIMING_INFO * pDecTimingInfo);
  24. #endif // } LOG_DECODE_TIMINGS_ON
  25. // This file includes the decoder main functions
  26. //--------------------------------------------------
  27. void Init_Decod(DECDEF *DecStat)
  28. {
  29. int i;
  30. // Init prev Lsp to Dc
  31. for (i = 0; i < LpcOrder; i++)
  32. DecStat->dPrevLsp[i] = LspDcTable[i];
  33. DecStat->dp = 9;
  34. DecStat->dq = 9;
  35. }
  36. //--------------------------------------------------
  37. Flag Decod(float *DataBuff, Word32 *Vinp, Word16 Crc, DECDEF *DecStat)
  38. {
  39. int i,j,g;
  40. float QntLpc[SubFrames*LpcOrder];
  41. float AcbkCont[SubFrLen];
  42. float LspVect[LpcOrder];
  43. float Temp[PitchMax+Frame];
  44. float *Dpnt;
  45. LINEDEF Line;
  46. #if defined(DECODE_TIMINGS_ON) || defined(DETAILED_DECODE_TIMINGS_ON) // { #if defined(DECODE_TIMINGS_ON) || defined(DETAILED_DECODE_TIMINGS_ON)
  47. unsigned long dwStartLow;
  48. unsigned long dwStartHigh;
  49. unsigned long dwElapsed;
  50. unsigned long dwBefore;
  51. unsigned long dwDecode = 0;
  52. int bTimingThisFrame = 0;
  53. #endif // } #if defined(DECODE_TIMINGS_ON) || defined(DETAILED_DECODE_TIMINGS_ON)
  54. #ifdef DETAILED_DECODE_TIMINGS_ON // { DETAILED_DECODE_TIMINGS_ON
  55. unsigned long dwLine_Unpk = 0;
  56. unsigned long dwLsp_Inq = 0;
  57. unsigned long dwLsp_Int = 0;
  58. unsigned long dwVariousD = 0;
  59. unsigned long dwFcbk_UnpkD = 0;
  60. unsigned long dwDecod_AcbkD = 0;
  61. unsigned long dwComp_Info = 0;
  62. unsigned long dwRegen = 0;
  63. unsigned long dwSynt = 0;
  64. unsigned long dwFcbk_UnpkDTemp = 0;
  65. unsigned long dwDecod_AcbkDTemp = 0;
  66. unsigned long dwSyntTemp = 0;
  67. #endif // } DETAILED_DECODE_TIMINGS_ON
  68. #ifdef LOG_DECODE_TIMINGS_ON // { LOG_DECODE_TIMINGS_ON
  69. DEC_TIMING_INFO * pDecTimingInfo = NULL;
  70. #endif // } LOG_DECODE_TIMINGS_ON
  71. #if defined(DECODE_TIMINGS_ON) || defined(DETAILED_DECODE_TIMINGS_ON) // { #if defined(DECODE_TIMINGS_ON) || defined(DETAILED_DECODE_TIMINGS_ON)
  72. TIMER_START(bTimingThisFrame,dwStartLow,dwStartHigh);
  73. #endif // } #if defined(DECODE_TIMINGS_ON) || defined(DETAILED_DECODE_TIMINGS_ON)
  74. #ifdef LOG_DECODE_TIMINGS_ON // { LOG_DECODE_TIMINGS_ON
  75. if (DecStat->dwStatFrameCount < DEC_TIMING_INFO_FRAME_COUNT)
  76. {
  77. DecStat->dwStartLow = dwStartLow;
  78. DecStat->dwStartHigh = dwStartHigh;
  79. }
  80. DecStat->bTimingThisFrame = bTimingThisFrame;
  81. #endif // } LOG_DECODE_TIMINGS_ON
  82. // Unpack the Line info
  83. #ifdef DETAILED_DECODE_TIMINGS_ON // { DETAILED_DECODE_TIMINGS_ON
  84. TIMER_BEFORE(bTimingThisFrame,dwStartLow,dwStartHigh,dwBefore);
  85. #endif // } DETAILED_DECODE_TIMINGS_ON
  86. Line_Unpk(&Line, Vinp, &DecStat->WrkRate, Crc);
  87. #ifdef DETAILED_DECODE_TIMINGS_ON // { DETAILED_DECODE_TIMINGS_ON
  88. TIMER_AFTER_P5(bTimingThisFrame,dwStartLow,dwStartHigh,dwBefore,dwElapsed,dwLine_Unpk);
  89. #endif // } DETAILED_DECODE_TIMINGS_ON
  90. if(DecStat->WrkRate == Silent) {
  91. //HACK: For handling SID frames.
  92. //Until comfort noise generator is in place, we play
  93. // out random noise frames.
  94. //In Line_unpck, reset WrkRate to original setting
  95. // and decode. We therefore should never reach this point.
  96. memset(DataBuff, 0, sizeof(float) * Frame);
  97. //exit having filled frame with zeros leave state alone
  98. //this will be fixed up in a later ITU release
  99. return (Flag) False;
  100. }
  101. else if(DecStat->WrkRate == Lost) {
  102. Line.Crc = !0;
  103. }
  104. /*
  105. Line.Crc equals one means that the line was corrupted. It shouldn't
  106. be reassigned. Otherwise, member of Line will be used uninitialized.
  107. Comment out the following two lines. muhan, 5/26/98
  108. else {
  109. Line.Crc = Crc;
  110. }
  111. */
  112. if (Line.Crc != 0)
  113. DecStat->Ecount++;
  114. else
  115. DecStat->Ecount = 0;
  116. if (DecStat->Ecount > ErrMaxNum)
  117. DecStat->Ecount = ErrMaxNum;
  118. // Inverse quantization of the LSP
  119. #ifdef DETAILED_DECODE_TIMINGS_ON // { DETAILED_DECODE_TIMINGS_ON
  120. TIMER_BEFORE(bTimingThisFrame,dwStartLow,dwStartHigh,dwBefore);
  121. #endif // } DETAILED_DECODE_TIMINGS_ON
  122. Lsp_Inq(LspVect, DecStat->dPrevLsp, Line.LspId, Line.Crc);
  123. #ifdef DETAILED_DECODE_TIMINGS_ON // { DETAILED_DECODE_TIMINGS_ON
  124. TIMER_AFTER_P5(bTimingThisFrame,dwStartLow,dwStartHigh,dwBefore,dwElapsed,dwLsp_Inq);
  125. #endif // } DETAILED_DECODE_TIMINGS_ON
  126. // Interpolate the Lsp vectors
  127. #ifdef DETAILED_DECODE_TIMINGS_ON // { DETAILED_DECODE_TIMINGS_ON
  128. TIMER_BEFORE(bTimingThisFrame,dwStartLow,dwStartHigh,dwBefore);
  129. #endif // } DETAILED_DECODE_TIMINGS_ON
  130. Lsp_Int(QntLpc, LspVect, DecStat->dPrevLsp);
  131. #ifdef DETAILED_DECODE_TIMINGS_ON // { DETAILED_DECODE_TIMINGS_ON
  132. TIMER_AFTER_P5(bTimingThisFrame,dwStartLow,dwStartHigh,dwBefore,dwElapsed,dwLsp_Int);
  133. #endif // } DETAILED_DECODE_TIMINGS_ON
  134. /* Copy the LSP vector for the next frame */
  135. #ifdef DETAILED_DECODE_TIMINGS_ON // { DETAILED_DECODE_TIMINGS_ON
  136. TIMER_BEFORE(bTimingThisFrame,dwStartLow,dwStartHigh,dwBefore);
  137. #endif // } DETAILED_DECODE_TIMINGS_ON
  138. for ( i = 0 ; i < LpcOrder ; i ++ )
  139. DecStat->dPrevLsp[i] = LspVect[i] ;
  140. /*
  141. * In case of no erasure, update the interpolation gain memory.
  142. * Otherwise compute the interpolation gain (Text: Section 3.10)
  143. */
  144. if (DecStat->Ecount == 0)
  145. {
  146. g = (Line.Sfs[SubFrames-2].Mamp + Line.Sfs[SubFrames-1].Mamp) >> 1;
  147. DecStat->InterGain = FcbkGainTable[g];
  148. }
  149. else
  150. DecStat->InterGain = DecStat->InterGain*0.75f;
  151. // Regenerate the excitation
  152. for (i = 0; i < PitchMax; i++)
  153. Temp[i] = DecStat->dPrevExc[i];
  154. Dpnt = &Temp[PitchMax];
  155. #ifdef DETAILED_DECODE_TIMINGS_ON // { DETAILED_DECODE_TIMINGS_ON
  156. TIMER_AFTER_P5(bTimingThisFrame,dwStartLow,dwStartHigh,dwBefore,dwElapsed,dwVariousD);
  157. #endif // } DETAILED_DECODE_TIMINGS_ON
  158. if (DecStat->Ecount == 0)
  159. {
  160. for (i = 0; i < SubFrames; i++)
  161. {
  162. // Unpack fixed code book
  163. #ifdef DETAILED_DECODE_TIMINGS_ON // { DETAILED_DECODE_TIMINGS_ON
  164. TIMER_BEFORE(bTimingThisFrame,dwStartLow,dwStartHigh,dwBefore);
  165. #endif // } DETAILED_DECODE_TIMINGS_ON
  166. Fcbk_Unpk(Dpnt, Line.Sfs[i], Line.Olp[i>>1], i, DecStat->WrkRate);
  167. #ifdef DETAILED_DECODE_TIMINGS_ON // { DETAILED_DECODE_TIMINGS_ON
  168. TIMER_AFTER_P5(bTimingThisFrame,dwStartLow,dwStartHigh,dwBefore,dwElapsed,dwFcbk_UnpkDTemp);
  169. #endif // } DETAILED_DECODE_TIMINGS_ON
  170. // Reconstruct the excitation
  171. #ifdef DETAILED_DECODE_TIMINGS_ON // { DETAILED_DECODE_TIMINGS_ON
  172. TIMER_BEFORE(bTimingThisFrame,dwStartLow,dwStartHigh,dwBefore);
  173. #endif // } DETAILED_DECODE_TIMINGS_ON
  174. Decod_Acbk(AcbkCont, &Temp[SubFrLen*i], Line.Olp[i>>1],
  175. Line.Sfs[i].AcLg, Line.Sfs[i].AcGn, DecStat->WrkRate);
  176. #ifdef DETAILED_DECODE_TIMINGS_ON // { DETAILED_DECODE_TIMINGS_ON
  177. TIMER_AFTER_P5(bTimingThisFrame,dwStartLow,dwStartHigh,dwBefore,dwElapsed,dwDecod_AcbkDTemp);
  178. #endif // } DETAILED_DECODE_TIMINGS_ON
  179. for (j = 0; j < SubFrLen; j++)
  180. Dpnt[j] = Dpnt[j]*2.0f + AcbkCont[j];
  181. Dpnt += SubFrLen;
  182. #ifdef DETAILED_DECODE_TIMINGS_ON // { DETAILED_DECODE_TIMINGS_ON
  183. // Cumulate stats
  184. dwFcbk_UnpkD += dwFcbk_UnpkDTemp; dwFcbk_UnpkDTemp = 0;
  185. dwDecod_AcbkD+= dwDecod_AcbkDTemp; dwDecod_AcbkDTemp = 0;
  186. #endif // } DETAILED_DECODE_TIMINGS_ON
  187. }
  188. // Save the Excitation
  189. for (j = 0; j < Frame; j++)
  190. DataBuff[j] = Temp[PitchMax+j];
  191. // Compute interpolation index, for future use in frame erasures
  192. #ifdef DETAILED_DECODE_TIMINGS_ON // { DETAILED_DECODE_TIMINGS_ON
  193. TIMER_BEFORE(bTimingThisFrame,dwStartLow,dwStartHigh,dwBefore);
  194. #endif // } DETAILED_DECODE_TIMINGS_ON
  195. DecStat->InterIndx = Comp_Info(Temp, Line.Olp[SubFrames/2-1]);
  196. #ifdef DETAILED_DECODE_TIMINGS_ON // { DETAILED_DECODE_TIMINGS_ON
  197. TIMER_AFTER_P5(bTimingThisFrame,dwStartLow,dwStartHigh,dwBefore,dwElapsed,dwComp_Info);
  198. #endif // } DETAILED_DECODE_TIMINGS_ON
  199. // Reload back
  200. for (j = 0; j < PitchMax; j++)
  201. Temp[j] = DecStat->dPrevExc[j];
  202. for (j = 0; j < Frame; j++)
  203. Temp[PitchMax+j] = DataBuff[j];
  204. #if 1 //do clipping
  205. /* Clip newly generated samples in Temp array */
  206. for(j = 0; j < Frame; j++)
  207. {
  208. //clip to +/- 32767.0 doing abs & compare with integer unit
  209. //if clipping is needed shift sign bit to use as lookup table index
  210. #define FLTCLIP(x) \
  211. {\
  212. const float T[2] = {32767.0f, -32767.0f};\
  213. if ((asint(x) & 0x7fffffff) > asint(T[0]))\
  214. x = T[((unsigned)asint(x)) >> 31];\
  215. }
  216. FLTCLIP(Temp[PitchMax+j]);
  217. }
  218. #endif //optclip
  219. }
  220. else
  221. {
  222. #ifdef DETAILED_DECODE_TIMINGS_ON // { DETAILED_DECODE_TIMINGS_ON
  223. TIMER_BEFORE(bTimingThisFrame,dwStartLow,dwStartHigh,dwBefore);
  224. #endif // } DETAILED_DECODE_TIMINGS_ON
  225. Regen(DataBuff, Temp, DecStat->InterIndx, DecStat->InterGain,
  226. DecStat->Ecount, &DecStat->Rseed);
  227. #ifdef DETAILED_DECODE_TIMINGS_ON // { DETAILED_DECODE_TIMINGS_ON
  228. TIMER_AFTER_P5(bTimingThisFrame,dwStartLow,dwStartHigh,dwBefore,dwElapsed,dwRegen);
  229. #endif // } DETAILED_DECODE_TIMINGS_ON
  230. }
  231. // Update PrevExc for next frame
  232. for (j = 0; j < PitchMax; j++)
  233. DecStat->dPrevExc[j] = Temp[Frame+j];
  234. // Synthesis
  235. Dpnt = DataBuff;
  236. for (i = 0; i < SubFrames; i++)
  237. {
  238. // Synthesize output speech
  239. #ifdef DETAILED_DECODE_TIMINGS_ON // { DETAILED_DECODE_TIMINGS_ON
  240. TIMER_BEFORE(bTimingThisFrame,dwStartLow,dwStartHigh,dwBefore);
  241. #endif // } DETAILED_DECODE_TIMINGS_ON
  242. Synt(Dpnt, &QntLpc[i*LpcOrder], DecStat);
  243. #ifdef DETAILED_DECODE_TIMINGS_ON // { DETAILED_DECODE_TIMINGS_ON
  244. TIMER_AFTER_P5(bTimingThisFrame,dwStartLow,dwStartHigh,dwBefore,dwElapsed,dwSyntTemp);
  245. #endif // } DETAILED_DECODE_TIMINGS_ON
  246. Dpnt += SubFrLen;
  247. #ifdef DETAILED_DECODE_TIMINGS_ON // { DETAILED_DECODE_TIMINGS_ON
  248. // Cumulate stats
  249. dwSynt += dwSyntTemp; dwSyntTemp = 0;
  250. #endif // } DETAILED_DECODE_TIMINGS_ON
  251. }
  252. #if defined(DECODE_TIMINGS_ON) || defined(DETAILED_DECODE_TIMINGS_ON) // { #if defined(DECODE_TIMINGS_ON) || defined(DETAILED_DECODE_TIMINGS_ON)
  253. TIMER_STOP(bTimingThisFrame,dwStartLow,dwStartHigh,dwDecode);
  254. #endif // } DECODE_TIMINGS_ON
  255. #ifdef LOG_DECODE_TIMINGS_ON // { LOG_DECODE_TIMINGS_ON
  256. if (bTimingThisFrame && (DecStat->dwStatFrameCount < DEC_TIMING_INFO_FRAME_COUNT))
  257. {
  258. pDecTimingInfo = &DecStat->DecTimingInfo[DecStat->dwStatFrameCount];
  259. pDecTimingInfo->dwDecode = dwDecode;
  260. #ifdef DETAILED_DECODE_TIMINGS_ON // { DETAILED_DECODE_TIMINGS_ON
  261. pDecTimingInfo->dwLine_Unpk = dwLine_Unpk;
  262. pDecTimingInfo->dwLsp_Inq = dwLsp_Inq;
  263. pDecTimingInfo->dwLsp_Int = dwLsp_Int;
  264. pDecTimingInfo->dwVariousD = dwVariousD;
  265. pDecTimingInfo->dwFcbk_UnpkD = dwFcbk_UnpkD;
  266. pDecTimingInfo->dwDecod_AcbkD = dwDecod_AcbkD;
  267. pDecTimingInfo->dwComp_Info = dwComp_Info;
  268. pDecTimingInfo->dwRegen = dwRegen;
  269. pDecTimingInfo->dwSynt = dwSynt;
  270. #endif // } DETAILED_DECODE_TIMINGS_ON
  271. DecStat->dwStatFrameCount++;
  272. }
  273. else
  274. {
  275. _asm int 3;
  276. }
  277. #endif // } #if defined(DECODE_TIMINGS_ON) || defined(DETAILED_DECODE_TIMINGS_ON)
  278. return (Flag) True;
  279. }
  280. #ifdef LOG_DECODE_TIMINGS_ON // { LOG_DECODE_TIMINGS_ON
  281. void OutputDecodeTimingStatistics(char * szFileName, DEC_TIMING_INFO * pDecTimingInfo, unsigned long dwFrameCount)
  282. {
  283. FILE * pFile;
  284. DEC_TIMING_INFO * pTempDecTimingInfo;
  285. DEC_TIMING_INFO dtiTemp;
  286. int i;
  287. int iCount;
  288. pFile = fopen(szFileName, "a");
  289. if (pFile == NULL)
  290. goto done;
  291. #if 0
  292. // Too verbose !!!
  293. /* Output the detail information
  294. */
  295. fprintf(pFile,"\nDetail Timing Information\n");
  296. for ( i = 0, pTempDecTimingInfo = pDecTimingInfo ; i < dwFrameCount ; i++, pTempDecTimingInfo++ )
  297. {
  298. fprintf(pFile, "Frame %d Detail Timing Information\n", i);
  299. OutputDecTimingDetail(pFile, pTempDecTimingInfo);
  300. }
  301. #endif
  302. /* Compute the total information
  303. */
  304. memset(&dtiTemp, 0, sizeof(DEC_TIMING_INFO));
  305. iCount = 0;
  306. for ( i = 0, pTempDecTimingInfo = pDecTimingInfo ; i < dwFrameCount ; i++, pTempDecTimingInfo++ )
  307. {
  308. iCount++;
  309. dtiTemp.dwDecode += pTempDecTimingInfo->dwDecode;
  310. #ifdef DETAILED_DECODE_TIMINGS_ON // { DETAILED_DECODE_TIMINGS_ON
  311. dtiTemp.dwLine_Unpk += pTempDecTimingInfo->dwLine_Unpk;
  312. dtiTemp.dwLsp_Inq += pTempDecTimingInfo->dwLsp_Inq;
  313. dtiTemp.dwLsp_Int += pTempDecTimingInfo->dwLsp_Int;
  314. dtiTemp.dwVariousD += pTempDecTimingInfo->dwVariousD;
  315. dtiTemp.dwFcbk_UnpkD += pTempDecTimingInfo->dwFcbk_UnpkD;
  316. dtiTemp.dwDecod_AcbkD += pTempDecTimingInfo->dwDecod_AcbkD;
  317. dtiTemp.dwComp_Info += pTempDecTimingInfo->dwComp_Info;
  318. dtiTemp.dwRegen += pTempDecTimingInfo->dwRegen;
  319. dtiTemp.dwSynt += pTempDecTimingInfo->dwSynt;
  320. #endif // } DETAILED_DECODE_TIMINGS_ON
  321. }
  322. if (iCount > 0)
  323. {
  324. /* Output the total information
  325. */
  326. fprintf(pFile,"Total for %d frames\n", iCount);
  327. OutputDecTimingDetail(pFile, &dtiTemp);
  328. /* Compute the average
  329. */
  330. dtiTemp.dwDecode = (dtiTemp.dwDecode + (iCount / 2)) / iCount;
  331. #ifdef DETAILED_DECODE_TIMINGS_ON // { DETAILED_DECODE_TIMINGS_ON
  332. dtiTemp.dwLine_Unpk = (dtiTemp.dwLine_Unpk + (iCount / 2)) / iCount;
  333. dtiTemp.dwLsp_Inq = (dtiTemp.dwLsp_Inq + (iCount / 2)) / iCount;
  334. dtiTemp.dwLsp_Int = (dtiTemp.dwLsp_Int + (iCount / 2)) / iCount;
  335. dtiTemp.dwVariousD = (dtiTemp.dwVariousD + (iCount / 2)) / iCount;
  336. dtiTemp.dwFcbk_UnpkD = (dtiTemp.dwFcbk_UnpkD + (iCount / 2)) / iCount;
  337. dtiTemp.dwDecod_AcbkD = (dtiTemp.dwDecod_AcbkD + (iCount / 2)) / iCount;
  338. dtiTemp.dwComp_Info = (dtiTemp.dwComp_Info + (iCount / 2)) / iCount;
  339. dtiTemp.dwRegen = (dtiTemp.dwRegen + (iCount / 2)) / iCount;
  340. dtiTemp.dwSynt = (dtiTemp.dwSynt + (iCount / 2)) / iCount;
  341. #endif // } DETAILED_DECODE_TIMINGS_ON
  342. /* Output the average information
  343. */
  344. fprintf(pFile,"Average over %d frames\n", iCount);
  345. OutputDecTimingDetail(pFile, &dtiTemp);
  346. }
  347. fclose(pFile);
  348. done:
  349. return;
  350. }
  351. void OutputDecTimingDetail(FILE * pFile, DEC_TIMING_INFO * pDecTimingInfo)
  352. {
  353. unsigned long dwOther;
  354. unsigned long dwRoundUp;
  355. unsigned long dwDivisor;
  356. fprintf(pFile, "\tDecode = %10u (%d milliseconds at 166Mhz)\n", pDecTimingInfo->dwDecode,
  357. (pDecTimingInfo->dwDecode + 83000) / 166000);
  358. dwOther = pDecTimingInfo->dwDecode;
  359. #ifdef DETAILED_DECODE_TIMINGS_ON // { DETAILED_DECODE_TIMINGS_ON
  360. /* This is needed because of the integer truncation.
  361. */
  362. dwDivisor = pDecTimingInfo->dwDecode / 100; // to yield a percent
  363. dwRoundUp = dwDivisor / 2;
  364. if (dwDivisor)
  365. {
  366. fprintf(pFile, "\tLine_Unpk = %10u (%2d%%)\n", pDecTimingInfo->dwLine_Unpk,
  367. (pDecTimingInfo->dwLine_Unpk + dwRoundUp) / dwDivisor);
  368. dwOther -= pDecTimingInfo->dwLine_Unpk;
  369. fprintf(pFile, "\tLsp_Inq = %10u (%2d%%)\n", pDecTimingInfo->dwLsp_Inq,
  370. (pDecTimingInfo->dwLsp_Inq + dwRoundUp) / dwDivisor);
  371. dwOther -= pDecTimingInfo->dwLsp_Inq;
  372. fprintf(pFile, "\tLsp_Int = %10u (%2d%%)\n", pDecTimingInfo->dwLsp_Int,
  373. (pDecTimingInfo->dwLsp_Int + dwRoundUp) / dwDivisor);
  374. dwOther -= pDecTimingInfo->dwLsp_Int;
  375. fprintf(pFile, "\tVariousD = %10u (%2d%%)\n", pDecTimingInfo->dwVariousD,
  376. (pDecTimingInfo->dwVariousD + dwRoundUp) / dwDivisor);
  377. dwOther -= pDecTimingInfo->dwVariousD;
  378. fprintf(pFile, "\tFcbk_UnpkD = %10u (%2d%%)\n", pDecTimingInfo->dwFcbk_UnpkD,
  379. (pDecTimingInfo->dwFcbk_UnpkD + dwRoundUp) / dwDivisor);
  380. dwOther -= pDecTimingInfo->dwFcbk_UnpkD;
  381. fprintf(pFile, "\tDecod_AcbkD = %10u (%2d%%)\n", pDecTimingInfo->dwDecod_AcbkD,
  382. (pDecTimingInfo->dwDecod_AcbkD + dwRoundUp) / dwDivisor);
  383. dwOther -= pDecTimingInfo->dwDecod_AcbkD;
  384. fprintf(pFile, "\tComp_Info = %10u (%2d%%)\n", pDecTimingInfo->dwComp_Info,
  385. (pDecTimingInfo->dwComp_Info + dwRoundUp) / dwDivisor);
  386. dwOther -= pDecTimingInfo->dwComp_Info;
  387. fprintf(pFile, "\tRegen = %10u (%2d%%)\n", pDecTimingInfo->dwRegen,
  388. (pDecTimingInfo->dwRegen + dwRoundUp) / dwDivisor);
  389. dwOther -= pDecTimingInfo->dwRegen;
  390. fprintf(pFile, "\tSynt = %10u (%2d%%)\n", pDecTimingInfo->dwSynt,
  391. (pDecTimingInfo->dwSynt + dwRoundUp) / dwDivisor);
  392. dwOther -= pDecTimingInfo->dwSynt;
  393. fprintf(pFile, "\tOther = %10u (%2d%%)\n", dwOther,
  394. (dwOther + dwRoundUp) / dwDivisor);
  395. }
  396. #endif // } DETAILED_DECODE_TIMINGS_ON
  397. }
  398. #endif // { LOG_DECODE_TIMINGS_ON