Remove tabs
authorFrank Livingston <frank-livingston@ti.com>
Wed, 18 Apr 2018 19:37:39 +0000 (14:37 -0500)
committerFrank Livingston <frank-livingston@ti.com>
Wed, 18 Apr 2018 19:37:39 +0000 (14:37 -0500)
pasdk/test_dsp/framework/aspDecOpCircBuf_master.c

index 8b1befd33a61e838562f17ce95b3b91334ad8a81..57a7fe685255468d92fb3b71b62691aa75570fb6 100644 (file)
@@ -450,25 +450,25 @@ Int cbReadAf(
         Cache_inv(pAfCb->data.samsiz, pCb->maxAFChanNum*sizeof(PAF_AudioSize), Cache_Type_ALLD, 0);
         Cache_wait();
         
-               if (pAfRd->bsMetadata_type == PAF_bsMetadata_DTS_X)
-               {
-                       //DTSX needs up to 8 to 16 channels to transfer metadata depends on sampling rate.
-                       for (i = 0; i < pAfCb->data.nChannels; i++)
-                       
-                          pAfRd->data.samsiz[i] = pAfCb->data.samsiz[i];
-                       }
-               }
-               else
-               {
-                       // Read CB AF samsiz array
-                       for (i = 0; i < pCb->maxAFChanNum; i++)
-                       {
-                               if ((streamMask >> i) & 0x1)
-                               {
-                                       pAfRd->data.samsiz[i] = pAfCb->data.samsiz[i];
-                               }
-                       }
-               }
+        if (pAfRd->bsMetadata_type == PAF_bsMetadata_DTS_X)
+        {
+            //DTSX needs up to 8 to 16 channels to transfer metadata depends on sampling rate.
+            for (i = 0; i < pAfCb->data.nChannels; i++)
+            { 
+               pAfRd->data.samsiz[i] = pAfCb->data.samsiz[i];
+            }
+        }
+        else
+        {
+            // Read CB AF samsiz array
+            for (i = 0; i < pCb->maxAFChanNum; i++)
+            {
+                if ((streamMask >> i) & 0x1)
+                {
+                    pAfRd->data.samsiz[i] = pAfCb->data.samsiz[i];
+                }
+            }
+        }
         
         // FL: This brute force approach to clearing metadata isn't 
         //     necessary if decoders properly set, and downstream 
@@ -497,51 +497,51 @@ Int cbReadAf(
             Cache_wait();
 
             // Cache invalidate CB AF PCM samples
-                       if (pAfRd->bsMetadata_type == PAF_bsMetadata_DTS_X)
-                       {
-                               //DTSX needs up to 8 to 16 channels to transfer metadata depends on sampling rate.
-                               for (i = 0; i < pAfCb->data.nChannels; i++)
-                               
-                                       Cache_inv(&pAfCb->data.sample[i][pCb->pcmRdIdx], numSampsRd*sizeof(PAF_AudioData), Cache_Type_ALLD, 0);
-                               }
-                       }
-                       else
-                       {
-                               for (i = 0; i < pCb->maxAFChanNum; i++)
-                               {
-                                       if ((streamMask >> i) & 0x1)
-                                       {
-                                               Cache_inv(&pAfCb->data.sample[i][pCb->pcmRdIdx], numSampsRd*sizeof(PAF_AudioData), Cache_Type_ALLD, 0);
-                                       }
-                               }
-                       }
+            if (pAfRd->bsMetadata_type == PAF_bsMetadata_DTS_X)
+            {
+                //DTSX needs up to 8 to 16 channels to transfer metadata depends on sampling rate.
+                for (i = 0; i < pAfCb->data.nChannels; i++)
+                { 
+                    Cache_inv(&pAfCb->data.sample[i][pCb->pcmRdIdx], numSampsRd*sizeof(PAF_AudioData), Cache_Type_ALLD, 0);
+                }
+            }
+            else
+            {
+                for (i = 0; i < pCb->maxAFChanNum; i++)
+                {
+                    if ((streamMask >> i) & 0x1)
+                    {
+                        Cache_inv(&pAfCb->data.sample[i][pCb->pcmRdIdx], numSampsRd*sizeof(PAF_AudioData), Cache_Type_ALLD, 0);
+                    }
+                }
+            }
             Cache_wait();
 
             // Read PCM samples from CB AF
-                       if (pAfRd->bsMetadata_type == PAF_bsMetadata_DTS_X)
-                       {
-                               //DTSX needs up to 8 to 16 channels to transfer metadata depends on sampling rate.
-                               for (i = 0; i < pAfCb->data.nChannels; i++)
-                               
-                                       for (j = 0; j < numSampsRd; j++)
-                                       {
-                                               pAfRd->data.sample[i][pcmWrtIdx+j] = pAfCb->data.sample[i][pCb->pcmRdIdx+j];
-                                       }
-                               }
-                       }
-                       else
-                       {
-                               for (i = 0; i < pCb->maxAFChanNum; i++)
-                               {
-                                       if ((streamMask >> i) & 0x1)
-                                       {
-                                               for (j = 0; j < numSampsRd; j++)
-                                               {
-                                                       pAfRd->data.sample[i][pcmWrtIdx+j] = pAfCb->data.sample[i][pCb->pcmRdIdx+j];
-                                               }
-                                       }
-                               }
-                       }
+            if (pAfRd->bsMetadata_type == PAF_bsMetadata_DTS_X)
+            {
+                //DTSX needs up to 8 to 16 channels to transfer metadata depends on sampling rate.
+                for (i = 0; i < pAfCb->data.nChannels; i++)
+                { 
+                    for (j = 0; j < numSampsRd; j++)
+                    {
+                        pAfRd->data.sample[i][pcmWrtIdx+j] = pAfCb->data.sample[i][pCb->pcmRdIdx+j];
+                    }
+                }
+            }
+            else
+            {
+                for (i = 0; i < pCb->maxAFChanNum; i++)
+                {
+                    if ((streamMask >> i) & 0x1)
+                    {
+                        for (j = 0; j < numSampsRd; j++)
+                        {
+                            pAfRd->data.sample[i][pcmWrtIdx+j] = pAfCb->data.sample[i][pCb->pcmRdIdx+j];
+                        }
+                    }
+                }
+            }
             // Cache invalidate CB AF unused metadata
             for (i = pCb->prvMdRdIdx; i < pAfCb->numPrivateMetadata; i++)
             {
@@ -627,23 +627,24 @@ Int cbReadAf(
             pAfRd->sampleCount = pCb->strFrameLen;  // update Read AF sample count for partial frame
 
             // Clear remaining Read AF PCM samples
-                       if (pAfRd->bsMetadata_type == PAF_bsMetadata_DTS_X)
-                       {
-                               //DTSX needs up to 8 to 16 channels to transfer metadata depends on sampling rate.
-                               for (i = 0; i < pAfCb->data.nChannels; i++)
-                               { 
-                                       memset(&pAfRd->data.sample[i][pcmWrtIdx], 0, (pCb->strFrameLen-totNumSampsRd));
-                               }
-                       }
-                       else{
-                               for (i = 0; i < pCb->maxAFChanNum; i++)
-                               {
-                                       if ((streamMask >> i) & 0x1)
-                                       {
-                                               memset(&pAfRd->data.sample[i][pcmWrtIdx], 0, (pCb->strFrameLen-totNumSampsRd));
-                                       }
-                               }
-                       }        
+            if (pAfRd->bsMetadata_type == PAF_bsMetadata_DTS_X)
+            {
+                //DTSX needs up to 8 to 16 channels to transfer metadata depends on sampling rate.
+                for (i = 0; i < pAfCb->data.nChannels; i++)
+                { 
+                    memset(&pAfRd->data.sample[i][pcmWrtIdx], 0, (pCb->strFrameLen-totNumSampsRd));
+                }
+            }
+            else{
+                for (i = 0; i < pCb->maxAFChanNum; i++)
+                {
+                    if ((streamMask >> i) & 0x1)
+                    {
+                        memset(&pAfRd->data.sample[i][pcmWrtIdx], 0, (pCb->strFrameLen-totNumSampsRd));
+                    }
+                }
+            }
+
             if (pCb->writerActiveFlag == 1)
             {
                 //
@@ -780,7 +781,7 @@ static Void cbReadMuteWithLastAfInfo(
     for (i = 0; i < ASP_DECOP_CB_MAX_NUM_PCM_CH; i++)
     {
         if ((streamMask >> i) & 0x1)
-               {
+        {
             memset(pAfRd->data.sample[i], 0, pAfRd->sampleCount*sizeof(PAF_AudioData));
         }
         pAfRd->data.samsiz[i] = 0;
@@ -790,10 +791,10 @@ static Void cbReadMuteWithLastAfInfo(
     pAfRd->numPrivateMetadata  = 0;                             /* number of valid private metadata (0 or 1 if metadata filtering enabled) */
     pAfRd->bsMetadata_offset   = 0;                             /* offset into audio frame for change in bsMetadata_type field */
     //Following parameters are used in DTSX
-       pAfRd->mode = 0;                                            /* mode used by PARMA */
-       pAfRd->numChansUsedForMetadata = 15;                        /* constant of 15 */
-       pAfRd->pafBsFixedData = TRUE;                               /* if true, do not convert float to fixed in DTSX metadata transfer */
-       pAfRd->root = 0x1BF;                                        /* used for channel MASK in DTSX. 0x1BF = 7.1 as defined in dtshd_dec_api_common.h */
+    pAfRd->mode = 0;                                            /* mode used by PARMA */
+    pAfRd->numChansUsedForMetadata = 15;                        /* constant of 15 */
+    pAfRd->pafBsFixedData = TRUE;                               /* if true, do not convert float to fixed in DTSX metadata transfer */
+    pAfRd->root = 0x1BF;                                        /* used for channel MASK in DTSX. 0x1BF = 7.1 as defined in dtshd_dec_api_common.h */
     pAfRd->resetCount = 0;                                      /* used for communication between DTSX and PARMA */
 }