]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/performance-audio-sr.git/commitdiff
PASDK-443:Update CB PCM buffer size to avoid overflow for 192 kHz tests.
authorFrank Livingston <frank-livingston@ti.com>
Thu, 9 Nov 2017 00:50:51 +0000 (18:50 -0600)
committerFrank Livingston <frank-livingston@ti.com>
Thu, 9 Nov 2017 00:53:56 +0000 (18:53 -0600)
Avoids overflow for Dolby CIDK listening tests #17,22,23,27 & 28.

pasdk/common/aspDecOpCircBuf_common.h
pasdk/test_arm/framework/aspDecOpCircBuf_slave.c
pasdk/test_dsp/framework/aspDecOpCircBuf_master.c

index 1facf56ed31ceb030bd84ca462d220e1ffce0865..cb22f203900e773669ad3ccd604cbd74b43c0d20 100644 (file)
@@ -84,7 +84,7 @@ All rights reserved.
 // Need to define CB size in different terms than existing macros.
 // (***) FL: !!! REVISIT!!! Allocating memory for max # channels (e.g. 32 for THD).
 // GROSS over allocation for THD 192 kHz, 6ch max.
-#define THD_HSR_FUDGE_FACTOR                    ( 368640 + 240000 )  
+#define THD_HSR_FUDGE_FACTOR                    ( 368640 + 240000 + 384000 )  
 #define ASP_DECOP_CB_PCM_BUF_SZ                 ( ASP_DECOP_CB_MAX_NUM_PCM_CH * ASP_DECOP_CB_MAX_NUM_PCM_FRAMES * ASP_DECOP_CB_MAX_PCM_FRAME_LEN + THD_HSR_FUDGE_FACTOR)
 // FL: unused
 //#define ASP_DECOP_CB_PCM_BUF_SZ_32CH48kMAT      ( ASP_DECOP_CB_MAX_NUM_PCM_CH_MAT * ASP_DECOP_CB_MAX_NUM_PCM_FRAMES * ASP_DECOP_CB_MAX_PCM_FRAME_LEN_48kMAT )
index 2281dd25765b175fd71d70960299b5a515dc2566..0cc35f09626769fc6f2c95defc60273e8115c3ca 100644 (file)
@@ -479,6 +479,10 @@ Int cbWriteStop(
 //Int16 gCalcDeltaSampsBuf[10];
 //Int8 gPrimedFlagCnt=0;
 
+Int32 gPcmOvershootWrap1=0;
+Int32 gPcmOvershootWrap2=0;
+Int32 gPcmOvershootNoWrap=0;
+
 // (***) FL: revisit
 // Write audio frame to circular buffer
 Int cbWriteAf(
@@ -600,6 +604,7 @@ Int cbWriteAf(
                         ((pPcmBuf + pAfWrt->sampleCount) >= pPcmBufRd))
                     {
                         pCb->errPcmOvrCnt++;
+                        gPcmOvershootWrap1 = pPcmBuf + pAfWrt->sampleCount - pPcmBufRd;
                         pcmOvr = 1;
                     }
                     
@@ -612,6 +617,7 @@ Int cbWriteAf(
                             ((pPcmBuf + pAfWrt->sampleCount) >= pPcmBufRd))
                         {
                             pCb->errPcmOvrCnt++;
+                            gPcmOvershootWrap2 = pPcmBuf + pAfWrt->sampleCount - pPcmBufRd;
                             pcmOvr = 1;
                         }                                                                
                     }
@@ -621,6 +627,7 @@ Int cbWriteAf(
                 {
                     // this write won't wrap
                     
+                    gPcmOvershootNoWrap = pPcmBuf + pAfWrt->sampleCount - pPcmBufRd;
                     pCb->errPcmOvrCnt++;
                     pcmOvr = 1;
                 }
index d63fe0e3f8401ae29518ace9524eedcab79cf3ba..870e476f8213d1216e2b4003e8f88f2d35d97964 100644 (file)
@@ -775,7 +775,7 @@ Int cbReadAf(
             cbReadMuteWithLastAfInfo(pCb, pAfRd);
             //SW_BREAKPOINT; // debug
             
-#if 0 // (***) FL: shows timing of CB underflow
+#if 1 // (***) FL: shows timing of CB underflow
             // debug
             {
                 static Uint8 toggleState = 0;
@@ -1057,7 +1057,7 @@ Int cbReadAf(
                 // Mute output on underflow
                 cbReadMuteWithLastAfInfo(pCb, pAfRd);
                 
-#if 0 // (***) FL: shows timing of CB underflow
+#if 1 // (***) FL: shows timing of CB underflow
                 // debug
                 {
                     static Uint8 toggleState = 0;