_Z16FDK_Delay_CreateP15FDK_SignalDelayth:
  110|      8|                     const UCHAR num_channels) {
  111|      8|  FDK_ASSERT(data != NULL);
  ------------------
  |  |  221|      8|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (111:3): [True: 8, False: 0]
  ------------------
  112|      8|  FDK_ASSERT(num_channels > 0);
  ------------------
  |  |  221|      8|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (112:3): [True: 8, False: 0]
  ------------------
  113|       |
  114|      8|  if (delay > 0) {
  ------------------
  |  Branch (114:7): [True: 8, False: 0]
  ------------------
  115|      8|    data->delay_line =
  116|      8|        (PCM_DEC*)FDKcalloc(num_channels * delay, sizeof(PCM_DEC));
  117|      8|    if (data->delay_line == NULL) {
  ------------------
  |  Branch (117:9): [True: 0, False: 8]
  ------------------
  118|      0|      return -1;
  119|      0|    }
  120|      8|  } else {
  121|      0|    data->delay_line = NULL;
  122|      0|  }
  123|      8|  data->num_channels = num_channels;
  124|      8|  data->delay = delay;
  125|       |
  126|      8|  return 0;
  127|      8|}
_Z17FDK_Delay_DestroyP15FDK_SignalDelay:
  164|  10.4k|void FDK_Delay_Destroy(FDK_SignalDelay* data) {
  165|  10.4k|  if (data->delay_line != NULL) {
  ------------------
  |  Branch (165:7): [True: 8, False: 10.4k]
  ------------------
  166|      8|    FDKfree(data->delay_line);
  167|      8|  }
  168|  10.4k|  data->delay_line = NULL;
  169|  10.4k|  data->delay = 0;
  170|  10.4k|  data->num_channels = 0;
  171|       |
  172|  10.4k|  return;
  173|  10.4k|}

_Z21aacDecoder_drcDisableP8CDrcInfo:
  159|  1.94k|void aacDecoder_drcDisable(HANDLE_AAC_DRC self) {
  160|  1.94k|  self->enable = 0;
  161|  1.94k|  self->applyExtGain = 0;
  162|  1.94k|  self->progRefLevelPresent = 0;
  163|  1.94k|}
_Z19aacDecoder_drcResetP8CDrcInfo:
  172|  7.39k|void aacDecoder_drcReset(HANDLE_AAC_DRC self) {
  173|  7.39k|  self->applyExtGain = 0;
  174|  7.39k|  self->additionalGainPrev = AACDEC_DRC_GAIN_INIT_VALUE;
  ------------------
  |  |  114|  7.39k|  (FL2FXCONST_DBL(                 \
  |  |  ------------------
  |  |  |  |  192|  7.39k|  (FIXP_DBL)(                                                                \
  |  |  |  |  193|  7.39k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:7): [True: 7.39k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  194|  7.39k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  7.39k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  7.39k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:14): [Folded, False: 7.39k]
  |  |  |  |  ------------------
  |  |  |  |  195|  7.39k|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|  7.39k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  196|  7.39k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  197|  7.39k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  7.39k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  7.39k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  198|  7.39k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  115|  7.39k|      1.0f / (1 << AACDEC_DRC_GAIN_SCALING))) /* Init value for DRC gains */
  ------------------
  175|  7.39k|  self->additionalGainFilterState = AACDEC_DRC_GAIN_INIT_VALUE;
  ------------------
  |  |  114|  7.39k|  (FL2FXCONST_DBL(                 \
  |  |  ------------------
  |  |  |  |  192|  7.39k|  (FIXP_DBL)(                                                                \
  |  |  |  |  193|  7.39k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:7): [True: 7.39k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  194|  7.39k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  7.39k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  7.39k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:14): [Folded, False: 7.39k]
  |  |  |  |  ------------------
  |  |  |  |  195|  7.39k|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|  7.39k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  196|  7.39k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  197|  7.39k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  7.39k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  7.39k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  198|  7.39k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  115|  7.39k|      1.0f / (1 << AACDEC_DRC_GAIN_SCALING))) /* Init value for DRC gains */
  ------------------
  176|  7.39k|  self->additionalGainFilterState1 = AACDEC_DRC_GAIN_INIT_VALUE;
  ------------------
  |  |  114|  7.39k|  (FL2FXCONST_DBL(                 \
  |  |  ------------------
  |  |  |  |  192|  7.39k|  (FIXP_DBL)(                                                                \
  |  |  |  |  193|  7.39k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:7): [True: 7.39k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  194|  7.39k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  7.39k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  7.39k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:14): [Folded, False: 7.39k]
  |  |  |  |  ------------------
  |  |  |  |  195|  7.39k|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|  7.39k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  196|  7.39k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  197|  7.39k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  7.39k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  7.39k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  198|  7.39k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  115|  7.39k|      1.0f / (1 << AACDEC_DRC_GAIN_SCALING))) /* Init value for DRC gains */
  ------------------
  177|  7.39k|}
_Z18aacDecoder_drcInitP8CDrcInfo:
  186|  7.39k|void aacDecoder_drcInit(HANDLE_AAC_DRC self) {
  187|  7.39k|  CDrcParams *pParams;
  188|       |
  189|  7.39k|  if (self == NULL) {
  ------------------
  |  Branch (189:7): [True: 0, False: 7.39k]
  ------------------
  190|      0|    return;
  191|      0|  }
  192|       |
  193|       |  /* init control fields */
  194|  7.39k|  self->enable = OFF;
  ------------------
  |  |  134|  7.39k|#define OFF 0
  ------------------
  195|  7.39k|  self->numThreads = 0;
  196|       |
  197|       |  /* init params */
  198|  7.39k|  pParams = &self->params;
  199|  7.39k|  pParams->bsDelayEnable = 0;
  200|  7.39k|  pParams->cut = FL2FXCONST_DBL(0.0f);
  ------------------
  |  |  192|  7.39k|  (FIXP_DBL)(                                                                \
  |  |  193|  7.39k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 7.39k, Folded]
  |  |  ------------------
  |  |  194|  7.39k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  7.39k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  7.39k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 7.39k]
  |  |  ------------------
  |  |  195|  7.39k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  7.39k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  7.39k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  7.39k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  7.39k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  7.39k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  7.39k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  201|  7.39k|  pParams->usrCut = FL2FXCONST_DBL(0.0f);
  ------------------
  |  |  192|  7.39k|  (FIXP_DBL)(                                                                \
  |  |  193|  7.39k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 7.39k, Folded]
  |  |  ------------------
  |  |  194|  7.39k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  7.39k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  7.39k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 7.39k]
  |  |  ------------------
  |  |  195|  7.39k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  7.39k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  7.39k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  7.39k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  7.39k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  7.39k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  7.39k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  202|  7.39k|  pParams->boost = FL2FXCONST_DBL(0.0f);
  ------------------
  |  |  192|  7.39k|  (FIXP_DBL)(                                                                \
  |  |  193|  7.39k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 7.39k, Folded]
  |  |  ------------------
  |  |  194|  7.39k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  7.39k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  7.39k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 7.39k]
  |  |  ------------------
  |  |  195|  7.39k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  7.39k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  7.39k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  7.39k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  7.39k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  7.39k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  7.39k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  203|  7.39k|  pParams->usrBoost = FL2FXCONST_DBL(0.0f);
  ------------------
  |  |  192|  7.39k|  (FIXP_DBL)(                                                                \
  |  |  193|  7.39k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 7.39k, Folded]
  |  |  ------------------
  |  |  194|  7.39k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  7.39k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  7.39k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 7.39k]
  |  |  ------------------
  |  |  195|  7.39k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  7.39k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  7.39k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  7.39k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  7.39k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  7.39k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  7.39k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  204|  7.39k|  pParams->targetRefLevel = 96;
  205|  7.39k|  pParams->expiryFrame = AACDEC_DRC_DFLT_EXPIRY_FRAMES;
  ------------------
  |  |  118|  7.39k|  (0) /* Default DRC data expiry time in AAC frames   */
  ------------------
  206|  7.39k|  pParams->applyHeavyCompression = OFF;
  ------------------
  |  |  134|  7.39k|#define OFF 0
  ------------------
  207|  7.39k|  pParams->usrApplyHeavyCompression = OFF;
  ------------------
  |  |  134|  7.39k|#define OFF 0
  ------------------
  208|       |
  209|  7.39k|  pParams->defaultPresentationMode = DISABLED_PARAMETER_HANDLING;
  210|  7.39k|  pParams->encoderTargetLevel = MAX_REFERENCE_LEVEL; /* worst case assumption */
  ------------------
  |  |  128|  7.39k|#define MAX_REFERENCE_LEVEL (127)
  ------------------
  211|       |
  212|  7.39k|  self->update = 1;
  213|  7.39k|  self->numOutChannels = 0;
  214|  7.39k|  self->prevAacNumChannels = 0;
  215|       |
  216|       |  /* initial program ref level = target ref level */
  217|  7.39k|  self->progRefLevel = pParams->targetRefLevel;
  218|  7.39k|  self->progRefLevelPresent = 0;
  219|  7.39k|  self->presMode = -1;
  220|       |
  221|  7.39k|  aacDecoder_drcReset(self);
  222|  7.39k|}
_Z29aacDecoder_drcInitChannelDataP15CDrcChannelData:
  231|  5.79k|void aacDecoder_drcInitChannelData(CDrcChannelData *pDrcChData) {
  232|  5.79k|  if (pDrcChData != NULL) {
  ------------------
  |  Branch (232:7): [True: 5.79k, False: 0]
  ------------------
  233|  5.79k|    pDrcChData->expiryCount = 0;
  234|  5.79k|    pDrcChData->numBands = 1;
  235|  5.79k|    pDrcChData->bandTop[0] = DRC_BLOCK_LEN_DIV_BAND_MULT - 1;
  ------------------
  |  |  126|  5.79k|#define DRC_BLOCK_LEN_DIV_BAND_MULT (DRC_BLOCK_LEN / DRC_BAND_MULT)
  |  |  ------------------
  |  |  |  |  124|  5.79k|#define DRC_BLOCK_LEN (1024)
  |  |  ------------------
  |  |               #define DRC_BLOCK_LEN_DIV_BAND_MULT (DRC_BLOCK_LEN / DRC_BAND_MULT)
  |  |  ------------------
  |  |  |  |  125|  5.79k|#define DRC_BAND_MULT (4)
  |  |  ------------------
  ------------------
  236|  5.79k|    pDrcChData->drcValue[0] = 0;
  237|  5.79k|    pDrcChData->drcInterpolationScheme = 0;
  238|  5.79k|    pDrcChData->drcDataType = UNKNOWN_PAYLOAD;
  239|  5.79k|  }
  240|  5.79k|}
_Z22aacDecoder_drcSetParamP8CDrcInfo16AACDEC_DRC_PARAMi:
  252|  23.2k|                                         AACDEC_DRC_PARAM param, INT value) {
  253|  23.2k|  AAC_DECODER_ERROR ErrorStatus = AAC_DEC_OK;
  254|       |
  255|  23.2k|  switch (param) {
  256|      0|    case DRC_CUT_SCALE:
  ------------------
  |  Branch (256:5): [True: 0, False: 23.2k]
  ------------------
  257|       |      /* set attenuation scale factor */
  258|      0|      if ((value < 0) || (value > DRC_MAX_QUANT_FACTOR)) {
  ------------------
  |  |  117|      0|#define DRC_MAX_QUANT_FACTOR (DRC_MAX_QUANT_STEPS - 1)
  |  |  ------------------
  |  |  |  |  116|      0|#define DRC_MAX_QUANT_STEPS (1 << DRC_PARAMETER_BITS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  115|      0|#define DRC_PARAMETER_BITS (7)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (258:11): [True: 0, False: 0]
  |  Branch (258:26): [True: 0, False: 0]
  ------------------
  259|      0|        return AAC_DEC_SET_PARAM_FAIL;
  260|      0|      }
  261|      0|      if (self == NULL) {
  ------------------
  |  Branch (261:11): [True: 0, False: 0]
  ------------------
  262|      0|        return AAC_DEC_INVALID_HANDLE;
  263|      0|      }
  264|      0|      self->params.usrCut = (FIXP_DBL)(
  265|      0|          (INT)(DRC_PARAM_QUANT_STEP >> DRC_PARAM_SCALE) * (INT)value);
  ------------------
  |  |  119|      0|  (FL2FXCONST_DBL(1.0f / (float)DRC_MAX_QUANT_FACTOR))
  |  |  ------------------
  |  |  |  |  192|      0|  (FIXP_DBL)(                                                                \
  |  |  |  |  193|      0|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:7): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |  194|      0|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  195|      0|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  196|      0|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  197|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  198|      0|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                        (INT)(DRC_PARAM_QUANT_STEP >> DRC_PARAM_SCALE) * (INT)value);
  ------------------
  |  |  120|      0|#define DRC_PARAM_SCALE (1)
  ------------------
  266|      0|      self->update = 1;
  267|      0|      break;
  268|      0|    case DRC_BOOST_SCALE:
  ------------------
  |  Branch (268:5): [True: 0, False: 23.2k]
  ------------------
  269|       |      /* set boost factor */
  270|      0|      if ((value < 0) || (value > DRC_MAX_QUANT_FACTOR)) {
  ------------------
  |  |  117|      0|#define DRC_MAX_QUANT_FACTOR (DRC_MAX_QUANT_STEPS - 1)
  |  |  ------------------
  |  |  |  |  116|      0|#define DRC_MAX_QUANT_STEPS (1 << DRC_PARAMETER_BITS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  115|      0|#define DRC_PARAMETER_BITS (7)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (270:11): [True: 0, False: 0]
  |  Branch (270:26): [True: 0, False: 0]
  ------------------
  271|      0|        return AAC_DEC_SET_PARAM_FAIL;
  272|      0|      }
  273|      0|      if (self == NULL) {
  ------------------
  |  Branch (273:11): [True: 0, False: 0]
  ------------------
  274|      0|        return AAC_DEC_INVALID_HANDLE;
  275|      0|      }
  276|      0|      self->params.usrBoost = (FIXP_DBL)(
  277|      0|          (INT)(DRC_PARAM_QUANT_STEP >> DRC_PARAM_SCALE) * (INT)value);
  ------------------
  |  |  119|      0|  (FL2FXCONST_DBL(1.0f / (float)DRC_MAX_QUANT_FACTOR))
  |  |  ------------------
  |  |  |  |  192|      0|  (FIXP_DBL)(                                                                \
  |  |  |  |  193|      0|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:7): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |  194|      0|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  195|      0|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  196|      0|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  197|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  198|      0|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                        (INT)(DRC_PARAM_QUANT_STEP >> DRC_PARAM_SCALE) * (INT)value);
  ------------------
  |  |  120|      0|#define DRC_PARAM_SCALE (1)
  ------------------
  278|      0|      self->update = 1;
  279|      0|      break;
  280|      0|    case TARGET_REF_LEVEL:
  ------------------
  |  Branch (280:5): [True: 0, False: 23.2k]
  ------------------
  281|      0|      if (value > MAX_REFERENCE_LEVEL || value < -MAX_REFERENCE_LEVEL) {
  ------------------
  |  |  128|      0|#define MAX_REFERENCE_LEVEL (127)
  ------------------
                    if (value > MAX_REFERENCE_LEVEL || value < -MAX_REFERENCE_LEVEL) {
  ------------------
  |  |  128|      0|#define MAX_REFERENCE_LEVEL (127)
  ------------------
  |  Branch (281:11): [True: 0, False: 0]
  |  Branch (281:42): [True: 0, False: 0]
  ------------------
  282|      0|        return AAC_DEC_SET_PARAM_FAIL;
  283|      0|      }
  284|      0|      if (self == NULL) {
  ------------------
  |  Branch (284:11): [True: 0, False: 0]
  ------------------
  285|      0|        return AAC_DEC_INVALID_HANDLE;
  286|      0|      }
  287|      0|      if (value < 0) {
  ------------------
  |  Branch (287:11): [True: 0, False: 0]
  ------------------
  288|      0|        self->params.targetRefLevel = -1;
  289|      0|      } else {
  290|      0|        if (self->params.targetRefLevel != (SCHAR)value) {
  ------------------
  |  Branch (290:13): [True: 0, False: 0]
  ------------------
  291|      0|          self->params.targetRefLevel = (SCHAR)value;
  292|      0|          self->progRefLevel = (SCHAR)value; /* Always set the program reference
  293|       |                                                level equal to the target level
  294|       |                                                according to 4.5.2.7.3 of
  295|       |                                                ISO/IEC 14496-3. */
  296|      0|        }
  297|      0|        self->update = 1;
  298|      0|      }
  299|      0|      break;
  300|      0|    case APPLY_HEAVY_COMPRESSION:
  ------------------
  |  Branch (300:5): [True: 0, False: 23.2k]
  ------------------
  301|      0|      if ((value != OFF) && (value != ON)) {
  ------------------
  |  |  134|      0|#define OFF 0
  ------------------
                    if ((value != OFF) && (value != ON)) {
  ------------------
  |  |  135|      0|#define ON 1
  ------------------
  |  Branch (301:11): [True: 0, False: 0]
  |  Branch (301:29): [True: 0, False: 0]
  ------------------
  302|      0|        return AAC_DEC_SET_PARAM_FAIL;
  303|      0|      }
  304|      0|      if (self == NULL) {
  ------------------
  |  Branch (304:11): [True: 0, False: 0]
  ------------------
  305|      0|        return AAC_DEC_INVALID_HANDLE;
  306|      0|      }
  307|       |      /* Store new parameter value */
  308|      0|      self->params.usrApplyHeavyCompression = (UCHAR)value;
  309|      0|      self->update = 1;
  310|      0|      break;
  311|      0|    case DEFAULT_PRESENTATION_MODE:
  ------------------
  |  Branch (311:5): [True: 0, False: 23.2k]
  ------------------
  312|      0|      if (value < AAC_DRC_PARAMETER_HANDLING_DISABLED ||
  ------------------
  |  Branch (312:11): [True: 0, False: 0]
  ------------------
  313|      0|          value > AAC_DRC_PRESENTATION_MODE_2_DEFAULT) {
  ------------------
  |  Branch (313:11): [True: 0, False: 0]
  ------------------
  314|      0|        return AAC_DEC_SET_PARAM_FAIL;
  315|      0|      }
  316|      0|      if (self == NULL) {
  ------------------
  |  Branch (316:11): [True: 0, False: 0]
  ------------------
  317|      0|        return AAC_DEC_INVALID_HANDLE;
  318|      0|      }
  319|      0|      self->params.defaultPresentationMode =
  320|      0|          (AACDEC_DRC_PARAMETER_HANDLING)value;
  321|      0|      self->update = 1;
  322|      0|      break;
  323|      0|    case ENCODER_TARGET_LEVEL:
  ------------------
  |  Branch (323:5): [True: 0, False: 23.2k]
  ------------------
  324|      0|      if (value > MAX_REFERENCE_LEVEL || value < 0) {
  ------------------
  |  |  128|      0|#define MAX_REFERENCE_LEVEL (127)
  ------------------
  |  Branch (324:11): [True: 0, False: 0]
  |  Branch (324:42): [True: 0, False: 0]
  ------------------
  325|      0|        return AAC_DEC_SET_PARAM_FAIL;
  326|      0|      }
  327|      0|      if (self == NULL) {
  ------------------
  |  Branch (327:11): [True: 0, False: 0]
  ------------------
  328|      0|        return AAC_DEC_INVALID_HANDLE;
  329|      0|      }
  330|      0|      self->params.encoderTargetLevel = (UCHAR)value;
  331|      0|      self->update = 1;
  332|      0|      break;
  333|  17.3k|    case DRC_BS_DELAY:
  ------------------
  |  Branch (333:5): [True: 17.3k, False: 5.91k]
  ------------------
  334|  17.3k|      if (value < 0 || value > 1) {
  ------------------
  |  Branch (334:11): [True: 0, False: 17.3k]
  |  Branch (334:24): [True: 0, False: 17.3k]
  ------------------
  335|      0|        return AAC_DEC_SET_PARAM_FAIL;
  336|      0|      }
  337|  17.3k|      if (self == NULL) {
  ------------------
  |  Branch (337:11): [True: 0, False: 17.3k]
  ------------------
  338|      0|        return AAC_DEC_INVALID_HANDLE;
  339|      0|      }
  340|  17.3k|      self->params.bsDelayEnable = value;
  341|  17.3k|      break;
  342|  5.91k|    case DRC_DATA_EXPIRY_FRAME:
  ------------------
  |  Branch (342:5): [True: 5.91k, False: 17.3k]
  ------------------
  343|  5.91k|      if (self == NULL) {
  ------------------
  |  Branch (343:11): [True: 0, False: 5.91k]
  ------------------
  344|      0|        return AAC_DEC_INVALID_HANDLE;
  345|      0|      }
  346|  5.91k|      self->params.expiryFrame = (value > 0) ? (UINT)value : 0;
  ------------------
  |  Branch (346:34): [True: 0, False: 5.91k]
  ------------------
  347|  5.91k|      break;
  348|      0|    case MAX_OUTPUT_CHANNELS:
  ------------------
  |  Branch (348:5): [True: 0, False: 23.2k]
  ------------------
  349|      0|      if (self == NULL) {
  ------------------
  |  Branch (349:11): [True: 0, False: 0]
  ------------------
  350|      0|        return AAC_DEC_INVALID_HANDLE;
  351|      0|      }
  352|      0|      self->numOutChannels = (INT)value;
  353|      0|      self->update = 1;
  354|      0|      break;
  355|      0|    default:
  ------------------
  |  Branch (355:5): [True: 0, False: 23.2k]
  ------------------
  356|      0|      return AAC_DEC_SET_PARAM_FAIL;
  357|  23.2k|  } /* switch(param) */
  358|       |
  359|  23.2k|  return ErrorStatus;
  360|  23.2k|}

_Z21CPns_UpdateNoiseStateP8CPnsDataPiS1_:
  140|  3.80k|                           INT *randomSeed) {
  141|       |  /* use pointer because seed has to be
  142|       |     same, left and right channel ! */
  143|  3.80k|  pPnsData->currentSeed = currentSeed;
  144|  3.80k|  pPnsData->randomSeed = randomSeed;
  145|  3.80k|}

_Z23CAacDecoder_AncDataInitP8CAncDataPhi:
  341|  7.39k|                                          unsigned char *buffer, int size) {
  342|  7.39k|  if (size >= 0) {
  ------------------
  |  Branch (342:7): [True: 7.39k, False: 0]
  ------------------
  343|  7.39k|    ancData->buffer = buffer;
  344|  7.39k|    ancData->bufferSize = size;
  345|       |
  346|  7.39k|    CAacDecoder_AncDataReset(ancData);
  347|       |
  348|  7.39k|    return AAC_DEC_OK;
  349|  7.39k|  }
  350|       |
  351|      0|  return AAC_DEC_ANC_DATA_ERROR;
  352|  7.39k|}
_Z16CAacDecoder_Open14TRANSPORT_TYPE:
 1282|  7.39k|{
 1283|  7.39k|  HANDLE_AACDECODER self;
 1284|       |
 1285|  7.39k|  self = GetAacDecoder();
 1286|  7.39k|  if (self == NULL) {
  ------------------
  |  Branch (1286:7): [True: 0, False: 7.39k]
  ------------------
 1287|      0|    goto bail;
 1288|      0|  }
 1289|       |
 1290|  7.39k|  FDK_QmfDomain_ClearRequested(&self->qmfDomain.globalConf);
 1291|       |
 1292|       |  /* Assign channel mapping info arrays (doing so removes dependency of settings
 1293|       |   * header in API header). */
 1294|  7.39k|  self->streamInfo.pChannelIndices = self->channelIndices;
 1295|  7.39k|  self->streamInfo.pChannelType = self->channelType;
 1296|  7.39k|  self->downscaleFactor = 1;
 1297|  7.39k|  self->downscaleFactorInBS = 1;
 1298|       |
 1299|       |  /* initialize anc data */
 1300|  7.39k|  CAacDecoder_AncDataInit(&self->ancData, NULL, 0);
 1301|       |
 1302|       |  /* initialize stream info */
 1303|  7.39k|  CStreamInfoInit(&self->streamInfo);
 1304|       |
 1305|       |  /* initialize progam config */
 1306|  7.39k|  CProgramConfig_Init(&self->pce);
 1307|       |
 1308|       |  /* initialize error concealment common data */
 1309|  7.39k|  CConcealment_InitCommonData(&self->concealCommonData);
 1310|  7.39k|  self->concealMethodUser = ConcealMethodNone; /* undefined -> auto mode */
 1311|       |
 1312|  7.39k|  self->hDrcInfo = GetDrcInfo();
 1313|  7.39k|  if (self->hDrcInfo == NULL) {
  ------------------
  |  Branch (1313:7): [True: 0, False: 7.39k]
  ------------------
 1314|      0|    goto bail;
 1315|      0|  }
 1316|       |  /* Init common DRC structure */
 1317|  7.39k|  aacDecoder_drcInit(self->hDrcInfo);
 1318|       |  /* Set default frame delay */
 1319|  7.39k|  aacDecoder_drcSetParam(self->hDrcInfo, DRC_BS_DELAY,
 1320|  7.39k|                         CConcealment_GetDelay(&self->concealCommonData));
 1321|  7.39k|  self->workBufferCore1 = (FIXP_DBL *)GetWorkBufferCore1();
 1322|       |
 1323|  7.39k|  self->workBufferCore2 = GetWorkBufferCore2();
 1324|  7.39k|  if (self->workBufferCore2 == NULL) goto bail;
  ------------------
  |  Branch (1324:7): [True: 0, False: 7.39k]
  ------------------
 1325|       |
 1326|       |  /* When RSVD60 is active use dedicated memory for core decoding */
 1327|  7.39k|  self->pTimeData2 = GetWorkBufferCore5();
 1328|  7.39k|  self->timeData2Size = GetRequiredMemWorkBufferCore5();
 1329|  7.39k|  if (self->pTimeData2 == NULL) {
  ------------------
  |  Branch (1329:7): [True: 0, False: 7.39k]
  ------------------
 1330|      0|    goto bail;
 1331|      0|  }
 1332|       |
 1333|  7.39k|  return self;
 1334|       |
 1335|      0|bail:
 1336|      0|  CAacDecoder_Close(self);
 1337|       |
 1338|       |  return NULL;
 1339|  7.39k|}
_Z19CAacDecoder_FreeMemP20AAC_DECODER_INSTANCEi:
 1491|  3.06k|                                                   const int subStreamIndex) {
 1492|  3.06k|  AAC_DECODER_ERROR err = AAC_DEC_OK;
 1493|       |
 1494|  3.06k|  CAacDecoder_DeInit(self, subStreamIndex);
 1495|       |
 1496|  3.06k|  return (err);
 1497|  3.06k|}
_Z17CAacDecoder_CloseP20AAC_DECODER_INSTANCE:
 1500|  7.39k|LINKSPEC_CPP void CAacDecoder_Close(HANDLE_AACDECODER self) {
 1501|  7.39k|  if (self == NULL) return;
  ------------------
  |  Branch (1501:7): [True: 0, False: 7.39k]
  ------------------
 1502|       |
 1503|  7.39k|  CAacDecoder_DeInit(self, 0);
 1504|       |
 1505|  7.39k|  {
 1506|  7.39k|    int ch;
 1507|  66.5k|    for (ch = 0; ch < (8); ch++) {
  ------------------
  |  Branch (1507:18): [True: 59.1k, False: 7.39k]
  ------------------
 1508|  59.1k|      if (self->pTimeDataFlush[ch] != NULL) {
  ------------------
  |  Branch (1508:11): [True: 1.99k, False: 57.1k]
  ------------------
 1509|  1.99k|        FreeTimeDataFlush(&self->pTimeDataFlush[ch]);
 1510|  1.99k|      }
 1511|  59.1k|    }
 1512|  7.39k|  }
 1513|       |
 1514|  7.39k|  if (self->hDrcInfo) {
  ------------------
  |  Branch (1514:7): [True: 7.39k, False: 0]
  ------------------
 1515|  7.39k|    FreeDrcInfo(&self->hDrcInfo);
 1516|  7.39k|  }
 1517|       |
 1518|  7.39k|  if (self->workBufferCore1 != NULL) {
  ------------------
  |  Branch (1518:7): [True: 7.39k, False: 0]
  ------------------
 1519|  7.39k|    FreeWorkBufferCore1((CWorkBufferCore1 **)&self->workBufferCore1);
 1520|  7.39k|  }
 1521|       |
 1522|       |  /* Free WorkBufferCore2 */
 1523|  7.39k|  if (self->workBufferCore2 != NULL) {
  ------------------
  |  Branch (1523:7): [True: 7.39k, False: 0]
  ------------------
 1524|  7.39k|    FreeWorkBufferCore2(&self->workBufferCore2);
 1525|  7.39k|  }
 1526|  7.39k|  if (self->pTimeData2 != NULL) {
  ------------------
  |  Branch (1526:7): [True: 7.39k, False: 0]
  ------------------
 1527|  7.39k|    FreeWorkBufferCore5(&self->pTimeData2);
 1528|  7.39k|  }
 1529|       |
 1530|  7.39k|  FDK_QmfDomain_Close(&self->qmfDomain);
 1531|       |
 1532|  7.39k|  FreeAacDecoder(&self);
 1533|  7.39k|}
_Z16CAacDecoder_InitP20AAC_DECODER_INSTANCEPK21CSAudioSpecificConfighPh:
 1544|  6.31k|                 UCHAR configMode, UCHAR *configChanged) {
 1545|  6.31k|  AAC_DECODER_ERROR err = AAC_DEC_OK;
 1546|  6.31k|  INT ascChannels, ascChanged = 0;
 1547|  6.31k|  AACDEC_RENDER_MODE initRenderMode = AACDEC_RENDER_INVALID;
 1548|  6.31k|  SCHAR usacStereoConfigIndex = -1;
 1549|  6.31k|  int usacResidualDelayCompSamples = 0;
 1550|  6.31k|  int elementOffset, aacChannelsOffset, aacChannelsOffsetIdx;
 1551|  6.31k|  const int streamIndex = 0;
 1552|  6.31k|  INT flushChannels = 0;
 1553|       |
 1554|  6.31k|  UINT flags;
 1555|       |  /* elFlags[(3*MAX_CHANNELS + (MAX_CHANNELS)/2 + 4 * (MAX_TRACKS) + 1]
 1556|       |     where MAX_CHANNELS is (8*2) and MAX_TRACKS is 1 */
 1557|  6.31k|  UINT elFlags[(3 * ((8) * 2) + (((8) * 2)) / 2 + 4 * (1) + 1)];
 1558|       |
 1559|  6.31k|  UCHAR sbrEnabled = self->sbrEnabled;
 1560|  6.31k|  UCHAR sbrEnabledPrev = self->sbrEnabledPrev;
 1561|  6.31k|  UCHAR mpsEnableCurr = self->mpsEnableCurr;
 1562|       |
 1563|  6.31k|  if (!self) return AAC_DEC_INVALID_HANDLE;
  ------------------
  |  Branch (1563:7): [True: 0, False: 6.31k]
  ------------------
 1564|       |
 1565|  6.31k|  UCHAR downscaleFactor = self->downscaleFactor;
 1566|  6.31k|  UCHAR downscaleFactorInBS = self->downscaleFactorInBS;
 1567|       |
 1568|  6.31k|  self->aacOutDataHeadroom = (3);
 1569|       |
 1570|       |  // set profile and check for supported aot
 1571|       |  // leave profile on default (=-1) for all other supported MPEG-4 aot's except
 1572|       |  // aot=2 (=AAC-LC)
 1573|  6.31k|  switch (asc->m_aot) {
 1574|  1.28k|    case AOT_AAC_LC:
  ------------------
  |  Branch (1574:5): [True: 1.28k, False: 5.03k]
  ------------------
 1575|  1.28k|      self->streamInfo.profile = 1;
 1576|  1.28k|      FDK_FALLTHROUGH;
  ------------------
  |  |  386|  1.28k|#define FDK_FALLTHROUGH [[clang::fallthrough]]
  ------------------
 1577|  1.29k|    case AOT_ER_AAC_SCAL:
  ------------------
  |  Branch (1577:5): [True: 13, False: 6.30k]
  ------------------
 1578|  1.29k|      if (asc->m_sc.m_gaSpecificConfig.m_layer > 0) {
  ------------------
  |  Branch (1578:11): [True: 5, False: 1.28k]
  ------------------
 1579|       |        /* aac_scalable_extension_element() currently not supported. */
 1580|      5|        return AAC_DEC_UNSUPPORTED_FORMAT;
 1581|      5|      }
 1582|  1.28k|      FDK_FALLTHROUGH;
  ------------------
  |  |  386|  1.28k|#define FDK_FALLTHROUGH [[clang::fallthrough]]
  ------------------
 1583|  1.28k|    case AOT_SBR:
  ------------------
  |  Branch (1583:5): [True: 0, False: 6.31k]
  ------------------
 1584|  1.28k|    case AOT_PS:
  ------------------
  |  Branch (1584:5): [True: 0, False: 6.31k]
  ------------------
 1585|  1.30k|    case AOT_ER_AAC_LC:
  ------------------
  |  Branch (1585:5): [True: 18, False: 6.29k]
  ------------------
 1586|  1.46k|    case AOT_ER_AAC_LD:
  ------------------
  |  Branch (1586:5): [True: 153, False: 6.16k]
  ------------------
 1587|  1.46k|    case AOT_DRM_AAC:
  ------------------
  |  Branch (1587:5): [True: 0, False: 6.31k]
  ------------------
 1588|  1.46k|    case AOT_DRM_SURROUND:
  ------------------
  |  Branch (1588:5): [True: 0, False: 6.31k]
  ------------------
 1589|  1.46k|      initRenderMode = AACDEC_RENDER_IMDCT;
 1590|  1.46k|      break;
 1591|    866|    case AOT_ER_AAC_ELD:
  ------------------
  |  Branch (1591:5): [True: 866, False: 5.44k]
  ------------------
 1592|    866|      initRenderMode = AACDEC_RENDER_ELDFB;
 1593|    866|      break;
 1594|  3.92k|    case AOT_USAC:
  ------------------
  |  Branch (1594:5): [True: 3.92k, False: 2.38k]
  ------------------
 1595|  3.92k|      initRenderMode = AACDEC_RENDER_IMDCT;
 1596|  3.92k|      break;
 1597|     58|    default:
  ------------------
  |  Branch (1597:5): [True: 58, False: 6.25k]
  ------------------
 1598|     58|      return AAC_DEC_UNSUPPORTED_AOT;
 1599|  6.31k|  }
 1600|       |
 1601|  6.25k|  if (CProgramConfig_IsValid(&self->pce) && (asc->m_channelConfiguration > 0)) {
  ------------------
  |  Branch (1601:7): [True: 144, False: 6.10k]
  |  Branch (1601:45): [True: 0, False: 144]
  ------------------
 1602|       |    /* Compare the stored (old) PCE with a default PCE created from the (new)
 1603|       |       channel_config (on a temporal buffer) to find out wheter we can keep it
 1604|       |       (and its metadata) or not. */
 1605|      0|    int pceCmpResult;
 1606|      0|    C_ALLOC_SCRATCH_START(tmpPce, CProgramConfig, 1);
  ------------------
  |  |  324|      0|#define C_ALLOC_SCRATCH_START(name, type, n) type name[n];
  ------------------
 1607|       |
 1608|      0|    CProgramConfig_GetDefault(tmpPce, asc->m_channelConfiguration);
 1609|      0|    pceCmpResult = CProgramConfig_Compare(&self->pce, tmpPce);
 1610|      0|    if ((pceCmpResult < 0) /* Reset if PCEs are completely different ... */
  ------------------
  |  Branch (1610:9): [True: 0, False: 0]
  ------------------
 1611|      0|        ||
 1612|      0|        (pceCmpResult > 1)) { /*            ... or have a different layout. */
  ------------------
  |  Branch (1612:9): [True: 0, False: 0]
  ------------------
 1613|      0|      CProgramConfig_Init(&self->pce);
 1614|      0|    } /* Otherwise keep the PCE (and its metadata). */
 1615|      0|    C_ALLOC_SCRATCH_END(tmpPce, CProgramConfig, 1);
 1616|  6.25k|  } else {
 1617|  6.25k|    CProgramConfig_Init(&self->pce);
 1618|  6.25k|  }
 1619|       |
 1620|       |  /* set channels */
 1621|  6.25k|  switch (asc->m_channelConfiguration) {
 1622|    461|    case 0:
  ------------------
  |  Branch (1622:5): [True: 461, False: 5.79k]
  ------------------
 1623|    461|      switch (asc->m_aot) {
 1624|      0|        case AOT_USAC:
  ------------------
  |  Branch (1624:9): [True: 0, False: 461]
  ------------------
 1625|      0|          self->chMapIndex = 0;
 1626|      0|          ascChannels = asc->m_sc.m_usacConfig.m_nUsacChannels;
 1627|      0|          break;
 1628|    461|        default:
  ------------------
  |  Branch (1628:9): [True: 461, False: 0]
  ------------------
 1629|       |          /* get channels from program config (ASC) */
 1630|    461|          if (CProgramConfig_IsValid(&asc->m_progrConfigElement)) {
  ------------------
  |  Branch (1630:15): [True: 351, False: 110]
  ------------------
 1631|    351|            ascChannels = asc->m_progrConfigElement.NumChannels;
 1632|    351|            if (ascChannels > 0) {
  ------------------
  |  Branch (1632:17): [True: 321, False: 30]
  ------------------
 1633|    321|              int el_tmp;
 1634|       |              /* valid number of channels -> copy program config element (PCE)
 1635|       |               * from ASC */
 1636|    321|              FDKmemcpy(&self->pce, &asc->m_progrConfigElement,
 1637|    321|                        sizeof(CProgramConfig));
 1638|       |              /* Built element table */
 1639|    321|              el_tmp = CProgramConfig_GetElementTable(
 1640|    321|                  &asc->m_progrConfigElement, self->elements, (((8)) + (8)),
 1641|    321|                  &self->chMapIndex);
 1642|  18.9k|              for (; el_tmp < (3 * ((8) * 2) + (((8) * 2)) / 2 + 4 * (1) + 1);
  ------------------
  |  Branch (1642:22): [True: 18.6k, False: 321]
  ------------------
 1643|  18.6k|                   el_tmp++) {
 1644|  18.6k|                self->elements[el_tmp] = ID_NONE;
 1645|  18.6k|              }
 1646|    321|            } else {
 1647|     30|              return AAC_DEC_UNSUPPORTED_CHANNELCONFIG;
 1648|     30|            }
 1649|    351|          } else {
 1650|    110|            self->chMapIndex = 0;
 1651|    110|            return AAC_DEC_UNSUPPORTED_CHANNELCONFIG;
 1652|    110|          }
 1653|    321|          break;
 1654|    461|      }
 1655|    321|      break;
 1656|  4.29k|    case 1:
  ------------------
  |  Branch (1656:5): [True: 4.29k, False: 1.95k]
  ------------------
 1657|  4.58k|    case 2:
  ------------------
  |  Branch (1657:5): [True: 296, False: 5.95k]
  ------------------
 1658|  4.80k|    case 3:
  ------------------
  |  Branch (1658:5): [True: 213, False: 6.03k]
  ------------------
 1659|  4.90k|    case 4:
  ------------------
  |  Branch (1659:5): [True: 102, False: 6.14k]
  ------------------
 1660|  5.11k|    case 5:
  ------------------
  |  Branch (1660:5): [True: 212, False: 6.03k]
  ------------------
 1661|  5.20k|    case 6:
  ------------------
  |  Branch (1661:5): [True: 91, False: 6.16k]
  ------------------
 1662|  5.20k|      ascChannels = asc->m_channelConfiguration;
 1663|  5.20k|      break;
 1664|     78|    case 11:
  ------------------
  |  Branch (1664:5): [True: 78, False: 6.17k]
  ------------------
 1665|     78|      ascChannels = 7;
 1666|     78|      break;
 1667|    156|    case 7:
  ------------------
  |  Branch (1667:5): [True: 156, False: 6.09k]
  ------------------
 1668|    286|    case 12:
  ------------------
  |  Branch (1668:5): [True: 130, False: 6.12k]
  ------------------
 1669|    376|    case 14:
  ------------------
  |  Branch (1669:5): [True: 90, False: 6.16k]
  ------------------
 1670|    376|      ascChannels = 8;
 1671|    376|      break;
 1672|    130|    default:
  ------------------
  |  Branch (1672:5): [True: 130, False: 6.12k]
  ------------------
 1673|    130|      return AAC_DEC_UNSUPPORTED_CHANNELCONFIG;
 1674|  6.25k|  }
 1675|       |
 1676|  5.98k|  if (asc->m_aot == AOT_USAC) {
  ------------------
  |  Branch (1676:7): [True: 3.92k, False: 2.05k]
  ------------------
 1677|  3.92k|    flushChannels = fMin(ascChannels, (8));
 1678|  3.92k|    INT numChannel;
 1679|  3.92k|    pcmDmx_GetParam(self->hPcmUtils, MIN_NUMBER_OF_OUTPUT_CHANNELS,
 1680|  3.92k|                    &numChannel);
 1681|  3.92k|    flushChannels = fMin(fMax(numChannel, flushChannels), (8));
 1682|  3.92k|  }
 1683|       |
 1684|  5.98k|  if (IS_USAC(asc->m_aot)) {
  ------------------
  |  |  226|  5.98k|#define IS_USAC(aot) ((aot) == AOT_USAC)
  |  |  ------------------
  |  |  |  Branch (226:22): [True: 3.92k, False: 2.05k]
  |  |  ------------------
  ------------------
 1685|  11.5k|    for (int el = 0; el < (INT)asc->m_sc.m_usacConfig.m_usacNumElements; el++) {
  ------------------
  |  Branch (1685:22): [True: 7.66k, False: 3.92k]
  ------------------
 1686|       |      /* fix number of core channels aka ascChannels for stereoConfigIndex = 1
 1687|       |       * cases */
 1688|  7.66k|      if (asc->m_sc.m_usacConfig.element[el].m_stereoConfigIndex == 1) {
  ------------------
  |  Branch (1688:11): [True: 18, False: 7.64k]
  ------------------
 1689|     18|        ascChannels--; /* stereoConfigIndex == 1 stereo cases do actually
 1690|       |                          contain only a mono core channel. */
 1691|  7.64k|      } else if (asc->m_sc.m_usacConfig.element[el].m_stereoConfigIndex == 2) {
  ------------------
  |  Branch (1691:18): [True: 36, False: 7.61k]
  ------------------
 1692|       |        /* In this case it is necessary to follow up the DMX signal delay caused
 1693|       |           by HBE also with the residual signal (2nd core channel). The SBR
 1694|       |           overlap delay is not regarded here, this is handled by the MPS212
 1695|       |           implementation.
 1696|       |        */
 1697|     36|        if (asc->m_sc.m_usacConfig.element[el].m_harmonicSBR) {
  ------------------
  |  Branch (1697:13): [True: 17, False: 19]
  ------------------
 1698|     17|          usacResidualDelayCompSamples += asc->m_samplesPerFrame;
 1699|     17|        }
 1700|     36|        if (asc->m_sc.m_usacConfig.m_coreSbrFrameLengthIndex == 4) {
  ------------------
  |  Branch (1700:13): [True: 14, False: 22]
  ------------------
 1701|     14|          usacResidualDelayCompSamples +=
 1702|     14|              6 * 16; /* difference between 12 SBR
 1703|       |                         overlap slots from SBR and 6
 1704|       |                         slots delayed in MPS212 */
 1705|     14|        }
 1706|     36|      }
 1707|  7.66k|    }
 1708|  3.92k|  }
 1709|       |
 1710|  5.98k|  aacChannelsOffset = 0;
 1711|  5.98k|  aacChannelsOffsetIdx = 0;
 1712|  5.98k|  elementOffset = 0;
 1713|  5.98k|  if ((ascChannels <= 0) || (ascChannels > (8)) ||
  ------------------
  |  Branch (1713:7): [True: 0, False: 5.98k]
  |  Branch (1713:29): [True: 5, False: 5.97k]
  ------------------
 1714|  5.97k|      (asc->m_channelConfiguration > AACDEC_MAX_CH_CONF)) {
  ------------------
  |  |  121|  5.97k|#define AACDEC_MAX_CH_CONF 14
  ------------------
  |  Branch (1714:7): [True: 0, False: 5.97k]
  ------------------
 1715|      5|    return AAC_DEC_UNSUPPORTED_CHANNELCONFIG;
 1716|      5|  }
 1717|       |
 1718|       |  /* Set syntax flags */
 1719|  5.97k|  flags = 0;
 1720|  5.97k|  { FDKmemclear(elFlags, sizeof(elFlags)); }
 1721|       |
 1722|  5.97k|  if ((asc->m_channelConfiguration > 0) || IS_USAC(asc->m_aot)) {
  ------------------
  |  |  226|    316|#define IS_USAC(aot) ((aot) == AOT_USAC)
  |  |  ------------------
  |  |  |  Branch (226:22): [True: 0, False: 316]
  |  |  ------------------
  ------------------
  |  Branch (1722:7): [True: 5.66k, False: 316]
  ------------------
 1723|  5.66k|    if (IS_USAC(asc->m_aot)) {
  ------------------
  |  |  226|  5.66k|#define IS_USAC(aot) ((aot) == AOT_USAC)
  |  |  ------------------
  |  |  |  Branch (226:22): [True: 3.92k, False: 1.73k]
  |  |  ------------------
  ------------------
 1724|       |      /* copy pointer to usac config
 1725|       |        (this is preliminary since there's an ongoing discussion about storing
 1726|       |        the config-part of the bitstream rather than the complete decoded
 1727|       |        configuration) */
 1728|  3.92k|      self->pUsacConfig[streamIndex] = &asc->m_sc.m_usacConfig;
 1729|       |
 1730|       |      /* copy list of elements */
 1731|  3.92k|      if (self->pUsacConfig[streamIndex]->m_usacNumElements >
  ------------------
  |  Branch (1731:11): [True: 0, False: 3.92k]
  ------------------
 1732|  3.92k|          (3 * ((8) * 2) + (((8) * 2)) / 2 + 4 * (1) + 1)) {
 1733|      0|        goto bail;
 1734|      0|      }
 1735|       |
 1736|  3.92k|      if (self->numUsacElements[streamIndex] !=
  ------------------
  |  Branch (1736:11): [True: 3.92k, False: 0]
  ------------------
 1737|  3.92k|          asc->m_sc.m_usacConfig.m_usacNumElements) {
 1738|  3.92k|        ascChanged = 1;
 1739|  3.92k|      }
 1740|       |
 1741|  3.92k|      if (configMode & AC_CM_ALLOC_MEM) {
  ------------------
  |  |  337|  3.92k|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
  |  Branch (1741:11): [True: 1.94k, False: 1.98k]
  ------------------
 1742|  1.94k|        self->numUsacElements[streamIndex] =
 1743|  1.94k|            asc->m_sc.m_usacConfig.m_usacNumElements;
 1744|  1.94k|      }
 1745|       |
 1746|  3.92k|      mpsEnableCurr = 0;
 1747|  3.92k|      for (int _el = 0;
 1748|  11.5k|           _el < (int)self->pUsacConfig[streamIndex]->m_usacNumElements;
  ------------------
  |  Branch (1748:12): [True: 7.66k, False: 3.92k]
  ------------------
 1749|  7.66k|           _el++) {
 1750|  7.66k|        int el = _el + elementOffset;
 1751|  7.66k|        if (self->elements[el] !=
  ------------------
  |  Branch (1751:13): [True: 7.66k, False: 0]
  ------------------
 1752|  7.66k|            self->pUsacConfig[streamIndex]->element[_el].usacElementType) {
 1753|  7.66k|          ascChanged = 1;
 1754|  7.66k|        }
 1755|  7.66k|        if (self->usacStereoConfigIndex[el] !=
  ------------------
  |  Branch (1755:13): [True: 72, False: 7.59k]
  ------------------
 1756|  7.66k|            asc->m_sc.m_usacConfig.element[_el].m_stereoConfigIndex) {
 1757|     72|          ascChanged = 1;
 1758|     72|        }
 1759|  7.66k|        if (configMode & AC_CM_ALLOC_MEM) {
  ------------------
  |  |  337|  7.66k|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
  |  Branch (1759:13): [True: 3.80k, False: 3.86k]
  ------------------
 1760|  3.80k|          self->elements[el] =
 1761|  3.80k|              self->pUsacConfig[streamIndex]->element[_el].usacElementType;
 1762|       |          /* for Unified Stereo Coding */
 1763|  3.80k|          self->usacStereoConfigIndex[el] =
 1764|  3.80k|              asc->m_sc.m_usacConfig.element[_el].m_stereoConfigIndex;
 1765|  3.80k|          if (self->elements[el] == ID_USAC_CPE) {
  ------------------
  |  Branch (1765:15): [True: 53, False: 3.75k]
  ------------------
 1766|     53|            mpsEnableCurr |= self->usacStereoConfigIndex[el] ? 1 : 0;
  ------------------
  |  Branch (1766:30): [True: 32, False: 21]
  ------------------
 1767|     53|          }
 1768|  3.80k|        }
 1769|       |
 1770|  7.66k|        elFlags[el] |= (asc->m_sc.m_usacConfig.element[_el].m_noiseFilling)
  ------------------
  |  Branch (1770:24): [True: 950, False: 6.71k]
  ------------------
 1771|  7.66k|                           ? AC_EL_USAC_NOISE
  ------------------
  |  |  344|    950|#define AC_EL_USAC_NOISE 0x000002 /*!< USAC noise filling is active */
  ------------------
 1772|  7.66k|                           : 0;
 1773|  7.66k|        elFlags[el] |=
 1774|  7.66k|            (asc->m_sc.m_usacConfig.element[_el].m_stereoConfigIndex > 0)
  ------------------
  |  Branch (1774:13): [True: 72, False: 7.59k]
  ------------------
 1775|  7.66k|                ? AC_EL_USAC_MPS212
  ------------------
  |  |  348|     72|#define AC_EL_USAC_MPS212 0x000010 /*!< USAC MPS212 tool is active */
  ------------------
 1776|  7.66k|                : 0;
 1777|  7.66k|        elFlags[el] |= (asc->m_sc.m_usacConfig.element[_el].m_interTes)
  ------------------
  |  Branch (1777:24): [True: 61, False: 7.60k]
  ------------------
 1778|  7.66k|                           ? AC_EL_USAC_ITES
  ------------------
  |  |  345|     61|#define AC_EL_USAC_ITES 0x000004  /*!< USAC SBR inter-TES tool is active */
  ------------------
 1779|  7.66k|                           : 0;
 1780|  7.66k|        elFlags[el] |=
 1781|  7.66k|            (asc->m_sc.m_usacConfig.element[_el].m_pvc) ? AC_EL_USAC_PVC : 0;
  ------------------
  |  |  347|     76|  0x000008 /*!< USAC SBR predictive vector coding tool is active */
  ------------------
  |  Branch (1781:13): [True: 76, False: 7.58k]
  ------------------
 1782|  7.66k|        elFlags[el] |=
 1783|  7.66k|            (asc->m_sc.m_usacConfig.element[_el].usacElementType == ID_USAC_LFE)
  ------------------
  |  Branch (1783:13): [True: 0, False: 7.66k]
  ------------------
 1784|  7.66k|                ? AC_EL_USAC_LFE
  ------------------
  |  |  349|      0|#define AC_EL_USAC_LFE 0x000020    /*!< USAC element is LFE */
  ------------------
 1785|  7.66k|                : 0;
 1786|  7.66k|        elFlags[el] |=
 1787|  7.66k|            (asc->m_sc.m_usacConfig.element[_el].usacElementType == ID_USAC_LFE)
  ------------------
  |  Branch (1787:13): [True: 0, False: 7.66k]
  ------------------
 1788|  7.66k|                ? AC_EL_LFE
  ------------------
  |  |  359|      0|#define AC_EL_LFE 0x002000              /*!< The element is of type LFE. */
  ------------------
 1789|  7.66k|                : 0;
 1790|  7.66k|        if ((asc->m_sc.m_usacConfig.element[_el].usacElementType ==
  ------------------
  |  Branch (1790:13): [True: 116, False: 7.54k]
  ------------------
 1791|  7.66k|             ID_USAC_CPE) &&
 1792|    116|            ((self->usacStereoConfigIndex[el] == 0))) {
  ------------------
  |  Branch (1792:13): [True: 84, False: 32]
  ------------------
 1793|     84|          elFlags[el] |= AC_EL_USAC_CP_POSSIBLE;
  ------------------
  |  |  351|     84|  0x000040 /*!< USAC may use Complex Stereo Prediction in this channel element \
  ------------------
 1794|     84|        }
 1795|  7.66k|      }
 1796|       |
 1797|  3.92k|      self->hasAudioPreRoll = 0;
 1798|  3.92k|      if (self->pUsacConfig[streamIndex]->m_usacNumElements) {
  ------------------
  |  Branch (1798:11): [True: 3.92k, False: 0]
  ------------------
 1799|  3.92k|        self->hasAudioPreRoll = asc->m_sc.m_usacConfig.element[0]
 1800|  3.92k|                                    .extElement.usacExtElementHasAudioPreRoll;
 1801|  3.92k|      }
 1802|  3.92k|      if (configMode & AC_CM_ALLOC_MEM) {
  ------------------
  |  |  337|  3.92k|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
  |  Branch (1802:11): [True: 1.94k, False: 1.98k]
  ------------------
 1803|  1.94k|        self->elements[elementOffset +
 1804|  1.94k|                       self->pUsacConfig[streamIndex]->m_usacNumElements] =
 1805|  1.94k|            ID_END;
 1806|  1.94k|      }
 1807|  3.92k|    } else {
 1808|       |      /* Initialize constant mappings for channel config 1-7 */
 1809|  1.73k|      int i;
 1810|  13.8k|      for (i = 0; i < AACDEC_CH_ELEMENTS_TAB_SIZE; i++) {
  ------------------
  |  |  122|  13.8k|#define AACDEC_CH_ELEMENTS_TAB_SIZE 7 /*!< Size of element tables */
  ------------------
  |  Branch (1810:19): [True: 12.1k, False: 1.73k]
  ------------------
 1811|  12.1k|        self->elements[i] = elementsTab[asc->m_channelConfiguration - 1][i];
 1812|  12.1k|      }
 1813|  95.4k|      for (; i < (3 * ((8) * 2) + (((8) * 2)) / 2 + 4 * (1) + 1); i++) {
  ------------------
  |  Branch (1813:14): [True: 93.6k, False: 1.73k]
  ------------------
 1814|  93.6k|        self->elements[i] = ID_NONE;
 1815|  93.6k|      }
 1816|  1.73k|    }
 1817|       |
 1818|  5.66k|    {
 1819|  5.66k|      int ch;
 1820|       |
 1821|  16.7k|      for (ch = 0; ch < ascChannels; ch++) {
  ------------------
  |  Branch (1821:20): [True: 11.0k, False: 5.66k]
  ------------------
 1822|  11.0k|        self->chMapping[ch] = ch;
 1823|  11.0k|      }
 1824|  39.8k|      for (; ch < (8); ch++) {
  ------------------
  |  Branch (1824:14): [True: 34.2k, False: 5.66k]
  ------------------
 1825|  34.2k|        self->chMapping[ch] = 255;
 1826|  34.2k|      }
 1827|  5.66k|    }
 1828|       |
 1829|  5.66k|    self->chMapIndex = asc->m_channelConfiguration;
 1830|  5.66k|  } else {
 1831|    316|    if (CProgramConfig_IsValid(&asc->m_progrConfigElement)) {
  ------------------
  |  Branch (1831:9): [True: 316, False: 0]
  ------------------
 1832|       |      /* Set matrix mixdown infos if available from PCE. */
 1833|    316|      pcmDmx_SetMatrixMixdownFromPce(
 1834|    316|          self->hPcmUtils, asc->m_progrConfigElement.MatrixMixdownIndexPresent,
 1835|    316|          asc->m_progrConfigElement.MatrixMixdownIndex,
 1836|    316|          asc->m_progrConfigElement.PseudoSurroundEnable);
 1837|    316|    }
 1838|    316|  }
 1839|       |
 1840|  5.97k|  self->streamInfo.channelConfig = asc->m_channelConfiguration;
 1841|       |
 1842|  5.97k|  if (self->streamInfo.aot != asc->m_aot) {
  ------------------
  |  Branch (1842:7): [True: 5.97k, False: 0]
  ------------------
 1843|  5.97k|    if (configMode & AC_CM_ALLOC_MEM) {
  ------------------
  |  |  337|  5.97k|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
  |  Branch (1843:9): [True: 2.84k, False: 3.12k]
  ------------------
 1844|  2.84k|      self->streamInfo.aot = asc->m_aot;
 1845|  2.84k|    }
 1846|  5.97k|    ascChanged = 1;
 1847|  5.97k|  }
 1848|       |
 1849|  5.97k|  if (asc->m_aot == AOT_ER_AAC_ELD &&
  ------------------
  |  Branch (1849:7): [True: 863, False: 5.11k]
  ------------------
 1850|    863|      asc->m_sc.m_eldSpecificConfig.m_downscaledSamplingFrequency != 0) {
  ------------------
  |  Branch (1850:7): [True: 863, False: 0]
  ------------------
 1851|    863|    if (self->samplingRateInfo[0].samplingRate !=
  ------------------
  |  Branch (1851:9): [True: 863, False: 0]
  ------------------
 1852|    863|            asc->m_sc.m_eldSpecificConfig.m_downscaledSamplingFrequency ||
 1853|      0|        self->samplingRateInfo[0].samplingRate * self->downscaleFactor !=
  ------------------
  |  Branch (1853:9): [True: 0, False: 0]
  ------------------
 1854|    863|            asc->m_samplingFrequency) {
 1855|       |      /* get downscaledSamplingFrequency from ESC and compute the downscale
 1856|       |       * factor */
 1857|    863|      downscaleFactorInBS =
 1858|    863|          asc->m_samplingFrequency /
 1859|    863|          asc->m_sc.m_eldSpecificConfig.m_downscaledSamplingFrequency;
 1860|    863|      if ((downscaleFactorInBS == 1 || downscaleFactorInBS == 2 ||
  ------------------
  |  Branch (1860:12): [True: 761, False: 102]
  |  Branch (1860:40): [True: 19, False: 83]
  ------------------
 1861|     83|           (downscaleFactorInBS == 3 &&
  ------------------
  |  Branch (1861:13): [True: 6, False: 77]
  ------------------
 1862|      6|            asc->m_sc.m_eldSpecificConfig.m_frameLengthFlag) ||
  ------------------
  |  Branch (1862:13): [True: 4, False: 2]
  ------------------
 1863|     79|           downscaleFactorInBS == 4) &&
  ------------------
  |  Branch (1863:12): [True: 6, False: 73]
  ------------------
 1864|    790|          ((asc->m_samplingFrequency %
  ------------------
  |  Branch (1864:11): [True: 762, False: 28]
  ------------------
 1865|    790|            asc->m_sc.m_eldSpecificConfig.m_downscaledSamplingFrequency) ==
 1866|    790|           0)) {
 1867|    762|        downscaleFactor = downscaleFactorInBS;
 1868|    762|      } else {
 1869|    101|        downscaleFactorInBS = 1;
 1870|    101|        downscaleFactor = 1;
 1871|    101|      }
 1872|    863|    }
 1873|  5.11k|  } else {
 1874|  5.11k|    downscaleFactorInBS = 1;
 1875|  5.11k|    downscaleFactor = 1;
 1876|  5.11k|  }
 1877|       |
 1878|  5.97k|  if (self->downscaleFactorInBS != downscaleFactorInBS) {
  ------------------
  |  Branch (1878:7): [True: 15, False: 5.96k]
  ------------------
 1879|     15|    if (configMode & AC_CM_ALLOC_MEM) {
  ------------------
  |  |  337|     15|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
  |  Branch (1879:9): [True: 6, False: 9]
  ------------------
 1880|      6|      self->downscaleFactorInBS = downscaleFactorInBS;
 1881|      6|      self->downscaleFactor = downscaleFactor;
 1882|      6|    }
 1883|     15|    ascChanged = 1;
 1884|     15|  }
 1885|       |
 1886|  5.97k|  if ((INT)asc->m_samplesPerFrame % downscaleFactor != 0) {
  ------------------
  |  Branch (1886:7): [True: 0, False: 5.97k]
  ------------------
 1887|      0|    return AAC_DEC_UNSUPPORTED_SAMPLINGRATE; /* frameSize/dsf must be an integer
 1888|       |                                                number */
 1889|      0|  }
 1890|       |
 1891|  5.97k|  self->streamInfo.bitRate = 0;
 1892|       |
 1893|  5.97k|  if (asc->m_aot == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (1893:7): [True: 863, False: 5.11k]
  ------------------
 1894|    863|    if (self->useLdQmfTimeAlign !=
  ------------------
  |  Branch (1894:9): [True: 156, False: 707]
  ------------------
 1895|    863|        asc->m_sc.m_eldSpecificConfig.m_useLdQmfTimeAlign) {
 1896|    156|      ascChanged = 1;
 1897|    156|    }
 1898|    863|    if (configMode & AC_CM_ALLOC_MEM) {
  ------------------
  |  |  337|    863|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
  |  Branch (1898:9): [True: 346, False: 517]
  ------------------
 1899|    346|      self->useLdQmfTimeAlign =
 1900|    346|          asc->m_sc.m_eldSpecificConfig.m_useLdQmfTimeAlign;
 1901|    346|    }
 1902|    863|    if (sbrEnabled != asc->m_sbrPresentFlag) {
  ------------------
  |  Branch (1902:9): [True: 575, False: 288]
  ------------------
 1903|    575|      ascChanged = 1;
 1904|    575|    }
 1905|    863|  }
 1906|       |
 1907|  5.97k|  self->streamInfo.extAot = asc->m_extensionAudioObjectType;
 1908|  5.97k|  if (self->streamInfo.extSamplingRate !=
  ------------------
  |  Branch (1908:7): [True: 2.20k, False: 3.77k]
  ------------------
 1909|  5.97k|      (INT)asc->m_extensionSamplingFrequency) {
 1910|  2.20k|    ascChanged = 1;
 1911|  2.20k|  }
 1912|  5.97k|  if (configMode & AC_CM_ALLOC_MEM) {
  ------------------
  |  |  337|  5.97k|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
  |  Branch (1912:7): [True: 2.84k, False: 3.12k]
  ------------------
 1913|  2.84k|    self->streamInfo.extSamplingRate = asc->m_extensionSamplingFrequency;
 1914|  2.84k|  }
 1915|  5.97k|  flags |= (asc->m_sbrPresentFlag) ? AC_SBR_PRESENT : 0;
  ------------------
  |  |  311|  1.90k|#define AC_SBR_PRESENT 0x008000 /*!< SBR present flag (from ASC) */
  ------------------
  |  Branch (1915:12): [True: 1.90k, False: 4.07k]
  ------------------
 1916|  5.97k|  flags |= (asc->m_psPresentFlag) ? AC_PS_PRESENT : 0;
  ------------------
  |  |  314|     66|#define AC_PS_PRESENT 0x020000 /*!< PS present flag (from ASC or implicit)  */
  ------------------
  |  Branch (1916:12): [True: 66, False: 5.91k]
  ------------------
 1917|  5.97k|  if (asc->m_sbrPresentFlag) {
  ------------------
  |  Branch (1917:7): [True: 1.90k, False: 4.07k]
  ------------------
 1918|  1.90k|    sbrEnabled = 1;
 1919|  1.90k|    sbrEnabledPrev = 1;
 1920|  4.07k|  } else {
 1921|  4.07k|    sbrEnabled = 0;
 1922|  4.07k|    sbrEnabledPrev = 0;
 1923|  4.07k|  }
 1924|  5.97k|  if (sbrEnabled && asc->m_extensionSamplingFrequency) {
  ------------------
  |  Branch (1924:7): [True: 1.90k, False: 4.07k]
  |  Branch (1924:21): [True: 1.90k, False: 0]
  ------------------
 1925|  1.90k|    if (downscaleFactor != 1 && (downscaleFactor)&1) {
  ------------------
  |  Branch (1925:9): [True: 11, False: 1.89k]
  |  Branch (1925:33): [True: 0, False: 11]
  ------------------
 1926|      0|      return AAC_DEC_UNSUPPORTED_SAMPLINGRATE; /* SBR needs an even downscale
 1927|       |                                                  factor */
 1928|      0|    }
 1929|  1.90k|    if (configMode & AC_CM_ALLOC_MEM) {
  ------------------
  |  |  337|  1.90k|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
  |  Branch (1929:9): [True: 814, False: 1.09k]
  ------------------
 1930|    814|      self->streamInfo.extSamplingRate =
 1931|    814|          self->streamInfo.extSamplingRate / self->downscaleFactor;
 1932|    814|    }
 1933|  1.90k|  }
 1934|  5.97k|  if ((asc->m_aot == AOT_AAC_LC) && (asc->m_sbrPresentFlag == 1) &&
  ------------------
  |  Branch (1934:7): [True: 1.02k, False: 4.95k]
  |  Branch (1934:37): [True: 202, False: 822]
  ------------------
 1935|    202|      (asc->m_extensionSamplingFrequency > (2 * asc->m_samplingFrequency))) {
  ------------------
  |  Branch (1935:7): [True: 66, False: 136]
  ------------------
 1936|     66|    return AAC_DEC_UNSUPPORTED_SAMPLINGRATE; /* Core decoder supports at most a
 1937|       |                                                1:2 upsampling for HE-AAC and
 1938|       |                                                HE-AACv2 */
 1939|     66|  }
 1940|       |
 1941|       |  /* --------- vcb11 ------------ */
 1942|  5.91k|  flags |= (asc->m_vcb11Flag) ? AC_ER_VCB11 : 0;
  ------------------
  |  |  294|    420|  0x000001 /*!< aacSectionDataResilienceFlag     flag (from ASC): 1 means use \
  ------------------
  |  Branch (1942:12): [True: 420, False: 5.49k]
  ------------------
 1943|       |
 1944|       |  /* ---------- rvlc ------------ */
 1945|  5.91k|  flags |= (asc->m_rvlcFlag) ? AC_ER_RVLC : 0;
  ------------------
  |  |  297|    412|  0x000002 /*!< aacSpectralDataResilienceFlag     flag (from ASC): 1 means use \
  ------------------
  |  Branch (1945:12): [True: 412, False: 5.49k]
  ------------------
 1946|       |
 1947|       |  /* ----------- hcr ------------ */
 1948|  5.91k|  flags |= (asc->m_hcrFlag) ? AC_ER_HCR : 0;
  ------------------
  |  |  300|    398|  0x000004 /*!< aacSectionDataResilienceFlag     flag (from ASC): 1 means use \
  ------------------
  |  Branch (1948:12): [True: 398, False: 5.51k]
  ------------------
 1949|       |
 1950|  5.91k|  if (asc->m_aot == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (1950:7): [True: 863, False: 5.04k]
  ------------------
 1951|    863|    mpsEnableCurr = 0;
 1952|    863|    flags |= AC_ELD;
  ------------------
  |  |  303|    863|#define AC_ELD 0x000010         /*!< AAC-ELD */
  ------------------
 1953|    863|    flags |= (asc->m_sbrPresentFlag)
  ------------------
  |  Branch (1953:14): [True: 575, False: 288]
  ------------------
 1954|    863|                 ? AC_SBR_PRESENT
  ------------------
  |  |  311|    575|#define AC_SBR_PRESENT 0x008000 /*!< SBR present flag (from ASC) */
  ------------------
 1955|    863|                 : 0; /* Need to set the SBR flag for backward-compatibility
 1956|       |                               reasons. Even if SBR is not supported. */
 1957|    863|    flags |= (asc->m_sc.m_eldSpecificConfig.m_sbrCrcFlag) ? AC_SBRCRC : 0;
  ------------------
  |  |  313|    217|  0x010000 /*!< SBR CRC present flag. Only relevant for AAC-ELD for now. */
  ------------------
  |  Branch (1957:14): [True: 217, False: 646]
  ------------------
 1958|    863|    flags |= (asc->m_sc.m_eldSpecificConfig.m_useLdQmfTimeAlign)
  ------------------
  |  Branch (1958:14): [True: 156, False: 707]
  ------------------
 1959|    863|                 ? AC_MPS_PRESENT
  ------------------
  |  |  316|    156|  0x040000                    /*!< MPS present flag (from ASC or implicit) \
  ------------------
 1960|    863|                 : 0;
 1961|    863|    if (self->mpsApplicable) {
  ------------------
  |  Branch (1961:9): [True: 117, False: 746]
  ------------------
 1962|    117|      mpsEnableCurr = asc->m_sc.m_eldSpecificConfig.m_useLdQmfTimeAlign;
 1963|    117|    }
 1964|    863|  }
 1965|  5.91k|  flags |= (asc->m_aot == AOT_ER_AAC_LD) ? AC_LD : 0;
  ------------------
  |  |  304|    140|#define AC_LD 0x000020          /*!< AAC-LD */
  ------------------
  |  Branch (1965:12): [True: 140, False: 5.77k]
  ------------------
 1966|  5.91k|  flags |= (asc->m_epConfig >= 0) ? AC_ER : 0;
  ------------------
  |  |  305|  1.02k|#define AC_ER 0x000040          /*!< ER syntax */
  ------------------
  |  Branch (1966:12): [True: 1.02k, False: 4.88k]
  ------------------
 1967|       |
 1968|  5.91k|  if (asc->m_aot == AOT_USAC) {
  ------------------
  |  Branch (1968:7): [True: 3.92k, False: 1.98k]
  ------------------
 1969|  3.92k|    flags |= AC_USAC;
  ------------------
  |  |  307|  3.92k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
 1970|  3.92k|    flags |= (asc->m_sc.m_usacConfig.element[0].m_stereoConfigIndex > 0)
  ------------------
  |  Branch (1970:14): [True: 72, False: 3.85k]
  ------------------
 1971|  3.92k|                 ? AC_MPS_PRESENT
  ------------------
  |  |  316|     72|  0x040000                    /*!< MPS present flag (from ASC or implicit) \
  ------------------
 1972|  3.92k|                 : 0;
 1973|  3.92k|  }
 1974|  5.91k|  if (asc->m_aot == AOT_DRM_AAC) {
  ------------------
  |  Branch (1974:7): [True: 0, False: 5.91k]
  ------------------
 1975|      0|    flags |= AC_DRM | AC_SBRCRC | AC_SCALABLE;
  ------------------
  |  |  318|      0|#define AC_DRM 0x080000       /*!< DRM bit stream syntax */
  ------------------
                  flags |= AC_DRM | AC_SBRCRC | AC_SCALABLE;
  ------------------
  |  |  313|      0|  0x010000 /*!< SBR CRC present flag. Only relevant for AAC-ELD for now. */
  ------------------
                  flags |= AC_DRM | AC_SBRCRC | AC_SCALABLE;
  ------------------
  |  |  302|      0|#define AC_SCALABLE 0x000008    /*!< AAC Scalable*/
  ------------------
 1976|      0|  }
 1977|  5.91k|  if (asc->m_aot == AOT_DRM_SURROUND) {
  ------------------
  |  Branch (1977:7): [True: 0, False: 5.91k]
  ------------------
 1978|      0|    flags |= AC_DRM | AC_SBRCRC | AC_SCALABLE | AC_MPS_PRESENT;
  ------------------
  |  |  318|      0|#define AC_DRM 0x080000       /*!< DRM bit stream syntax */
  ------------------
                  flags |= AC_DRM | AC_SBRCRC | AC_SCALABLE | AC_MPS_PRESENT;
  ------------------
  |  |  313|      0|  0x010000 /*!< SBR CRC present flag. Only relevant for AAC-ELD for now. */
  ------------------
                  flags |= AC_DRM | AC_SBRCRC | AC_SCALABLE | AC_MPS_PRESENT;
  ------------------
  |  |  302|      0|#define AC_SCALABLE 0x000008    /*!< AAC Scalable*/
  ------------------
                  flags |= AC_DRM | AC_SBRCRC | AC_SCALABLE | AC_MPS_PRESENT;
  ------------------
  |  |  316|      0|  0x040000                    /*!< MPS present flag (from ASC or implicit) \
  ------------------
 1979|      0|    FDK_ASSERT(!asc->m_psPresentFlag);
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1979:5): [True: 0, False: 0]
  ------------------
 1980|      0|  }
 1981|  5.91k|  if ((asc->m_aot == AOT_AAC_SCAL) || (asc->m_aot == AOT_ER_AAC_SCAL)) {
  ------------------
  |  Branch (1981:7): [True: 0, False: 5.91k]
  |  Branch (1981:39): [True: 8, False: 5.90k]
  ------------------
 1982|      8|    flags |= AC_SCALABLE;
  ------------------
  |  |  302|      8|#define AC_SCALABLE 0x000008    /*!< AAC Scalable*/
  ------------------
 1983|      8|  }
 1984|       |
 1985|  5.91k|  if ((asc->m_epConfig >= 0) && (asc->m_channelConfiguration <= 0)) {
  ------------------
  |  Branch (1985:7): [True: 1.02k, False: 4.88k]
  |  Branch (1985:33): [True: 0, False: 1.02k]
  ------------------
 1986|       |    /* we have to know the number of channels otherwise no decoding is possible
 1987|       |     */
 1988|      0|    return AAC_DEC_UNSUPPORTED_ER_FORMAT;
 1989|      0|  }
 1990|       |
 1991|  5.91k|  self->streamInfo.epConfig = asc->m_epConfig;
 1992|       |  /* self->hInput->asc.m_epConfig = asc->m_epConfig; */
 1993|       |
 1994|  5.91k|  if (asc->m_epConfig > 1) return AAC_DEC_UNSUPPORTED_ER_FORMAT;
  ------------------
  |  Branch (1994:7): [True: 0, False: 5.91k]
  ------------------
 1995|       |
 1996|       |  /* Check if samplerate changed. */
 1997|  5.91k|  if ((self->samplingRateInfo[streamIndex].samplingRate !=
  ------------------
  |  Branch (1997:7): [True: 5.90k, False: 2]
  ------------------
 1998|  5.91k|       asc->m_samplingFrequency) ||
 1999|      2|      (self->streamInfo.aacSamplesPerFrame !=
  ------------------
  |  Branch (1999:7): [True: 2, False: 0]
  ------------------
 2000|  5.91k|       (INT)asc->m_samplesPerFrame / downscaleFactor)) {
 2001|  5.91k|    AAC_DECODER_ERROR error;
 2002|       |
 2003|  5.91k|    ascChanged = 1;
 2004|       |
 2005|  5.91k|    if (configMode & AC_CM_ALLOC_MEM) {
  ------------------
  |  |  337|  5.91k|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
  |  Branch (2005:9): [True: 2.84k, False: 3.06k]
  ------------------
 2006|       |      /* Update samplerate info. */
 2007|  2.84k|      error = getSamplingRateInfo(
 2008|  2.84k|          &self->samplingRateInfo[streamIndex], asc->m_samplesPerFrame,
 2009|  2.84k|          asc->m_samplingFrequencyIndex, asc->m_samplingFrequency);
 2010|  2.84k|      if (error != AAC_DEC_OK) {
  ------------------
  |  Branch (2010:11): [True: 0, False: 2.84k]
  ------------------
 2011|      0|        return error;
 2012|      0|      }
 2013|  2.84k|      self->streamInfo.aacSampleRate =
 2014|  2.84k|          self->samplingRateInfo[0].samplingRate / self->downscaleFactor;
 2015|  2.84k|      self->streamInfo.aacSamplesPerFrame =
 2016|  2.84k|          asc->m_samplesPerFrame / self->downscaleFactor;
 2017|  2.84k|      if (self->streamInfo.aacSampleRate <= 0) {
  ------------------
  |  Branch (2017:11): [True: 0, False: 2.84k]
  ------------------
 2018|      0|        return AAC_DEC_UNSUPPORTED_SAMPLINGRATE;
 2019|      0|      }
 2020|  2.84k|    }
 2021|  5.91k|  }
 2022|       |
 2023|       |  /* Check if amount of channels has changed. */
 2024|  5.91k|  if (self->ascChannels[streamIndex] != ascChannels) {
  ------------------
  |  Branch (2024:7): [True: 5.91k, False: 0]
  ------------------
 2025|  5.91k|    ascChanged = 1;
 2026|  5.91k|  }
 2027|       |
 2028|       |  /* detect config change */
 2029|  5.91k|  if (configMode & AC_CM_DET_CFG_CHANGE) {
  ------------------
  |  |  334|  5.91k|  0x000001 /*!< Config mode signalizes the callback to work in config change \
  ------------------
  |  Branch (2029:7): [True: 3.06k, False: 2.84k]
  ------------------
 2030|  3.06k|    if (ascChanged != 0) {
  ------------------
  |  Branch (2030:9): [True: 3.06k, False: 0]
  ------------------
 2031|  3.06k|      *configChanged = 1;
 2032|  3.06k|    }
 2033|       |
 2034|  3.06k|    CAacDecoder_AcceptFlags(self, asc, flags, elFlags, streamIndex,
 2035|  3.06k|                            elementOffset);
 2036|       |
 2037|  3.06k|    return err;
 2038|  3.06k|  }
 2039|       |
 2040|       |  /* set AC_USAC_SCFGI3 globally if any usac element uses */
 2041|  2.84k|  switch (asc->m_aot) {
 2042|  1.94k|    case AOT_USAC:
  ------------------
  |  Branch (2042:5): [True: 1.94k, False: 907]
  ------------------
 2043|  1.94k|      if (sbrEnabled) {
  ------------------
  |  Branch (2043:11): [True: 518, False: 1.42k]
  ------------------
 2044|    518|        for (int _el = 0;
 2045|  1.50k|             _el < (int)self->pUsacConfig[streamIndex]->m_usacNumElements;
  ------------------
  |  Branch (2045:14): [True: 990, False: 518]
  ------------------
 2046|    990|             _el++) {
 2047|    990|          int el = elementOffset + _el;
 2048|    990|          if (IS_USAC_CHANNEL_ELEMENT(self->elements[el])) {
  ------------------
  |  |  484|    990|  ((elementId) == ID_USAC_SCE || (elementId) == ID_USAC_CPE || \
  |  |  ------------------
  |  |  |  Branch (484:4): [True: 476, False: 514]
  |  |  |  Branch (484:34): [True: 42, False: 472]
  |  |  ------------------
  |  |  485|    990|   (elementId) == ID_USAC_LFE)
  |  |  ------------------
  |  |  |  Branch (485:4): [True: 0, False: 472]
  |  |  ------------------
  ------------------
 2049|    518|            if (usacStereoConfigIndex < 0) {
  ------------------
  |  Branch (2049:17): [True: 518, False: 0]
  ------------------
 2050|    518|              usacStereoConfigIndex = self->usacStereoConfigIndex[el];
 2051|    518|            } else {
 2052|      0|              if ((usacStereoConfigIndex != self->usacStereoConfigIndex[el]) ||
  ------------------
  |  Branch (2052:19): [True: 0, False: 0]
  ------------------
 2053|      0|                  (self->usacStereoConfigIndex[el] > 0)) {
  ------------------
  |  Branch (2053:19): [True: 0, False: 0]
  ------------------
 2054|      0|                goto bail;
 2055|      0|              }
 2056|      0|            }
 2057|    518|          }
 2058|    990|        }
 2059|       |
 2060|    518|        if (usacStereoConfigIndex < 0) {
  ------------------
  |  Branch (2060:13): [True: 0, False: 518]
  ------------------
 2061|      0|          goto bail;
 2062|      0|        }
 2063|       |
 2064|    518|        if (usacStereoConfigIndex == 3) {
  ------------------
  |  Branch (2064:13): [True: 9, False: 509]
  ------------------
 2065|      9|          flags |= AC_USAC_SCFGI3;
  ------------------
  |  |  329|      9|  0x8000000 /*!< USAC flag: If stereoConfigIndex is 3 the flag is set. */
  ------------------
 2066|      9|        }
 2067|    518|      }
 2068|  1.94k|      break;
 2069|  1.94k|    default:
  ------------------
  |  Branch (2069:5): [True: 907, False: 1.94k]
  ------------------
 2070|    907|      break;
 2071|  2.84k|  }
 2072|       |
 2073|  2.84k|  if (*configChanged) {
  ------------------
  |  Branch (2073:7): [True: 2.84k, False: 0]
  ------------------
 2074|       |    /* Set up QMF domain for AOTs with explicit signalling of SBR and or MPS.
 2075|       |       This is to be able to play out the first frame alway with the correct
 2076|       |       frame size and sampling rate even in case of concealment.
 2077|       |    */
 2078|  2.84k|    switch (asc->m_aot) {
 2079|  1.94k|      case AOT_USAC:
  ------------------
  |  Branch (2079:7): [True: 1.94k, False: 907]
  ------------------
 2080|  1.94k|        if (sbrEnabled) {
  ------------------
  |  Branch (2080:13): [True: 518, False: 1.42k]
  ------------------
 2081|    518|          const UCHAR map_sbrRatio_2_nAnaBands[] = {16, 24, 32};
 2082|       |
 2083|    518|          FDK_ASSERT(asc->m_sc.m_usacConfig.m_sbrRatioIndex > 0);
  ------------------
  |  |  221|    518|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (2083:11): [True: 518, False: 0]
  ------------------
 2084|    518|          FDK_ASSERT(streamIndex == 0);
  ------------------
  |  |  221|    518|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (2084:11): [True: 518, Folded]
  ------------------
 2085|       |
 2086|    518|          self->qmfDomain.globalConf.nInputChannels_requested = ascChannels;
 2087|    518|          self->qmfDomain.globalConf.nOutputChannels_requested =
 2088|    518|              (usacStereoConfigIndex == 1) ? 2 : ascChannels;
  ------------------
  |  Branch (2088:15): [True: 8, False: 510]
  ------------------
 2089|    518|          self->qmfDomain.globalConf.flags_requested = 0;
 2090|    518|          self->qmfDomain.globalConf.nBandsAnalysis_requested =
 2091|    518|              map_sbrRatio_2_nAnaBands[asc->m_sc.m_usacConfig.m_sbrRatioIndex -
 2092|    518|                                       1];
 2093|    518|          self->qmfDomain.globalConf.nBandsSynthesis_requested = 64;
 2094|    518|          self->qmfDomain.globalConf.nQmfTimeSlots_requested =
 2095|    518|              (asc->m_sc.m_usacConfig.m_sbrRatioIndex == 1) ? 64 : 32;
  ------------------
  |  Branch (2095:15): [True: 113, False: 405]
  ------------------
 2096|    518|          self->qmfDomain.globalConf.nQmfOvTimeSlots_requested =
 2097|    518|              (asc->m_sc.m_usacConfig.m_sbrRatioIndex == 1) ? 12 : 6;
  ------------------
  |  Branch (2097:15): [True: 113, False: 405]
  ------------------
 2098|    518|          self->qmfDomain.globalConf.nQmfProcBands_requested = 64;
 2099|    518|          self->qmfDomain.globalConf.nQmfProcChannels_requested = 1;
 2100|    518|          self->qmfDomain.globalConf.parkChannel =
 2101|    518|              (usacStereoConfigIndex == 3) ? 1 : 0;
  ------------------
  |  Branch (2101:15): [True: 9, False: 509]
  ------------------
 2102|    518|          self->qmfDomain.globalConf.parkChannel_requested =
 2103|    518|              (usacStereoConfigIndex == 3) ? 1 : 0;
  ------------------
  |  Branch (2103:15): [True: 9, False: 509]
  ------------------
 2104|    518|          self->qmfDomain.globalConf.qmfDomainExplicitConfig = 1;
 2105|    518|        }
 2106|  1.94k|        break;
 2107|  1.94k|      case AOT_ER_AAC_ELD:
  ------------------
  |  Branch (2107:7): [True: 346, False: 2.50k]
  ------------------
 2108|    346|        if (mpsEnableCurr &&
  ------------------
  |  Branch (2108:13): [True: 57, False: 289]
  ------------------
 2109|     57|            asc->m_sc.m_eldSpecificConfig.m_useLdQmfTimeAlign) {
  ------------------
  |  Branch (2109:13): [True: 57, False: 0]
  ------------------
 2110|     57|          SAC_INPUT_CONFIG sac_interface = (sbrEnabled && self->hSbrDecoder)
  ------------------
  |  Branch (2110:45): [True: 6, False: 51]
  |  Branch (2110:59): [True: 6, False: 0]
  ------------------
 2111|     57|                                               ? SAC_INTERFACE_QMF
 2112|     57|                                               : SAC_INTERFACE_TIME;
 2113|     57|          mpegSurroundDecoder_ConfigureQmfDomain(
 2114|     57|              (CMpegSurroundDecoder *)self->pMpegSurroundDecoder, sac_interface,
 2115|     57|              (UINT)self->streamInfo.aacSampleRate, asc->m_aot);
 2116|     57|          self->qmfDomain.globalConf.qmfDomainExplicitConfig = 1;
 2117|     57|        }
 2118|    346|        break;
 2119|    561|      default:
  ------------------
  |  Branch (2119:7): [True: 561, False: 2.28k]
  ------------------
 2120|    561|        self->qmfDomain.globalConf.qmfDomainExplicitConfig =
 2121|    561|            0; /* qmfDomain is initialized by SBR and MPS init functions if
 2122|       |                  required */
 2123|    561|        break;
 2124|  2.84k|    }
 2125|       |
 2126|       |    /* Allocate all memory structures for each channel */
 2127|  2.84k|    {
 2128|  2.84k|      int ch = aacChannelsOffset;
 2129|  8.64k|      for (int _ch = 0; _ch < ascChannels; _ch++) {
  ------------------
  |  Branch (2129:25): [True: 5.79k, False: 2.84k]
  ------------------
 2130|  5.79k|        if (ch >= (8)) {
  ------------------
  |  Branch (2130:13): [True: 0, False: 5.79k]
  ------------------
 2131|      0|          goto bail;
 2132|      0|        }
 2133|  5.79k|        self->pAacDecoderChannelInfo[ch] = GetAacDecoderChannelInfo(ch);
 2134|       |        /* This is temporary until the DynamicData is split into two or more
 2135|       |           regions! The memory could be reused after completed core decoding. */
 2136|  5.79k|        if (self->pAacDecoderChannelInfo[ch] == NULL) {
  ------------------
  |  Branch (2136:13): [True: 0, False: 5.79k]
  ------------------
 2137|      0|          goto bail;
 2138|      0|        }
 2139|  5.79k|        ch++;
 2140|  5.79k|      }
 2141|       |
 2142|  2.84k|      int chIdx = aacChannelsOffsetIdx;
 2143|  2.84k|      ch = aacChannelsOffset;
 2144|  2.84k|      int _numElements;
 2145|  2.84k|      _numElements = (((8)) + (8));
 2146|  2.84k|      if (flags & (AC_RSV603DA | AC_USAC)) {
  ------------------
  |  |  308|  2.84k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
                    if (flags & (AC_RSV603DA | AC_USAC)) {
  ------------------
  |  |  307|  2.84k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
  |  Branch (2146:11): [True: 1.94k, False: 907]
  ------------------
 2147|  1.94k|        _numElements = (int)asc->m_sc.m_usacConfig.m_usacNumElements;
 2148|  1.94k|      }
 2149|  11.2k|      for (int _el = 0; _el < _numElements; _el++) {
  ------------------
  |  Branch (2149:25): [True: 9.25k, False: 1.96k]
  ------------------
 2150|  9.25k|        int el_channels = 0;
 2151|  9.25k|        int el = elementOffset + _el;
 2152|       |
 2153|  9.25k|        if (flags &
  ------------------
  |  Branch (2153:13): [True: 5.17k, False: 4.07k]
  ------------------
 2154|  9.25k|            (AC_ER | AC_LD | AC_ELD | AC_RSV603DA | AC_USAC | AC_RSVD50)) {
  ------------------
  |  |  305|  9.25k|#define AC_ER 0x000040          /*!< ER syntax */
  ------------------
                          (AC_ER | AC_LD | AC_ELD | AC_RSV603DA | AC_USAC | AC_RSVD50)) {
  ------------------
  |  |  304|  9.25k|#define AC_LD 0x000020          /*!< AAC-LD */
  ------------------
                          (AC_ER | AC_LD | AC_ELD | AC_RSV603DA | AC_USAC | AC_RSVD50)) {
  ------------------
  |  |  303|  9.25k|#define AC_ELD 0x000010         /*!< AAC-ELD */
  ------------------
                          (AC_ER | AC_LD | AC_ELD | AC_RSV603DA | AC_USAC | AC_RSVD50)) {
  ------------------
  |  |  308|  9.25k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
                          (AC_ER | AC_LD | AC_ELD | AC_RSV603DA | AC_USAC | AC_RSVD50)) {
  ------------------
  |  |  307|  9.25k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                          (AC_ER | AC_LD | AC_ELD | AC_RSV603DA | AC_USAC | AC_RSVD50)) {
  ------------------
  |  |  310|  9.25k|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
 2155|  5.17k|          if (ch >= ascChannels) {
  ------------------
  |  Branch (2155:15): [True: 552, False: 4.62k]
  ------------------
 2156|    552|            break;
 2157|    552|          }
 2158|  5.17k|        }
 2159|       |
 2160|  8.70k|        switch (self->elements[el]) {
 2161|  1.02k|          case ID_SCE:
  ------------------
  |  Branch (2161:11): [True: 1.02k, False: 7.67k]
  ------------------
 2162|  2.25k|          case ID_CPE:
  ------------------
  |  Branch (2162:11): [True: 1.23k, False: 7.46k]
  ------------------
 2163|  2.56k|          case ID_LFE:
  ------------------
  |  Branch (2163:11): [True: 310, False: 8.39k]
  ------------------
 2164|  4.45k|          case ID_USAC_SCE:
  ------------------
  |  Branch (2164:11): [True: 1.88k, False: 6.81k]
  ------------------
 2165|  4.51k|          case ID_USAC_CPE:
  ------------------
  |  Branch (2165:11): [True: 53, False: 8.64k]
  ------------------
 2166|  4.51k|          case ID_USAC_LFE:
  ------------------
  |  Branch (2166:11): [True: 0, False: 8.70k]
  ------------------
 2167|       |
 2168|  4.51k|            el_channels = CAacDecoder_GetELChannels(
 2169|  4.51k|                self->elements[el], self->usacStereoConfigIndex[el]);
 2170|       |
 2171|  4.51k|            {
 2172|  4.51k|              self->pAacDecoderChannelInfo[ch]->pComStaticData =
 2173|  4.51k|                  (CAacDecoderCommonStaticData *)FDKcalloc(
 2174|  4.51k|                      1, sizeof(CAacDecoderCommonStaticData));
 2175|  4.51k|              if (self->pAacDecoderChannelInfo[ch]->pComStaticData == NULL) {
  ------------------
  |  Branch (2175:19): [True: 0, False: 4.51k]
  ------------------
 2176|      0|                goto bail;
 2177|      0|              }
 2178|  4.51k|              if (ch == aacChannelsOffset) {
  ------------------
  |  Branch (2178:19): [True: 2.84k, False: 1.66k]
  ------------------
 2179|  2.84k|                self->pAacDecoderChannelInfo[ch]->pComData =
 2180|  2.84k|                    (CAacDecoderCommonData *)GetWorkBufferCore6();
 2181|  2.84k|                self->pAacDecoderChannelInfo[ch]
 2182|  2.84k|                    ->pComStaticData->pWorkBufferCore1 = GetWorkBufferCore1();
 2183|  2.84k|              } else {
 2184|  1.66k|                self->pAacDecoderChannelInfo[ch]->pComData =
 2185|  1.66k|                    (CAacDecoderCommonData *)FDKaalloc(
 2186|  1.66k|                        sizeof(CAacDecoderCommonData), ALIGNMENT_DEFAULT);
  ------------------
  |  |  256|  1.66k|#define ALIGNMENT_DEFAULT 8
  ------------------
 2187|  1.66k|                self->pAacDecoderChannelInfo[ch]
 2188|  1.66k|                    ->pComStaticData->pWorkBufferCore1 =
 2189|  1.66k|                    self->pAacDecoderChannelInfo[aacChannelsOffset]
 2190|  1.66k|                        ->pComStaticData->pWorkBufferCore1;
 2191|  1.66k|              }
 2192|  4.51k|              if ((self->pAacDecoderChannelInfo[ch]->pComData == NULL) ||
  ------------------
  |  Branch (2192:19): [True: 0, False: 4.51k]
  ------------------
 2193|  4.51k|                  (self->pAacDecoderChannelInfo[ch]
  ------------------
  |  Branch (2193:19): [True: 0, False: 4.51k]
  ------------------
 2194|  4.51k|                       ->pComStaticData->pWorkBufferCore1 == NULL)) {
 2195|      0|                goto bail;
 2196|      0|              }
 2197|  4.51k|              self->pAacDecoderChannelInfo[ch]->pDynData =
 2198|  4.51k|                  &(self->pAacDecoderChannelInfo[ch]
 2199|  4.51k|                        ->pComData->pAacDecoderDynamicData[0]);
 2200|  4.51k|              self->pAacDecoderChannelInfo[ch]->pSpectralCoefficient =
 2201|  4.51k|                  (SPECTRAL_PTR)&self->workBufferCore2[ch * 1024];
 2202|       |
 2203|  4.51k|              if (el_channels == 2) {
  ------------------
  |  Branch (2203:19): [True: 1.28k, False: 3.23k]
  ------------------
 2204|  1.28k|                if (ch >= (8) - 1) {
  ------------------
  |  Branch (2204:21): [True: 0, False: 1.28k]
  ------------------
 2205|      0|                  return AAC_DEC_UNSUPPORTED_CHANNELCONFIG;
 2206|      0|                }
 2207|  1.28k|                self->pAacDecoderChannelInfo[ch + 1]->pComData =
 2208|  1.28k|                    self->pAacDecoderChannelInfo[ch]->pComData;
 2209|  1.28k|                self->pAacDecoderChannelInfo[ch + 1]->pComStaticData =
 2210|  1.28k|                    self->pAacDecoderChannelInfo[ch]->pComStaticData;
 2211|  1.28k|                self->pAacDecoderChannelInfo[ch + 1]
 2212|  1.28k|                    ->pComStaticData->pWorkBufferCore1 =
 2213|  1.28k|                    self->pAacDecoderChannelInfo[ch]
 2214|  1.28k|                        ->pComStaticData->pWorkBufferCore1;
 2215|  1.28k|                self->pAacDecoderChannelInfo[ch + 1]->pDynData =
 2216|  1.28k|                    &(self->pAacDecoderChannelInfo[ch]
 2217|  1.28k|                          ->pComData->pAacDecoderDynamicData[1]);
 2218|  1.28k|                self->pAacDecoderChannelInfo[ch + 1]->pSpectralCoefficient =
 2219|  1.28k|                    (SPECTRAL_PTR)&self->workBufferCore2[(ch + 1) * 1024];
 2220|  1.28k|              }
 2221|       |
 2222|  4.51k|              ch += el_channels;
 2223|  4.51k|            }
 2224|      0|            chIdx += el_channels;
 2225|  4.51k|            break;
 2226|       |
 2227|  4.19k|          default:
  ------------------
  |  Branch (2227:11): [True: 4.19k, False: 4.51k]
  ------------------
 2228|  4.19k|            break;
 2229|  8.70k|        }
 2230|       |
 2231|  8.70k|        if (self->elements[el] == ID_END) {
  ------------------
  |  Branch (2231:13): [True: 335, False: 8.36k]
  ------------------
 2232|    335|          break;
 2233|    335|        }
 2234|       |
 2235|  8.36k|        el++;
 2236|  8.36k|      }
 2237|       |
 2238|  2.84k|      chIdx = aacChannelsOffsetIdx;
 2239|  2.84k|      ch = aacChannelsOffset;
 2240|  8.64k|      for (int _ch = 0; _ch < ascChannels; _ch++) {
  ------------------
  |  Branch (2240:25): [True: 5.79k, False: 2.84k]
  ------------------
 2241|       |        /* Allocate persistent channel memory */
 2242|  5.79k|        {
 2243|  5.79k|          self->pAacDecoderStaticChannelInfo[ch] =
 2244|  5.79k|              GetAacDecoderStaticChannelInfo(ch);
 2245|  5.79k|          if (self->pAacDecoderStaticChannelInfo[ch] == NULL) {
  ------------------
  |  Branch (2245:15): [True: 0, False: 5.79k]
  ------------------
 2246|      0|            goto bail;
 2247|      0|          }
 2248|  5.79k|          self->pAacDecoderStaticChannelInfo[ch]->pOverlapBuffer =
 2249|  5.79k|              GetOverlapBuffer(ch); /* This area size depends on the AOT */
 2250|  5.79k|          if (self->pAacDecoderStaticChannelInfo[ch]->pOverlapBuffer == NULL) {
  ------------------
  |  Branch (2250:15): [True: 0, False: 5.79k]
  ------------------
 2251|      0|            goto bail;
 2252|      0|          }
 2253|  5.79k|          if (flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA /*|AC_BSAC*/)) {
  ------------------
  |  |  307|  5.79k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                        if (flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA /*|AC_BSAC*/)) {
  ------------------
  |  |  310|  5.79k|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
                        if (flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA /*|AC_BSAC*/)) {
  ------------------
  |  |  308|  5.79k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (2253:15): [True: 1.98k, False: 3.80k]
  ------------------
 2254|  1.98k|            self->pAacDecoderStaticChannelInfo[ch]->hArCo = CArco_Create();
 2255|  1.98k|            if (self->pAacDecoderStaticChannelInfo[ch]->hArCo == NULL) {
  ------------------
  |  Branch (2255:17): [True: 0, False: 1.98k]
  ------------------
 2256|      0|              goto bail;
 2257|      0|            }
 2258|  1.98k|          }
 2259|       |
 2260|  5.79k|          if (!(flags & (AC_USAC | AC_RSV603DA))) {
  ------------------
  |  |  307|  5.79k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                        if (!(flags & (AC_USAC | AC_RSV603DA))) {
  ------------------
  |  |  308|  5.79k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (2260:15): [True: 3.80k, False: 1.98k]
  ------------------
 2261|  3.80k|            CPns_UpdateNoiseState(
 2262|  3.80k|                &self->pAacDecoderChannelInfo[ch]->data.aac.PnsData,
 2263|  3.80k|                &self->pAacDecoderStaticChannelInfo[ch]->pnsCurrentSeed,
 2264|  3.80k|                self->pAacDecoderChannelInfo[ch]->pComData->pnsRandomSeed);
 2265|  3.80k|          }
 2266|  5.79k|          ch++;
 2267|  5.79k|        }
 2268|      0|        chIdx++;
 2269|  5.79k|      }
 2270|       |
 2271|  2.84k|      if (flags & AC_USAC) {
  ------------------
  |  |  307|  2.84k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
  |  Branch (2271:11): [True: 1.94k, False: 907]
  ------------------
 2272|  3.93k|        for (int _ch = 0; _ch < flushChannels; _ch++) {
  ------------------
  |  Branch (2272:27): [True: 1.99k, False: 1.94k]
  ------------------
 2273|  1.99k|          ch = aacChannelsOffset + _ch;
 2274|  1.99k|          if (self->pTimeDataFlush[ch] == NULL) {
  ------------------
  |  Branch (2274:15): [True: 1.99k, False: 0]
  ------------------
 2275|  1.99k|            self->pTimeDataFlush[ch] = GetTimeDataFlush(ch);
 2276|  1.99k|            if (self->pTimeDataFlush[ch] == NULL) {
  ------------------
  |  Branch (2276:17): [True: 0, False: 1.99k]
  ------------------
 2277|      0|              goto bail;
 2278|      0|            }
 2279|  1.99k|          }
 2280|  1.99k|        }
 2281|  1.94k|      }
 2282|       |
 2283|  2.84k|      if (flags & (AC_USAC | AC_RSV603DA)) {
  ------------------
  |  |  307|  2.84k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                    if (flags & (AC_USAC | AC_RSV603DA)) {
  ------------------
  |  |  308|  2.84k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (2283:11): [True: 1.94k, False: 907]
  ------------------
 2284|  1.94k|        int complexStereoPredPossible = 0;
 2285|  1.94k|        ch = aacChannelsOffset;
 2286|  1.94k|        chIdx = aacChannelsOffsetIdx;
 2287|  5.74k|        for (int _el2 = 0; _el2 < (int)asc->m_sc.m_usacConfig.m_usacNumElements;
  ------------------
  |  Branch (2287:28): [True: 3.80k, False: 1.94k]
  ------------------
 2288|  3.80k|             _el2++) {
 2289|  3.80k|          int el2 = elementOffset + _el2;
 2290|  3.80k|          int elCh = 0, ch2;
 2291|       |
 2292|  3.80k|          if ((self->elements[el2] == ID_USAC_CPE) &&
  ------------------
  |  Branch (2292:15): [True: 53, False: 3.75k]
  ------------------
 2293|     53|              !(self->usacStereoConfigIndex[el2] == 1)) {
  ------------------
  |  Branch (2293:15): [True: 45, False: 8]
  ------------------
 2294|     45|            elCh = 2;
 2295|  3.75k|          } else if (IS_CHANNEL_ELEMENT(self->elements[el2])) {
  ------------------
  |  |  459|  3.75k|  ((elementId) == ID_SCE || (elementId) == ID_CPE || (elementId) == ID_LFE || \
  |  |  ------------------
  |  |  |  Branch (459:4): [True: 0, False: 3.75k]
  |  |  |  Branch (459:29): [True: 0, False: 3.75k]
  |  |  |  Branch (459:54): [True: 0, False: 3.75k]
  |  |  ------------------
  |  |  460|  3.75k|   (elementId) == ID_USAC_SCE || (elementId) == ID_USAC_CPE ||                \
  |  |  ------------------
  |  |  |  Branch (460:4): [True: 1.88k, False: 1.87k]
  |  |  |  Branch (460:34): [True: 8, False: 1.86k]
  |  |  ------------------
  |  |  461|  3.75k|   (elementId) == ID_USAC_LFE)
  |  |  ------------------
  |  |  |  Branch (461:4): [True: 0, False: 1.86k]
  |  |  ------------------
  ------------------
 2296|  1.89k|            elCh = 1;
 2297|  1.89k|          }
 2298|       |
 2299|  3.80k|          if (elFlags[el2] & AC_EL_USAC_CP_POSSIBLE) {
  ------------------
  |  |  351|  3.80k|  0x000040 /*!< USAC may use Complex Stereo Prediction in this channel element \
  ------------------
  |  Branch (2299:15): [True: 21, False: 3.78k]
  ------------------
 2300|     21|            complexStereoPredPossible = 1;
 2301|     21|            if (self->cpeStaticData[el2] == NULL) {
  ------------------
  |  Branch (2301:17): [True: 21, False: 0]
  ------------------
 2302|     21|              self->cpeStaticData[el2] = GetCpePersistentData();
 2303|     21|              if (self->cpeStaticData[el2] == NULL) {
  ------------------
  |  Branch (2303:19): [True: 0, False: 21]
  ------------------
 2304|      0|                goto bail;
 2305|      0|              }
 2306|     21|            }
 2307|     21|          }
 2308|       |
 2309|  5.79k|          for (ch2 = 0; ch2 < elCh; ch2++) {
  ------------------
  |  Branch (2309:25): [True: 1.98k, False: 3.80k]
  ------------------
 2310|       |            /* Hook element specific cpeStaticData into channel specific
 2311|       |             * aacDecoderStaticChannelInfo */
 2312|  1.98k|            self->pAacDecoderStaticChannelInfo[ch]->pCpeStaticData =
 2313|  1.98k|                self->cpeStaticData[el2];
 2314|  1.98k|            if (self->pAacDecoderStaticChannelInfo[ch]->pCpeStaticData !=
  ------------------
  |  Branch (2314:17): [True: 42, False: 1.94k]
  ------------------
 2315|  1.98k|                NULL) {
 2316|     42|              self->pAacDecoderStaticChannelInfo[ch]
 2317|     42|                  ->pCpeStaticData->jointStereoPersistentData
 2318|     42|                  .spectralCoeffs[ch2] =
 2319|     42|                  self->pAacDecoderStaticChannelInfo[ch]
 2320|     42|                      ->concealmentInfo.spectralCoefficient;
 2321|     42|              self->pAacDecoderStaticChannelInfo[ch]
 2322|     42|                  ->pCpeStaticData->jointStereoPersistentData.specScale[ch2] =
 2323|     42|                  self->pAacDecoderStaticChannelInfo[ch]
 2324|     42|                      ->concealmentInfo.specScale;
 2325|     42|              self->pAacDecoderStaticChannelInfo[ch]
 2326|     42|                  ->pCpeStaticData->jointStereoPersistentData.scratchBuffer =
 2327|     42|                  (FIXP_DBL *)self->pTimeData2;
 2328|     42|            }
 2329|  1.98k|            chIdx++;
 2330|  1.98k|            ch++;
 2331|  1.98k|          } /* for each channel in current element */
 2332|  3.80k|          if (complexStereoPredPossible && (elCh == 2)) {
  ------------------
  |  Branch (2332:15): [True: 97, False: 3.70k]
  |  Branch (2332:44): [True: 21, False: 76]
  ------------------
 2333|       |            /* needed once for all channels */
 2334|     21|            if (self->pAacDecoderChannelInfo[ch - 1]
  ------------------
  |  Branch (2334:17): [True: 21, False: 0]
  ------------------
 2335|     21|                    ->pComStaticData->cplxPredictionData == NULL) {
 2336|     21|              self->pAacDecoderChannelInfo[ch - 1]
 2337|     21|                  ->pComStaticData->cplxPredictionData =
 2338|     21|                  GetCplxPredictionData();
 2339|     21|            }
 2340|     21|            if (self->pAacDecoderChannelInfo[ch - 1]
  ------------------
  |  Branch (2340:17): [True: 0, False: 21]
  ------------------
 2341|     21|                    ->pComStaticData->cplxPredictionData == NULL) {
 2342|      0|              goto bail;
 2343|      0|            }
 2344|     21|          }
 2345|  3.80k|          if (elCh > 0) {
  ------------------
  |  Branch (2345:15): [True: 1.94k, False: 1.86k]
  ------------------
 2346|  1.94k|            self->pAacDecoderStaticChannelInfo[ch - elCh]->nfRandomSeed =
 2347|  1.94k|                (ULONG)0x3039;
 2348|  1.94k|            if (self->elements[el2] == ID_USAC_CPE) {
  ------------------
  |  Branch (2348:17): [True: 53, False: 1.88k]
  ------------------
 2349|     53|              if (asc->m_sc.m_usacConfig.element[el2].m_stereoConfigIndex !=
  ------------------
  |  Branch (2349:19): [True: 45, False: 8]
  ------------------
 2350|     53|                  1) {
 2351|     45|                self->pAacDecoderStaticChannelInfo[ch - elCh + 1]
 2352|     45|                    ->nfRandomSeed = (ULONG)0x10932;
 2353|     45|              }
 2354|     53|            }
 2355|  1.94k|          }
 2356|  3.80k|        } /* for each element */
 2357|  1.94k|      }
 2358|       |
 2359|  2.84k|      if (ascChannels != self->aacChannels) {
  ------------------
  |  Branch (2359:11): [True: 2.84k, False: 0]
  ------------------
 2360|       |        /* Make allocated channel count persistent in decoder context. */
 2361|  2.84k|        self->aacChannels = aacChannelsOffset + ch;
 2362|  2.84k|      }
 2363|  2.84k|    }
 2364|       |
 2365|  2.84k|    if (usacResidualDelayCompSamples) {
  ------------------
  |  Branch (2365:9): [True: 8, False: 2.84k]
  ------------------
 2366|      8|      INT delayErr = FDK_Delay_Create(&self->usacResidualDelay,
 2367|      8|                                      (USHORT)usacResidualDelayCompSamples, 1);
 2368|      8|      if (delayErr) {
  ------------------
  |  Branch (2368:11): [True: 0, False: 8]
  ------------------
 2369|      0|        goto bail;
 2370|      0|      }
 2371|      8|    }
 2372|       |
 2373|       |    /* Make amount of signalled channels persistent in decoder context. */
 2374|  2.84k|    self->ascChannels[streamIndex] = ascChannels;
 2375|       |    /* Init the previous channel count values. This is required to avoid a
 2376|       |       mismatch of memory accesses in the error concealment module and the
 2377|       |       allocated channel structures in this function. */
 2378|  2.84k|    self->aacChannelsPrev = 0;
 2379|  2.84k|  }
 2380|       |
 2381|  2.84k|  if (self->pAacDecoderChannelInfo[0] != NULL) {
  ------------------
  |  Branch (2381:7): [True: 2.84k, False: 0]
  ------------------
 2382|  2.84k|    self->pDrmBsBuffer = self->pAacDecoderChannelInfo[0]
 2383|  2.84k|                             ->pComStaticData->pWorkBufferCore1->DrmBsBuffer;
 2384|  2.84k|    self->drmBsBufferSize = DRM_BS_BUFFER_SIZE;
  ------------------
  |  |  136|  2.84k|  (512) /* size of the dynamic buffer which is used to reverse the bits of \
  ------------------
 2385|  2.84k|  }
 2386|       |
 2387|       |  /* Update structures */
 2388|  2.84k|  if (*configChanged) {
  ------------------
  |  Branch (2388:7): [True: 2.84k, False: 0]
  ------------------
 2389|       |    /* Things to be done for each channel, which do not involve allocating
 2390|       |       memory. Doing these things only on the channels needed for the current
 2391|       |       configuration (ascChannels) could lead to memory access violation later
 2392|       |       (error concealment). */
 2393|  2.84k|    int ch = 0;
 2394|  2.84k|    int chIdx = 0;
 2395|  8.64k|    for (int _ch = 0; _ch < self->ascChannels[streamIndex]; _ch++) {
  ------------------
  |  Branch (2395:23): [True: 5.79k, False: 2.84k]
  ------------------
 2396|  5.79k|      switch (self->streamInfo.aot) {
 2397|  1.15k|        case AOT_ER_AAC_ELD:
  ------------------
  |  Branch (2397:9): [True: 1.15k, False: 4.64k]
  ------------------
 2398|  1.48k|        case AOT_ER_AAC_LD:
  ------------------
  |  Branch (2398:9): [True: 334, False: 5.45k]
  ------------------
 2399|  1.48k|          self->pAacDecoderChannelInfo[ch]->granuleLength =
 2400|  1.48k|              self->streamInfo.aacSamplesPerFrame;
 2401|  1.48k|          break;
 2402|  4.30k|        default:
  ------------------
  |  Branch (2402:9): [True: 4.30k, False: 1.48k]
  ------------------
 2403|  4.30k|          self->pAacDecoderChannelInfo[ch]->granuleLength =
 2404|  4.30k|              self->streamInfo.aacSamplesPerFrame / 8;
 2405|  4.30k|          break;
 2406|  5.79k|      }
 2407|  5.79k|      self->pAacDecoderChannelInfo[ch]->renderMode = initRenderMode;
 2408|       |
 2409|  5.79k|      mdct_init(&self->pAacDecoderStaticChannelInfo[ch]->IMdct,
 2410|  5.79k|                self->pAacDecoderStaticChannelInfo[ch]->pOverlapBuffer,
 2411|  5.79k|                OverlapBufferSize);
  ------------------
  |  |  109|  5.79k|#define OverlapBufferSize (768)
  ------------------
 2412|       |
 2413|  5.79k|      self->pAacDecoderStaticChannelInfo[ch]->last_core_mode = FD_LONG;
 2414|  5.79k|      self->pAacDecoderStaticChannelInfo[ch]->last_lpd_mode = 255;
 2415|       |
 2416|  5.79k|      self->pAacDecoderStaticChannelInfo[ch]->last_tcx_pitch = L_DIV;
  ------------------
  |  |  192|  5.79k|#define L_DIV L_DIV_1024
  |  |  ------------------
  |  |  |  |  158|  5.79k|  (L_FRAME_PLUS_1024 / NB_DIV) /* length of one acelp or tcx20 frame */
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|  5.79k|#define L_FRAME_PLUS_1024 1024 /* length of one 80ms superframe */
  |  |  |  |  ------------------
  |  |  |  |                 (L_FRAME_PLUS_1024 / NB_DIV) /* length of one acelp or tcx20 frame */
  |  |  |  |  ------------------
  |  |  |  |  |  |  145|  5.79k|#define NB_DIV 4   /* number of division (20ms) per 80ms frame */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2417|       |
 2418|       |      /* Reset DRC control data for this channel */
 2419|  5.79k|      aacDecoder_drcInitChannelData(
 2420|  5.79k|          &self->pAacDecoderStaticChannelInfo[ch]->drcData);
 2421|       |
 2422|       |      /* Delete mixdown metadata from the past */
 2423|  5.79k|      pcmDmx_Reset(self->hPcmUtils, PCMDMX_RESET_BS_DATA);
  ------------------
  |  |  324|  5.79k|#define PCMDMX_RESET_BS_DATA (2)
  ------------------
 2424|       |
 2425|       |      /* Reset concealment only if ASC changed. Otherwise it will be done with
 2426|       |         any config callback. E.g. every time the LATM SMC is present. */
 2427|  5.79k|      CConcealment_InitChannelData(
 2428|  5.79k|          &self->pAacDecoderStaticChannelInfo[ch]->concealmentInfo,
 2429|  5.79k|          &self->concealCommonData, initRenderMode,
 2430|  5.79k|          self->streamInfo.aacSamplesPerFrame);
 2431|  5.79k|      ch++;
 2432|  5.79k|      chIdx++;
 2433|  5.79k|    }
 2434|  2.84k|  }
 2435|       |
 2436|  2.84k|  if (*configChanged) {
  ------------------
  |  Branch (2436:7): [True: 2.84k, False: 0]
  ------------------
 2437|  2.84k|    int drcDecSampleRate, drcDecFrameSize;
 2438|       |
 2439|  2.84k|    if (self->streamInfo.extSamplingRate != 0) {
  ------------------
  |  Branch (2439:9): [True: 961, False: 1.88k]
  ------------------
 2440|    961|      drcDecSampleRate = self->streamInfo.extSamplingRate;
 2441|    961|      drcDecFrameSize = (self->streamInfo.aacSamplesPerFrame *
 2442|    961|                         self->streamInfo.extSamplingRate) /
 2443|    961|                        self->streamInfo.aacSampleRate;
 2444|  1.88k|    } else {
 2445|  1.88k|      drcDecSampleRate = self->streamInfo.aacSampleRate;
 2446|  1.88k|      drcDecFrameSize = self->streamInfo.aacSamplesPerFrame;
 2447|  1.88k|    }
 2448|       |
 2449|  2.84k|    if (FDK_drcDec_Init(self->hUniDrcDecoder, drcDecFrameSize, drcDecSampleRate,
  ------------------
  |  Branch (2449:9): [True: 0, False: 2.84k]
  ------------------
 2450|  2.84k|                        self->aacChannels) != 0)
 2451|      0|      goto bail;
 2452|  2.84k|  }
 2453|       |
 2454|  2.84k|  if (*configChanged) {
  ------------------
  |  Branch (2454:7): [True: 2.84k, False: 0]
  ------------------
 2455|  2.84k|    if (asc->m_aot == AOT_USAC) {
  ------------------
  |  Branch (2455:9): [True: 1.94k, False: 907]
  ------------------
 2456|  1.94k|      aacDecoder_drcDisable(self->hDrcInfo);
 2457|  1.94k|    }
 2458|  2.84k|  }
 2459|       |
 2460|  2.84k|  if (asc->m_aot == AOT_USAC) {
  ------------------
  |  Branch (2460:7): [True: 1.94k, False: 907]
  ------------------
 2461|  1.94k|    pcmLimiter_SetAttack(self->hLimiter, (5));
 2462|  1.94k|    pcmLimiter_SetThreshold(self->hLimiter, FL2FXCONST_DBL(0.89125094f));
  ------------------
  |  |  192|  1.94k|  (FIXP_DBL)(                                                                \
  |  |  193|  1.94k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 1.94k, Folded]
  |  |  ------------------
  |  |  194|  1.94k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  1.94k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.94k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 1.94k]
  |  |  ------------------
  |  |  195|  1.94k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  1.94k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  1.94k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  1.94k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  1.94k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.94k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  1.94k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2463|  1.94k|  }
 2464|       |
 2465|  2.84k|  CAacDecoder_AcceptFlags(self, asc, flags, elFlags, streamIndex,
 2466|  2.84k|                          elementOffset);
 2467|  2.84k|  self->sbrEnabled = sbrEnabled;
 2468|  2.84k|  self->sbrEnabledPrev = sbrEnabledPrev;
 2469|  2.84k|  self->mpsEnableCurr = mpsEnableCurr;
 2470|       |
 2471|       |  /* Update externally visible copy of flags */
 2472|  2.84k|  self->streamInfo.flags = self->flags[0];
 2473|       |
 2474|  2.84k|  return err;
 2475|       |
 2476|      0|bail:
 2477|      0|  CAacDecoder_DeInit(self, 0);
 2478|      0|  return AAC_DEC_OUT_OF_MEMORY;
 2479|  2.84k|}
aacdecoder.cpp:_ZL24CAacDecoder_AncDataResetP8CAncData:
  321|  7.39k|static AAC_DECODER_ERROR CAacDecoder_AncDataReset(CAncData *ancData) {
  322|  7.39k|  int i;
  323|  66.5k|  for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (323:15): [True: 59.1k, False: 7.39k]
  ------------------
  324|  59.1k|    ancData->offset[i] = 0;
  325|  59.1k|  }
  326|  7.39k|  ancData->nrElements = 0;
  327|       |
  328|  7.39k|  return AAC_DEC_OK;
  329|  7.39k|}
aacdecoder.cpp:_ZL15CStreamInfoInitP11CStreamInfo:
 1239|  7.39k|static void CStreamInfoInit(CStreamInfo *pStreamInfo) {
 1240|  7.39k|  pStreamInfo->aacSampleRate = 0;
 1241|  7.39k|  pStreamInfo->profile = -1;
 1242|  7.39k|  pStreamInfo->aot = AOT_NONE;
 1243|       |
 1244|  7.39k|  pStreamInfo->channelConfig = -1;
 1245|  7.39k|  pStreamInfo->bitRate = 0;
 1246|  7.39k|  pStreamInfo->aacSamplesPerFrame = 0;
 1247|       |
 1248|  7.39k|  pStreamInfo->extAot = AOT_NONE;
 1249|  7.39k|  pStreamInfo->extSamplingRate = 0;
 1250|       |
 1251|  7.39k|  pStreamInfo->flags = 0;
 1252|       |
 1253|  7.39k|  pStreamInfo->epConfig = -1; /* default: no ER */
 1254|       |
 1255|  7.39k|  pStreamInfo->numChannels = 0;
 1256|  7.39k|  pStreamInfo->sampleRate = 0;
 1257|  7.39k|  pStreamInfo->frameSize = 0;
 1258|       |
 1259|  7.39k|  pStreamInfo->outputDelay = 0;
 1260|       |
 1261|       |  /* DRC */
 1262|  7.39k|  pStreamInfo->drcProgRefLev =
 1263|  7.39k|      -1; /* set program reference level to not indicated */
 1264|  7.39k|  pStreamInfo->drcPresMode = -1; /* default: presentation mode not indicated */
 1265|       |
 1266|  7.39k|  pStreamInfo->outputLoudness = -1; /* default: no loudness metadata present */
 1267|  7.39k|}
aacdecoder.cpp:_ZL18CAacDecoder_DeInitP20AAC_DECODER_INSTANCEi:
 1343|  10.4k|                               const int subStreamIndex) {
 1344|  10.4k|  int ch;
 1345|  10.4k|  int aacChannelOffset = 0, aacChannels = (8);
 1346|  10.4k|  int numElements = (3 * ((8) * 2) + (((8) * 2)) / 2 + 4 * (1) + 1),
 1347|  10.4k|      elementOffset = 0;
 1348|       |
 1349|  10.4k|  if (self == NULL) return;
  ------------------
  |  Branch (1349:7): [True: 0, False: 10.4k]
  ------------------
 1350|       |
 1351|  10.4k|  {
 1352|  10.4k|    self->ascChannels[0] = 0;
 1353|  10.4k|    self->elements[0] = ID_END;
 1354|  10.4k|  }
 1355|       |
 1356|  94.0k|  for (ch = aacChannelOffset; ch < aacChannelOffset + aacChannels; ch++) {
  ------------------
  |  Branch (1356:31): [True: 83.6k, False: 10.4k]
  ------------------
 1357|  83.6k|    if (self->pAacDecoderChannelInfo[ch] != NULL) {
  ------------------
  |  Branch (1357:9): [True: 5.79k, False: 77.8k]
  ------------------
 1358|  5.79k|      if (self->pAacDecoderChannelInfo[ch]->pComStaticData != NULL) {
  ------------------
  |  Branch (1358:11): [True: 4.51k, False: 1.28k]
  ------------------
 1359|  4.51k|        if (self->pAacDecoderChannelInfo[ch]
  ------------------
  |  Branch (1359:13): [True: 4.51k, False: 0]
  ------------------
 1360|  4.51k|                ->pComStaticData->pWorkBufferCore1 != NULL) {
 1361|  4.51k|          if (ch == aacChannelOffset) {
  ------------------
  |  Branch (1361:15): [True: 2.84k, False: 1.66k]
  ------------------
 1362|  2.84k|            FreeWorkBufferCore1(&self->pAacDecoderChannelInfo[ch]
 1363|  2.84k|                                     ->pComStaticData->pWorkBufferCore1);
 1364|  2.84k|          }
 1365|  4.51k|        }
 1366|  4.51k|        if (self->pAacDecoderChannelInfo[ch]
  ------------------
  |  Branch (1366:13): [True: 21, False: 4.49k]
  ------------------
 1367|  4.51k|                ->pComStaticData->cplxPredictionData != NULL) {
 1368|     21|          FreeCplxPredictionData(&self->pAacDecoderChannelInfo[ch]
 1369|     21|                                      ->pComStaticData->cplxPredictionData);
 1370|     21|        }
 1371|       |        /* Avoid double free of linked pComStaticData in case of CPE by settings
 1372|       |         * pointer to NULL. */
 1373|  4.51k|        if (ch < (8) - 1) {
  ------------------
  |  Branch (1373:13): [True: 4.35k, False: 160]
  ------------------
 1374|  4.35k|          if ((self->pAacDecoderChannelInfo[ch + 1] != NULL) &&
  ------------------
  |  Branch (1374:15): [True: 2.04k, False: 2.30k]
  ------------------
 1375|  2.04k|              (self->pAacDecoderChannelInfo[ch + 1]->pComStaticData ==
  ------------------
  |  Branch (1375:15): [True: 1.28k, False: 768]
  ------------------
 1376|  2.04k|               self->pAacDecoderChannelInfo[ch]->pComStaticData)) {
 1377|  1.28k|            self->pAacDecoderChannelInfo[ch + 1]->pComStaticData = NULL;
 1378|  1.28k|          }
 1379|  4.35k|        }
 1380|  4.51k|        FDKfree(self->pAacDecoderChannelInfo[ch]->pComStaticData);
 1381|  4.51k|        self->pAacDecoderChannelInfo[ch]->pComStaticData = NULL;
 1382|  4.51k|      }
 1383|  5.79k|      if (self->pAacDecoderChannelInfo[ch]->pComData != NULL) {
  ------------------
  |  Branch (1383:11): [True: 4.51k, False: 1.28k]
  ------------------
 1384|       |        /* Avoid double free of linked pComData in case of CPE by settings
 1385|       |         * pointer to NULL. */
 1386|  4.51k|        if (ch < (8) - 1) {
  ------------------
  |  Branch (1386:13): [True: 4.35k, False: 160]
  ------------------
 1387|  4.35k|          if ((self->pAacDecoderChannelInfo[ch + 1] != NULL) &&
  ------------------
  |  Branch (1387:15): [True: 2.04k, False: 2.30k]
  ------------------
 1388|  2.04k|              (self->pAacDecoderChannelInfo[ch + 1]->pComData ==
  ------------------
  |  Branch (1388:15): [True: 1.28k, False: 768]
  ------------------
 1389|  2.04k|               self->pAacDecoderChannelInfo[ch]->pComData)) {
 1390|  1.28k|            self->pAacDecoderChannelInfo[ch + 1]->pComData = NULL;
 1391|  1.28k|          }
 1392|  4.35k|        }
 1393|  4.51k|        if (ch == aacChannelOffset) {
  ------------------
  |  Branch (1393:13): [True: 2.84k, False: 1.66k]
  ------------------
 1394|  2.84k|          FreeWorkBufferCore6(
 1395|  2.84k|              (SCHAR **)&self->pAacDecoderChannelInfo[ch]->pComData);
 1396|  2.84k|        } else {
 1397|  1.66k|          FDKafree(self->pAacDecoderChannelInfo[ch]->pComData);
 1398|  1.66k|        }
 1399|  4.51k|        self->pAacDecoderChannelInfo[ch]->pComData = NULL;
 1400|  4.51k|      }
 1401|  5.79k|    }
 1402|  83.6k|    if (self->pAacDecoderStaticChannelInfo[ch] != NULL) {
  ------------------
  |  Branch (1402:9): [True: 5.79k, False: 77.8k]
  ------------------
 1403|  5.79k|      if (self->pAacDecoderStaticChannelInfo[ch]->pOverlapBuffer != NULL) {
  ------------------
  |  Branch (1403:11): [True: 5.79k, False: 0]
  ------------------
 1404|  5.79k|        FreeOverlapBuffer(
 1405|  5.79k|            &self->pAacDecoderStaticChannelInfo[ch]->pOverlapBuffer);
 1406|  5.79k|      }
 1407|  5.79k|      if (self->pAacDecoderStaticChannelInfo[ch]->hArCo != NULL) {
  ------------------
  |  Branch (1407:11): [True: 1.98k, False: 3.80k]
  ------------------
 1408|  1.98k|        CArco_Destroy(self->pAacDecoderStaticChannelInfo[ch]->hArCo);
 1409|  1.98k|      }
 1410|  5.79k|      FreeAacDecoderStaticChannelInfo(&self->pAacDecoderStaticChannelInfo[ch]);
 1411|  5.79k|    }
 1412|  83.6k|    if (self->pAacDecoderChannelInfo[ch] != NULL) {
  ------------------
  |  Branch (1412:9): [True: 5.79k, False: 77.8k]
  ------------------
 1413|  5.79k|      FreeAacDecoderChannelInfo(&self->pAacDecoderChannelInfo[ch]);
 1414|  5.79k|    }
 1415|  83.6k|  }
 1416|       |
 1417|  10.4k|  {
 1418|  10.4k|    int el;
 1419|   648k|    for (el = elementOffset; el < elementOffset + numElements; el++) {
  ------------------
  |  Branch (1419:30): [True: 637k, False: 10.4k]
  ------------------
 1420|   637k|      if (self->cpeStaticData[el] != NULL) {
  ------------------
  |  Branch (1420:11): [True: 21, False: 637k]
  ------------------
 1421|     21|        FreeCpePersistentData(&self->cpeStaticData[el]);
 1422|     21|      }
 1423|   637k|    }
 1424|  10.4k|  }
 1425|       |
 1426|  10.4k|  FDK_Delay_Destroy(&self->usacResidualDelay);
 1427|       |
 1428|  10.4k|  self->aacChannels = 0;
 1429|  10.4k|  self->streamInfo.aacSampleRate = 0;
 1430|  10.4k|  self->streamInfo.sampleRate = 0;
 1431|       |  /* This samplerate value is checked for configuration change, not the others
 1432|       |   * above. */
 1433|  10.4k|  self->samplingRateInfo[subStreamIndex].samplingRate = 0;
 1434|  10.4k|}
aacdecoder.cpp:_ZL23CAacDecoder_AcceptFlagsP20AAC_DECODER_INSTANCEPK21CSAudioSpecificConfigjPjii:
 1451|  5.91k|                                    int elementOffset) {
 1452|  5.91k|  FDKmemcpy(self->elFlags, elFlags, sizeof(self->elFlags));
 1453|       |
 1454|  5.91k|  self->flags[streamIndex] = flags;
 1455|  5.91k|}
aacdecoder.cpp:_ZL25CAacDecoder_GetELChannels14MP4_ELEMENT_IDh:
  286|  4.51k|                                     UCHAR usacStereoConfigIndex) {
  287|  4.51k|  int el_channels = 0;
  288|       |
  289|  4.51k|  switch (type) {
  290|     53|    case ID_USAC_CPE:
  ------------------
  |  Branch (290:5): [True: 53, False: 4.45k]
  ------------------
  291|     53|      if (usacStereoConfigIndex == 1) {
  ------------------
  |  Branch (291:11): [True: 8, False: 45]
  ------------------
  292|      8|        el_channels = 1;
  293|     45|      } else {
  294|     45|        el_channels = 2;
  295|     45|      }
  296|     53|      break;
  297|  1.23k|    case ID_CPE:
  ------------------
  |  Branch (297:5): [True: 1.23k, False: 3.27k]
  ------------------
  298|  1.23k|      el_channels = 2;
  299|  1.23k|      break;
  300|  1.88k|    case ID_USAC_SCE:
  ------------------
  |  Branch (300:5): [True: 1.88k, False: 2.62k]
  ------------------
  301|  1.88k|    case ID_USAC_LFE:
  ------------------
  |  Branch (301:5): [True: 0, False: 4.51k]
  ------------------
  302|  2.91k|    case ID_SCE:
  ------------------
  |  Branch (302:5): [True: 1.02k, False: 3.48k]
  ------------------
  303|  3.22k|    case ID_LFE:
  ------------------
  |  Branch (303:5): [True: 310, False: 4.20k]
  ------------------
  304|  3.22k|      el_channels = 1;
  305|  3.22k|      break;
  306|      0|    default:
  ------------------
  |  Branch (306:5): [True: 0, False: 4.51k]
  ------------------
  307|      0|      el_channels = 0;
  308|      0|      break;
  309|  4.51k|  }
  310|       |
  311|  4.51k|  return el_channels;
  312|  4.51k|}

aacDecoder_ConfigRaw:
  194|  7.39k|                                                    const UINT length[]) {
  195|  7.39k|  AAC_DECODER_ERROR err = AAC_DEC_OK;
  196|  7.39k|  TRANSPORTDEC_ERROR errTp;
  197|  7.39k|  UINT layer, nrOfLayers = self->nrOfLayers;
  198|       |
  199|  10.2k|  for (layer = 0; layer < nrOfLayers; layer++) {
  ------------------
  |  Branch (199:19): [True: 7.39k, False: 2.84k]
  ------------------
  200|  7.39k|    if (length[layer] > 0) {
  ------------------
  |  Branch (200:9): [True: 7.39k, False: 0]
  ------------------
  201|  7.39k|      errTp = transportDec_OutOfBandConfig(self->hInput, conf[layer],
  202|  7.39k|                                           length[layer], layer);
  203|  7.39k|      if (errTp != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (203:11): [True: 4.54k, False: 2.84k]
  ------------------
  204|  4.54k|        switch (errTp) {
  205|      0|          case TRANSPORTDEC_NEED_TO_RESTART:
  ------------------
  |  Branch (205:11): [True: 0, False: 4.54k]
  ------------------
  206|      0|            err = AAC_DEC_NEED_TO_RESTART;
  207|      0|            break;
  208|    133|          case TRANSPORTDEC_UNSUPPORTED_FORMAT:
  ------------------
  |  Branch (208:11): [True: 133, False: 4.40k]
  ------------------
  209|    133|            err = AAC_DEC_UNSUPPORTED_FORMAT;
  210|    133|            break;
  211|  4.40k|          default:
  ------------------
  |  Branch (211:11): [True: 4.40k, False: 133]
  ------------------
  212|  4.40k|            err = AAC_DEC_UNKNOWN;
  213|  4.40k|            break;
  214|  4.54k|        }
  215|       |        /* if baselayer is OK we continue decoding */
  216|  4.54k|        if (layer >= 1) {
  ------------------
  |  Branch (216:13): [True: 0, False: 4.54k]
  ------------------
  217|      0|          self->nrOfLayers = layer;
  218|      0|          err = AAC_DEC_OK;
  219|      0|        }
  220|  4.54k|        break;
  221|  4.54k|      }
  222|  7.39k|    }
  223|  7.39k|  }
  224|       |
  225|  7.39k|  return err;
  226|  7.39k|}
aacDecoder_Open:
  957|  7.39k|                                               UINT nrOfLayers) {
  958|  7.39k|  AAC_DECODER_INSTANCE *aacDec = NULL;
  959|  7.39k|  HANDLE_TRANSPORTDEC pIn;
  960|  7.39k|  int err = 0;
  961|  7.39k|  int stereoConfigIndex = -1;
  962|       |
  963|  7.39k|  UINT nrOfLayers_min = fMin(nrOfLayers, (UINT)1);
  964|       |
  965|       |  /* Allocate transport layer struct. */
  966|  7.39k|  pIn = transportDec_Open(transportFmt, TP_FLAG_MPEG4, nrOfLayers_min);
  ------------------
  |  |  322|  7.39k|#define TP_FLAG_MPEG4 1
  ------------------
  967|  7.39k|  if (pIn == NULL) {
  ------------------
  |  Branch (967:7): [True: 0, False: 7.39k]
  ------------------
  968|      0|    return NULL;
  969|      0|  }
  970|       |
  971|       |  /* Allocate AAC decoder core struct. */
  972|  7.39k|  aacDec = CAacDecoder_Open(transportFmt);
  973|       |
  974|  7.39k|  if (aacDec == NULL) {
  ------------------
  |  Branch (974:7): [True: 0, False: 7.39k]
  ------------------
  975|      0|    transportDec_Close(&pIn);
  976|      0|    goto bail;
  977|      0|  }
  978|  7.39k|  aacDec->hInput = pIn;
  979|       |
  980|  7.39k|  aacDec->nrOfLayers = nrOfLayers_min;
  981|       |
  982|       |  /* Setup channel mapping descriptor. */
  983|  7.39k|  FDK_chMapDescr_init(&aacDec->mapDescr, NULL, 0, 0);
  984|       |
  985|       |  /* Register Config Update callback. */
  986|  7.39k|  transportDec_RegisterAscCallback(pIn, aacDecoder_ConfigCallback,
  987|  7.39k|                                   (void *)aacDec);
  988|       |
  989|       |  /* Register Free Memory callback. */
  990|  7.39k|  transportDec_RegisterFreeMemCallback(pIn, aacDecoder_FreeMemCallback,
  991|  7.39k|                                       (void *)aacDec);
  992|       |
  993|       |  /* Register config switch control callback. */
  994|  7.39k|  transportDec_RegisterCtrlCFGChangeCallback(
  995|  7.39k|      pIn, aacDecoder_CtrlCFGChangeCallback, (void *)aacDec);
  996|       |
  997|  7.39k|  FDKmemclear(&aacDec->qmfDomain, sizeof(FDK_QMF_DOMAIN));
  998|       |  /* open SBR decoder */
  999|  7.39k|  if (SBRDEC_OK != sbrDecoder_Open(&aacDec->hSbrDecoder, &aacDec->qmfDomain)) {
  ------------------
  |  Branch (999:7): [True: 0, False: 7.39k]
  ------------------
 1000|      0|    err = -1;
 1001|      0|    goto bail;
 1002|      0|  }
 1003|  7.39k|  aacDec->qmfModeUser = NOT_DEFINED;
 1004|  7.39k|  transportDec_RegisterSbrCallback(aacDec->hInput, aacDecoder_SbrCallback,
 1005|  7.39k|                                   (void *)aacDec->hSbrDecoder);
 1006|       |
 1007|  7.39k|  if (mpegSurroundDecoder_Open(
  ------------------
  |  Branch (1007:7): [True: 0, False: 7.39k]
  ------------------
 1008|  7.39k|          (CMpegSurroundDecoder **)&aacDec->pMpegSurroundDecoder,
 1009|  7.39k|          stereoConfigIndex, &aacDec->qmfDomain)) {
 1010|      0|    err = -1;
 1011|      0|    goto bail;
 1012|      0|  }
 1013|       |  /* Set MPEG Surround defaults */
 1014|  7.39k|  aacDec->mpsEnableUser = 0;
 1015|  7.39k|  aacDec->mpsEnableCurr = 0;
 1016|  7.39k|  aacDec->mpsApplicable = 0;
 1017|  7.39k|  aacDec->mpsOutputMode = (SCHAR)SACDEC_OUT_MODE_NORMAL;
 1018|  7.39k|  transportDec_RegisterSscCallback(pIn, aacDecoder_SscCallback, (void *)aacDec);
 1019|       |
 1020|  7.39k|  {
 1021|  7.39k|    if (FDK_drcDec_Open(&(aacDec->hUniDrcDecoder), DRC_DEC_ALL) != 0) {
  ------------------
  |  Branch (1021:9): [True: 0, False: 7.39k]
  ------------------
 1022|      0|      err = -1;
 1023|      0|      goto bail;
 1024|      0|    }
 1025|  7.39k|  }
 1026|       |
 1027|  7.39k|  transportDec_RegisterUniDrcConfigCallback(pIn, aacDecoder_UniDrcCallback,
 1028|  7.39k|                                            (void *)aacDec,
 1029|  7.39k|                                            aacDec->loudnessInfoSetPosition);
 1030|  7.39k|  aacDec->defaultTargetLoudness = (SCHAR)96;
 1031|       |
 1032|  7.39k|  pcmDmx_Open(&aacDec->hPcmUtils);
 1033|  7.39k|  if (aacDec->hPcmUtils == NULL) {
  ------------------
  |  Branch (1033:7): [True: 0, False: 7.39k]
  ------------------
 1034|      0|    err = -1;
 1035|      0|    goto bail;
 1036|      0|  }
 1037|       |
 1038|  7.39k|  aacDec->hLimiter =
 1039|  7.39k|      pcmLimiter_Create(TDL_ATTACK_DEFAULT_MS, TDL_RELEASE_DEFAULT_MS,
  ------------------
  |  |  109|  7.39k|#define TDL_ATTACK_DEFAULT_MS (15)  /* default attack  time in ms */
  ------------------
                    pcmLimiter_Create(TDL_ATTACK_DEFAULT_MS, TDL_RELEASE_DEFAULT_MS,
  ------------------
  |  |  110|  7.39k|#define TDL_RELEASE_DEFAULT_MS (50) /* default release time in ms */
  ------------------
 1040|  7.39k|                        (FIXP_DBL)MAXVAL_DBL, (8), 96000);
  ------------------
  |  |  156|  7.39k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
 1041|  7.39k|  if (NULL == aacDec->hLimiter) {
  ------------------
  |  Branch (1041:7): [True: 0, False: 7.39k]
  ------------------
 1042|      0|    err = -1;
 1043|      0|    goto bail;
 1044|      0|  }
 1045|  7.39k|  aacDec->limiterEnableUser = (UCHAR)-1;
 1046|  7.39k|  aacDec->limiterEnableCurr = 0;
 1047|       |
 1048|       |  /* Assure that all modules have same delay */
 1049|  7.39k|  if (setConcealMethod(aacDec,
  ------------------
  |  Branch (1049:7): [True: 0, False: 7.39k]
  ------------------
 1050|  7.39k|                       CConcealment_GetMethod(&aacDec->concealCommonData))) {
 1051|      0|    err = -1;
 1052|      0|    goto bail;
 1053|      0|  }
 1054|       |
 1055|  7.39k|bail:
 1056|  7.39k|  if (err == -1) {
  ------------------
  |  Branch (1056:7): [True: 0, False: 7.39k]
  ------------------
 1057|      0|    aacDecoder_Close(aacDec);
 1058|       |    aacDec = NULL;
 1059|      0|  }
 1060|  7.39k|  return aacDec;
 1061|  7.39k|}
aacDecoder_Close:
 2044|  7.39k|LINKSPEC_CPP void aacDecoder_Close(HANDLE_AACDECODER self) {
 2045|  7.39k|  if (self == NULL) return;
  ------------------
  |  Branch (2045:7): [True: 0, False: 7.39k]
  ------------------
 2046|       |
 2047|  7.39k|  if (self->hLimiter != NULL) {
  ------------------
  |  Branch (2047:7): [True: 7.39k, False: 0]
  ------------------
 2048|  7.39k|    pcmLimiter_Destroy(self->hLimiter);
 2049|  7.39k|  }
 2050|       |
 2051|  7.39k|  if (self->hPcmUtils != NULL) {
  ------------------
  |  Branch (2051:7): [True: 7.39k, False: 0]
  ------------------
 2052|  7.39k|    pcmDmx_Close(&self->hPcmUtils);
 2053|  7.39k|  }
 2054|       |
 2055|  7.39k|  FDK_drcDec_Close(&self->hUniDrcDecoder);
 2056|       |
 2057|  7.39k|  if (self->pMpegSurroundDecoder != NULL) {
  ------------------
  |  Branch (2057:7): [True: 7.39k, False: 0]
  ------------------
 2058|  7.39k|    mpegSurroundDecoder_Close(
 2059|  7.39k|        (CMpegSurroundDecoder *)self->pMpegSurroundDecoder);
 2060|  7.39k|  }
 2061|       |
 2062|  7.39k|  if (self->hSbrDecoder != NULL) {
  ------------------
  |  Branch (2062:7): [True: 7.39k, False: 0]
  ------------------
 2063|  7.39k|    sbrDecoder_Close(&self->hSbrDecoder);
 2064|  7.39k|  }
 2065|       |
 2066|  7.39k|  if (self->hInput != NULL) {
  ------------------
  |  Branch (2066:7): [True: 7.39k, False: 0]
  ------------------
 2067|  7.39k|    transportDec_Close(&self->hInput);
 2068|  7.39k|  }
 2069|       |
 2070|  7.39k|  CAacDecoder_Close(self);
 2071|  7.39k|}
aacdecoder_lib.cpp:_ZL28aacDecoder_setMetadataExpiryP20AAC_DECODER_INSTANCEi:
  137|  5.91k|                                         const INT value) {
  138|       |  /* check decoder handle */
  139|  5.91k|  if (self != NULL) {
  ------------------
  |  Branch (139:7): [True: 5.91k, False: 0]
  ------------------
  140|  5.91k|    INT mdExpFrame = 0; /* default: disable */
  141|       |
  142|  5.91k|    if ((value > 0) &&
  ------------------
  |  Branch (142:9): [True: 0, False: 5.91k]
  ------------------
  143|      0|        (self->streamInfo.aacSamplesPerFrame >
  ------------------
  |  Branch (143:9): [True: 0, False: 0]
  ------------------
  144|      0|         0)) { /* Determine the corresponding number of frames: */
  145|      0|      FIXP_DBL frameTime = fDivNorm(self->streamInfo.aacSampleRate,
  146|      0|                                    self->streamInfo.aacSamplesPerFrame * 1000);
  147|      0|      mdExpFrame = fMultIceil(frameTime, value);
  148|      0|    }
  149|       |
  150|       |    /* Configure DRC module */
  151|  5.91k|    aacDecoder_drcSetParam(self->hDrcInfo, DRC_DATA_EXPIRY_FRAME, mdExpFrame);
  152|       |
  153|       |    /* Configure PCM downmix module */
  154|  5.91k|    pcmDmx_SetParam(self->hPcmUtils, DMX_BS_DATA_EXPIRY_FRAME, mdExpFrame);
  155|  5.91k|  }
  156|  5.91k|}
aacdecoder_lib.cpp:_ZL16setConcealMethodP20AAC_DECODER_INSTANCEi:
  565|  9.96k|    const INT method) {
  566|  9.96k|  AAC_DECODER_ERROR errorStatus = AAC_DEC_OK;
  567|  9.96k|  CConcealParams *pConcealData = NULL;
  568|  9.96k|  int method_revert = 0;
  569|  9.96k|  HANDLE_SBRDECODER hSbrDec = NULL;
  570|  9.96k|  HANDLE_AAC_DRC hDrcInfo = NULL;
  571|  9.96k|  HANDLE_PCM_DOWNMIX hPcmDmx = NULL;
  572|  9.96k|  CConcealmentMethod backupMethod = ConcealMethodNone;
  573|  9.96k|  int backupDelay = 0;
  574|  9.96k|  int bsDelay = 0;
  575|       |
  576|       |  /* check decoder handle */
  577|  9.96k|  if (self != NULL) {
  ------------------
  |  Branch (577:7): [True: 9.96k, False: 0]
  ------------------
  578|  9.96k|    pConcealData = &self->concealCommonData;
  579|  9.96k|    hSbrDec = self->hSbrDecoder;
  580|  9.96k|    hDrcInfo = self->hDrcInfo;
  581|  9.96k|    hPcmDmx = self->hPcmUtils;
  582|  9.96k|    if (self->flags[0] & (AC_USAC | AC_RSVD50 | AC_RSV603DA) && method >= 2) {
  ------------------
  |  |  307|  9.96k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                  if (self->flags[0] & (AC_USAC | AC_RSVD50 | AC_RSV603DA) && method >= 2) {
  ------------------
  |  |  310|  9.96k|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
                  if (self->flags[0] & (AC_USAC | AC_RSVD50 | AC_RSV603DA) && method >= 2) {
  ------------------
  |  |  308|  9.96k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (582:9): [True: 1.98k, False: 7.97k]
  |  Branch (582:65): [True: 0, False: 1.98k]
  ------------------
  583|       |      /* Interpolation concealment is not implemented for USAC/RSVD50 */
  584|       |      /* errorStatus = AAC_DEC_SET_PARAM_FAIL;
  585|       |         goto bail; */
  586|      0|      method_revert = 1;
  587|      0|    }
  588|  9.96k|    if (self->flags[0] & (AC_USAC | AC_RSVD50 | AC_RSV603DA) && method >= 2) {
  ------------------
  |  |  307|  9.96k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                  if (self->flags[0] & (AC_USAC | AC_RSVD50 | AC_RSV603DA) && method >= 2) {
  ------------------
  |  |  310|  9.96k|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
                  if (self->flags[0] & (AC_USAC | AC_RSVD50 | AC_RSV603DA) && method >= 2) {
  ------------------
  |  |  308|  9.96k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (588:9): [True: 1.98k, False: 7.97k]
  |  Branch (588:65): [True: 0, False: 1.98k]
  ------------------
  589|       |      /* Interpolation concealment is not implemented for USAC/RSVD50 */
  590|      0|      errorStatus = AAC_DEC_SET_PARAM_FAIL;
  591|      0|      goto bail;
  592|      0|    }
  593|  9.96k|  }
  594|       |
  595|       |  /* Get current method/delay */
  596|  9.96k|  backupMethod = CConcealment_GetMethod(pConcealData);
  597|  9.96k|  backupDelay = CConcealment_GetDelay(pConcealData);
  598|       |
  599|       |  /* Be sure to set AAC and SBR concealment method simultaneously! */
  600|  9.96k|  errorStatus = CConcealment_SetParams(
  601|  9.96k|      pConcealData,
  602|  9.96k|      (method_revert == 0) ? (int)method : (int)1,  // concealMethod
  ------------------
  |  Branch (602:7): [True: 9.96k, False: 0]
  ------------------
  603|  9.96k|      AACDEC_CONCEAL_PARAM_NOT_SPECIFIED,           // concealFadeOutSlope
  ------------------
  |  |  108|  9.96k|#define AACDEC_CONCEAL_PARAM_NOT_SPECIFIED (0xFFFE)
  ------------------
  604|  9.96k|      AACDEC_CONCEAL_PARAM_NOT_SPECIFIED,           // concealFadeInSlope
  ------------------
  |  |  108|  9.96k|#define AACDEC_CONCEAL_PARAM_NOT_SPECIFIED (0xFFFE)
  ------------------
  605|  9.96k|      AACDEC_CONCEAL_PARAM_NOT_SPECIFIED,           // concealMuteRelease
  ------------------
  |  |  108|  9.96k|#define AACDEC_CONCEAL_PARAM_NOT_SPECIFIED (0xFFFE)
  ------------------
  606|  9.96k|      AACDEC_CONCEAL_PARAM_NOT_SPECIFIED            // concealComfNoiseLevel
  ------------------
  |  |  108|  9.96k|#define AACDEC_CONCEAL_PARAM_NOT_SPECIFIED (0xFFFE)
  ------------------
  607|  9.96k|  );
  608|  9.96k|  if ((errorStatus != AAC_DEC_OK) && (errorStatus != AAC_DEC_INVALID_HANDLE)) {
  ------------------
  |  Branch (608:7): [True: 0, False: 9.96k]
  |  Branch (608:38): [True: 0, False: 0]
  ------------------
  609|      0|    goto bail;
  610|      0|  }
  611|       |
  612|       |  /* Get new delay */
  613|  9.96k|  bsDelay = CConcealment_GetDelay(pConcealData);
  614|       |
  615|  9.96k|  {
  616|  9.96k|    SBR_ERROR sbrErr = SBRDEC_OK;
  617|       |
  618|       |    /* set SBR bitstream delay */
  619|  9.96k|    sbrErr = sbrDecoder_SetParam(hSbrDec, SBR_SYSTEM_BITSTREAM_DELAY, bsDelay);
  620|       |
  621|  9.96k|    switch (sbrErr) {
  622|  9.96k|      case SBRDEC_OK:
  ------------------
  |  Branch (622:7): [True: 9.96k, False: 0]
  ------------------
  623|  9.96k|      case SBRDEC_NOT_INITIALIZED:
  ------------------
  |  Branch (623:7): [True: 0, False: 9.96k]
  ------------------
  624|  9.96k|        if (self != NULL) {
  ------------------
  |  Branch (624:13): [True: 9.96k, False: 0]
  ------------------
  625|       |          /* save the param value and set later
  626|       |             (when SBR has been initialized) */
  627|  9.96k|          self->sbrParams.bsDelay = bsDelay;
  628|  9.96k|        }
  629|  9.96k|        break;
  630|      0|      default:
  ------------------
  |  Branch (630:7): [True: 0, False: 9.96k]
  ------------------
  631|      0|        errorStatus = AAC_DEC_SET_PARAM_FAIL;
  632|      0|        goto bail;
  633|  9.96k|    }
  634|  9.96k|  }
  635|       |
  636|  9.96k|  errorStatus = aacDecoder_drcSetParam(hDrcInfo, DRC_BS_DELAY, bsDelay);
  637|  9.96k|  if ((errorStatus != AAC_DEC_OK) && (errorStatus != AAC_DEC_INVALID_HANDLE)) {
  ------------------
  |  Branch (637:7): [True: 0, False: 9.96k]
  |  Branch (637:38): [True: 0, False: 0]
  ------------------
  638|      0|    goto bail;
  639|      0|  }
  640|       |
  641|  9.96k|  if (errorStatus == AAC_DEC_OK) {
  ------------------
  |  Branch (641:7): [True: 9.96k, False: 0]
  ------------------
  642|  9.96k|    PCMDMX_ERROR err = pcmDmx_SetParam(hPcmDmx, DMX_BS_DATA_DELAY, bsDelay);
  643|  9.96k|    switch (err) {
  644|      0|      case PCMDMX_INVALID_HANDLE:
  ------------------
  |  Branch (644:7): [True: 0, False: 9.96k]
  ------------------
  645|      0|        errorStatus = AAC_DEC_INVALID_HANDLE;
  646|      0|        break;
  647|  9.96k|      case PCMDMX_OK:
  ------------------
  |  Branch (647:7): [True: 9.96k, False: 0]
  ------------------
  648|  9.96k|        break;
  649|      0|      default:
  ------------------
  |  Branch (649:7): [True: 0, False: 9.96k]
  ------------------
  650|      0|        errorStatus = AAC_DEC_SET_PARAM_FAIL;
  651|      0|        goto bail;
  652|  9.96k|    }
  653|  9.96k|  }
  654|       |
  655|  9.96k|bail:
  656|  9.96k|  if ((errorStatus != AAC_DEC_OK) && (errorStatus != AAC_DEC_INVALID_HANDLE)) {
  ------------------
  |  Branch (656:7): [True: 0, False: 9.96k]
  |  Branch (656:38): [True: 0, False: 0]
  ------------------
  657|       |    /* Revert to the initial state */
  658|      0|    CConcealment_SetParams(
  659|      0|        pConcealData, (int)backupMethod, AACDEC_CONCEAL_PARAM_NOT_SPECIFIED,
  ------------------
  |  |  108|      0|#define AACDEC_CONCEAL_PARAM_NOT_SPECIFIED (0xFFFE)
  ------------------
  660|      0|        AACDEC_CONCEAL_PARAM_NOT_SPECIFIED, AACDEC_CONCEAL_PARAM_NOT_SPECIFIED,
  ------------------
  |  |  108|      0|#define AACDEC_CONCEAL_PARAM_NOT_SPECIFIED (0xFFFE)
  ------------------
                      AACDEC_CONCEAL_PARAM_NOT_SPECIFIED, AACDEC_CONCEAL_PARAM_NOT_SPECIFIED,
  ------------------
  |  |  108|      0|#define AACDEC_CONCEAL_PARAM_NOT_SPECIFIED (0xFFFE)
  ------------------
  661|      0|        AACDEC_CONCEAL_PARAM_NOT_SPECIFIED);
  ------------------
  |  |  108|      0|#define AACDEC_CONCEAL_PARAM_NOT_SPECIFIED (0xFFFE)
  ------------------
  662|       |    /* Revert SBR bitstream delay */
  663|      0|    sbrDecoder_SetParam(hSbrDec, SBR_SYSTEM_BITSTREAM_DELAY, backupDelay);
  664|       |    /* Revert DRC bitstream delay */
  665|      0|    aacDecoder_drcSetParam(hDrcInfo, DRC_BS_DELAY, backupDelay);
  666|       |    /* Revert PCM mixdown bitstream delay */
  667|      0|    pcmDmx_SetParam(hPcmDmx, DMX_BS_DATA_DELAY, backupDelay);
  668|      0|  }
  669|       |
  670|  9.96k|  return errorStatus;
  671|  9.96k|}
aacdecoder_lib.cpp:_ZL25aacDecoder_ConfigCallbackPvPK21CSAudioSpecificConfighPh:
  275|  6.31k|                                     UCHAR configMode, UCHAR *configChanged) {
  276|  6.31k|  HANDLE_AACDECODER self = (HANDLE_AACDECODER)handle;
  277|  6.31k|  AAC_DECODER_ERROR err = AAC_DEC_OK;
  278|  6.31k|  TRANSPORTDEC_ERROR errTp;
  279|       |
  280|  6.31k|  FDK_ASSERT(self != NULL);
  ------------------
  |  |  221|  6.31k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (280:3): [True: 6.31k, False: 0]
  ------------------
  281|  6.31k|  {
  282|  6.31k|    { err = aacDecoder_Config(self, pAscStruct, configMode, configChanged); }
  283|  6.31k|  }
  284|  6.31k|  if (err == AAC_DEC_OK) {
  ------------------
  |  Branch (284:7): [True: 5.91k, False: 404]
  ------------------
  285|       |    /*
  286|       |    revert concealment method if either
  287|       |       - Interpolation concealment might not be meaningful
  288|       |       - Interpolation concealment is not implemented
  289|       |    */
  290|  5.91k|    if ((self->flags[0] & (AC_LD | AC_ELD) &&
  ------------------
  |  |  304|  5.91k|#define AC_LD 0x000020          /*!< AAC-LD */
  ------------------
                  if ((self->flags[0] & (AC_LD | AC_ELD) &&
  ------------------
  |  |  303|  5.91k|#define AC_ELD 0x000010         /*!< AAC-ELD */
  ------------------
  |  Branch (290:10): [True: 1.00k, False: 4.90k]
  ------------------
  291|  1.00k|         (self->concealMethodUser == ConcealMethodNone) &&
  ------------------
  |  Branch (291:10): [True: 1.00k, False: 0]
  ------------------
  292|  1.00k|         CConcealment_GetDelay(&self->concealCommonData) >
  ------------------
  |  Branch (292:10): [True: 587, False: 416]
  ------------------
  293|  1.00k|             0) /* might not be meaningful but allow if user has set it
  294|       |                   expicitly */
  295|  5.32k|        || (self->flags[0] & (AC_USAC | AC_RSVD50 | AC_RSV603DA) &&
  ------------------
  |  |  307|  5.32k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                      || (self->flags[0] & (AC_USAC | AC_RSVD50 | AC_RSV603DA) &&
  ------------------
  |  |  310|  5.32k|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
                      || (self->flags[0] & (AC_USAC | AC_RSVD50 | AC_RSV603DA) &&
  ------------------
  |  |  308|  5.32k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (295:13): [True: 3.92k, False: 1.39k]
  ------------------
  296|  3.92k|            CConcealment_GetDelay(&self->concealCommonData) >
  ------------------
  |  Branch (296:13): [True: 1.98k, False: 1.94k]
  ------------------
  297|  3.92k|                0) /* not implemented */
  298|  5.91k|    ) {
  299|       |      /* Revert to error concealment method Noise Substitution.
  300|       |         Because interpolation is not implemented for USAC or
  301|       |         the additional delay is unwanted for low delay codecs. */
  302|  2.57k|      setConcealMethod(self, 1);
  303|  2.57k|    }
  304|  5.91k|    aacDecoder_setMetadataExpiry(self, self->metadataExpiry);
  305|  5.91k|    errTp = TRANSPORTDEC_OK;
  306|  5.91k|  } else {
  307|    404|    if (err == AAC_DEC_NEED_TO_RESTART) {
  ------------------
  |  Branch (307:9): [True: 0, False: 404]
  ------------------
  308|      0|      errTp = TRANSPORTDEC_NEED_TO_RESTART;
  309|    404|    } else if (IS_INIT_ERROR(err)) {
  ------------------
  |  |  547|    404|  ((((err) >= aac_dec_init_error_start) && ((err) <= aac_dec_init_error_end)) \
  |  |  ------------------
  |  |  |  Branch (547:3): [True: 404, False: 0]
  |  |  |  Branch (547:5): [True: 404, False: 0]
  |  |  |  Branch (547:44): [True: 404, False: 0]
  |  |  ------------------
  |  |  548|    404|       ? 1                                                                    \
  |  |  549|    404|       : 0)
  ------------------
  310|    404|      errTp = TRANSPORTDEC_UNSUPPORTED_FORMAT;
  311|    404|    } /* Fatal errors */
  312|      0|    else {
  313|      0|      errTp = TRANSPORTDEC_UNKOWN_ERROR;
  314|      0|    }
  315|    404|  }
  316|       |
  317|  6.31k|  return errTp;
  318|  6.31k|}
aacdecoder_lib.cpp:_ZL17aacDecoder_ConfigP20AAC_DECODER_INSTANCEPK21CSAudioSpecificConfighPh:
  179|  6.31k|    UCHAR configMode, UCHAR *configChanged) {
  180|  6.31k|  AAC_DECODER_ERROR err;
  181|       |
  182|       |  /* Initialize AAC core decoder, and update self->streaminfo */
  183|  6.31k|  err = CAacDecoder_Init(self, pAscStruct, configMode, configChanged);
  184|       |
  185|  6.31k|  if (!FDK_chMapDescr_isValid(&self->mapDescr)) {
  ------------------
  |  Branch (185:7): [True: 0, False: 6.31k]
  ------------------
  186|      0|    return AAC_DEC_UNSUPPORTED_CHANNELCONFIG;
  187|      0|  }
  188|       |
  189|  6.31k|  return err;
  190|  6.31k|}
aacdecoder_lib.cpp:_ZL26aacDecoder_FreeMemCallbackPvPK21CSAudioSpecificConfig:
  321|  3.06k|                                      const CSAudioSpecificConfig *pAscStruct) {
  322|  3.06k|  TRANSPORTDEC_ERROR errTp = TRANSPORTDEC_OK;
  323|  3.06k|  HANDLE_AACDECODER self = (HANDLE_AACDECODER)handle;
  324|       |
  325|  3.06k|  const int subStreamIndex = 0;
  326|       |
  327|  3.06k|  FDK_ASSERT(self != NULL);
  ------------------
  |  |  221|  3.06k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (327:3): [True: 3.06k, False: 0]
  ------------------
  328|       |
  329|  3.06k|  if (CAacDecoder_FreeMem(self, subStreamIndex) != AAC_DEC_OK) {
  ------------------
  |  Branch (329:7): [True: 0, False: 3.06k]
  ------------------
  330|      0|    errTp = TRANSPORTDEC_UNKOWN_ERROR;
  331|      0|  }
  332|       |
  333|       |  /* free Ram_SbrDecoder and Ram_SbrDecChannel */
  334|  3.06k|  if (self->hSbrDecoder != NULL) {
  ------------------
  |  Branch (334:7): [True: 3.06k, False: 0]
  ------------------
  335|  3.06k|    if (sbrDecoder_FreeMem(&self->hSbrDecoder) != SBRDEC_OK) {
  ------------------
  |  Branch (335:9): [True: 0, False: 3.06k]
  ------------------
  336|      0|      errTp = TRANSPORTDEC_UNKOWN_ERROR;
  337|      0|    }
  338|  3.06k|  }
  339|       |
  340|       |  /* free pSpatialDec and mpsData */
  341|  3.06k|  if (self->pMpegSurroundDecoder != NULL) {
  ------------------
  |  Branch (341:7): [True: 3.06k, False: 0]
  ------------------
  342|  3.06k|    if (mpegSurroundDecoder_FreeMem(
  ------------------
  |  Branch (342:9): [True: 0, False: 3.06k]
  ------------------
  343|  3.06k|            (CMpegSurroundDecoder *)self->pMpegSurroundDecoder) != MPS_OK) {
  344|      0|      errTp = TRANSPORTDEC_UNKOWN_ERROR;
  345|      0|    }
  346|  3.06k|  }
  347|       |
  348|       |  /* free persistent qmf domain buffer, QmfWorkBufferCore3, QmfWorkBufferCore4,
  349|       |   * QmfWorkBufferCore5 and configuration variables */
  350|  3.06k|  FDK_QmfDomain_FreeMem(&self->qmfDomain);
  351|       |
  352|  3.06k|  return errTp;
  353|  3.06k|}
aacdecoder_lib.cpp:_ZL22aacDecoder_SbrCallbackPvP13FDK_BITSTREAMiii17AUDIO_OBJECT_TYPE14MP4_ELEMENT_IDihhhPhi:
  377|  2.79k|    const INT downscaleFactor) {
  378|  2.79k|  HANDLE_SBRDECODER self = (HANDLE_SBRDECODER)handle;
  379|       |
  380|  2.79k|  INT errTp = sbrDecoder_Header(self, hBs, sampleRateIn, sampleRateOut,
  381|  2.79k|                                samplesPerFrame, coreCodec, elementID,
  382|  2.79k|                                elementIndex, harmonicSBR, stereoConfigIndex,
  383|  2.79k|                                configMode, configChanged, downscaleFactor);
  384|       |
  385|  2.79k|  return errTp;
  386|  2.79k|}
aacdecoder_lib.cpp:_ZL22aacDecoder_SscCallbackPvP13FDK_BITSTREAM17AUDIO_OBJECT_TYPEiiiiiihPh:
  392|  1.01k|    const INT configBytes, const UCHAR configMode, UCHAR *configChanged) {
  393|  1.01k|  SACDEC_ERROR err;
  394|  1.01k|  TRANSPORTDEC_ERROR errTp;
  395|  1.01k|  HANDLE_AACDECODER hAacDecoder = (HANDLE_AACDECODER)handle;
  396|       |
  397|  1.01k|  err = mpegSurroundDecoder_Config(
  398|  1.01k|      (CMpegSurroundDecoder *)hAacDecoder->pMpegSurroundDecoder, hBs, coreCodec,
  399|  1.01k|      samplingRate, frameSize, numChannels, stereoConfigIndex,
  400|  1.01k|      coreSbrFrameLengthIndex, configBytes, configMode, configChanged);
  401|       |
  402|  1.01k|  switch (err) {
  403|    267|    case MPS_UNSUPPORTED_CONFIG:
  ------------------
  |  Branch (403:5): [True: 267, False: 748]
  ------------------
  404|       |      /* MPS found but invalid or not decodable by this instance            */
  405|       |      /* We switch off MPS and keep going                                   */
  406|    267|      hAacDecoder->mpsEnableCurr = 0;
  407|    267|      hAacDecoder->mpsApplicable = 0;
  408|    267|      errTp = TRANSPORTDEC_OK;
  409|    267|      break;
  410|    229|    case MPS_PARSE_ERROR:
  ------------------
  |  Branch (410:5): [True: 229, False: 786]
  ------------------
  411|       |      /* MPS found but invalid or not decodable by this instance            */
  412|    229|      hAacDecoder->mpsEnableCurr = 0;
  413|    229|      hAacDecoder->mpsApplicable = 0;
  414|    229|      if ((coreCodec == AOT_USAC) || (coreCodec == AOT_DRM_USAC) ||
  ------------------
  |  Branch (414:11): [True: 28, False: 201]
  |  Branch (414:38): [True: 0, False: 201]
  ------------------
  415|    229|          IS_LOWDELAY(coreCodec)) {
  ------------------
  |  |  228|    201|#define IS_LOWDELAY(aot) ((aot) == AOT_ER_AAC_LD || (aot) == AOT_ER_AAC_ELD)
  |  |  ------------------
  |  |  |  Branch (228:27): [True: 0, False: 201]
  |  |  |  Branch (228:53): [True: 201, False: 0]
  |  |  ------------------
  ------------------
  416|    229|        errTp = TRANSPORTDEC_PARSE_ERROR;
  417|    229|      } else {
  418|      0|        errTp = TRANSPORTDEC_OK;
  419|      0|      }
  420|    229|      break;
  421|    516|    case MPS_OK:
  ------------------
  |  Branch (421:5): [True: 516, False: 499]
  ------------------
  422|    516|      hAacDecoder->mpsApplicable = 1;
  423|    516|      errTp = TRANSPORTDEC_OK;
  424|    516|      break;
  425|      3|    default:
  ------------------
  |  Branch (425:5): [True: 3, False: 1.01k]
  ------------------
  426|       |      /* especially Parsing error is critical for transport layer          */
  427|      3|      hAacDecoder->mpsApplicable = 0;
  428|      3|      errTp = TRANSPORTDEC_UNKOWN_ERROR;
  429|  1.01k|  }
  430|       |
  431|  1.01k|  return (INT)errTp;
  432|  1.01k|}
aacdecoder_lib.cpp:_ZL25aacDecoder_UniDrcCallbackPvP13FDK_BITSTREAMiiii17AUDIO_OBJECT_TYPE:
  439|  39.1k|                                     const AUDIO_OBJECT_TYPE aot) {
  440|  39.1k|  DRC_DEC_ERROR err = DRC_DEC_OK;
  441|  39.1k|  TRANSPORTDEC_ERROR errTp;
  442|  39.1k|  HANDLE_AACDECODER hAacDecoder = (HANDLE_AACDECODER)handle;
  443|  39.1k|  DRC_DEC_CODEC_MODE drcDecCodecMode = DRC_DEC_CODEC_MODE_UNDEFINED;
  444|  39.1k|  UCHAR dummyBuffer[4] = {0};
  445|  39.1k|  FDK_BITSTREAM dummyBs;
  446|  39.1k|  HANDLE_FDK_BITSTREAM hReadBs;
  447|       |
  448|  39.1k|  if (subStreamIndex != 0) {
  ------------------
  |  Branch (448:7): [True: 0, False: 39.1k]
  ------------------
  449|      0|    return TRANSPORTDEC_OK;
  450|      0|  }
  451|       |
  452|  39.1k|  if (hBs == NULL) {
  ------------------
  |  Branch (452:7): [True: 4.07k, False: 35.0k]
  ------------------
  453|       |    /* use dummy zero payload to clear memory */
  454|  4.07k|    hReadBs = &dummyBs;
  455|  4.07k|    FDKinitBitStream(hReadBs, dummyBuffer, 4, 24);
  456|  35.0k|  } else {
  457|  35.0k|    hReadBs = hBs;
  458|  35.0k|  }
  459|       |
  460|  39.1k|  if (aot == AOT_USAC) {
  ------------------
  |  Branch (460:7): [True: 39.1k, False: 0]
  ------------------
  461|  39.1k|    drcDecCodecMode = DRC_DEC_MPEG_D_USAC;
  462|  39.1k|  }
  463|       |
  464|  39.1k|  err = FDK_drcDec_SetCodecMode(hAacDecoder->hUniDrcDecoder, drcDecCodecMode);
  465|  39.1k|  if (err) return (INT)TRANSPORTDEC_UNKOWN_ERROR;
  ------------------
  |  Branch (465:7): [True: 0, False: 39.1k]
  ------------------
  466|       |
  467|  39.1k|  if (payloadType == 0) /* uniDrcConfig */
  ------------------
  |  Branch (467:7): [True: 33.5k, False: 5.55k]
  ------------------
  468|  33.5k|  {
  469|  33.5k|    err = FDK_drcDec_ReadUniDrcConfig(hAacDecoder->hUniDrcDecoder, hReadBs);
  470|  33.5k|  } else /* loudnessInfoSet */
  471|  5.55k|  {
  472|  5.55k|    err = FDK_drcDec_ReadLoudnessInfoSet(hAacDecoder->hUniDrcDecoder, hReadBs);
  473|  5.55k|    hAacDecoder->loudnessInfoSetPosition[1] = payloadStart;
  474|  5.55k|    hAacDecoder->loudnessInfoSetPosition[2] = fullPayloadLength;
  475|  5.55k|  }
  476|       |
  477|  39.1k|  if (err == DRC_DEC_OK)
  ------------------
  |  Branch (477:7): [True: 39.1k, False: 0]
  ------------------
  478|  39.1k|    errTp = TRANSPORTDEC_OK;
  479|      0|  else
  480|      0|    errTp = TRANSPORTDEC_UNKOWN_ERROR;
  481|       |
  482|  39.1k|  return (INT)errTp;
  483|  39.1k|}

_Z19getSamplingRateInfoP16SamplingRateInfojjj:
  227|  2.84k|                                      UINT samplingRate) {
  228|  2.84k|  int index = 0;
  229|       |
  230|       |  /* Search closest samplerate according to ISO/IEC 13818-7:2005(E) 8.2.4 (Table
  231|       |   * 38): */
  232|  2.84k|  if ((samplingRateIndex >= 15) || (samplesPerFrame == 768)) {
  ------------------
  |  Branch (232:7): [True: 1.34k, False: 1.50k]
  |  Branch (232:36): [True: 334, False: 1.17k]
  ------------------
  233|  1.67k|    const UINT borders[] = {(UINT)-1, 92017, 75132, 55426, 46009, 37566,
  234|  1.67k|                            27713,    23004, 18783, 13856, 11502, 9391};
  235|  1.67k|    UINT i, samplingRateSearch = samplingRate;
  236|       |
  237|  1.67k|    if (samplesPerFrame == 768) {
  ------------------
  |  Branch (237:9): [True: 973, False: 704]
  ------------------
  238|    973|      samplingRateSearch = (samplingRate * 4) / 3;
  239|    973|    }
  240|       |
  241|  12.1k|    for (i = 0; i < 11; i++) {
  ------------------
  |  Branch (241:17): [True: 11.9k, False: 231]
  ------------------
  242|  11.9k|      if (borders[i] > samplingRateSearch &&
  ------------------
  |  Branch (242:11): [True: 11.9k, False: 0]
  ------------------
  243|  11.9k|          samplingRateSearch >= borders[i + 1]) {
  ------------------
  |  Branch (243:11): [True: 1.44k, False: 10.4k]
  ------------------
  244|  1.44k|        break;
  245|  1.44k|      }
  246|  11.9k|    }
  247|  1.67k|    samplingRateIndex = i;
  248|  1.67k|  }
  249|       |
  250|  2.84k|  t->samplingRateIndex = samplingRateIndex;
  251|  2.84k|  t->samplingRate = samplingRate;
  252|       |
  253|  2.84k|  switch (samplesPerFrame) {
  254|  1.26k|    case 1024:
  ------------------
  |  Branch (254:5): [True: 1.26k, False: 1.58k]
  ------------------
  255|  1.26k|      index = 0;
  256|  1.26k|      break;
  257|    198|    case 960:
  ------------------
  |  Branch (257:5): [True: 198, False: 2.65k]
  ------------------
  258|    198|      index = 1;
  259|    198|      break;
  260|    973|    case 768:
  ------------------
  |  Branch (260:5): [True: 973, False: 1.87k]
  ------------------
  261|    973|      index = 2;
  262|    973|      break;
  263|    206|    case 512:
  ------------------
  |  Branch (263:5): [True: 206, False: 2.64k]
  ------------------
  264|    206|      index = 3;
  265|    206|      break;
  266|    210|    case 480:
  ------------------
  |  Branch (266:5): [True: 210, False: 2.63k]
  ------------------
  267|    210|      index = 4;
  268|    210|      break;
  269|       |
  270|      0|    default:
  ------------------
  |  Branch (270:5): [True: 0, False: 2.84k]
  ------------------
  271|      0|      return AAC_DEC_UNSUPPORTED_FORMAT;
  272|  2.84k|  }
  273|       |
  274|  2.84k|  t->ScaleFactorBands_Long =
  275|  2.84k|      sfbOffsetTables[index][samplingRateIndex].sfbOffsetLong;
  276|  2.84k|  t->ScaleFactorBands_Short =
  277|  2.84k|      sfbOffsetTables[index][samplingRateIndex].sfbOffsetShort;
  278|  2.84k|  t->NumberOfScaleFactorBands_Long =
  279|  2.84k|      sfbOffsetTables[index][samplingRateIndex].numberOfSfbLong;
  280|  2.84k|  t->NumberOfScaleFactorBands_Short =
  281|  2.84k|      sfbOffsetTables[index][samplingRateIndex].numberOfSfbShort;
  282|       |
  283|  2.84k|  if (t->ScaleFactorBands_Long == NULL ||
  ------------------
  |  Branch (283:7): [True: 0, False: 2.84k]
  ------------------
  284|  2.84k|      t->NumberOfScaleFactorBands_Long == 0) {
  ------------------
  |  Branch (284:7): [True: 0, False: 2.84k]
  ------------------
  285|      0|    t->samplingRate = 0;
  286|      0|    return AAC_DEC_UNSUPPORTED_FORMAT;
  287|      0|  }
  288|       |
  289|  2.84k|  FDK_ASSERT((UINT)t->ScaleFactorBands_Long[t->NumberOfScaleFactorBands_Long] ==
  ------------------
  |  |  221|  2.84k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (289:3): [True: 2.84k, False: 0]
  ------------------
  290|  2.84k|             samplesPerFrame);
  291|  2.84k|  FDK_ASSERT(
  ------------------
  |  |  221|  2.84k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (291:3): [True: 416, False: 2.43k]
  |  Branch (291:3): [True: 2.43k, False: 0]
  |  Branch (291:3): [True: 2.84k, False: 0]
  ------------------
  292|  2.84k|      t->ScaleFactorBands_Short == NULL ||
  293|  2.84k|      (UINT)t->ScaleFactorBands_Short[t->NumberOfScaleFactorBands_Short] * 8 ==
  294|  2.84k|          samplesPerFrame);
  295|       |
  296|  2.84k|  return AAC_DEC_OK;
  297|  2.84k|}

_Z27CConcealment_InitCommonDataP14CConcealParams:
  265|  7.39k|void CConcealment_InitCommonData(CConcealParams *pConcealCommonData) {
  266|  7.39k|  if (pConcealCommonData != NULL) {
  ------------------
  |  Branch (266:7): [True: 7.39k, False: 0]
  ------------------
  267|  7.39k|    int i;
  268|       |
  269|       |    /* Set default error concealment technique */
  270|  7.39k|    pConcealCommonData->method = ConcealMethodInter;
  271|       |
  272|  7.39k|    pConcealCommonData->numFadeOutFrames = CONCEAL_DFLT_FADEOUT_FRAMES;
  ------------------
  |  |  161|  7.39k|#define CONCEAL_DFLT_FADEOUT_FRAMES (6)
  ------------------
  273|  7.39k|    pConcealCommonData->numFadeInFrames = CONCEAL_DFLT_FADEIN_FRAMES;
  ------------------
  |  |  162|  7.39k|#define CONCEAL_DFLT_FADEIN_FRAMES (5)
  ------------------
  274|  7.39k|    pConcealCommonData->numMuteReleaseFrames = CONCEAL_DFLT_MUTE_RELEASE_FRAMES;
  ------------------
  |  |  163|  7.39k|#define CONCEAL_DFLT_MUTE_RELEASE_FRAMES (0)
  ------------------
  275|       |
  276|  7.39k|    pConcealCommonData->comfortNoiseLevel =
  277|  7.39k|        (FIXP_DBL)CONCEAL_DFLT_COMF_NOISE_LEVEL;
  ------------------
  |  |  156|  7.39k|#define CONCEAL_DFLT_COMF_NOISE_LEVEL (0x100000)
  ------------------
  278|       |
  279|       |    /* Init fade factors (symetric) */
  280|  7.39k|    pConcealCommonData->fadeOutFactor[0] =
  281|  7.39k|        FL2FXCONST_SGL(CONCEAL_DFLT_FADE_FACTOR);
  ------------------
  |  |  180|  7.39k|  (FIXP_SGL)(                                                                \
  |  |  181|  7.39k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 7.39k, Folded]
  |  |  ------------------
  |  |  182|  7.39k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  7.39k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  7.39k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 7.39k]
  |  |  ------------------
  |  |  183|  7.39k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  7.39k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  7.39k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  7.39k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  7.39k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  7.39k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  7.39k|          : ((((double)(val) * (FRACT_FIX_SCALE)-0.5) <=                     \
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (186:14): [Folded, False: 0]
  |  |  ------------------
  |  |  187|      0|              (double)(MINVAL_SGL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  188|      0|                 ? (SHORT)(MINVAL_SGL_CONST)                                 \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  189|      0|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  282|  7.39k|    pConcealCommonData->fadeInFactor[0] = pConcealCommonData->fadeOutFactor[0];
  283|       |
  284|   236k|    for (i = 1; i < CONCEAL_MAX_NUM_FADE_FACTORS; i++) {
  ------------------
  |  |  113|   236k|#define CONCEAL_MAX_NUM_FADE_FACTORS (32)
  ------------------
  |  Branch (284:17): [True: 229k, False: 7.39k]
  ------------------
  285|   229k|      pConcealCommonData->fadeOutFactor[i] =
  286|   229k|          FX_DBL2FX_SGL(fMult(pConcealCommonData->fadeOutFactor[i - 1],
  ------------------
  |  |  220|   916k|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|   229k|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|   229k|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  |  |  |  Branch (220:41): [Folded, False: 229k]
  |  |  |  Branch (220:41): [Folded, False: 0]
  |  |  |  Branch (220:41): [True: 229k, Folded]
  |  |  ------------------
  ------------------
  287|   229k|                              FL2FXCONST_SGL(CONCEAL_DFLT_FADE_FACTOR)));
  288|   229k|      pConcealCommonData->fadeInFactor[i] =
  289|   229k|          pConcealCommonData->fadeOutFactor[i];
  290|   229k|    }
  291|  7.39k|  }
  292|  7.39k|}
_Z22CConcealment_GetMethodP14CConcealParams:
  300|  17.3k|CConcealmentMethod CConcealment_GetMethod(CConcealParams *pConcealCommonData) {
  301|  17.3k|  CConcealmentMethod method = ConcealMethodNone;
  302|       |
  303|  17.3k|  if (pConcealCommonData != NULL) {
  ------------------
  |  Branch (303:7): [True: 17.3k, False: 0]
  ------------------
  304|  17.3k|    method = pConcealCommonData->method;
  305|  17.3k|  }
  306|       |
  307|  17.3k|  return (method);
  308|  17.3k|}
_Z28CConcealment_InitChannelDataP16CConcealmentInfoP14CConcealParams18AACDEC_RENDER_MODEi:
  322|  5.79k|                                  int samplesPerFrame) {
  323|  5.79k|  int i;
  324|  5.79k|  pConcealChannelInfo->TDNoiseSeed = 0;
  325|  5.79k|  FDKmemclear(pConcealChannelInfo->TDNoiseStates,
  326|  5.79k|              sizeof(pConcealChannelInfo->TDNoiseStates));
  327|  5.79k|  pConcealChannelInfo->TDNoiseCoef[0] = FL2FXCONST_SGL(0.05f);
  ------------------
  |  |  180|  5.79k|  (FIXP_SGL)(                                                                \
  |  |  181|  5.79k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 5.79k, Folded]
  |  |  ------------------
  |  |  182|  5.79k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  5.79k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  5.79k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 5.79k]
  |  |  ------------------
  |  |  183|  5.79k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  5.79k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  5.79k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  5.79k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  5.79k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  5.79k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  5.79k|          : ((((double)(val) * (FRACT_FIX_SCALE)-0.5) <=                     \
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (186:14): [Folded, False: 0]
  |  |  ------------------
  |  |  187|      0|              (double)(MINVAL_SGL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  188|      0|                 ? (SHORT)(MINVAL_SGL_CONST)                                 \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  189|      0|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  328|  5.79k|  pConcealChannelInfo->TDNoiseCoef[1] = FL2FXCONST_SGL(0.5f);
  ------------------
  |  |  180|  5.79k|  (FIXP_SGL)(                                                                \
  |  |  181|  5.79k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 5.79k, Folded]
  |  |  ------------------
  |  |  182|  5.79k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  5.79k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  5.79k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 5.79k]
  |  |  ------------------
  |  |  183|  5.79k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  5.79k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  5.79k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  5.79k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  5.79k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  5.79k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  5.79k|          : ((((double)(val) * (FRACT_FIX_SCALE)-0.5) <=                     \
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (186:14): [Folded, False: 0]
  |  |  ------------------
  |  |  187|      0|              (double)(MINVAL_SGL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  188|      0|                 ? (SHORT)(MINVAL_SGL_CONST)                                 \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  189|      0|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  329|  5.79k|  pConcealChannelInfo->TDNoiseCoef[2] = FL2FXCONST_SGL(0.45f);
  ------------------
  |  |  180|  5.79k|  (FIXP_SGL)(                                                                \
  |  |  181|  5.79k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 5.79k, Folded]
  |  |  ------------------
  |  |  182|  5.79k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  5.79k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  5.79k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 5.79k]
  |  |  ------------------
  |  |  183|  5.79k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  5.79k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  5.79k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  5.79k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  5.79k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  5.79k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  5.79k|          : ((((double)(val) * (FRACT_FIX_SCALE)-0.5) <=                     \
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (186:14): [Folded, False: 0]
  |  |  ------------------
  |  |  187|      0|              (double)(MINVAL_SGL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  188|      0|                 ? (SHORT)(MINVAL_SGL_CONST)                                 \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  189|      0|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  330|       |
  331|  5.79k|  pConcealChannelInfo->pConcealParams = pConcealCommonData;
  332|       |
  333|  5.79k|  pConcealChannelInfo->lastRenderMode = initRenderMode;
  334|       |
  335|  5.79k|  pConcealChannelInfo->windowShape = CONCEAL_NOT_DEFINED;
  ------------------
  |  |  158|  5.79k|#define CONCEAL_NOT_DEFINED ((UCHAR)-1)
  ------------------
  336|  5.79k|  pConcealChannelInfo->windowSequence = BLOCK_LONG; /* default type */
  337|  5.79k|  pConcealChannelInfo->lastWinGrpLen = 1;
  338|       |
  339|  5.79k|  pConcealChannelInfo->concealState = ConcealState_Ok;
  340|       |
  341|  5.79k|  FDKmemclear(pConcealChannelInfo->spectralCoefficient,
  342|  5.79k|              1024 * sizeof(FIXP_CNCL));
  343|       |
  344|  52.1k|  for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (344:15): [True: 46.3k, False: 5.79k]
  ------------------
  345|  46.3k|    pConcealChannelInfo->specScale[i] = 0;
  346|  46.3k|  }
  347|       |
  348|  5.79k|  pConcealChannelInfo->iRandomPhase = 0;
  349|       |
  350|  5.79k|  pConcealChannelInfo->prevFrameOk[0] = 1;
  351|  5.79k|  pConcealChannelInfo->prevFrameOk[1] = 1;
  352|       |
  353|  5.79k|  pConcealChannelInfo->cntFadeFrames = 0;
  354|  5.79k|  pConcealChannelInfo->cntValidFrames = 0;
  355|  5.79k|  pConcealChannelInfo->fade_old = (FIXP_DBL)MAXVAL_DBL;
  ------------------
  |  |  156|  5.79k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  356|  5.79k|  pConcealChannelInfo->winGrpOffset[0] = 0;
  357|  5.79k|  pConcealChannelInfo->winGrpOffset[1] = 0;
  358|  5.79k|  pConcealChannelInfo->attGrpOffset[0] = 0;
  359|  5.79k|  pConcealChannelInfo->attGrpOffset[1] = 0;
  360|  5.79k|}
_Z22CConcealment_SetParamsP14CConcealParamsiiiii:
  375|  9.96k|                       FIXP_DBL comfNoiseLevel) {
  376|       |  /* set concealment technique */
  377|  9.96k|  if (method != AACDEC_CONCEAL_PARAM_NOT_SPECIFIED) {
  ------------------
  |  |  108|  9.96k|#define AACDEC_CONCEAL_PARAM_NOT_SPECIFIED (0xFFFE)
  ------------------
  |  Branch (377:7): [True: 9.96k, False: 0]
  ------------------
  378|  9.96k|    switch ((CConcealmentMethod)method) {
  379|      0|      case ConcealMethodMute:
  ------------------
  |  Branch (379:7): [True: 0, False: 9.96k]
  ------------------
  380|  2.57k|      case ConcealMethodNoise:
  ------------------
  |  Branch (380:7): [True: 2.57k, False: 7.39k]
  ------------------
  381|  9.96k|      case ConcealMethodInter:
  ------------------
  |  Branch (381:7): [True: 7.39k, False: 2.57k]
  ------------------
  382|       |        /* Be sure to enable delay adjustment of SBR decoder! */
  383|  9.96k|        if (concealParams == NULL) {
  ------------------
  |  Branch (383:13): [True: 0, False: 9.96k]
  ------------------
  384|      0|          return AAC_DEC_INVALID_HANDLE;
  385|  9.96k|        } else {
  386|       |          /* set param */
  387|  9.96k|          concealParams->method = (CConcealmentMethod)method;
  388|  9.96k|        }
  389|  9.96k|        break;
  390|       |
  391|  9.96k|      default:
  ------------------
  |  Branch (391:7): [True: 0, False: 9.96k]
  ------------------
  392|      0|        return AAC_DEC_SET_PARAM_FAIL;
  393|  9.96k|    }
  394|  9.96k|  }
  395|       |
  396|       |  /* set number of frames for fade-out slope */
  397|  9.96k|  if (fadeOutSlope != AACDEC_CONCEAL_PARAM_NOT_SPECIFIED) {
  ------------------
  |  |  108|  9.96k|#define AACDEC_CONCEAL_PARAM_NOT_SPECIFIED (0xFFFE)
  ------------------
  |  Branch (397:7): [True: 0, False: 9.96k]
  ------------------
  398|      0|    if ((fadeOutSlope < CONCEAL_MAX_NUM_FADE_FACTORS) && (fadeOutSlope >= 0)) {
  ------------------
  |  |  113|      0|#define CONCEAL_MAX_NUM_FADE_FACTORS (32)
  ------------------
  |  Branch (398:9): [True: 0, False: 0]
  |  Branch (398:58): [True: 0, False: 0]
  ------------------
  399|      0|      if (concealParams == NULL) {
  ------------------
  |  Branch (399:11): [True: 0, False: 0]
  ------------------
  400|      0|        return AAC_DEC_INVALID_HANDLE;
  401|      0|      } else {
  402|       |        /* set param */
  403|      0|        concealParams->numFadeOutFrames = fadeOutSlope;
  404|      0|      }
  405|      0|    } else {
  406|      0|      return AAC_DEC_SET_PARAM_FAIL;
  407|      0|    }
  408|      0|  }
  409|       |
  410|       |  /* set number of frames for fade-in slope */
  411|  9.96k|  if (fadeInSlope != AACDEC_CONCEAL_PARAM_NOT_SPECIFIED) {
  ------------------
  |  |  108|  9.96k|#define AACDEC_CONCEAL_PARAM_NOT_SPECIFIED (0xFFFE)
  ------------------
  |  Branch (411:7): [True: 0, False: 9.96k]
  ------------------
  412|      0|    if ((fadeInSlope < CONCEAL_MAX_NUM_FADE_FACTORS) && (fadeInSlope >= 0)) {
  ------------------
  |  |  113|      0|#define CONCEAL_MAX_NUM_FADE_FACTORS (32)
  ------------------
  |  Branch (412:9): [True: 0, False: 0]
  |  Branch (412:57): [True: 0, False: 0]
  ------------------
  413|      0|      if (concealParams == NULL) {
  ------------------
  |  Branch (413:11): [True: 0, False: 0]
  ------------------
  414|      0|        return AAC_DEC_INVALID_HANDLE;
  415|      0|      } else {
  416|       |        /* set param */
  417|      0|        concealParams->numFadeInFrames = fadeInSlope;
  418|      0|      }
  419|      0|    } else {
  420|      0|      return AAC_DEC_SET_PARAM_FAIL;
  421|      0|    }
  422|      0|  }
  423|       |
  424|       |  /* set number of error-free frames after which the muting will be released */
  425|  9.96k|  if (muteRelease != AACDEC_CONCEAL_PARAM_NOT_SPECIFIED) {
  ------------------
  |  |  108|  9.96k|#define AACDEC_CONCEAL_PARAM_NOT_SPECIFIED (0xFFFE)
  ------------------
  |  Branch (425:7): [True: 0, False: 9.96k]
  ------------------
  426|      0|    if ((muteRelease < (CONCEAL_MAX_NUM_FADE_FACTORS << 1)) &&
  ------------------
  |  |  113|      0|#define CONCEAL_MAX_NUM_FADE_FACTORS (32)
  ------------------
  |  Branch (426:9): [True: 0, False: 0]
  ------------------
  427|      0|        (muteRelease >= 0)) {
  ------------------
  |  Branch (427:9): [True: 0, False: 0]
  ------------------
  428|      0|      if (concealParams == NULL) {
  ------------------
  |  Branch (428:11): [True: 0, False: 0]
  ------------------
  429|      0|        return AAC_DEC_INVALID_HANDLE;
  430|      0|      } else {
  431|       |        /* set param */
  432|      0|        concealParams->numMuteReleaseFrames = muteRelease;
  433|      0|      }
  434|      0|    } else {
  435|      0|      return AAC_DEC_SET_PARAM_FAIL;
  436|      0|    }
  437|      0|  }
  438|       |
  439|       |  /* set confort noise level which will be inserted while in state 'muting' */
  440|  9.96k|  if (comfNoiseLevel != (FIXP_DBL)AACDEC_CONCEAL_PARAM_NOT_SPECIFIED) {
  ------------------
  |  |  108|  9.96k|#define AACDEC_CONCEAL_PARAM_NOT_SPECIFIED (0xFFFE)
  ------------------
  |  Branch (440:7): [True: 0, False: 9.96k]
  ------------------
  441|      0|    if ((comfNoiseLevel < (FIXP_DBL)0) ||
  ------------------
  |  Branch (441:9): [True: 0, False: 0]
  ------------------
  442|      0|        (comfNoiseLevel > (FIXP_DBL)MAXVAL_DBL)) {
  ------------------
  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  |  Branch (442:9): [True: 0, False: 0]
  ------------------
  443|      0|      return AAC_DEC_SET_PARAM_FAIL;
  444|      0|    }
  445|      0|    if (concealParams == NULL) {
  ------------------
  |  Branch (445:9): [True: 0, False: 0]
  ------------------
  446|      0|      return AAC_DEC_INVALID_HANDLE;
  447|      0|    } else {
  448|      0|      concealParams->comfortNoiseLevel = (FIXP_DBL)comfNoiseLevel;
  449|      0|    }
  450|      0|  }
  451|       |
  452|  9.96k|  return (AAC_DEC_OK);
  453|  9.96k|}
_Z21CConcealment_GetDelayP14CConcealParams:
 1651|  32.2k|UINT CConcealment_GetDelay(CConcealParams *pConcealCommonData) {
 1652|  32.2k|  UINT frameDelay = 0;
 1653|       |
 1654|  32.2k|  if (pConcealCommonData != NULL) {
  ------------------
  |  Branch (1654:7): [True: 32.2k, False: 0]
  ------------------
 1655|  32.2k|    switch (pConcealCommonData->method) {
 1656|      0|      case ConcealMethodTonal:
  ------------------
  |  Branch (1656:7): [True: 0, False: 32.2k]
  ------------------
 1657|  27.3k|      case ConcealMethodInter:
  ------------------
  |  Branch (1657:7): [True: 27.3k, False: 4.92k]
  ------------------
 1658|  27.3k|        frameDelay = 1;
 1659|  27.3k|        break;
 1660|  4.92k|      default:
  ------------------
  |  Branch (1660:7): [True: 4.92k, False: 27.3k]
  ------------------
 1661|  4.92k|        break;
 1662|  32.2k|    }
 1663|  32.2k|  }
 1664|       |
 1665|  32.2k|  return frameDelay;
 1666|  32.2k|}

_Z12CArco_Createv:
  733|  1.98k|CArcoData *CArco_Create(void) { return GetArcoData(); }
_Z13CArco_DestroyP9CArcoData:
  735|  1.98k|void CArco_Destroy(CArcoData *pArcoData) { FreeArcoData(&pArcoData); }

FDK_drcDec_Open:
  216|  7.39k|                const DRC_DEC_FUNCTIONAL_RANGE functionalRange) {
  217|  7.39k|  DRC_ERROR dErr = DE_OK;
  218|  7.39k|  DRCDEC_SELECTION_PROCESS_RETURN sErr = DRCDEC_SELECTION_PROCESS_NO_ERROR;
  219|  7.39k|  HANDLE_DRC_DECODER hDrcDec;
  220|       |
  221|  7.39k|  *phDrcDec = (HANDLE_DRC_DECODER)FDKcalloc(1, sizeof(DRC_DECODER));
  222|  7.39k|  if (!*phDrcDec) return DRC_DEC_OUT_OF_MEMORY;
  ------------------
  |  Branch (222:7): [True: 0, False: 7.39k]
  ------------------
  223|  7.39k|  hDrcDec = *phDrcDec;
  224|       |
  225|  7.39k|  hDrcDec->functionalRange = functionalRange;
  226|       |
  227|  7.39k|  hDrcDec->status = DRC_DEC_NOT_INITIALIZED;
  228|  7.39k|  hDrcDec->codecMode = DRC_DEC_CODEC_MODE_UNDEFINED;
  229|       |
  230|  7.39k|  if (hDrcDec->functionalRange & DRC_DEC_SELECTION) {
  ------------------
  |  Branch (230:7): [True: 7.39k, False: 0]
  ------------------
  231|  7.39k|    sErr = drcDec_SelectionProcess_Create(&(hDrcDec->hSelectionProc));
  232|  7.39k|    if (sErr) return DRC_DEC_OUT_OF_MEMORY;
  ------------------
  |  Branch (232:9): [True: 0, False: 7.39k]
  ------------------
  233|  7.39k|    sErr = drcDec_SelectionProcess_Init(hDrcDec->hSelectionProc);
  234|  7.39k|    if (sErr) return DRC_DEC_NOT_OK;
  ------------------
  |  Branch (234:9): [True: 0, False: 7.39k]
  ------------------
  235|  7.39k|    hDrcDec->selProcInputDiff = 1;
  236|  7.39k|  }
  237|       |
  238|  7.39k|  if (hDrcDec->functionalRange & DRC_DEC_GAIN) {
  ------------------
  |  Branch (238:7): [True: 7.39k, False: 0]
  ------------------
  239|  7.39k|    dErr = drcDec_GainDecoder_Open(&(hDrcDec->hGainDec));
  240|  7.39k|    if (dErr) return DRC_DEC_OUT_OF_MEMORY;
  ------------------
  |  Branch (240:9): [True: 0, False: 7.39k]
  ------------------
  241|  7.39k|  }
  242|       |
  243|  7.39k|  return DRC_DEC_OK;
  244|  7.39k|}
FDK_drcDec_SetCodecMode:
  248|  39.1k|                        const DRC_DEC_CODEC_MODE codecMode) {
  249|  39.1k|  DRC_ERROR dErr = DE_OK;
  250|  39.1k|  DRCDEC_SELECTION_PROCESS_RETURN sErr = DRCDEC_SELECTION_PROCESS_NO_ERROR;
  251|       |
  252|  39.1k|  if (hDrcDec == NULL) return DRC_DEC_NOT_OPENED;
  ------------------
  |  Branch (252:7): [True: 0, False: 39.1k]
  ------------------
  253|       |
  254|  39.1k|  if (hDrcDec->codecMode ==
  ------------------
  |  Branch (254:7): [True: 5.14k, False: 33.9k]
  ------------------
  255|  39.1k|      DRC_DEC_CODEC_MODE_UNDEFINED) { /* Set codec mode, if it is set for the
  256|       |                                         first time */
  257|  5.14k|    hDrcDec->codecMode = codecMode;
  258|       |
  259|  5.14k|    if (hDrcDec->functionalRange & DRC_DEC_SELECTION) {
  ------------------
  |  Branch (259:9): [True: 5.14k, False: 0]
  ------------------
  260|  5.14k|      sErr = drcDec_SelectionProcess_SetCodecMode(
  261|  5.14k|          hDrcDec->hSelectionProc, (SEL_PROC_CODEC_MODE)codecMode);
  262|  5.14k|      if (sErr) return DRC_DEC_NOT_OK;
  ------------------
  |  Branch (262:11): [True: 0, False: 5.14k]
  ------------------
  263|  5.14k|      hDrcDec->selProcInputDiff = 1;
  264|  5.14k|    }
  265|       |
  266|  5.14k|    if (hDrcDec->functionalRange & DRC_DEC_GAIN) {
  ------------------
  |  Branch (266:9): [True: 5.14k, False: 0]
  ------------------
  267|  5.14k|      DELAY_MODE delayMode;
  268|  5.14k|      int timeDomainSupported;
  269|  5.14k|      SUBBAND_DOMAIN_MODE subbandDomainSupported;
  270|       |
  271|  5.14k|      switch (hDrcDec->codecMode) {
  272|      0|        case DRC_DEC_MPEG_4_AAC:
  ------------------
  |  Branch (272:9): [True: 0, False: 5.14k]
  ------------------
  273|  5.14k|        case DRC_DEC_MPEG_D_USAC:
  ------------------
  |  Branch (273:9): [True: 5.14k, False: 0]
  ------------------
  274|  5.14k|        case DRC_DEC_MPEG_H_3DA:
  ------------------
  |  Branch (274:9): [True: 0, False: 5.14k]
  ------------------
  275|  5.14k|        default:
  ------------------
  |  Branch (275:9): [True: 0, False: 5.14k]
  ------------------
  276|  5.14k|          delayMode = DM_REGULAR_DELAY;
  277|  5.14k|      }
  278|       |
  279|  5.14k|      switch (hDrcDec->codecMode) {
  280|      0|        case DRC_DEC_MPEG_4_AAC:
  ------------------
  |  Branch (280:9): [True: 0, False: 5.14k]
  ------------------
  281|  5.14k|        case DRC_DEC_MPEG_D_USAC:
  ------------------
  |  Branch (281:9): [True: 5.14k, False: 0]
  ------------------
  282|  5.14k|          timeDomainSupported = 1;
  283|  5.14k|          subbandDomainSupported = SDM_OFF;
  284|  5.14k|          break;
  285|      0|        case DRC_DEC_MPEG_H_3DA:
  ------------------
  |  Branch (285:9): [True: 0, False: 5.14k]
  ------------------
  286|      0|          timeDomainSupported = 1;
  287|      0|          subbandDomainSupported = SDM_STFT256;
  288|      0|          break;
  289|       |
  290|      0|        case DRC_DEC_TEST_TIME_DOMAIN:
  ------------------
  |  Branch (290:9): [True: 0, False: 5.14k]
  ------------------
  291|      0|          timeDomainSupported = 1;
  292|      0|          subbandDomainSupported = SDM_OFF;
  293|      0|          break;
  294|      0|        case DRC_DEC_TEST_QMF_DOMAIN:
  ------------------
  |  Branch (294:9): [True: 0, False: 5.14k]
  ------------------
  295|      0|          timeDomainSupported = 0;
  296|      0|          subbandDomainSupported = SDM_QMF64;
  297|      0|          break;
  298|      0|        case DRC_DEC_TEST_STFT_DOMAIN:
  ------------------
  |  Branch (298:9): [True: 0, False: 5.14k]
  ------------------
  299|      0|          timeDomainSupported = 0;
  300|      0|          subbandDomainSupported = SDM_STFT256;
  301|      0|          break;
  302|       |
  303|      0|        default:
  ------------------
  |  Branch (303:9): [True: 0, False: 5.14k]
  ------------------
  304|      0|          timeDomainSupported = 0;
  305|      0|          subbandDomainSupported = SDM_OFF;
  306|  5.14k|      }
  307|       |
  308|  5.14k|      dErr = drcDec_GainDecoder_SetCodecDependentParameters(
  309|  5.14k|          hDrcDec->hGainDec, delayMode, timeDomainSupported,
  310|  5.14k|          subbandDomainSupported);
  311|  5.14k|      if (dErr) return DRC_DEC_NOT_OK;
  ------------------
  |  Branch (311:11): [True: 0, False: 5.14k]
  ------------------
  312|  5.14k|    }
  313|  5.14k|  }
  314|       |
  315|       |  /* Don't allow changing codecMode if it has already been set. */
  316|  39.1k|  if (hDrcDec->codecMode != codecMode) return DRC_DEC_NOT_OK;
  ------------------
  |  Branch (316:7): [True: 0, False: 39.1k]
  ------------------
  317|       |
  318|  39.1k|  return DRC_DEC_OK;
  319|  39.1k|}
FDK_drcDec_Init:
  323|  2.84k|                const int sampleRate, const int baseChannelCount) {
  324|  2.84k|  DRC_ERROR dErr = DE_OK;
  325|  2.84k|  DRCDEC_SELECTION_PROCESS_RETURN sErr = DRCDEC_SELECTION_PROCESS_NO_ERROR;
  326|       |
  327|  2.84k|  if (hDrcDec == NULL || frameSize == 0 || sampleRate == 0 ||
  ------------------
  |  Branch (327:7): [True: 0, False: 2.84k]
  |  Branch (327:26): [True: 3, False: 2.84k]
  |  Branch (327:44): [True: 0, False: 2.84k]
  ------------------
  328|  2.84k|      baseChannelCount == 0)
  ------------------
  |  Branch (328:7): [True: 0, False: 2.84k]
  ------------------
  329|      3|    return DRC_DEC_OK; /* return without doing anything */
  330|       |
  331|  2.84k|  if (hDrcDec->functionalRange & DRC_DEC_SELECTION) {
  ------------------
  |  Branch (331:7): [True: 2.84k, False: 0]
  ------------------
  332|  2.84k|    sErr = drcDec_SelectionProcess_SetParam(
  333|  2.84k|        hDrcDec->hSelectionProc, SEL_PROC_BASE_CHANNEL_COUNT,
  334|  2.84k|        (FIXP_DBL)baseChannelCount, &(hDrcDec->selProcInputDiff));
  335|  2.84k|    if (sErr) return DRC_DEC_NOT_OK;
  ------------------
  |  Branch (335:9): [True: 0, False: 2.84k]
  ------------------
  336|  2.84k|    sErr = drcDec_SelectionProcess_SetParam(
  337|  2.84k|        hDrcDec->hSelectionProc, SEL_PROC_SAMPLE_RATE, (FIXP_DBL)sampleRate,
  338|  2.84k|        &(hDrcDec->selProcInputDiff));
  339|  2.84k|    if (sErr) return DRC_DEC_NOT_OK;
  ------------------
  |  Branch (339:9): [True: 0, False: 2.84k]
  ------------------
  340|  2.84k|  }
  341|       |
  342|  2.84k|  if (hDrcDec->functionalRange & DRC_DEC_GAIN) {
  ------------------
  |  Branch (342:7): [True: 2.84k, False: 0]
  ------------------
  343|  2.84k|    dErr = drcDec_GainDecoder_SetParam(hDrcDec->hGainDec, GAIN_DEC_FRAME_SIZE,
  344|  2.84k|                                       frameSize);
  345|  2.84k|    if (dErr) return DRC_DEC_NOT_OK;
  ------------------
  |  Branch (345:9): [True: 0, False: 2.84k]
  ------------------
  346|  2.84k|    dErr = drcDec_GainDecoder_SetParam(hDrcDec->hGainDec, GAIN_DEC_SAMPLE_RATE,
  347|  2.84k|                                       sampleRate);
  348|  2.84k|    if (dErr) return DRC_DEC_NOT_OK;
  ------------------
  |  Branch (348:9): [True: 0, False: 2.84k]
  ------------------
  349|  2.84k|    dErr = drcDec_GainDecoder_Init(hDrcDec->hGainDec);
  350|  2.84k|    if (dErr) return DRC_DEC_NOT_OK;
  ------------------
  |  Branch (350:9): [True: 0, False: 2.84k]
  ------------------
  351|  2.84k|  }
  352|       |
  353|  2.84k|  hDrcDec->status = DRC_DEC_INITIALIZED;
  354|       |
  355|  2.84k|  startSelectionProcess(hDrcDec);
  356|       |
  357|  2.84k|  return DRC_DEC_OK;
  358|  2.84k|}
FDK_drcDec_Close:
  361|  7.39k|FDK_drcDec_Close(HANDLE_DRC_DECODER* phDrcDec) {
  362|  7.39k|  HANDLE_DRC_DECODER hDrcDec;
  363|       |
  364|  7.39k|  if (phDrcDec == NULL) {
  ------------------
  |  Branch (364:7): [True: 0, False: 7.39k]
  ------------------
  365|      0|    return DRC_DEC_OK;
  366|      0|  }
  367|       |
  368|  7.39k|  hDrcDec = *phDrcDec;
  369|       |
  370|  7.39k|  if (hDrcDec == NULL) return DRC_DEC_NOT_OPENED;
  ------------------
  |  Branch (370:7): [True: 0, False: 7.39k]
  ------------------
  371|       |
  372|  7.39k|  if (hDrcDec->functionalRange & DRC_DEC_GAIN) {
  ------------------
  |  Branch (372:7): [True: 7.39k, False: 0]
  ------------------
  373|  7.39k|    drcDec_GainDecoder_Close(&(hDrcDec->hGainDec));
  374|  7.39k|  }
  375|       |
  376|  7.39k|  if (hDrcDec->functionalRange & DRC_DEC_SELECTION) {
  ------------------
  |  Branch (376:7): [True: 7.39k, False: 0]
  ------------------
  377|  7.39k|    drcDec_SelectionProcess_Delete(&(hDrcDec->hSelectionProc));
  378|  7.39k|  }
  379|       |
  380|  7.39k|  FDKfree(*phDrcDec);
  381|  7.39k|  *phDrcDec = NULL;
  382|       |
  383|  7.39k|  return DRC_DEC_OK;
  384|  7.39k|}
FDK_drcDec_ReadUniDrcConfig:
  585|  33.5k|                            HANDLE_FDK_BITSTREAM hBitstream) {
  586|  33.5k|  DRC_ERROR dErr = DE_OK;
  587|       |
  588|  33.5k|  if (hDrcDec == NULL) return DRC_DEC_NOT_OPENED;
  ------------------
  |  Branch (588:7): [True: 0, False: 33.5k]
  ------------------
  589|       |
  590|  33.5k|  if (hDrcDec->codecMode == DRC_DEC_MPEG_D_USAC) {
  ------------------
  |  Branch (590:7): [True: 33.5k, False: 0]
  ------------------
  591|  33.5k|    dErr = drcDec_readUniDrcConfig(hBitstream, &(hDrcDec->uniDrcConfig));
  592|  33.5k|  } else
  593|      0|    return DRC_DEC_NOT_OK;
  594|       |
  595|  33.5k|  if (dErr) {
  ------------------
  |  Branch (595:7): [True: 20.9k, False: 12.5k]
  ------------------
  596|       |    /* clear config, if parsing error occured */
  597|  20.9k|    FDKmemclear(&hDrcDec->uniDrcConfig, sizeof(hDrcDec->uniDrcConfig));
  598|  20.9k|    hDrcDec->uniDrcConfig.diff = 1;
  599|  20.9k|  }
  600|       |
  601|  33.5k|  startSelectionProcess(hDrcDec);
  602|       |
  603|  33.5k|  return DRC_DEC_OK;
  604|  33.5k|}
FDK_drcDec_ReadLoudnessInfoSet:
  680|  5.55k|                               HANDLE_FDK_BITSTREAM hBitstream) {
  681|  5.55k|  DRC_ERROR dErr = DE_OK;
  682|       |
  683|  5.55k|  if (hDrcDec == NULL) return DRC_DEC_NOT_OPENED;
  ------------------
  |  Branch (683:7): [True: 0, False: 5.55k]
  ------------------
  684|       |
  685|  5.55k|  if (hDrcDec->codecMode == DRC_DEC_MPEG_D_USAC) {
  ------------------
  |  Branch (685:7): [True: 5.55k, False: 0]
  ------------------
  686|  5.55k|    dErr = drcDec_readLoudnessInfoSet(hBitstream, &(hDrcDec->loudnessInfoSet));
  687|  5.55k|  } else
  688|      0|    return DRC_DEC_NOT_OK;
  689|       |
  690|  5.55k|  if (dErr) {
  ------------------
  |  Branch (690:7): [True: 932, False: 4.62k]
  ------------------
  691|       |    /* clear config, if parsing error occurred */
  692|    932|    FDKmemclear(&hDrcDec->loudnessInfoSet, sizeof(hDrcDec->loudnessInfoSet));
  693|    932|    hDrcDec->loudnessInfoSet.diff = 1;
  694|    932|  }
  695|       |
  696|  5.55k|  startSelectionProcess(hDrcDec);
  697|       |
  698|  5.55k|  return DRC_DEC_OK;
  699|  5.55k|}
FDK_drcDecLib.cpp:_ZL21startSelectionProcessP13s_drc_decoder:
  180|  41.9k|static void startSelectionProcess(HANDLE_DRC_DECODER hDrcDec) {
  181|  41.9k|  int uniDrcConfigHasChanged = 0;
  182|  41.9k|  SEL_PROC_OUTPUT oldSelProcOutput = hDrcDec->selProcOutput;
  183|       |
  184|  41.9k|  if (!hDrcDec->status) return;
  ------------------
  |  Branch (184:7): [True: 39.1k, False: 2.84k]
  ------------------
  185|       |
  186|  2.84k|  if (hDrcDec->functionalRange & DRC_DEC_SELECTION) {
  ------------------
  |  Branch (186:7): [True: 2.84k, False: 0]
  ------------------
  187|  2.84k|    uniDrcConfigHasChanged = hDrcDec->uniDrcConfig.diff;
  188|  2.84k|    if (hDrcDec->uniDrcConfig.diff || hDrcDec->loudnessInfoSet.diff ||
  ------------------
  |  Branch (188:9): [True: 102, False: 2.74k]
  |  Branch (188:39): [True: 188, False: 2.55k]
  ------------------
  189|  2.84k|        hDrcDec->selProcInputDiff) {
  ------------------
  |  Branch (189:9): [True: 2.55k, False: 0]
  ------------------
  190|       |      /* in case of an error, signal that selection process was not successful
  191|       |       */
  192|  2.84k|      hDrcDec->selProcOutput.numSelectedDrcSets = 0;
  193|       |
  194|  2.84k|      drcDec_SelectionProcess_Process(
  195|  2.84k|          hDrcDec->hSelectionProc, &(hDrcDec->uniDrcConfig),
  196|  2.84k|          &(hDrcDec->loudnessInfoSet), &(hDrcDec->selProcOutput));
  197|       |
  198|  2.84k|      hDrcDec->selProcInputDiff = 0;
  199|  2.84k|      hDrcDec->uniDrcConfig.diff = 0;
  200|  2.84k|      hDrcDec->loudnessInfoSet.diff = 0;
  201|  2.84k|    }
  202|  2.84k|  }
  203|       |
  204|  2.84k|  if (hDrcDec->functionalRange & DRC_DEC_GAIN) {
  ------------------
  |  Branch (204:7): [True: 2.84k, False: 0]
  ------------------
  205|  2.84k|    if (isResetNeeded(hDrcDec, oldSelProcOutput) || uniDrcConfigHasChanged) {
  ------------------
  |  Branch (205:9): [True: 2.72k, False: 123]
  |  Branch (205:53): [True: 1, False: 122]
  ------------------
  206|  2.72k|      drcDec_GainDecoder_Config(hDrcDec->hGainDec, &(hDrcDec->uniDrcConfig),
  207|  2.72k|                                hDrcDec->selProcOutput.numSelectedDrcSets,
  208|  2.72k|                                hDrcDec->selProcOutput.selectedDrcSetIds,
  209|  2.72k|                                hDrcDec->selProcOutput.selectedDownmixIds);
  210|  2.72k|    }
  211|  2.84k|  }
  212|  2.84k|}
FDK_drcDecLib.cpp:_ZL13isResetNeededP13s_drc_decoder26s_selection_process_output:
  153|  2.84k|                         const SEL_PROC_OUTPUT oldSelProcOutput) {
  154|  2.84k|  int i, resetNeeded = 0;
  155|       |
  156|  2.84k|  if (hDrcDec->selProcOutput.numSelectedDrcSets !=
  ------------------
  |  Branch (156:7): [True: 2.72k, False: 123]
  ------------------
  157|  2.84k|      oldSelProcOutput.numSelectedDrcSets) {
  158|  2.72k|    resetNeeded = 1;
  159|  2.72k|  } else {
  160|    123|    for (i = 0; i < hDrcDec->selProcOutput.numSelectedDrcSets; i++) {
  ------------------
  |  Branch (160:17): [True: 0, False: 123]
  ------------------
  161|      0|      if (hDrcDec->selProcOutput.selectedDrcSetIds[i] !=
  ------------------
  |  Branch (161:11): [True: 0, False: 0]
  ------------------
  162|      0|          oldSelProcOutput.selectedDrcSetIds[i])
  163|      0|        resetNeeded = 1;
  164|      0|      if (hDrcDec->selProcOutput.selectedDownmixIds[i] !=
  ------------------
  |  Branch (164:11): [True: 0, False: 0]
  ------------------
  165|      0|          oldSelProcOutput.selectedDownmixIds[i])
  166|      0|        resetNeeded = 1;
  167|      0|    }
  168|    123|  }
  169|       |
  170|  2.84k|  if (hDrcDec->selProcOutput.boost != oldSelProcOutput.boost) resetNeeded = 1;
  ------------------
  |  Branch (170:7): [True: 2.72k, False: 123]
  ------------------
  171|  2.84k|  if (hDrcDec->selProcOutput.compress != oldSelProcOutput.compress)
  ------------------
  |  Branch (171:7): [True: 2.72k, False: 123]
  ------------------
  172|  2.72k|    resetNeeded = 1;
  173|       |
  174|       |  /* Note: Changes in downmix matrix are not caught, as they don't affect the
  175|       |   * DRC gain decoder */
  176|       |
  177|  2.84k|  return resetNeeded;
  178|  2.84k|}

_Z23drcDec_GainDecoder_OpenPP16DRC_GAIN_DECODER:
  158|  7.39k|drcDec_GainDecoder_Open(HANDLE_DRC_GAIN_DECODER* phGainDec) {
  159|  7.39k|  DRC_GAIN_DECODER* hGainDec = NULL;
  160|       |
  161|  7.39k|  hGainDec = (DRC_GAIN_DECODER*)FDKcalloc(1, sizeof(DRC_GAIN_DECODER));
  162|  7.39k|  if (hGainDec == NULL) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (162:7): [True: 0, False: 7.39k]
  ------------------
  163|       |
  164|  7.39k|  hGainDec->multiBandActiveDrcIndex = -1;
  165|  7.39k|  hGainDec->channelGainActiveDrcIndex = -1;
  166|       |
  167|  7.39k|  *phGainDec = hGainDec;
  168|       |
  169|  7.39k|  return DE_OK;
  170|  7.39k|}
_Z23drcDec_GainDecoder_InitP16DRC_GAIN_DECODER:
  173|  2.84k|drcDec_GainDecoder_Init(HANDLE_DRC_GAIN_DECODER hGainDec) {
  174|  2.84k|  DRC_ERROR err = DE_OK;
  175|       |
  176|  2.84k|  err = initGainDec(hGainDec);
  177|  2.84k|  if (err) return err;
  ------------------
  |  Branch (177:7): [True: 0, False: 2.84k]
  ------------------
  178|       |
  179|  2.84k|  initDrcGainBuffers(hGainDec->frameSize, &hGainDec->drcGainBuffers);
  180|       |
  181|  2.84k|  return err;
  182|  2.84k|}
_Z27drcDec_GainDecoder_SetParamP16DRC_GAIN_DECODER14GAIN_DEC_PARAMi:
  187|  5.69k|                            const int paramValue) {
  188|  5.69k|  switch (paramType) {
  189|  2.84k|    case GAIN_DEC_FRAME_SIZE:
  ------------------
  |  Branch (189:5): [True: 2.84k, False: 2.84k]
  ------------------
  190|  2.84k|      if (paramValue < 0) return DE_PARAM_OUT_OF_RANGE;
  ------------------
  |  Branch (190:11): [True: 0, False: 2.84k]
  ------------------
  191|  2.84k|      hGainDec->frameSize = paramValue;
  192|  2.84k|      break;
  193|  2.84k|    case GAIN_DEC_SAMPLE_RATE:
  ------------------
  |  Branch (193:5): [True: 2.84k, False: 2.84k]
  ------------------
  194|  2.84k|      if (paramValue < 0) return DE_PARAM_OUT_OF_RANGE;
  ------------------
  |  Branch (194:11): [True: 0, False: 2.84k]
  ------------------
  195|  2.84k|      hGainDec->deltaTminDefault = getDeltaTmin(paramValue);
  196|  2.84k|      break;
  197|      0|    default:
  ------------------
  |  Branch (197:5): [True: 0, False: 5.69k]
  ------------------
  198|      0|      return DE_PARAM_INVALID;
  199|  5.69k|  }
  200|  5.69k|  return DE_OK;
  201|  5.69k|}
_Z46drcDec_GainDecoder_SetCodecDependentParametersP16DRC_GAIN_DECODER10DELAY_MODEi19SUBBAND_DOMAIN_MODE:
  207|  5.14k|    const SUBBAND_DOMAIN_MODE subbandDomainSupported) {
  208|  5.14k|  if ((delayMode != DM_REGULAR_DELAY) && (delayMode != DM_LOW_DELAY)) {
  ------------------
  |  Branch (208:7): [True: 0, False: 5.14k]
  |  Branch (208:42): [True: 0, False: 0]
  ------------------
  209|      0|    return DE_NOT_OK;
  210|      0|  }
  211|  5.14k|  hGainDec->delayMode = delayMode;
  212|  5.14k|  hGainDec->timeDomainSupported = timeDomainSupported;
  213|  5.14k|  hGainDec->subbandDomainSupported = subbandDomainSupported;
  214|       |
  215|  5.14k|  return DE_OK;
  216|  5.14k|}
_Z25drcDec_GainDecoder_ConfigP16DRC_GAIN_DECODERP14UNI_DRC_CONFIGhPKaPKh:
  223|  2.72k|                          const UCHAR* selectedDownmixIds) {
  224|  2.72k|  DRC_ERROR err = DE_OK;
  225|  2.72k|  int a;
  226|       |
  227|  2.72k|  hGainDec->nActiveDrcs = 0;
  228|  2.72k|  hGainDec->multiBandActiveDrcIndex = -1;
  229|  2.72k|  hGainDec->channelGainActiveDrcIndex = -1;
  230|  5.68k|  for (a = 0; a < numSelectedDrcSets; a++) {
  ------------------
  |  Branch (230:15): [True: 2.99k, False: 2.69k]
  ------------------
  231|  2.99k|    err = initActiveDrc(hGainDec, hUniDrcConfig, selectedDrcSetIds[a],
  232|  2.99k|                        selectedDownmixIds[a]);
  233|  2.99k|    if (err) return err;
  ------------------
  |  Branch (233:9): [True: 34, False: 2.95k]
  ------------------
  234|  2.99k|  }
  235|       |
  236|  2.69k|  err = initActiveDrcOffset(hGainDec);
  237|  2.69k|  if (err) return err;
  ------------------
  |  Branch (237:7): [True: 6, False: 2.68k]
  ------------------
  238|       |
  239|  2.68k|  return err;
  240|  2.69k|}
_Z24drcDec_GainDecoder_ClosePP16DRC_GAIN_DECODER:
  243|  7.39k|drcDec_GainDecoder_Close(HANDLE_DRC_GAIN_DECODER* phGainDec) {
  244|  7.39k|  if (*phGainDec != NULL) {
  ------------------
  |  Branch (244:7): [True: 7.39k, False: 0]
  ------------------
  245|  7.39k|    FDKfree(*phGainDec);
  246|  7.39k|    *phGainDec = NULL;
  247|  7.39k|  }
  248|       |
  249|  7.39k|  return DE_OK;
  250|  7.39k|}

_Z23drcDec_readUniDrcConfigP13FDK_BITSTREAMP14UNI_DRC_CONFIG:
 1676|  33.5k|                        HANDLE_UNI_DRC_CONFIG hUniDrcConfig) {
 1677|  33.5k|  DRC_ERROR err = DE_OK;
 1678|  33.5k|  int i, diff = 0;
 1679|  33.5k|  int drcDescriptionBasicPresent, drcCoefficientsBasicCount,
 1680|  33.5k|      drcInstructionsBasicCount;
 1681|  33.5k|  CHANNEL_LAYOUT tmpChan;
 1682|  33.5k|  FDKmemclear(&tmpChan, sizeof(CHANNEL_LAYOUT));
 1683|  33.5k|  if (hUniDrcConfig == NULL) return DE_NOT_OK;
  ------------------
  |  Branch (1683:7): [True: 0, False: 33.5k]
  ------------------
 1684|       |
 1685|  33.5k|  diff |= _compAssign(&hUniDrcConfig->sampleRatePresent, FDKreadBits(hBs, 1));
 1686|       |
 1687|  33.5k|  if (hUniDrcConfig->sampleRatePresent == 1) {
  ------------------
  |  Branch (1687:7): [True: 1.02k, False: 32.5k]
  ------------------
 1688|  1.02k|    diff |=
 1689|  1.02k|        _compAssign(&hUniDrcConfig->sampleRate, FDKreadBits(hBs, 18) + 1000);
 1690|  1.02k|  }
 1691|       |
 1692|  33.5k|  diff |= _compAssign(&hUniDrcConfig->downmixInstructionsCountV0,
 1693|  33.5k|                      FDKreadBits(hBs, 7));
 1694|       |
 1695|  33.5k|  drcDescriptionBasicPresent = FDKreadBits(hBs, 1);
 1696|  33.5k|  if (drcDescriptionBasicPresent == 1) {
  ------------------
  |  Branch (1696:7): [True: 2.61k, False: 30.9k]
  ------------------
 1697|  2.61k|    drcCoefficientsBasicCount = FDKreadBits(hBs, 3);
 1698|  2.61k|    drcInstructionsBasicCount = FDKreadBits(hBs, 4);
 1699|  30.9k|  } else {
 1700|  30.9k|    drcCoefficientsBasicCount = 0;
 1701|  30.9k|    drcInstructionsBasicCount = 0;
 1702|  30.9k|  }
 1703|       |
 1704|  33.5k|  diff |= _compAssign(&hUniDrcConfig->drcCoefficientsUniDrcCountV0,
 1705|  33.5k|                      FDKreadBits(hBs, 3));
 1706|  33.5k|  diff |= _compAssign(&hUniDrcConfig->drcInstructionsUniDrcCountV0,
 1707|  33.5k|                      FDKreadBits(hBs, 6));
 1708|       |
 1709|  33.5k|  err = _readChannelLayout(hBs, &tmpChan);
 1710|  33.5k|  if (err) return err;
  ------------------
  |  Branch (1710:7): [True: 253, False: 33.3k]
  ------------------
 1711|       |
 1712|  33.3k|  if (!diff)
  ------------------
  |  Branch (1712:7): [True: 17.4k, False: 15.8k]
  ------------------
 1713|  17.4k|    diff |= (FDKmemcmp(&tmpChan, &hUniDrcConfig->channelLayout,
 1714|  17.4k|                       sizeof(CHANNEL_LAYOUT)) != 0);
 1715|  33.3k|  hUniDrcConfig->channelLayout = tmpChan;
 1716|       |
 1717|  33.3k|  hUniDrcConfig->downmixInstructionsCount =
 1718|  33.3k|      fMin(hUniDrcConfig->downmixInstructionsCountV0, (UCHAR)6);
 1719|  1.24M|  for (i = 0; i < hUniDrcConfig->downmixInstructionsCountV0; i++) {
  ------------------
  |  Branch (1719:15): [True: 1.21M, False: 33.2k]
  ------------------
 1720|  1.21M|    DOWNMIX_INSTRUCTIONS tmpDown;
 1721|  1.21M|    FDKmemclear(&tmpDown, sizeof(DOWNMIX_INSTRUCTIONS));
 1722|  1.21M|    err = _readDownmixInstructions(hBs, 0, &hUniDrcConfig->channelLayout,
 1723|  1.21M|                                   &tmpDown);
 1724|  1.21M|    if (err) return err;
  ------------------
  |  Branch (1724:9): [True: 85, False: 1.21M]
  ------------------
 1725|  1.21M|    if (i >= 6) continue;
  ------------------
  |  Branch (1725:9): [True: 1.14M, False: 71.8k]
  ------------------
 1726|  71.8k|    if (!diff)
  ------------------
  |  Branch (1726:9): [True: 11.9k, False: 59.9k]
  ------------------
 1727|  11.9k|      diff |= (FDKmemcmp(&tmpDown, &(hUniDrcConfig->downmixInstructions[i]),
 1728|  11.9k|                         sizeof(DOWNMIX_INSTRUCTIONS)) != 0);
 1729|  71.8k|    hUniDrcConfig->downmixInstructions[i] = tmpDown;
 1730|  71.8k|  }
 1731|       |
 1732|  38.2k|  for (i = 0; i < drcCoefficientsBasicCount; i++) {
  ------------------
  |  Branch (1732:15): [True: 5.07k, False: 33.2k]
  ------------------
 1733|  5.07k|    _skipDrcCoefficientsBasic(hBs);
 1734|  5.07k|  }
 1735|  54.0k|  for (i = 0; i < drcInstructionsBasicCount; i++) {
  ------------------
  |  Branch (1735:15): [True: 20.8k, False: 33.2k]
  ------------------
 1736|  20.8k|    _skipDrcInstructionsBasic(hBs);
 1737|  20.8k|  }
 1738|       |
 1739|  33.2k|  hUniDrcConfig->drcCoefficientsUniDrcCount =
 1740|  33.2k|      fMin(hUniDrcConfig->drcCoefficientsUniDrcCountV0, (UCHAR)2);
 1741|  85.0k|  for (i = 0; i < hUniDrcConfig->drcCoefficientsUniDrcCountV0; i++) {
  ------------------
  |  Branch (1741:15): [True: 51.9k, False: 33.1k]
  ------------------
 1742|  51.9k|    DRC_COEFFICIENTS_UNI_DRC tmpCoef;
 1743|  51.9k|    FDKmemclear(&tmpCoef, sizeof(DRC_COEFFICIENTS_UNI_DRC));
 1744|  51.9k|    err = _readDrcCoefficientsUniDrc(hBs, 0, &tmpCoef);
 1745|  51.9k|    if (err) return err;
  ------------------
  |  Branch (1745:9): [True: 86, False: 51.8k]
  ------------------
 1746|  51.8k|    if (i >= 2) continue;
  ------------------
  |  Branch (1746:9): [True: 30.6k, False: 21.2k]
  ------------------
 1747|  21.2k|    if (!diff)
  ------------------
  |  Branch (1747:9): [True: 5.52k, False: 15.7k]
  ------------------
 1748|  5.52k|      diff |= (FDKmemcmp(&tmpCoef, &(hUniDrcConfig->drcCoefficientsUniDrc[i]),
 1749|  5.52k|                         sizeof(DRC_COEFFICIENTS_UNI_DRC)) != 0);
 1750|  21.2k|    hUniDrcConfig->drcCoefficientsUniDrc[i] = tmpCoef;
 1751|  21.2k|  }
 1752|       |
 1753|  33.1k|  hUniDrcConfig->drcInstructionsUniDrcCount =
 1754|  33.1k|      fMin(hUniDrcConfig->drcInstructionsUniDrcCountV0, (UCHAR)12);
 1755|   757k|  for (i = 0; i < hUniDrcConfig->drcInstructionsUniDrcCountV0; i++) {
  ------------------
  |  Branch (1755:15): [True: 725k, False: 31.2k]
  ------------------
 1756|   725k|    DRC_INSTRUCTIONS_UNI_DRC tmpInst;
 1757|   725k|    FDKmemclear(&tmpInst, sizeof(DRC_INSTRUCTIONS_UNI_DRC));
 1758|   725k|    err = _readDrcInstructionsUniDrc(hBs, 0, hUniDrcConfig, &tmpInst);
 1759|   725k|    if (err) return err;
  ------------------
  |  Branch (1759:9): [True: 1.91k, False: 723k]
  ------------------
 1760|   723k|    if (i >= 12) continue;
  ------------------
  |  Branch (1760:9): [True: 546k, False: 177k]
  ------------------
 1761|   177k|    if (!diff)
  ------------------
  |  Branch (1761:9): [True: 39.4k, False: 137k]
  ------------------
 1762|  39.4k|      diff |= (FDKmemcmp(&tmpInst, &(hUniDrcConfig->drcInstructionsUniDrc[i]),
 1763|  39.4k|                         sizeof(DRC_INSTRUCTIONS_UNI_DRC)) != 0);
 1764|   177k|    hUniDrcConfig->drcInstructionsUniDrc[i] = tmpInst;
 1765|   177k|  }
 1766|       |
 1767|  31.2k|  diff |=
 1768|  31.2k|      _compAssign(&hUniDrcConfig->uniDrcConfigExtPresent, FDKreadBits(hBs, 1));
 1769|  31.2k|  hUniDrcConfig->diff = diff;
 1770|       |
 1771|  31.2k|  if (hUniDrcConfig->uniDrcConfigExtPresent == 1) {
  ------------------
  |  Branch (1771:7): [True: 19.6k, False: 11.5k]
  ------------------
 1772|  19.6k|    err = _readUniDrcConfigExtension(hBs, hUniDrcConfig);
 1773|  19.6k|    if (err) return err;
  ------------------
  |  Branch (1773:9): [True: 18.6k, False: 997]
  ------------------
 1774|  19.6k|  }
 1775|       |
 1776|  12.5k|  return err;
 1777|  31.2k|}
_Z26drcDec_readLoudnessInfoSetP13FDK_BITSTREAMP17LOUDNESS_INFO_SET:
 1995|  5.55k|                           HANDLE_LOUDNESS_INFO_SET hLoudnessInfoSet) {
 1996|  5.55k|  DRC_ERROR err = DE_OK;
 1997|  5.55k|  int i, diff = 0;
 1998|  5.55k|  if (hLoudnessInfoSet == NULL) return DE_NOT_OK;
  ------------------
  |  Branch (1998:7): [True: 0, False: 5.55k]
  ------------------
 1999|       |
 2000|  5.55k|  diff |= _compAssign(&hLoudnessInfoSet->loudnessInfoAlbumCountV0,
 2001|  5.55k|                      FDKreadBits(hBs, 6));
 2002|  5.55k|  diff |=
 2003|  5.55k|      _compAssign(&hLoudnessInfoSet->loudnessInfoCountV0, FDKreadBits(hBs, 6));
 2004|       |
 2005|  5.55k|  hLoudnessInfoSet->loudnessInfoAlbumCount =
 2006|  5.55k|      fMin(hLoudnessInfoSet->loudnessInfoAlbumCountV0, (UCHAR)12);
 2007|  10.8k|  for (i = 0; i < hLoudnessInfoSet->loudnessInfoAlbumCountV0; i++) {
  ------------------
  |  Branch (2007:15): [True: 5.68k, False: 5.20k]
  ------------------
 2008|  5.68k|    LOUDNESS_INFO tmpLoud;
 2009|  5.68k|    FDKmemclear(&tmpLoud, sizeof(LOUDNESS_INFO));
 2010|  5.68k|    err = _readLoudnessInfo(hBs, 0, &tmpLoud);
 2011|  5.68k|    if (err) return err;
  ------------------
  |  Branch (2011:9): [True: 353, False: 5.32k]
  ------------------
 2012|  5.32k|    if (i >= 12) continue;
  ------------------
  |  Branch (2012:9): [True: 2.66k, False: 2.65k]
  ------------------
 2013|  2.65k|    if (!diff)
  ------------------
  |  Branch (2013:9): [True: 270, False: 2.38k]
  ------------------
 2014|    270|      diff |= (FDKmemcmp(&tmpLoud, &(hLoudnessInfoSet->loudnessInfoAlbum[i]),
 2015|    270|                         sizeof(LOUDNESS_INFO)) != 0);
 2016|  2.65k|    hLoudnessInfoSet->loudnessInfoAlbum[i] = tmpLoud;
 2017|  2.65k|  }
 2018|       |
 2019|  5.20k|  hLoudnessInfoSet->loudnessInfoCount =
 2020|  5.20k|      fMin(hLoudnessInfoSet->loudnessInfoCountV0, (UCHAR)12);
 2021|  13.0k|  for (i = 0; i < hLoudnessInfoSet->loudnessInfoCountV0; i++) {
  ------------------
  |  Branch (2021:15): [True: 7.94k, False: 5.08k]
  ------------------
 2022|  7.94k|    LOUDNESS_INFO tmpLoud;
 2023|  7.94k|    FDKmemclear(&tmpLoud, sizeof(LOUDNESS_INFO));
 2024|  7.94k|    err = _readLoudnessInfo(hBs, 0, &tmpLoud);
 2025|  7.94k|    if (err) return err;
  ------------------
  |  Branch (2025:9): [True: 125, False: 7.82k]
  ------------------
 2026|  7.82k|    if (i >= 12) continue;
  ------------------
  |  Branch (2026:9): [True: 2.72k, False: 5.09k]
  ------------------
 2027|  5.09k|    if (!diff)
  ------------------
  |  Branch (2027:9): [True: 1.84k, False: 3.24k]
  ------------------
 2028|  1.84k|      diff |= (FDKmemcmp(&tmpLoud, &(hLoudnessInfoSet->loudnessInfo[i]),
 2029|  1.84k|                         sizeof(LOUDNESS_INFO)) != 0);
 2030|  5.09k|    hLoudnessInfoSet->loudnessInfo[i] = tmpLoud;
 2031|  5.09k|  }
 2032|       |
 2033|  5.08k|  diff |= _compAssign(&hLoudnessInfoSet->loudnessInfoSetExtPresent,
 2034|  5.08k|                      FDKreadBits(hBs, 1));
 2035|  5.08k|  hLoudnessInfoSet->diff = diff;
 2036|       |
 2037|  5.08k|  if (hLoudnessInfoSet->loudnessInfoSetExtPresent) {
  ------------------
  |  Branch (2037:7): [True: 1.02k, False: 4.05k]
  ------------------
 2038|  1.02k|    err = _readLoudnessInfoSetExtension(hBs, hLoudnessInfoSet);
 2039|  1.02k|    if (err) return err;
  ------------------
  |  Branch (2039:9): [True: 454, False: 572]
  ------------------
 2040|  1.02k|  }
 2041|       |
 2042|  4.62k|  return err;
 2043|  5.08k|}
drcDec_reader.cpp:_ZL11_compAssignPhh:
  139|   248k|static inline int _compAssign(UCHAR* dest, const UCHAR src) {
  140|   248k|  int diff = 0;
  141|   248k|  if (*dest != src) diff = 1;
  ------------------
  |  Branch (141:7): [True: 68.7k, False: 179k]
  ------------------
  142|   248k|  *dest = src;
  143|   248k|  return diff;
  144|   248k|}
drcDec_reader.cpp:_ZL11_compAssignPjj:
  146|  1.02k|static inline int _compAssign(ULONG* dest, const ULONG src) {
  147|  1.02k|  int diff = 0;
  148|  1.02k|  if (*dest != src) diff = 1;
  ------------------
  |  Branch (148:7): [True: 548, False: 481]
  ------------------
  149|  1.02k|  *dest = src;
  150|  1.02k|  return diff;
  151|  1.02k|}
drcDec_reader.cpp:_ZL18_readChannelLayoutP13FDK_BITSTREAMP14CHANNEL_LAYOUT:
 1478|  33.5k|                                    CHANNEL_LAYOUT* pChan) {
 1479|  33.5k|  DRC_ERROR err = DE_OK;
 1480|       |
 1481|  33.5k|  pChan->baseChannelCount = FDKreadBits(hBs, 7);
 1482|       |
 1483|  33.5k|  if (pChan->baseChannelCount > 8) return DE_NOT_OK;
  ------------------
  |  Branch (1483:7): [True: 253, False: 33.3k]
  ------------------
 1484|       |
 1485|  33.3k|  pChan->layoutSignalingPresent = FDKreadBits(hBs, 1);
 1486|       |
 1487|  33.3k|  if (pChan->layoutSignalingPresent) {
  ------------------
  |  Branch (1487:7): [True: 6.80k, False: 26.5k]
  ------------------
 1488|  6.80k|    pChan->definedLayout = FDKreadBits(hBs, 8);
 1489|       |
 1490|  6.80k|    if (pChan->definedLayout == 0) {
  ------------------
  |  Branch (1490:9): [True: 511, False: 6.29k]
  ------------------
 1491|    511|      int i;
 1492|  2.84k|      for (i = 0; i < pChan->baseChannelCount; i++) {
  ------------------
  |  Branch (1492:19): [True: 2.33k, False: 511]
  ------------------
 1493|  2.33k|        if (i < 8) {
  ------------------
  |  Branch (1493:13): [True: 2.33k, False: 0]
  ------------------
 1494|  2.33k|          pChan->speakerPosition[i] = FDKreadBits(hBs, 7);
 1495|  2.33k|        } else {
 1496|      0|          FDKpushFor(hBs, 7);
 1497|      0|        }
 1498|  2.33k|      }
 1499|    511|    }
 1500|  6.80k|  }
 1501|  33.3k|  return err;
 1502|  33.5k|}
drcDec_reader.cpp:_ZL24_readDownmixInstructionsP13FDK_BITSTREAMiP14CHANNEL_LAYOUTP20DOWNMIX_INSTRUCTIONS:
 1507|  1.26M|                                          DOWNMIX_INSTRUCTIONS* pDown) {
 1508|  1.26M|  DRC_ERROR err = DE_OK;
 1509|       |
 1510|  1.26M|  pDown->downmixId = FDKreadBits(hBs, 7);
 1511|  1.26M|  pDown->targetChannelCount = FDKreadBits(hBs, 7);
 1512|  1.26M|  pDown->targetLayout = FDKreadBits(hBs, 8);
 1513|  1.26M|  pDown->downmixCoefficientsPresent = FDKreadBits(hBs, 1);
 1514|       |
 1515|  1.26M|  if (pDown->downmixCoefficientsPresent) {
  ------------------
  |  Branch (1515:7): [True: 4.60k, False: 1.26M]
  ------------------
 1516|  4.60k|    int nDownmixCoeffs = pDown->targetChannelCount * pChan->baseChannelCount;
 1517|  4.60k|    int i;
 1518|  4.60k|    if (nDownmixCoeffs > 8 * 8) return DE_NOT_OK;
  ------------------
  |  Branch (1518:9): [True: 179, False: 4.42k]
  ------------------
 1519|  4.42k|    if (version == 0) {
  ------------------
  |  Branch (1519:9): [True: 2.52k, False: 1.90k]
  ------------------
 1520|  2.52k|      pDown->bsDownmixOffset = 0;
 1521|  25.7k|      for (i = 0; i < nDownmixCoeffs; i++) {
  ------------------
  |  Branch (1521:19): [True: 23.2k, False: 2.52k]
  ------------------
 1522|       |        /* LFE downmix coefficients are not supported. */
 1523|  23.2k|        pDown->downmixCoefficient[i] = downmixCoeff[FDKreadBits(hBs, 4)];
 1524|  23.2k|      }
 1525|  2.52k|    } else {
 1526|  1.90k|      pDown->bsDownmixOffset = FDKreadBits(hBs, 4);
 1527|  4.42k|      for (i = 0; i < nDownmixCoeffs; i++) {
  ------------------
  |  Branch (1527:19): [True: 2.52k, False: 1.90k]
  ------------------
 1528|  2.52k|        pDown->downmixCoefficient[i] = downmixCoeffV1[FDKreadBits(hBs, 5)];
 1529|  2.52k|      }
 1530|  1.90k|    }
 1531|  4.42k|  }
 1532|  1.26M|  return err;
 1533|  1.26M|}
drcDec_reader.cpp:_ZL25_skipDrcCoefficientsBasicP13FDK_BITSTREAM:
 1104|  5.07k|static void _skipDrcCoefficientsBasic(HANDLE_FDK_BITSTREAM hBs) {
 1105|  5.07k|  FDKpushFor(hBs, 4); /* drcLocation */
 1106|  5.07k|  FDKpushFor(hBs, 7); /* drcCharacteristic */
 1107|  5.07k|}
drcDec_reader.cpp:_ZL25_skipDrcInstructionsBasicP13FDK_BITSTREAM:
 1215|  20.8k|static void _skipDrcInstructionsBasic(HANDLE_FDK_BITSTREAM hBs) {
 1216|  20.8k|  int drcSetEffect;
 1217|  20.8k|  int additionalDownmixIdPresent, additionalDownmixIdCount,
 1218|  20.8k|      limiterPeakTargetPresent;
 1219|  20.8k|  int drcSetTargetLoudnessPresent, drcSetTargetLoudnessValueLowerPresent;
 1220|       |
 1221|  20.8k|  FDKpushFor(hBs, 6); /* drcSetId */
 1222|  20.8k|  FDKpushFor(hBs, 4); /* drcLocation */
 1223|  20.8k|  FDKpushFor(hBs, 7); /* downmixId */
 1224|  20.8k|  additionalDownmixIdPresent = FDKreadBits(hBs, 1);
 1225|  20.8k|  if (additionalDownmixIdPresent) {
  ------------------
  |  Branch (1225:7): [True: 2.16k, False: 18.6k]
  ------------------
 1226|  2.16k|    additionalDownmixIdCount = FDKreadBits(hBs, 3);
 1227|  2.16k|    FDKpushFor(hBs, 7 * additionalDownmixIdCount); /* additionalDownmixId */
 1228|  2.16k|  }
 1229|       |
 1230|  20.8k|  drcSetEffect = FDKreadBits(hBs, 16);
 1231|  20.8k|  if (!(drcSetEffect & (EB_DUCK_OTHER | EB_DUCK_SELF))) {
  ------------------
  |  Branch (1231:7): [True: 19.0k, False: 1.80k]
  ------------------
 1232|  19.0k|    limiterPeakTargetPresent = FDKreadBits(hBs, 1);
 1233|  19.0k|    if (limiterPeakTargetPresent) {
  ------------------
  |  Branch (1233:9): [True: 1.23k, False: 17.7k]
  ------------------
 1234|  1.23k|      FDKpushFor(hBs, 8); /* bsLimiterPeakTarget */
 1235|  1.23k|    }
 1236|  19.0k|  }
 1237|       |
 1238|  20.8k|  drcSetTargetLoudnessPresent = FDKreadBits(hBs, 1);
 1239|  20.8k|  if (drcSetTargetLoudnessPresent) {
  ------------------
  |  Branch (1239:7): [True: 1.89k, False: 18.9k]
  ------------------
 1240|  1.89k|    FDKpushFor(hBs, 6); /* bsDrcSetTargetLoudnessValueUpper */
 1241|  1.89k|    drcSetTargetLoudnessValueLowerPresent = FDKreadBits(hBs, 1);
 1242|  1.89k|    if (drcSetTargetLoudnessValueLowerPresent) {
  ------------------
  |  Branch (1242:9): [True: 1.09k, False: 805]
  ------------------
 1243|  1.09k|      FDKpushFor(hBs, 6); /* bsDrcSetTargetLoudnessValueLower */
 1244|  1.09k|    }
 1245|  1.89k|  }
 1246|  20.8k|}
drcDec_reader.cpp:_ZL26_readDrcCoefficientsUniDrcP13FDK_BITSTREAMiP24DRC_COEFFICIENTS_UNI_DRC:
 1111|  79.9k|                                            DRC_COEFFICIENTS_UNI_DRC* pCoef) {
 1112|  79.9k|  DRC_ERROR err = DE_OK;
 1113|  79.9k|  int i, bsDrcFrameSize;
 1114|  79.9k|  int gainSequenceIndex = -1;
 1115|       |
 1116|  79.9k|  pCoef->drcLocation = FDKreadBits(hBs, 4);
 1117|  79.9k|  pCoef->drcFrameSizePresent = FDKreadBits(hBs, 1);
 1118|       |
 1119|  79.9k|  if (pCoef->drcFrameSizePresent == 1) {
  ------------------
  |  Branch (1119:7): [True: 4.48k, False: 75.4k]
  ------------------
 1120|  4.48k|    bsDrcFrameSize = FDKreadBits(hBs, 15);
 1121|  4.48k|    pCoef->drcFrameSize = bsDrcFrameSize + 1;
 1122|  4.48k|  }
 1123|  79.9k|  if (version == 0) {
  ------------------
  |  Branch (1123:7): [True: 51.9k, False: 28.0k]
  ------------------
 1124|  51.9k|    int gainSequenceCount = 0, gainSetCount;
 1125|  51.9k|    pCoef->characteristicLeftCount = 0;
 1126|  51.9k|    pCoef->characteristicRightCount = 0;
 1127|  51.9k|    gainSetCount = FDKreadBits(hBs, 6);
 1128|  51.9k|    pCoef->gainSetCount = fMin(gainSetCount, 12);
 1129|  80.6k|    for (i = 0; i < gainSetCount; i++) {
  ------------------
  |  Branch (1129:17): [True: 28.7k, False: 51.8k]
  ------------------
 1130|  28.7k|      GAIN_SET tmpGset;
 1131|  28.7k|      FDKmemclear(&tmpGset, sizeof(GAIN_SET));
 1132|  28.7k|      err = _readGainSet(hBs, version, &gainSequenceIndex, &tmpGset, 0);
 1133|  28.7k|      if (err) return err;
  ------------------
  |  Branch (1133:11): [True: 86, False: 28.7k]
  ------------------
 1134|  28.7k|      gainSequenceCount += tmpGset.bandCount;
 1135|       |
 1136|  28.7k|      if (i >= 12) continue;
  ------------------
  |  Branch (1136:11): [True: 17.4k, False: 11.2k]
  ------------------
 1137|  11.2k|      pCoef->gainSet[i] = tmpGset;
 1138|  11.2k|    }
 1139|  51.8k|    pCoef->gainSequenceCount = gainSequenceCount;
 1140|  51.8k|  } else { /* (version == 1) */
 1141|  28.0k|    UCHAR drcCharacteristicLeftPresent, drcCharacteristicRightPresent;
 1142|  28.0k|    UCHAR shapeFiltersPresent, shapeFilterCount, tmpPresent;
 1143|  28.0k|    int gainSetCount;
 1144|  28.0k|    drcCharacteristicLeftPresent = FDKreadBits(hBs, 1);
 1145|  28.0k|    if (drcCharacteristicLeftPresent) {
  ------------------
  |  Branch (1145:9): [True: 2.25k, False: 25.7k]
  ------------------
 1146|  2.25k|      pCoef->characteristicLeftCount = FDKreadBits(hBs, 4);
 1147|  2.25k|      if ((pCoef->characteristicLeftCount + 1) > 16) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (1147:11): [True: 0, False: 2.25k]
  ------------------
 1148|  7.94k|      for (i = 0; i < pCoef->characteristicLeftCount; i++) {
  ------------------
  |  Branch (1148:19): [True: 5.68k, False: 2.25k]
  ------------------
 1149|  5.68k|        err = _readCustomDrcCharacteristic(
 1150|  5.68k|            hBs, CS_LEFT, &(pCoef->characteristicLeftFormat[i + 1]),
 1151|  5.68k|            &(pCoef->customCharacteristicLeft[i + 1]), 0);
 1152|  5.68k|        if (err) return err;
  ------------------
  |  Branch (1152:13): [True: 0, False: 5.68k]
  ------------------
 1153|  5.68k|      }
 1154|  2.25k|    }
 1155|  28.0k|    drcCharacteristicRightPresent = FDKreadBits(hBs, 1);
 1156|  28.0k|    if (drcCharacteristicRightPresent) {
  ------------------
  |  Branch (1156:9): [True: 2.06k, False: 25.9k]
  ------------------
 1157|  2.06k|      pCoef->characteristicRightCount = FDKreadBits(hBs, 4);
 1158|  2.06k|      if ((pCoef->characteristicRightCount + 1) > 16) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (1158:11): [True: 0, False: 2.06k]
  ------------------
 1159|  7.57k|      for (i = 0; i < pCoef->characteristicRightCount; i++) {
  ------------------
  |  Branch (1159:19): [True: 5.50k, False: 2.06k]
  ------------------
 1160|  5.50k|        err = _readCustomDrcCharacteristic(
 1161|  5.50k|            hBs, CS_RIGHT, &(pCoef->characteristicRightFormat[i + 1]),
 1162|  5.50k|            &(pCoef->customCharacteristicRight[i + 1]), 0);
 1163|  5.50k|        if (err) return err;
  ------------------
  |  Branch (1163:13): [True: 0, False: 5.50k]
  ------------------
 1164|  5.50k|      }
 1165|  2.06k|    }
 1166|  28.0k|    shapeFiltersPresent = FDKreadBits(hBs, 1);
 1167|  28.0k|    if (shapeFiltersPresent) {
  ------------------
  |  Branch (1167:9): [True: 3.79k, False: 24.2k]
  ------------------
 1168|  3.79k|      shapeFilterCount = FDKreadBits(hBs, 4);
 1169|  27.7k|      for (i = 0; i < shapeFilterCount; i++) {
  ------------------
  |  Branch (1169:19): [True: 23.9k, False: 3.79k]
  ------------------
 1170|  23.9k|        tmpPresent = FDKreadBits(hBs, 1);
 1171|  23.9k|        if (tmpPresent) /* lfCutParams */
  ------------------
  |  Branch (1171:13): [True: 5.81k, False: 18.1k]
  ------------------
 1172|  5.81k|          FDKpushFor(hBs, 5);
 1173|       |
 1174|  23.9k|        tmpPresent = FDKreadBits(hBs, 1);
 1175|  23.9k|        if (tmpPresent) /* lfBoostParams */
  ------------------
  |  Branch (1175:13): [True: 5.59k, False: 18.4k]
  ------------------
 1176|  5.59k|          FDKpushFor(hBs, 5);
 1177|       |
 1178|  23.9k|        tmpPresent = FDKreadBits(hBs, 1);
 1179|  23.9k|        if (tmpPresent) /* hfCutParams */
  ------------------
  |  Branch (1179:13): [True: 6.08k, False: 17.9k]
  ------------------
 1180|  6.08k|          FDKpushFor(hBs, 5);
 1181|       |
 1182|  23.9k|        tmpPresent = FDKreadBits(hBs, 1);
 1183|  23.9k|        if (tmpPresent) /* hfBoostParams */
  ------------------
  |  Branch (1183:13): [True: 3.94k, False: 20.0k]
  ------------------
 1184|  3.94k|          FDKpushFor(hBs, 5);
 1185|  23.9k|      }
 1186|  3.79k|    }
 1187|  28.0k|    pCoef->gainSequenceCount = FDKreadBits(hBs, 6);
 1188|  28.0k|    gainSetCount = FDKreadBits(hBs, 6);
 1189|  28.0k|    pCoef->gainSetCount = fMin(gainSetCount, 12);
 1190|  90.1k|    for (i = 0; i < gainSetCount; i++) {
  ------------------
  |  Branch (1190:17): [True: 62.2k, False: 27.9k]
  ------------------
 1191|  62.2k|      GAIN_SET tmpGset;
 1192|  62.2k|      FDKmemclear(&tmpGset, sizeof(GAIN_SET));
 1193|  62.2k|      err = _readGainSet(hBs, version, &gainSequenceIndex, &tmpGset, 0);
 1194|  62.2k|      if (err) return err;
  ------------------
  |  Branch (1194:11): [True: 89, False: 62.1k]
  ------------------
 1195|       |
 1196|  62.1k|      if (i >= 12) continue;
  ------------------
  |  Branch (1196:11): [True: 36.0k, False: 26.1k]
  ------------------
 1197|  26.1k|      pCoef->gainSet[i] = tmpGset;
 1198|  26.1k|    }
 1199|  28.0k|  }
 1200|  1.03M|  for (i = 0; i < 12; i++) {
  ------------------
  |  Branch (1200:15): [True: 957k, False: 79.7k]
  ------------------
 1201|   957k|    pCoef->gainSetIndexForGainSequence[i] = 255;
 1202|   957k|  }
 1203|   117k|  for (i = 0; i < pCoef->gainSetCount; i++) {
  ------------------
  |  Branch (1203:15): [True: 37.2k, False: 79.7k]
  ------------------
 1204|  37.2k|    int b;
 1205|  53.3k|    for (b = 0; b < pCoef->gainSet[i].bandCount; b++) {
  ------------------
  |  Branch (1205:17): [True: 16.0k, False: 37.2k]
  ------------------
 1206|  16.0k|      if (pCoef->gainSet[i].gainSequenceIndex[b] >= 12) continue;
  ------------------
  |  Branch (1206:11): [True: 3.88k, False: 12.1k]
  ------------------
 1207|  12.1k|      pCoef->gainSetIndexForGainSequence[pCoef->gainSet[i]
 1208|  12.1k|                                             .gainSequenceIndex[b]] = i;
 1209|  12.1k|    }
 1210|  37.2k|  }
 1211|       |
 1212|  79.7k|  return err;
 1213|  79.9k|}
drcDec_reader.cpp:_ZL12_readGainSetP13FDK_BITSTREAMiPiP8GAIN_SETi:
  708|  91.0k|                              int isBox) {
  709|  91.0k|  if (isBox) FDKpushFor(hBs, 2); /* reserved */
  ------------------
  |  Branch (709:7): [True: 0, False: 91.0k]
  ------------------
  710|  91.0k|  pGSet->gainCodingProfile = FDKreadBits(hBs, 2);
  711|  91.0k|  pGSet->gainInterpolationType = FDKreadBits(hBs, 1);
  712|  91.0k|  pGSet->fullFrame = FDKreadBits(hBs, 1);
  713|  91.0k|  pGSet->timeAlignment = FDKreadBits(hBs, 1);
  714|  91.0k|  pGSet->timeDeltaMinPresent = FDKreadBits(hBs, 1);
  715|       |
  716|  91.0k|  if (pGSet->timeDeltaMinPresent) {
  ------------------
  |  Branch (716:7): [True: 2.59k, False: 88.4k]
  ------------------
  717|  2.59k|    int bsTimeDeltaMin;
  718|  2.59k|    if (isBox) FDKpushFor(hBs, 5); /* reserved */
  ------------------
  |  Branch (718:9): [True: 0, False: 2.59k]
  ------------------
  719|  2.59k|    bsTimeDeltaMin = FDKreadBits(hBs, 11);
  720|  2.59k|    pGSet->timeDeltaMin = bsTimeDeltaMin + 1;
  721|  2.59k|  }
  722|       |
  723|  91.0k|  if (pGSet->gainCodingProfile != GCP_CONSTANT) {
  ------------------
  |  Branch (723:7): [True: 86.0k, False: 4.99k]
  ------------------
  724|  86.0k|    int i;
  725|  86.0k|    if (isBox) FDKpushFor(hBs, 3); /* reserved */
  ------------------
  |  Branch (725:9): [True: 0, False: 86.0k]
  ------------------
  726|  86.0k|    pGSet->bandCount = FDKreadBits(hBs, 4);
  727|  86.0k|    if (pGSet->bandCount > 4) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (727:9): [True: 175, False: 85.8k]
  ------------------
  728|       |
  729|  85.8k|    if ((pGSet->bandCount > 1) || isBox) {
  ------------------
  |  Branch (729:9): [True: 3.05k, False: 82.7k]
  |  Branch (729:35): [True: 0, False: 82.7k]
  ------------------
  730|  3.05k|      pGSet->drcBandType = FDKreadBits(hBs, 1);
  731|  3.05k|    }
  732|       |
  733|  97.1k|    for (i = 0; i < pGSet->bandCount; i++) {
  ------------------
  |  Branch (733:17): [True: 11.2k, False: 85.8k]
  ------------------
  734|  11.2k|      if (version == 0) {
  ------------------
  |  Branch (734:11): [True: 2.02k, False: 9.26k]
  ------------------
  735|  2.02k|        *gainSequenceIndex = (*gainSequenceIndex) + 1;
  736|  9.26k|      } else {
  737|  9.26k|        int indexPresent;
  738|  9.26k|        indexPresent = (isBox) ? 1 : FDKreadBits(hBs, 1);
  ------------------
  |  Branch (738:24): [True: 0, False: 9.26k]
  ------------------
  739|  9.26k|        if (indexPresent) {
  ------------------
  |  Branch (739:13): [True: 2.33k, False: 6.92k]
  ------------------
  740|  2.33k|          int bsIndex;
  741|  2.33k|          bsIndex = FDKreadBits(hBs, 6);
  742|  2.33k|          *gainSequenceIndex = bsIndex;
  743|  6.92k|        } else {
  744|  6.92k|          *gainSequenceIndex = (*gainSequenceIndex) + 1;
  745|  6.92k|        }
  746|  9.26k|      }
  747|  11.2k|      pGSet->gainSequenceIndex[i] = *gainSequenceIndex;
  748|  11.2k|      _readDrcCharacteristic(hBs, version, &(pGSet->drcCharacteristic[i]),
  749|  11.2k|                             isBox);
  750|  11.2k|    }
  751|  92.6k|    for (i = 1; i < pGSet->bandCount; i++) {
  ------------------
  |  Branch (751:17): [True: 6.84k, False: 85.8k]
  ------------------
  752|  6.84k|      _readBandBorder(hBs, &(pGSet->bandBorder[i]), pGSet->drcBandType, isBox);
  753|  6.84k|    }
  754|  85.8k|  } else {
  755|  4.99k|    pGSet->bandCount = 1;
  756|  4.99k|    *gainSequenceIndex = (*gainSequenceIndex) + 1;
  757|  4.99k|    pGSet->gainSequenceIndex[0] = *gainSequenceIndex;
  758|  4.99k|  }
  759|       |
  760|  90.8k|  return DE_OK;
  761|  91.0k|}
drcDec_reader.cpp:_ZL22_readDrcCharacteristicP13FDK_BITSTREAMiP18DRC_CHARACTERISTICi:
  669|  11.2k|                                   DRC_CHARACTERISTIC* pDChar, int isBox) {
  670|  11.2k|  if (version == 0) {
  ------------------
  |  Branch (670:7): [True: 2.02k, False: 9.26k]
  ------------------
  671|  2.02k|    if (isBox) FDKpushFor(hBs, 1); /* reserved */
  ------------------
  |  Branch (671:9): [True: 0, False: 2.02k]
  ------------------
  672|  2.02k|    pDChar->cicpIndex = FDKreadBits(hBs, 7);
  673|  2.02k|    if (pDChar->cicpIndex > 0) {
  ------------------
  |  Branch (673:9): [True: 915, False: 1.10k]
  ------------------
  674|    915|      pDChar->present = 1;
  675|    915|      pDChar->isCICP = 1;
  676|  1.10k|    } else {
  677|  1.10k|      pDChar->present = 0;
  678|  1.10k|    }
  679|  9.26k|  } else {
  680|  9.26k|    pDChar->present = FDKreadBits(hBs, 1);
  681|  9.26k|    if (isBox) pDChar->isCICP = FDKreadBits(hBs, 1);
  ------------------
  |  Branch (681:9): [True: 0, False: 9.26k]
  ------------------
  682|  9.26k|    if (pDChar->present) {
  ------------------
  |  Branch (682:9): [True: 2.76k, False: 6.49k]
  ------------------
  683|  2.76k|      if (!isBox) pDChar->isCICP = FDKreadBits(hBs, 1);
  ------------------
  |  Branch (683:11): [True: 2.76k, False: 0]
  ------------------
  684|  2.76k|      if (pDChar->isCICP) {
  ------------------
  |  Branch (684:11): [True: 1.07k, False: 1.69k]
  ------------------
  685|  1.07k|        if (isBox) FDKpushFor(hBs, 1); /* reserved */
  ------------------
  |  Branch (685:13): [True: 0, False: 1.07k]
  ------------------
  686|  1.07k|        pDChar->cicpIndex = FDKreadBits(hBs, 7);
  687|  1.69k|      } else {
  688|  1.69k|        pDChar->custom.left = FDKreadBits(hBs, 4);
  689|  1.69k|        pDChar->custom.right = FDKreadBits(hBs, 4);
  690|  1.69k|      }
  691|  2.76k|    }
  692|  9.26k|  }
  693|  11.2k|}
drcDec_reader.cpp:_ZL15_readBandBorderP13FDK_BITSTREAMP11BAND_BORDERii:
  696|  6.84k|                            int drcBandType, int isBox) {
  697|  6.84k|  if (drcBandType) {
  ------------------
  |  Branch (697:7): [True: 4.25k, False: 2.58k]
  ------------------
  698|  4.25k|    if (isBox) FDKpushFor(hBs, 4); /* reserved */
  ------------------
  |  Branch (698:9): [True: 0, False: 4.25k]
  ------------------
  699|  4.25k|    pBBord->crossoverFreqIndex = FDKreadBits(hBs, 4);
  700|  4.25k|  } else {
  701|  2.58k|    if (isBox) FDKpushFor(hBs, 6); /* reserved */
  ------------------
  |  Branch (701:9): [True: 0, False: 2.58k]
  ------------------
  702|  2.58k|    pBBord->startSubBandIndex = FDKreadBits(hBs, 10);
  703|  2.58k|  }
  704|  6.84k|}
drcDec_reader.cpp:_ZL28_readCustomDrcCharacteristicP13FDK_BITSTREAM19CHARACTERISTIC_SIDEPhP15CUSTOM_DRC_CHARi:
  767|  11.1k|                                              int isBox) {
  768|  11.1k|  if (isBox) FDKpushFor(hBs, 7); /* reserved */
  ------------------
  |  Branch (768:7): [True: 0, False: 11.1k]
  ------------------
  769|  11.1k|  *pCharacteristicFormat = FDKreadBits(hBs, 1);
  770|  11.1k|  if (*pCharacteristicFormat == CF_SIGMOID) {
  ------------------
  |  Branch (770:7): [True: 9.25k, False: 1.93k]
  ------------------
  771|  9.25k|    int bsGain, bsIoRatio, bsExp;
  772|  9.25k|    if (isBox) FDKpushFor(hBs, 1); /* reserved */
  ------------------
  |  Branch (772:9): [True: 0, False: 9.25k]
  ------------------
  773|  9.25k|    bsGain = FDKreadBits(hBs, 6);
  774|  9.25k|    if (side == CS_LEFT) {
  ------------------
  |  Branch (774:9): [True: 4.29k, False: 4.96k]
  ------------------
  775|  4.29k|      pCChar->sigmoid.gain = (FIXP_SGL)(bsGain << (FRACT_BITS - 1 - 6));
  ------------------
  |  |  112|  4.29k|#define FRACT_BITS 16  /* single precision */
  ------------------
  776|  4.96k|    } else {
  777|  4.96k|      pCChar->sigmoid.gain = (FIXP_SGL)(-bsGain << (FRACT_BITS - 1 - 6));
  ------------------
  |  |  112|  4.96k|#define FRACT_BITS 16  /* single precision */
  ------------------
  778|  4.96k|    }
  779|  9.25k|    bsIoRatio = FDKreadBits(hBs, 4);
  780|       |    /* pCChar->sigmoid.ioRatio = 0.05 + 0.15 * bsIoRatio; */
  781|  9.25k|    pCChar->sigmoid.ioRatio =
  782|  9.25k|        FL2FXCONST_SGL(0.05f / (float)(1 << 2)) +
  ------------------
  |  |  180|  9.25k|  (FIXP_SGL)(                                                                \
  |  |  181|  9.25k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 9.25k, Folded]
  |  |  ------------------
  |  |  182|  9.25k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  9.25k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  9.25k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 9.25k]
  |  |  ------------------
  |  |  183|  9.25k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  9.25k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  9.25k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  9.25k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  9.25k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  9.25k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  9.25k|          : ((((double)(val) * (FRACT_FIX_SCALE)-0.5) <=                     \
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (186:14): [Folded, False: 0]
  |  |  ------------------
  |  |  187|      0|              (double)(MINVAL_SGL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  188|      0|                 ? (SHORT)(MINVAL_SGL_CONST)                                 \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  189|      0|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  783|  9.25k|        (FIXP_SGL)((((3 * bsIoRatio) << (FRACT_BITS - 1)) / 5) >> 4);
  ------------------
  |  |  112|  9.25k|#define FRACT_BITS 16  /* single precision */
  ------------------
  784|  9.25k|    bsExp = FDKreadBits(hBs, 4);
  785|  9.25k|    if (bsExp < 15) {
  ------------------
  |  Branch (785:9): [True: 9.01k, False: 241]
  ------------------
  786|  9.01k|      pCChar->sigmoid.exp = (FIXP_SGL)((1 + 2 * bsExp) << (FRACT_BITS - 1 - 5));
  ------------------
  |  |  112|  9.01k|#define FRACT_BITS 16  /* single precision */
  ------------------
  787|  9.01k|    } else {
  788|    241|      pCChar->sigmoid.exp = (FIXP_SGL)MAXVAL_SGL; /* represents infinity */
  ------------------
  |  |  152|    241|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  ------------------
  789|    241|    }
  790|  9.25k|    pCChar->sigmoid.flipSign = FDKreadBits(hBs, 1);
  791|  9.25k|  } else { /* CF_NODES */
  792|  1.93k|    int i, bsCharacteristicNodeCount, bsNodeLevelDelta, bsNodeGain;
  793|  1.93k|    if (isBox) FDKpushFor(hBs, 6); /* reserved */
  ------------------
  |  Branch (793:9): [True: 0, False: 1.93k]
  ------------------
  794|  1.93k|    bsCharacteristicNodeCount = FDKreadBits(hBs, 2);
  795|  1.93k|    pCChar->nodes.characteristicNodeCount = bsCharacteristicNodeCount + 1;
  796|  1.93k|    if (pCChar->nodes.characteristicNodeCount > 4) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (796:9): [True: 0, False: 1.93k]
  ------------------
  797|  1.93k|    pCChar->nodes.nodeLevel[0] = DRC_INPUT_LOUDNESS_TARGET_SGL;
  ------------------
  |  |  140|  1.93k|#define DRC_INPUT_LOUDNESS_TARGET_SGL FL2FXCONST_SGL(-31.0f / (float)(1 << 7))
  |  |  ------------------
  |  |  |  |  180|  1.93k|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|  1.93k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [Folded, False: 1.93k]
  |  |  |  |  ------------------
  |  |  |  |  182|  1.93k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (182:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  183|      0|              (double)(MAXVAL_SGL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  184|      0|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  185|      0|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  186|  1.93k|          : ((((double)(val) * (FRACT_FIX_SCALE)-0.5) <=                     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  1.93k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  1.93k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (186:14): [Folded, False: 1.93k]
  |  |  |  |  ------------------
  |  |  |  |  187|  1.93k|              (double)(MINVAL_SGL_CONST))                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  177|  1.93k|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|  1.93k|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  188|  1.93k|                 ? (SHORT)(MINVAL_SGL_CONST)                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  189|  1.93k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE)-0.5)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  1.93k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  1.93k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  798|  1.93k|    pCChar->nodes.nodeGain[0] = (FIXP_SGL)0;
  799|  5.97k|    for (i = 0; i < pCChar->nodes.characteristicNodeCount; i++) {
  ------------------
  |  Branch (799:17): [True: 4.03k, False: 1.93k]
  ------------------
  800|  4.03k|      if (isBox) FDKpushFor(hBs, 3); /* reserved */
  ------------------
  |  Branch (800:11): [True: 0, False: 4.03k]
  ------------------
  801|  4.03k|      bsNodeLevelDelta = FDKreadBits(hBs, 5);
  802|  4.03k|      if (side == CS_LEFT) {
  ------------------
  |  Branch (802:11): [True: 3.00k, False: 1.03k]
  ------------------
  803|  3.00k|        pCChar->nodes.nodeLevel[i + 1] =
  804|  3.00k|            pCChar->nodes.nodeLevel[i] -
  805|  3.00k|            (FIXP_SGL)((1 + bsNodeLevelDelta) << (FRACT_BITS - 1 - 7));
  ------------------
  |  |  112|  3.00k|#define FRACT_BITS 16  /* single precision */
  ------------------
  806|  3.00k|      } else {
  807|  1.03k|        pCChar->nodes.nodeLevel[i + 1] =
  808|  1.03k|            pCChar->nodes.nodeLevel[i] +
  809|  1.03k|            (FIXP_SGL)((1 + bsNodeLevelDelta) << (FRACT_BITS - 1 - 7));
  ------------------
  |  |  112|  1.03k|#define FRACT_BITS 16  /* single precision */
  ------------------
  810|  1.03k|      }
  811|  4.03k|      bsNodeGain = FDKreadBits(hBs, 8);
  812|  4.03k|      pCChar->nodes.nodeGain[i + 1] = (FIXP_SGL)(
  813|  4.03k|          (bsNodeGain - 128)
  814|  4.03k|          << (FRACT_BITS - 1 - 1 - 7)); /* 0.5f * bsNodeGain - 64.0f; */
  ------------------
  |  |  112|  4.03k|#define FRACT_BITS 16  /* single precision */
  ------------------
  815|  4.03k|    }
  816|  1.93k|  }
  817|  11.1k|  return DE_OK;
  818|  11.1k|}
drcDec_reader.cpp:_ZL26_readDrcInstructionsUniDrcP13FDK_BITSTREAMiP14UNI_DRC_CONFIGP24DRC_INSTRUCTIONS_UNI_DRC:
 1251|   794k|                                            DRC_INSTRUCTIONS_UNI_DRC* pInst) {
 1252|   794k|  DRC_ERROR err = DE_OK;
 1253|   794k|  int i, g, c;
 1254|   794k|  int downmixIdPresent, additionalDownmixIdPresent, additionalDownmixIdCount;
 1255|   794k|  int bsLimiterPeakTarget, channelCount;
 1256|   794k|  DRC_COEFFICIENTS_UNI_DRC* pCoef = NULL;
 1257|   794k|  int repeatParameters, bsRepeatParametersCount;
 1258|   794k|  int repeatSequenceIndex, bsRepeatSequenceCount;
 1259|   794k|  SCHAR* gainSetIndex = pInst->gainSetIndex;
 1260|   794k|  SCHAR channelGroupForChannel[8];
 1261|   794k|  DUCKING_MODIFICATION duckingModificationForChannelGroup[8];
 1262|       |
 1263|   794k|  pInst->drcSetId = FDKreadBits(hBs, 6);
 1264|   794k|  if (version == 0) {
  ------------------
  |  Branch (1264:7): [True: 725k, False: 69.0k]
  ------------------
 1265|       |    /* Assume all v0 DRC sets to be manageable in terms of complexity */
 1266|   725k|    pInst->drcSetComplexityLevel = 2;
 1267|   725k|  } else {
 1268|  69.0k|    pInst->drcSetComplexityLevel = FDKreadBits(hBs, 4);
 1269|  69.0k|  }
 1270|   794k|  pInst->drcLocation = FDKreadBits(hBs, 4);
 1271|   794k|  if (version == 0) {
  ------------------
  |  Branch (1271:7): [True: 725k, False: 69.0k]
  ------------------
 1272|   725k|    downmixIdPresent = 1;
 1273|   725k|  } else {
 1274|  69.0k|    downmixIdPresent = FDKreadBits(hBs, 1);
 1275|  69.0k|  }
 1276|   794k|  if (downmixIdPresent) {
  ------------------
  |  Branch (1276:7): [True: 727k, False: 66.9k]
  ------------------
 1277|   727k|    pInst->downmixId[0] = FDKreadBits(hBs, 7);
 1278|   727k|    if (version == 0) {
  ------------------
  |  Branch (1278:9): [True: 725k, False: 2.08k]
  ------------------
 1279|   725k|      if (pInst->downmixId[0] == 0)
  ------------------
  |  Branch (1279:11): [True: 715k, False: 10.5k]
  ------------------
 1280|   715k|        pInst->drcApplyToDownmix = 0;
 1281|  10.5k|      else
 1282|  10.5k|        pInst->drcApplyToDownmix = 1;
 1283|   725k|    } else {
 1284|  2.08k|      pInst->drcApplyToDownmix = FDKreadBits(hBs, 1);
 1285|  2.08k|    }
 1286|       |
 1287|   727k|    additionalDownmixIdPresent = FDKreadBits(hBs, 1);
 1288|   727k|    if (additionalDownmixIdPresent) {
  ------------------
  |  Branch (1288:9): [True: 7.82k, False: 720k]
  ------------------
 1289|  7.82k|      additionalDownmixIdCount = FDKreadBits(hBs, 3);
 1290|  7.82k|      if ((1 + additionalDownmixIdCount) > 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (1290:11): [True: 0, False: 7.82k]
  ------------------
 1291|  29.1k|      for (i = 0; i < additionalDownmixIdCount; i++) {
  ------------------
  |  Branch (1291:19): [True: 21.3k, False: 7.82k]
  ------------------
 1292|  21.3k|        pInst->downmixId[i + 1] = FDKreadBits(hBs, 7);
 1293|  21.3k|      }
 1294|  7.82k|      pInst->downmixIdCount = 1 + additionalDownmixIdCount;
 1295|   720k|    } else {
 1296|   720k|      pInst->downmixIdCount = 1;
 1297|   720k|    }
 1298|   727k|  } else {
 1299|  66.9k|    pInst->downmixId[0] = 0;
 1300|  66.9k|    pInst->downmixIdCount = 1;
 1301|  66.9k|  }
 1302|       |
 1303|   794k|  pInst->drcSetEffect = FDKreadBits(hBs, 16);
 1304|       |
 1305|   794k|  if ((pInst->drcSetEffect & (EB_DUCK_OTHER | EB_DUCK_SELF)) == 0) {
  ------------------
  |  Branch (1305:7): [True: 787k, False: 7.03k]
  ------------------
 1306|   787k|    pInst->limiterPeakTargetPresent = FDKreadBits(hBs, 1);
 1307|   787k|    if (pInst->limiterPeakTargetPresent) {
  ------------------
  |  Branch (1307:9): [True: 1.97k, False: 785k]
  ------------------
 1308|  1.97k|      bsLimiterPeakTarget = FDKreadBits(hBs, 8);
 1309|  1.97k|      pInst->limiterPeakTarget = -(FIXP_SGL)(
 1310|  1.97k|          bsLimiterPeakTarget
 1311|  1.97k|          << (FRACT_BITS - 1 - 3 - 5)); /* - bsLimiterPeakTarget * 0.125; */
  ------------------
  |  |  112|  1.97k|#define FRACT_BITS 16  /* single precision */
  ------------------
 1312|  1.97k|    }
 1313|   787k|  }
 1314|       |
 1315|   794k|  pInst->drcSetTargetLoudnessPresent = FDKreadBits(hBs, 1);
 1316|       |
 1317|       |  /* set default values */
 1318|   794k|  pInst->drcSetTargetLoudnessValueUpper = 0;
 1319|   794k|  pInst->drcSetTargetLoudnessValueLower = -63;
 1320|       |
 1321|   794k|  if (pInst->drcSetTargetLoudnessPresent == 1) {
  ------------------
  |  Branch (1321:7): [True: 4.92k, False: 789k]
  ------------------
 1322|  4.92k|    int bsDrcSetTargetLoudnessValueUpper, bsDrcSetTargetLoudnessValueLower;
 1323|  4.92k|    int drcSetTargetLoudnessValueLowerPresent;
 1324|  4.92k|    bsDrcSetTargetLoudnessValueUpper = FDKreadBits(hBs, 6);
 1325|  4.92k|    pInst->drcSetTargetLoudnessValueUpper =
 1326|  4.92k|        bsDrcSetTargetLoudnessValueUpper - 63;
 1327|  4.92k|    drcSetTargetLoudnessValueLowerPresent = FDKreadBits(hBs, 1);
 1328|  4.92k|    if (drcSetTargetLoudnessValueLowerPresent == 1) {
  ------------------
  |  Branch (1328:9): [True: 1.77k, False: 3.15k]
  ------------------
 1329|  1.77k|      bsDrcSetTargetLoudnessValueLower = FDKreadBits(hBs, 6);
 1330|  1.77k|      pInst->drcSetTargetLoudnessValueLower =
 1331|  1.77k|          bsDrcSetTargetLoudnessValueLower - 63;
 1332|  1.77k|    }
 1333|  4.92k|  }
 1334|       |
 1335|   794k|  pInst->dependsOnDrcSetPresent = FDKreadBits(hBs, 1);
 1336|       |
 1337|   794k|  pInst->noIndependentUse = 0;
 1338|   794k|  if (pInst->dependsOnDrcSetPresent) {
  ------------------
  |  Branch (1338:7): [True: 4.40k, False: 790k]
  ------------------
 1339|  4.40k|    pInst->dependsOnDrcSet = FDKreadBits(hBs, 6);
 1340|   790k|  } else {
 1341|   790k|    pInst->noIndependentUse = FDKreadBits(hBs, 1);
 1342|   790k|  }
 1343|       |
 1344|   794k|  if (version == 0) {
  ------------------
  |  Branch (1344:7): [True: 725k, False: 69.0k]
  ------------------
 1345|   725k|    pInst->requiresEq = 0;
 1346|   725k|  } else {
 1347|  69.0k|    pInst->requiresEq = FDKreadBits(hBs, 1);
 1348|  69.0k|  }
 1349|       |
 1350|   794k|  pCoef = selectDrcCoefficients(hUniDrcConfig, pInst->drcLocation);
 1351|       |
 1352|   794k|  pInst->drcChannelCount = channelCount =
 1353|   794k|      hUniDrcConfig->channelLayout.baseChannelCount;
 1354|       |
 1355|   794k|  if (pInst->drcSetEffect & (EB_DUCK_OTHER | EB_DUCK_SELF)) {
  ------------------
  |  Branch (1355:7): [True: 7.03k, False: 787k]
  ------------------
 1356|  7.03k|    DUCKING_MODIFICATION* pDModForChannel =
 1357|  7.03k|        pInst->duckingModificationForChannel;
 1358|  7.03k|    c = 0;
 1359|  22.4k|    while (c < channelCount) {
  ------------------
  |  Branch (1359:12): [True: 15.7k, False: 6.69k]
  ------------------
 1360|  15.7k|      int bsGainSetIndex;
 1361|  15.7k|      bsGainSetIndex = FDKreadBits(hBs, 6);
 1362|  15.7k|      if (c >= 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (1362:11): [True: 0, False: 15.7k]
  ------------------
 1363|  15.7k|      gainSetIndex[c] = bsGainSetIndex - 1;
 1364|  15.7k|      _decodeDuckingModification(hBs, &(pDModForChannel[c]), 0);
 1365|       |
 1366|  15.7k|      c++;
 1367|  15.7k|      repeatParameters = FDKreadBits(hBs, 1);
 1368|  15.7k|      if (repeatParameters == 1) {
  ------------------
  |  Branch (1368:11): [True: 1.53k, False: 14.2k]
  ------------------
 1369|  1.53k|        bsRepeatParametersCount = FDKreadBits(hBs, 5);
 1370|  1.53k|        bsRepeatParametersCount += 1;
 1371|  7.54k|        for (i = 0; i < bsRepeatParametersCount; i++) {
  ------------------
  |  Branch (1371:21): [True: 6.34k, False: 1.19k]
  ------------------
 1372|  6.34k|          if (c >= 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (1372:15): [True: 342, False: 6.00k]
  ------------------
 1373|  6.00k|          gainSetIndex[c] = gainSetIndex[c - 1];
 1374|  6.00k|          pDModForChannel[c] = pDModForChannel[c - 1];
 1375|  6.00k|          c++;
 1376|  6.00k|        }
 1377|  1.53k|      }
 1378|  15.7k|    }
 1379|  6.69k|    if (c > channelCount) {
  ------------------
  |  Branch (1379:9): [True: 88, False: 6.60k]
  ------------------
 1380|     88|      return DE_NOT_OK;
 1381|     88|    }
 1382|       |
 1383|  6.60k|    err = deriveDrcChannelGroups(
 1384|  6.60k|        pInst->drcSetEffect, pInst->drcChannelCount, gainSetIndex,
 1385|  6.60k|        pDModForChannel, &pInst->nDrcChannelGroups,
 1386|  6.60k|        pInst->gainSetIndexForChannelGroup, channelGroupForChannel,
 1387|  6.60k|        duckingModificationForChannelGroup);
 1388|  6.60k|    if (err) return (err);
  ------------------
  |  Branch (1388:9): [True: 981, False: 5.62k]
  ------------------
 1389|   787k|  } else {
 1390|   787k|    int deriveChannelCount = 0;
 1391|   787k|    if (((version == 0) || (pInst->drcApplyToDownmix != 0)) &&
  ------------------
  |  Branch (1391:10): [True: 719k, False: 68.1k]
  |  Branch (1391:28): [True: 678, False: 67.5k]
  ------------------
 1392|   720k|        (pInst->downmixId[0] != DOWNMIX_ID_BASE_LAYOUT) &&
  ------------------
  |  |  122|   720k|#define DOWNMIX_ID_BASE_LAYOUT 0x0
  ------------------
  |  Branch (1392:9): [True: 6.60k, False: 713k]
  ------------------
 1393|  6.60k|        (pInst->downmixId[0] != DOWNMIX_ID_ANY_DOWNMIX) &&
  ------------------
  |  |  123|  6.60k|#define DOWNMIX_ID_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (1393:9): [True: 6.20k, False: 401]
  ------------------
 1394|  6.20k|        (pInst->downmixIdCount == 1)) {
  ------------------
  |  Branch (1394:9): [True: 2.54k, False: 3.65k]
  ------------------
 1395|  2.54k|      if (hUniDrcConfig->downmixInstructionsCount != 0) {
  ------------------
  |  Branch (1395:11): [True: 703, False: 1.84k]
  ------------------
 1396|    703|        DOWNMIX_INSTRUCTIONS* pDown =
 1397|    703|            selectDownmixInstructions(hUniDrcConfig, pInst->downmixId[0]);
 1398|    703|        if (pDown == NULL) return DE_NOT_OK;
  ------------------
  |  Branch (1398:13): [True: 245, False: 458]
  ------------------
 1399|    458|        pInst->drcChannelCount = channelCount =
 1400|    458|            pDown->targetChannelCount; /* targetChannelCountFromDownmixId*/
 1401|  1.84k|      } else {
 1402|  1.84k|        deriveChannelCount = 1;
 1403|  1.84k|        channelCount = 1;
 1404|  1.84k|      }
 1405|   785k|    } else if (((version == 0) || (pInst->drcApplyToDownmix != 0)) &&
  ------------------
  |  Branch (1405:17): [True: 717k, False: 68.0k]
  |  Branch (1405:35): [True: 494, False: 67.5k]
  ------------------
 1406|   717k|               ((pInst->downmixId[0] == DOWNMIX_ID_ANY_DOWNMIX) ||
  ------------------
  |  |  123|   717k|#define DOWNMIX_ID_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (1406:17): [True: 401, False: 717k]
  ------------------
 1407|   717k|                (pInst->downmixIdCount > 1))) {
  ------------------
  |  Branch (1407:17): [True: 3.73k, False: 713k]
  ------------------
 1408|       |      /* Set maximum channel count as upper border. The effective channel count
 1409|       |       * is set at the process function. */
 1410|  4.13k|      pInst->drcChannelCount = 8;
 1411|  4.13k|      channelCount = 1;
 1412|  4.13k|    }
 1413|       |
 1414|   787k|    c = 0;
 1415|  6.29M|    while (c < channelCount) {
  ------------------
  |  Branch (1415:12): [True: 5.50M, False: 787k]
  ------------------
 1416|  5.50M|      int bsGainSetIndex;
 1417|  5.50M|      bsGainSetIndex = FDKreadBits(hBs, 6);
 1418|  5.50M|      if (c >= 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (1418:11): [True: 105, False: 5.50M]
  ------------------
 1419|  5.50M|      gainSetIndex[c] = bsGainSetIndex - 1;
 1420|  5.50M|      c++;
 1421|  5.50M|      repeatSequenceIndex = FDKreadBits(hBs, 1);
 1422|       |
 1423|  5.50M|      if (repeatSequenceIndex == 1) {
  ------------------
  |  Branch (1423:11): [True: 5.61k, False: 5.49M]
  ------------------
 1424|  5.61k|        bsRepeatSequenceCount = FDKreadBits(hBs, 5);
 1425|  5.61k|        bsRepeatSequenceCount += 1;
 1426|  5.61k|        if (deriveChannelCount) {
  ------------------
  |  Branch (1426:13): [True: 741, False: 4.87k]
  ------------------
 1427|    741|          channelCount = 1 + bsRepeatSequenceCount;
 1428|    741|        }
 1429|  27.2k|        for (i = 0; i < bsRepeatSequenceCount; i++) {
  ------------------
  |  Branch (1429:21): [True: 21.9k, False: 5.30k]
  ------------------
 1430|  21.9k|          if (c >= 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (1430:15): [True: 313, False: 21.6k]
  ------------------
 1431|  21.6k|          gainSetIndex[c] = bsGainSetIndex - 1;
 1432|  21.6k|          c++;
 1433|  21.6k|        }
 1434|  5.61k|      }
 1435|  5.50M|    }
 1436|   787k|    if (c > channelCount) {
  ------------------
  |  Branch (1436:9): [True: 86, False: 787k]
  ------------------
 1437|     86|      return DE_NOT_OK;
 1438|     86|    }
 1439|   787k|    if (deriveChannelCount) {
  ------------------
  |  Branch (1439:9): [True: 1.79k, False: 785k]
  ------------------
 1440|  1.79k|      pInst->drcChannelCount = channelCount;
 1441|  1.79k|    }
 1442|       |
 1443|       |    /* DOWNMIX_ID_ANY_DOWNMIX: channelCount is 1. Distribute gainSetIndex to all
 1444|       |     * channels. */
 1445|   787k|    if ((pInst->downmixId[0] == DOWNMIX_ID_ANY_DOWNMIX) ||
  ------------------
  |  |  123|   787k|#define DOWNMIX_ID_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (1445:9): [True: 436, False: 786k]
  ------------------
 1446|   786k|        (pInst->downmixIdCount > 1)) {
  ------------------
  |  Branch (1446:9): [True: 3.97k, False: 782k]
  ------------------
 1447|  32.4k|      for (c = 1; c < pInst->drcChannelCount; c++) {
  ------------------
  |  Branch (1447:19): [True: 27.9k, False: 4.41k]
  ------------------
 1448|  27.9k|        gainSetIndex[c] = gainSetIndex[0];
 1449|  27.9k|      }
 1450|  4.41k|    }
 1451|       |
 1452|   787k|    err = deriveDrcChannelGroups(pInst->drcSetEffect, pInst->drcChannelCount,
 1453|   787k|                                 gainSetIndex, NULL, &pInst->nDrcChannelGroups,
 1454|   787k|                                 pInst->gainSetIndexForChannelGroup,
 1455|   787k|                                 channelGroupForChannel, NULL);
 1456|   787k|    if (err) return (err);
  ------------------
  |  Branch (1456:9): [True: 0, False: 787k]
  ------------------
 1457|       |
 1458|   821k|    for (g = 0; g < pInst->nDrcChannelGroups; g++) {
  ------------------
  |  Branch (1458:17): [True: 34.4k, False: 787k]
  ------------------
 1459|  34.4k|      int set, bandCount;
 1460|  34.4k|      set = pInst->gainSetIndexForChannelGroup[g];
 1461|       |
 1462|       |      /* get bandCount */
 1463|  34.4k|      if (pCoef != NULL && set < pCoef->gainSetCount) {
  ------------------
  |  Branch (1463:11): [True: 18.4k, False: 15.9k]
  |  Branch (1463:28): [True: 1.08k, False: 17.3k]
  ------------------
 1464|  1.08k|        bandCount = pCoef->gainSet[set].bandCount;
 1465|  33.3k|      } else {
 1466|  33.3k|        bandCount = 1;
 1467|  33.3k|      }
 1468|       |
 1469|  34.4k|      _decodeGainModification(hBs, version, bandCount,
 1470|  34.4k|                              pInst->gainModificationForChannelGroup[g], 0);
 1471|  34.4k|    }
 1472|   787k|  }
 1473|       |
 1474|   792k|  return err;
 1475|   794k|}
drcDec_reader.cpp:_ZL26_decodeDuckingModificationP13FDK_BITSTREAMP20DUCKING_MODIFICATIONi:
  535|  15.7k|                                       DUCKING_MODIFICATION* pDMod, int isBox) {
  536|  15.7k|  int bsDuckingScaling, sigma, mu;
  537|       |
  538|  15.7k|  if (isBox) FDKpushFor(hBs, 7); /* reserved */
  ------------------
  |  Branch (538:7): [True: 0, False: 15.7k]
  ------------------
  539|  15.7k|  pDMod->duckingScalingPresent = FDKreadBits(hBs, 1);
  540|       |
  541|  15.7k|  if (pDMod->duckingScalingPresent) {
  ------------------
  |  Branch (541:7): [True: 3.58k, False: 12.2k]
  ------------------
  542|  3.58k|    if (isBox) FDKpushFor(hBs, 4); /* reserved */
  ------------------
  |  Branch (542:9): [True: 0, False: 3.58k]
  ------------------
  543|  3.58k|    bsDuckingScaling = FDKreadBits(hBs, 4);
  544|  3.58k|    sigma = bsDuckingScaling >> 3;
  545|  3.58k|    mu = bsDuckingScaling & 0x7;
  546|       |
  547|  3.58k|    if (sigma) {
  ------------------
  |  Branch (547:9): [True: 2.18k, False: 1.40k]
  ------------------
  548|  2.18k|      pDMod->duckingScaling = (FIXP_SGL)(
  549|  2.18k|          (7 - mu) << (FRACT_BITS - 1 - 3 - 2)); /* 1.0 - 0.125 * (1 + mu); */
  ------------------
  |  |  112|  2.18k|#define FRACT_BITS 16  /* single precision */
  ------------------
  550|  2.18k|    } else {
  551|  1.40k|      pDMod->duckingScaling = (FIXP_SGL)(
  552|  1.40k|          (9 + mu) << (FRACT_BITS - 1 - 3 - 2)); /* 1.0 + 0.125 * (1 + mu); */
  ------------------
  |  |  112|  1.40k|#define FRACT_BITS 16  /* single precision */
  ------------------
  553|  1.40k|    }
  554|  12.2k|  } else {
  555|  12.2k|    pDMod->duckingScaling = (FIXP_SGL)(1 << (FRACT_BITS - 1 - 2)); /* 1.0 */
  ------------------
  |  |  112|  12.2k|#define FRACT_BITS 16  /* single precision */
  ------------------
  556|  12.2k|  }
  557|  15.7k|}
drcDec_reader.cpp:_ZL23_decodeGainModificationP13FDK_BITSTREAMiiP17GAIN_MODIFICATIONi:
  561|  34.4k|                                    int isBox) {
  562|  34.4k|  int sign, bsGainOffset, bsAttenuationScaling, bsAmplificationScaling;
  563|       |
  564|  34.4k|  if (version > 0) {
  ------------------
  |  Branch (564:7): [True: 7.66k, False: 26.7k]
  ------------------
  565|  7.66k|    int b, shapeFilterPresent;
  566|       |
  567|  7.66k|    if (isBox) {
  ------------------
  |  Branch (567:9): [True: 0, False: 7.66k]
  ------------------
  568|      0|      FDKpushFor(hBs, 4); /* reserved */
  569|      0|      bandCount = FDKreadBits(hBs, 4);
  570|      0|    }
  571|       |
  572|  15.3k|    for (b = 0; b < bandCount; b++) {
  ------------------
  |  Branch (572:17): [True: 7.65k, False: 7.66k]
  ------------------
  573|  7.65k|      if (isBox) {
  ------------------
  |  Branch (573:11): [True: 0, False: 7.65k]
  ------------------
  574|      0|        FDKpushFor(hBs, 4); /* reserved */
  575|      0|        pGMod[b].targetCharacteristicLeftPresent = FDKreadBits(hBs, 1);
  576|      0|        pGMod[b].targetCharacteristicRightPresent = FDKreadBits(hBs, 1);
  577|      0|        pGMod[b].gainScalingPresent = FDKreadBits(hBs, 1);
  578|      0|        pGMod[b].gainOffsetPresent = FDKreadBits(hBs, 1);
  579|      0|      }
  580|       |
  581|  7.65k|      if (!isBox)
  ------------------
  |  Branch (581:11): [True: 7.65k, False: 0]
  ------------------
  582|  7.65k|        pGMod[b].targetCharacteristicLeftPresent = FDKreadBits(hBs, 1);
  583|  7.65k|      if (pGMod[b].targetCharacteristicLeftPresent) {
  ------------------
  |  Branch (583:11): [True: 2.18k, False: 5.46k]
  ------------------
  584|  2.18k|        if (isBox) FDKpushFor(hBs, 4); /* reserved */
  ------------------
  |  Branch (584:13): [True: 0, False: 2.18k]
  ------------------
  585|  2.18k|        pGMod[b].targetCharacteristicLeftIndex = FDKreadBits(hBs, 4);
  586|  2.18k|      }
  587|  7.65k|      if (!isBox)
  ------------------
  |  Branch (587:11): [True: 7.65k, False: 0]
  ------------------
  588|  7.65k|        pGMod[b].targetCharacteristicRightPresent = FDKreadBits(hBs, 1);
  589|  7.65k|      if (pGMod[b].targetCharacteristicRightPresent) {
  ------------------
  |  Branch (589:11): [True: 2.29k, False: 5.36k]
  ------------------
  590|  2.29k|        if (isBox) FDKpushFor(hBs, 4); /* reserved */
  ------------------
  |  Branch (590:13): [True: 0, False: 2.29k]
  ------------------
  591|  2.29k|        pGMod[b].targetCharacteristicRightIndex = FDKreadBits(hBs, 4);
  592|  2.29k|      }
  593|  7.65k|      if (!isBox) pGMod[b].gainScalingPresent = FDKreadBits(hBs, 1);
  ------------------
  |  Branch (593:11): [True: 7.65k, False: 0]
  ------------------
  594|  7.65k|      if (pGMod[b].gainScalingPresent) {
  ------------------
  |  Branch (594:11): [True: 2.23k, False: 5.41k]
  ------------------
  595|  2.23k|        bsAttenuationScaling = FDKreadBits(hBs, 4);
  596|  2.23k|        pGMod[b].attenuationScaling = (FIXP_SGL)(
  597|  2.23k|            bsAttenuationScaling
  598|  2.23k|            << (FRACT_BITS - 1 - 3 - 2)); /* bsAttenuationScaling * 0.125; */
  ------------------
  |  |  112|  2.23k|#define FRACT_BITS 16  /* single precision */
  ------------------
  599|  2.23k|        bsAmplificationScaling = FDKreadBits(hBs, 4);
  600|  2.23k|        pGMod[b].amplificationScaling = (FIXP_SGL)(
  601|  2.23k|            bsAmplificationScaling
  602|  2.23k|            << (FRACT_BITS - 1 - 3 - 2)); /* bsAmplificationScaling * 0.125; */
  ------------------
  |  |  112|  2.23k|#define FRACT_BITS 16  /* single precision */
  ------------------
  603|  2.23k|      }
  604|  7.65k|      if (!isBox) pGMod[b].gainOffsetPresent = FDKreadBits(hBs, 1);
  ------------------
  |  Branch (604:11): [True: 7.65k, False: 0]
  ------------------
  605|  7.65k|      if (pGMod[b].gainOffsetPresent) {
  ------------------
  |  Branch (605:11): [True: 2.22k, False: 5.43k]
  ------------------
  606|  2.22k|        if (isBox) FDKpushFor(hBs, 2); /* reserved */
  ------------------
  |  Branch (606:13): [True: 0, False: 2.22k]
  ------------------
  607|  2.22k|        sign = FDKreadBits(hBs, 1);
  608|  2.22k|        bsGainOffset = FDKreadBits(hBs, 5);
  609|  2.22k|        pGMod[b].gainOffset = (FIXP_SGL)(
  610|  2.22k|            (1 + bsGainOffset)
  611|  2.22k|            << (FRACT_BITS - 1 - 2 - 4)); /* (1+bsGainOffset) * 0.25; */
  ------------------
  |  |  112|  2.22k|#define FRACT_BITS 16  /* single precision */
  ------------------
  612|  2.22k|        if (sign) {
  ------------------
  |  Branch (612:13): [True: 1.24k, False: 977]
  ------------------
  613|  1.24k|          pGMod[b].gainOffset = -pGMod[b].gainOffset;
  614|  1.24k|        }
  615|  2.22k|      }
  616|  7.65k|    }
  617|  7.66k|    if (bandCount == 1) {
  ------------------
  |  Branch (617:9): [True: 7.33k, False: 325]
  ------------------
  618|  7.33k|      shapeFilterPresent = FDKreadBits(hBs, 1);
  619|  7.33k|      if (shapeFilterPresent) {
  ------------------
  |  Branch (619:11): [True: 2.03k, False: 5.30k]
  ------------------
  620|  2.03k|        if (isBox) FDKpushFor(hBs, 3); /* reserved */
  ------------------
  |  Branch (620:13): [True: 0, False: 2.03k]
  ------------------
  621|  2.03k|        FDKpushFor(hBs, 4);            /* pGMod->shapeFilterIndex */
  622|  5.30k|      } else {
  623|  5.30k|        if (isBox) FDKpushFor(hBs, 7); /* reserved */
  ------------------
  |  Branch (623:13): [True: 0, False: 5.30k]
  ------------------
  624|  5.30k|      }
  625|  7.33k|    }
  626|  26.7k|  } else {
  627|  26.7k|    int b, gainScalingPresent, gainOffsetPresent;
  628|  26.7k|    FIXP_SGL attenuationScaling = FL2FXCONST_SGL(1.0f / (float)(1 << 2)),
  ------------------
  |  |  180|  26.7k|  (FIXP_SGL)(                                                                \
  |  |  181|  26.7k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 26.7k, Folded]
  |  |  ------------------
  |  |  182|  26.7k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  26.7k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  26.7k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 26.7k]
  |  |  ------------------
  |  |  183|  26.7k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  26.7k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  26.7k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  26.7k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  26.7k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  26.7k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  26.7k|          : ((((double)(val) * (FRACT_FIX_SCALE)-0.5) <=                     \
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (186:14): [Folded, False: 0]
  |  |  ------------------
  |  |  187|      0|              (double)(MINVAL_SGL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  188|      0|                 ? (SHORT)(MINVAL_SGL_CONST)                                 \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  189|      0|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  629|  26.7k|             amplificationScaling = FL2FXCONST_SGL(1.0f / (float)(1 << 2)),
  ------------------
  |  |  180|  26.7k|  (FIXP_SGL)(                                                                \
  |  |  181|  26.7k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 26.7k, Folded]
  |  |  ------------------
  |  |  182|  26.7k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  26.7k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  26.7k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 26.7k]
  |  |  ------------------
  |  |  183|  26.7k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  26.7k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  26.7k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  26.7k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  26.7k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  26.7k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  26.7k|          : ((((double)(val) * (FRACT_FIX_SCALE)-0.5) <=                     \
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (186:14): [Folded, False: 0]
  |  |  ------------------
  |  |  187|      0|              (double)(MINVAL_SGL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  188|      0|                 ? (SHORT)(MINVAL_SGL_CONST)                                 \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  189|      0|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  630|  26.7k|             gainOffset = (FIXP_SGL)0;
  631|  26.7k|    if (isBox) FDKpushFor(hBs, 7); /* reserved */
  ------------------
  |  Branch (631:9): [True: 0, False: 26.7k]
  ------------------
  632|  26.7k|    gainScalingPresent = FDKreadBits(hBs, 1);
  633|  26.7k|    if (gainScalingPresent) {
  ------------------
  |  Branch (633:9): [True: 15.9k, False: 10.8k]
  ------------------
  634|  15.9k|      bsAttenuationScaling = FDKreadBits(hBs, 4);
  635|  15.9k|      attenuationScaling = (FIXP_SGL)(
  636|  15.9k|          bsAttenuationScaling
  637|  15.9k|          << (FRACT_BITS - 1 - 3 - 2)); /* bsAttenuationScaling * 0.125; */
  ------------------
  |  |  112|  15.9k|#define FRACT_BITS 16  /* single precision */
  ------------------
  638|  15.9k|      bsAmplificationScaling = FDKreadBits(hBs, 4);
  639|  15.9k|      amplificationScaling = (FIXP_SGL)(
  640|  15.9k|          bsAmplificationScaling
  641|  15.9k|          << (FRACT_BITS - 1 - 3 - 2)); /* bsAmplificationScaling * 0.125; */
  ------------------
  |  |  112|  15.9k|#define FRACT_BITS 16  /* single precision */
  ------------------
  642|  15.9k|    }
  643|  26.7k|    if (isBox) FDKpushFor(hBs, 7); /* reserved */
  ------------------
  |  Branch (643:9): [True: 0, False: 26.7k]
  ------------------
  644|  26.7k|    gainOffsetPresent = FDKreadBits(hBs, 1);
  645|  26.7k|    if (gainOffsetPresent) {
  ------------------
  |  Branch (645:9): [True: 14.0k, False: 12.7k]
  ------------------
  646|  14.0k|      if (isBox) FDKpushFor(hBs, 2); /* reserved */
  ------------------
  |  Branch (646:11): [True: 0, False: 14.0k]
  ------------------
  647|  14.0k|      sign = FDKreadBits(hBs, 1);
  648|  14.0k|      bsGainOffset = FDKreadBits(hBs, 5);
  649|  14.0k|      gainOffset =
  650|  14.0k|          (FIXP_SGL)((1 + bsGainOffset) << (FRACT_BITS - 1 - 2 -
  ------------------
  |  |  112|  14.0k|#define FRACT_BITS 16  /* single precision */
  ------------------
  651|  14.0k|                                            4)); /* (1+bsGainOffset) * 0.25; */
  652|  14.0k|      if (sign) {
  ------------------
  |  Branch (652:11): [True: 8.28k, False: 5.74k]
  ------------------
  653|  8.28k|        gainOffset = -gainOffset;
  654|  8.28k|      }
  655|  14.0k|    }
  656|   133k|    for (b = 0; b < 4; b++) {
  ------------------
  |  Branch (656:17): [True: 107k, False: 26.7k]
  ------------------
  657|   107k|      pGMod[b].targetCharacteristicLeftPresent = 0;
  658|   107k|      pGMod[b].targetCharacteristicRightPresent = 0;
  659|   107k|      pGMod[b].gainScalingPresent = gainScalingPresent;
  660|   107k|      pGMod[b].attenuationScaling = attenuationScaling;
  661|   107k|      pGMod[b].amplificationScaling = amplificationScaling;
  662|   107k|      pGMod[b].gainOffsetPresent = gainOffsetPresent;
  663|   107k|      pGMod[b].gainOffset = gainOffset;
  664|   107k|    }
  665|  26.7k|  }
  666|  34.4k|}
drcDec_reader.cpp:_ZL26_readUniDrcConfigExtensionP13FDK_BITSTREAMP14UNI_DRC_CONFIG:
 1636|  19.6k|    HANDLE_FDK_BITSTREAM hBs, HANDLE_UNI_DRC_CONFIG hUniDrcConfig) {
 1637|  19.6k|  DRC_ERROR err = DE_OK;
 1638|  19.6k|  int k, bitSizeLen, extSizeBits, bitSize;
 1639|  19.6k|  INT nBitsRemaining;
 1640|  19.6k|  UNI_DRC_CONFIG_EXTENSION* pExt = &(hUniDrcConfig->uniDrcConfigExt);
 1641|       |
 1642|  19.6k|  k = 0;
 1643|  19.6k|  pExt->uniDrcConfigExtType[k] = FDKreadBits(hBs, 4);
 1644|  39.3k|  while (pExt->uniDrcConfigExtType[k] != UNIDRCCONFEXT_TERM) {
  ------------------
  |  |  117|  39.3k|#define UNIDRCCONFEXT_TERM 0x0
  ------------------
  |  Branch (1644:10): [True: 38.3k, False: 997]
  ------------------
 1645|  38.3k|    if (k >= (8 - 1)) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (1645:9): [True: 678, False: 37.6k]
  ------------------
 1646|  37.6k|    bitSizeLen = FDKreadBits(hBs, 4);
 1647|  37.6k|    extSizeBits = bitSizeLen + 4;
 1648|       |
 1649|  37.6k|    bitSize = FDKreadBits(hBs, extSizeBits);
 1650|  37.6k|    pExt->extBitSize[k] = bitSize + 1;
 1651|  37.6k|    nBitsRemaining = (INT)FDKgetValidBits(hBs);
 1652|       |
 1653|  37.6k|    switch (pExt->uniDrcConfigExtType[k]) {
 1654|  21.8k|      case UNIDRCCONFEXT_V1:
  ------------------
  |  |  112|  21.8k|#define UNIDRCCONFEXT_V1 0x2
  ------------------
  |  Branch (1654:7): [True: 21.8k, False: 15.7k]
  ------------------
 1655|  21.8k|        err = _readDrcExtensionV1(hBs, hUniDrcConfig);
 1656|  21.8k|        if (err) return err;
  ------------------
  |  Branch (1656:13): [True: 433, False: 21.4k]
  ------------------
 1657|  21.4k|        if (nBitsRemaining !=
  ------------------
  |  Branch (1657:13): [True: 17.5k, False: 3.86k]
  ------------------
 1658|  21.4k|            ((INT)pExt->extBitSize[k] + (INT)FDKgetValidBits(hBs)))
 1659|  17.5k|          return DE_NOT_OK;
 1660|  3.86k|        break;
 1661|  3.86k|      case UNIDRCCONFEXT_PARAM_DRC:
  ------------------
  |  |  111|    944|#define UNIDRCCONFEXT_PARAM_DRC 0x1
  ------------------
  |  Branch (1661:7): [True: 944, False: 36.7k]
  ------------------
 1662|       |      /* add future extensions here */
 1663|  15.7k|      default:
  ------------------
  |  Branch (1663:7): [True: 14.8k, False: 22.7k]
  ------------------
 1664|  15.7k|        FDKpushFor(hBs, pExt->extBitSize[k]);
 1665|  15.7k|        break;
 1666|  37.6k|    }
 1667|  19.6k|    k++;
 1668|  19.6k|    pExt->uniDrcConfigExtType[k] = FDKreadBits(hBs, 4);
 1669|  19.6k|  }
 1670|       |
 1671|    997|  return err;
 1672|  19.6k|}
drcDec_reader.cpp:_ZL19_readDrcExtensionV1P13FDK_BITSTREAMP14UNI_DRC_CONFIG:
 1536|  21.8k|                                     HANDLE_UNI_DRC_CONFIG hUniDrcConfig) {
 1537|  21.8k|  DRC_ERROR err = DE_OK;
 1538|  21.8k|  int downmixInstructionsV1Present;
 1539|  21.8k|  int drcCoeffsAndInstructionsUniDrcV1Present;
 1540|  21.8k|  int loudEqInstructionsPresent, loudEqInstructionsCount;
 1541|  21.8k|  int eqPresent, eqInstructionsCount;
 1542|  21.8k|  int i, offset;
 1543|  21.8k|  int diff = hUniDrcConfig->diff;
 1544|       |
 1545|  21.8k|  downmixInstructionsV1Present = FDKreadBits(hBs, 1);
 1546|  21.8k|  if (downmixInstructionsV1Present == 1) {
  ------------------
  |  Branch (1546:7): [True: 3.53k, False: 18.3k]
  ------------------
 1547|  3.53k|    diff |= _compAssign(&hUniDrcConfig->downmixInstructionsCountV1,
 1548|  3.53k|                        FDKreadBits(hBs, 7));
 1549|  3.53k|    offset = hUniDrcConfig->downmixInstructionsCountV0;
 1550|  3.53k|    hUniDrcConfig->downmixInstructionsCount = fMin(
 1551|  3.53k|        (UCHAR)(offset + hUniDrcConfig->downmixInstructionsCountV1), (UCHAR)6);
 1552|  56.6k|    for (i = 0; i < hUniDrcConfig->downmixInstructionsCountV1; i++) {
  ------------------
  |  Branch (1552:17): [True: 53.1k, False: 3.44k]
  ------------------
 1553|  53.1k|      DOWNMIX_INSTRUCTIONS tmpDown;
 1554|  53.1k|      FDKmemclear(&tmpDown, sizeof(DOWNMIX_INSTRUCTIONS));
 1555|  53.1k|      err = _readDownmixInstructions(hBs, 1, &hUniDrcConfig->channelLayout,
 1556|  53.1k|                                     &tmpDown);
 1557|  53.1k|      if (err) return err;
  ------------------
  |  Branch (1557:11): [True: 94, False: 53.0k]
  ------------------
 1558|  53.0k|      if ((offset + i) >= 6) continue;
  ------------------
  |  Branch (1558:11): [True: 44.5k, False: 8.52k]
  ------------------
 1559|  8.52k|      if (!diff)
  ------------------
  |  Branch (1559:11): [True: 246, False: 8.27k]
  ------------------
 1560|    246|        diff |= (FDKmemcmp(&tmpDown,
 1561|    246|                           &(hUniDrcConfig->downmixInstructions[offset + i]),
 1562|    246|                           sizeof(DOWNMIX_INSTRUCTIONS)) != 0);
 1563|  8.52k|      hUniDrcConfig->downmixInstructions[offset + i] = tmpDown;
 1564|  8.52k|    }
 1565|  18.3k|  } else {
 1566|  18.3k|    diff |= _compAssign(&hUniDrcConfig->downmixInstructionsCountV1, 0);
 1567|  18.3k|  }
 1568|       |
 1569|  21.7k|  drcCoeffsAndInstructionsUniDrcV1Present = FDKreadBits(hBs, 1);
 1570|  21.7k|  if (drcCoeffsAndInstructionsUniDrcV1Present == 1) {
  ------------------
  |  Branch (1570:7): [True: 10.2k, False: 11.4k]
  ------------------
 1571|  10.2k|    diff |= _compAssign(&hUniDrcConfig->drcCoefficientsUniDrcCountV1,
 1572|  10.2k|                        FDKreadBits(hBs, 3));
 1573|  10.2k|    offset = hUniDrcConfig->drcCoefficientsUniDrcCountV0;
 1574|  10.2k|    hUniDrcConfig->drcCoefficientsUniDrcCount =
 1575|  10.2k|        fMin((UCHAR)(offset + hUniDrcConfig->drcCoefficientsUniDrcCountV1),
 1576|  10.2k|             (UCHAR)2);
 1577|  38.2k|    for (i = 0; i < hUniDrcConfig->drcCoefficientsUniDrcCountV1; i++) {
  ------------------
  |  Branch (1577:17): [True: 28.0k, False: 10.2k]
  ------------------
 1578|  28.0k|      DRC_COEFFICIENTS_UNI_DRC tmpCoef;
 1579|  28.0k|      FDKmemclear(&tmpCoef, sizeof(DRC_COEFFICIENTS_UNI_DRC));
 1580|  28.0k|      err = _readDrcCoefficientsUniDrc(hBs, 1, &tmpCoef);
 1581|  28.0k|      if (err) return err;
  ------------------
  |  Branch (1581:11): [True: 89, False: 27.9k]
  ------------------
 1582|  27.9k|      if ((offset + i) >= 2) continue;
  ------------------
  |  Branch (1582:11): [True: 21.0k, False: 6.87k]
  ------------------
 1583|  6.87k|      if (!diff)
  ------------------
  |  Branch (1583:11): [True: 300, False: 6.57k]
  ------------------
 1584|    300|        diff |= (FDKmemcmp(&tmpCoef,
 1585|    300|                           &(hUniDrcConfig->drcCoefficientsUniDrc[offset + i]),
 1586|    300|                           sizeof(DRC_COEFFICIENTS_UNI_DRC)) != 0);
 1587|  6.87k|      hUniDrcConfig->drcCoefficientsUniDrc[offset + i] = tmpCoef;
 1588|  6.87k|    }
 1589|       |
 1590|  10.2k|    diff |= _compAssign(&hUniDrcConfig->drcInstructionsUniDrcCountV1,
 1591|  10.2k|                        FDKreadBits(hBs, 6));
 1592|  10.2k|    offset = hUniDrcConfig->drcInstructionsUniDrcCount;
 1593|  10.2k|    hUniDrcConfig->drcInstructionsUniDrcCount =
 1594|  10.2k|        fMin((UCHAR)(offset + hUniDrcConfig->drcInstructionsUniDrcCountV1),
 1595|  10.2k|             (UCHAR)12);
 1596|  79.0k|    for (i = 0; i < hUniDrcConfig->drcInstructionsUniDrcCount; i++) {
  ------------------
  |  Branch (1596:17): [True: 69.0k, False: 9.95k]
  ------------------
 1597|  69.0k|      DRC_INSTRUCTIONS_UNI_DRC tmpInst;
 1598|  69.0k|      FDKmemclear(&tmpInst, sizeof(DRC_INSTRUCTIONS_UNI_DRC));
 1599|  69.0k|      err = _readDrcInstructionsUniDrc(hBs, 1, hUniDrcConfig, &tmpInst);
 1600|  69.0k|      if (err) return err;
  ------------------
  |  Branch (1600:11): [True: 250, False: 68.8k]
  ------------------
 1601|  68.8k|      if ((offset + i) >= 12) continue;
  ------------------
  |  Branch (1601:11): [True: 46.8k, False: 21.9k]
  ------------------
 1602|  21.9k|      if (!diff)
  ------------------
  |  Branch (1602:11): [True: 435, False: 21.5k]
  ------------------
 1603|    435|        diff |= (FDKmemcmp(&tmpInst,
 1604|    435|                           &(hUniDrcConfig->drcInstructionsUniDrc[offset + i]),
 1605|    435|                           sizeof(DRC_INSTRUCTIONS_UNI_DRC)) != 0);
 1606|  21.9k|      hUniDrcConfig->drcInstructionsUniDrc[offset + i] = tmpInst;
 1607|  21.9k|    }
 1608|  11.4k|  } else {
 1609|  11.4k|    diff |= _compAssign(&hUniDrcConfig->drcCoefficientsUniDrcCountV1, 0);
 1610|  11.4k|    diff |= _compAssign(&hUniDrcConfig->drcInstructionsUniDrcCountV1, 0);
 1611|  11.4k|  }
 1612|       |
 1613|  21.4k|  loudEqInstructionsPresent = FDKreadBits(hBs, 1);
 1614|  21.4k|  if (loudEqInstructionsPresent == 1) {
  ------------------
  |  Branch (1614:7): [True: 4.57k, False: 16.8k]
  ------------------
 1615|  4.57k|    loudEqInstructionsCount = FDKreadBits(hBs, 4);
 1616|  24.3k|    for (i = 0; i < loudEqInstructionsCount; i++) {
  ------------------
  |  Branch (1616:17): [True: 19.7k, False: 4.57k]
  ------------------
 1617|  19.7k|      _skipLoudEqInstructions(hBs);
 1618|  19.7k|    }
 1619|  4.57k|  }
 1620|       |
 1621|  21.4k|  eqPresent = FDKreadBits(hBs, 1);
 1622|  21.4k|  if (eqPresent == 1) {
  ------------------
  |  Branch (1622:7): [True: 7.41k, False: 13.9k]
  ------------------
 1623|  7.41k|    _skipEqCoefficients(hBs);
 1624|  7.41k|    eqInstructionsCount = FDKreadBits(hBs, 4);
 1625|  44.6k|    for (i = 0; i < eqInstructionsCount; i++) {
  ------------------
  |  Branch (1625:17): [True: 37.2k, False: 7.41k]
  ------------------
 1626|  37.2k|      _skipEqInstructions(hBs, hUniDrcConfig);
 1627|  37.2k|    }
 1628|  7.41k|  }
 1629|       |
 1630|  21.4k|  hUniDrcConfig->diff = diff;
 1631|       |
 1632|  21.4k|  return err;
 1633|  21.7k|}
drcDec_reader.cpp:_ZL23_skipLoudEqInstructionsP13FDK_BITSTREAM:
  820|  19.7k|static void _skipLoudEqInstructions(HANDLE_FDK_BITSTREAM hBs) {
  821|  19.7k|  int i;
  822|  19.7k|  int downmixIdPresent, additionalDownmixIdPresent,
  823|  19.7k|      additionalDownmixIdCount = 0;
  824|  19.7k|  int drcSetIdPresent, additionalDrcSetIdPresent, additionalDrcSetIdCount = 0;
  825|  19.7k|  int eqSetIdPresent, additionalEqSetIdPresent, additionalEqSetIdCount = 0;
  826|  19.7k|  int loudEqGainSequenceCount, drcCharacteristicFormatIsCICP;
  827|       |
  828|  19.7k|  FDKpushFor(hBs, 4); /* loudEqSetId */
  829|  19.7k|  FDKpushFor(hBs, 4); /* drcLocation */
  830|  19.7k|  downmixIdPresent = FDKreadBits(hBs, 1);
  831|  19.7k|  if (downmixIdPresent) {
  ------------------
  |  Branch (831:7): [True: 1.89k, False: 17.9k]
  ------------------
  832|  1.89k|    FDKpushFor(hBs, 7); /* downmixId */
  833|  1.89k|    additionalDownmixIdPresent = FDKreadBits(hBs, 1);
  834|  1.89k|    if (additionalDownmixIdPresent) {
  ------------------
  |  Branch (834:9): [True: 1.00k, False: 893]
  ------------------
  835|  1.00k|      additionalDownmixIdCount = FDKreadBits(hBs, 7);
  836|  21.7k|      for (i = 0; i < additionalDownmixIdCount; i++) {
  ------------------
  |  Branch (836:19): [True: 20.7k, False: 1.00k]
  ------------------
  837|  20.7k|        FDKpushFor(hBs, 7); /* additionalDownmixId */
  838|  20.7k|      }
  839|  1.00k|    }
  840|  1.89k|  }
  841|       |
  842|  19.7k|  drcSetIdPresent = FDKreadBits(hBs, 1);
  843|  19.7k|  if (drcSetIdPresent) {
  ------------------
  |  Branch (843:7): [True: 2.15k, False: 17.6k]
  ------------------
  844|  2.15k|    FDKpushFor(hBs, 6); /* drcSetId */
  845|  2.15k|    additionalDrcSetIdPresent = FDKreadBits(hBs, 1);
  846|  2.15k|    if (additionalDrcSetIdPresent) {
  ------------------
  |  Branch (846:9): [True: 795, False: 1.36k]
  ------------------
  847|    795|      additionalDrcSetIdCount = FDKreadBits(hBs, 6);
  848|  5.38k|      for (i = 0; i < additionalDrcSetIdCount; i++) {
  ------------------
  |  Branch (848:19): [True: 4.59k, False: 795]
  ------------------
  849|  4.59k|        FDKpushFor(hBs, 6); /* additionalDrcSetId; */
  850|  4.59k|      }
  851|    795|    }
  852|  2.15k|  }
  853|       |
  854|  19.7k|  eqSetIdPresent = FDKreadBits(hBs, 1);
  855|  19.7k|  if (eqSetIdPresent) {
  ------------------
  |  Branch (855:7): [True: 1.71k, False: 18.0k]
  ------------------
  856|  1.71k|    FDKpushFor(hBs, 6); /* eqSetId */
  857|  1.71k|    additionalEqSetIdPresent = FDKreadBits(hBs, 1);
  858|  1.71k|    if (additionalEqSetIdPresent) {
  ------------------
  |  Branch (858:9): [True: 844, False: 875]
  ------------------
  859|    844|      additionalEqSetIdCount = FDKreadBits(hBs, 6);
  860|  4.18k|      for (i = 0; i < additionalEqSetIdCount; i++) {
  ------------------
  |  Branch (860:19): [True: 3.34k, False: 844]
  ------------------
  861|  3.34k|        FDKpushFor(hBs, 6); /* additionalEqSetId; */
  862|  3.34k|      }
  863|    844|    }
  864|  1.71k|  }
  865|       |
  866|  19.7k|  FDKpushFor(hBs, 1); /* loudnessAfterDrc */
  867|  19.7k|  FDKpushFor(hBs, 1); /* loudnessAfterEq */
  868|  19.7k|  loudEqGainSequenceCount = FDKreadBits(hBs, 6);
  869|  30.9k|  for (i = 0; i < loudEqGainSequenceCount; i++) {
  ------------------
  |  Branch (869:15): [True: 11.1k, False: 19.7k]
  ------------------
  870|  11.1k|    FDKpushFor(hBs, 6); /* gainSequenceIndex */
  871|  11.1k|    drcCharacteristicFormatIsCICP = FDKreadBits(hBs, 1);
  872|  11.1k|    if (drcCharacteristicFormatIsCICP) {
  ------------------
  |  Branch (872:9): [True: 1.12k, False: 10.0k]
  ------------------
  873|  1.12k|      FDKpushFor(hBs, 7); /* drcCharacteristic */
  874|  10.0k|    } else {
  875|  10.0k|      FDKpushFor(hBs, 4); /* drcCharacteristicLeftIndex */
  876|  10.0k|      FDKpushFor(hBs, 4); /* drcCharacteristicRightIndex */
  877|  10.0k|    }
  878|  11.1k|    FDKpushFor(hBs, 6); /* frequencyRangeIndex */
  879|  11.1k|    FDKpushFor(hBs, 3); /* bsLoudEqScaling */
  880|  11.1k|    FDKpushFor(hBs, 5); /* bsLoudEqOffset */
  881|  11.1k|  }
  882|  19.7k|}
drcDec_reader.cpp:_ZL19_skipEqCoefficientsP13FDK_BITSTREAM:
  911|  7.41k|static void _skipEqCoefficients(HANDLE_FDK_BITSTREAM hBs) {
  912|  7.41k|  int j, k;
  913|  7.41k|  int eqDelayMaxPresent;
  914|  7.41k|  int uniqueFilterBlockCount, filterElementCount, filterElementGainPresent;
  915|  7.41k|  int uniqueTdFilterElementCount, eqFilterFormat, bsRealZeroRadiusOneCount,
  916|  7.41k|      realZeroCount, genericZeroCount, realPoleCount, complexPoleCount,
  917|  7.41k|      firFilterOrder;
  918|  7.41k|  int uniqueEqSubbandGainsCount, eqSubbandGainRepresentation,
  919|  7.41k|      eqSubbandGainCount;
  920|  7.41k|  int eqSubbandGainFormat;
  921|       |
  922|  7.41k|  eqDelayMaxPresent = FDKreadBits(hBs, 1);
  923|  7.41k|  if (eqDelayMaxPresent) {
  ------------------
  |  Branch (923:7): [True: 1.21k, False: 6.20k]
  ------------------
  924|  1.21k|    FDKpushFor(hBs, 8); /* bsEqDelayMax */
  925|  1.21k|  }
  926|       |
  927|  7.41k|  uniqueFilterBlockCount = FDKreadBits(hBs, 6);
  928|  25.2k|  for (j = 0; j < uniqueFilterBlockCount; j++) {
  ------------------
  |  Branch (928:15): [True: 17.8k, False: 7.41k]
  ------------------
  929|  17.8k|    filterElementCount = FDKreadBits(hBs, 6);
  930|  29.1k|    for (k = 0; k < filterElementCount; k++) {
  ------------------
  |  Branch (930:17): [True: 11.3k, False: 17.8k]
  ------------------
  931|  11.3k|      FDKpushFor(hBs, 6); /* filterElementIndex */
  932|  11.3k|      filterElementGainPresent = FDKreadBits(hBs, 1);
  933|  11.3k|      if (filterElementGainPresent) {
  ------------------
  |  Branch (933:11): [True: 773, False: 10.5k]
  ------------------
  934|    773|        FDKpushFor(hBs, 10); /* bsFilterElementGain */
  935|    773|      }
  936|  11.3k|    }
  937|  17.8k|  }
  938|  7.41k|  uniqueTdFilterElementCount = FDKreadBits(hBs, 6);
  939|  24.4k|  for (j = 0; j < uniqueTdFilterElementCount; j++) {
  ------------------
  |  Branch (939:15): [True: 16.9k, False: 7.41k]
  ------------------
  940|  16.9k|    eqFilterFormat = FDKreadBits(hBs, 1);
  941|  16.9k|    if (eqFilterFormat == 0) { /* pole/zero */
  ------------------
  |  Branch (941:9): [True: 15.7k, False: 1.21k]
  ------------------
  942|  15.7k|      bsRealZeroRadiusOneCount = FDKreadBits(hBs, 3);
  943|  15.7k|      realZeroCount = FDKreadBits(hBs, 6);
  944|  15.7k|      genericZeroCount = FDKreadBits(hBs, 6);
  945|  15.7k|      realPoleCount = FDKreadBits(hBs, 4);
  946|  15.7k|      complexPoleCount = FDKreadBits(hBs, 4);
  947|  15.7k|      FDKpushFor(hBs, 2 * bsRealZeroRadiusOneCount * 1);
  948|  15.7k|      FDKpushFor(hBs, realZeroCount * 8);
  949|  15.7k|      FDKpushFor(hBs, genericZeroCount * 14);
  950|  15.7k|      FDKpushFor(hBs, realPoleCount * 8);
  951|  15.7k|      FDKpushFor(hBs, complexPoleCount * 14);
  952|  15.7k|    } else { /* FIR coefficients */
  953|  1.21k|      firFilterOrder = FDKreadBits(hBs, 7);
  954|  1.21k|      FDKpushFor(hBs, 1);
  955|  1.21k|      FDKpushFor(hBs, (firFilterOrder / 2 + 1) * 11);
  956|  1.21k|    }
  957|  16.9k|  }
  958|  7.41k|  uniqueEqSubbandGainsCount = FDKreadBits(hBs, 6);
  959|  7.41k|  if (uniqueEqSubbandGainsCount > 0) {
  ------------------
  |  Branch (959:7): [True: 4.52k, False: 2.89k]
  ------------------
  960|  4.52k|    eqSubbandGainRepresentation = FDKreadBits(hBs, 1);
  961|  4.52k|    eqSubbandGainFormat = FDKreadBits(hBs, 4);
  962|  4.52k|    switch (eqSubbandGainFormat) {
  963|    503|      case GF_QMF32:
  ------------------
  |  Branch (963:7): [True: 503, False: 4.02k]
  ------------------
  964|    503|        eqSubbandGainCount = 32;
  965|    503|        break;
  966|    160|      case GF_QMFHYBRID39:
  ------------------
  |  Branch (966:7): [True: 160, False: 4.36k]
  ------------------
  967|    160|        eqSubbandGainCount = 39;
  968|    160|        break;
  969|    394|      case GF_QMF64:
  ------------------
  |  Branch (969:7): [True: 394, False: 4.13k]
  ------------------
  970|    394|        eqSubbandGainCount = 64;
  971|    394|        break;
  972|     14|      case GF_QMFHYBRID71:
  ------------------
  |  Branch (972:7): [True: 14, False: 4.51k]
  ------------------
  973|     14|        eqSubbandGainCount = 71;
  974|     14|        break;
  975|     92|      case GF_QMF128:
  ------------------
  |  Branch (975:7): [True: 92, False: 4.43k]
  ------------------
  976|     92|        eqSubbandGainCount = 128;
  977|     92|        break;
  978|    348|      case GF_QMFHYBRID135:
  ------------------
  |  Branch (978:7): [True: 348, False: 4.17k]
  ------------------
  979|    348|        eqSubbandGainCount = 135;
  980|    348|        break;
  981|    387|      case GF_UNIFORM:
  ------------------
  |  Branch (981:7): [True: 387, False: 4.13k]
  ------------------
  982|  3.01k|      default:
  ------------------
  |  Branch (982:7): [True: 2.62k, False: 1.89k]
  ------------------
  983|  3.01k|        eqSubbandGainCount = FDKreadBits(hBs, 8);
  984|  3.01k|        eqSubbandGainCount++;
  985|  3.01k|        break;
  986|  4.52k|    }
  987|   135k|    for (k = 0; k < uniqueEqSubbandGainsCount; k++) {
  ------------------
  |  Branch (987:17): [True: 130k, False: 4.52k]
  ------------------
  988|   130k|      if (eqSubbandGainRepresentation == 1) {
  ------------------
  |  Branch (988:11): [True: 24.4k, False: 106k]
  ------------------
  989|  24.4k|        _skipEqSubbandGainSpline(hBs);
  990|   106k|      } else {
  991|   106k|        FDKpushFor(hBs, eqSubbandGainCount * 9);
  992|   106k|      }
  993|   130k|    }
  994|  4.52k|  }
  995|  7.41k|}
drcDec_reader.cpp:_ZL24_skipEqSubbandGainSplineP13FDK_BITSTREAM:
  884|  24.4k|static void _skipEqSubbandGainSpline(HANDLE_FDK_BITSTREAM hBs) {
  885|  24.4k|  int nEqNodes, k, bits;
  886|  24.4k|  nEqNodes = FDKreadBits(hBs, 5);
  887|  24.4k|  nEqNodes += 2;
  888|  75.8k|  for (k = 0; k < nEqNodes; k++) {
  ------------------
  |  Branch (888:15): [True: 51.3k, False: 24.4k]
  ------------------
  889|  51.3k|    bits = FDKreadBits(hBs, 1);
  890|  51.3k|    if (!bits) {
  ------------------
  |  Branch (890:9): [True: 48.6k, False: 2.67k]
  ------------------
  891|  48.6k|      FDKpushFor(hBs, 4);
  892|  48.6k|    }
  893|  51.3k|  }
  894|  24.4k|  FDKpushFor(hBs, 4 * (nEqNodes - 1));
  895|  24.4k|  bits = FDKreadBits(hBs, 2);
  896|  24.4k|  switch (bits) {
  ------------------
  |  Branch (896:11): [True: 24.4k, False: 0]
  ------------------
  897|  22.7k|    case 0:
  ------------------
  |  Branch (897:5): [True: 22.7k, False: 1.70k]
  ------------------
  898|  22.7k|      FDKpushFor(hBs, 5);
  899|  22.7k|      break;
  900|    355|    case 1:
  ------------------
  |  Branch (900:5): [True: 355, False: 24.1k]
  ------------------
  901|  1.24k|    case 2:
  ------------------
  |  Branch (901:5): [True: 889, False: 23.5k]
  ------------------
  902|  1.24k|      FDKpushFor(hBs, 4);
  903|  1.24k|      break;
  904|    465|    case 3:
  ------------------
  |  Branch (904:5): [True: 465, False: 23.9k]
  ------------------
  905|    465|      FDKpushFor(hBs, 3);
  906|    465|      break;
  907|  24.4k|  }
  908|  24.4k|  FDKpushFor(hBs, 5 * (nEqNodes - 1));
  909|  24.4k|}
drcDec_reader.cpp:_ZL19_skipEqInstructionsP13FDK_BITSTREAMP14UNI_DRC_CONFIG:
 1019|  37.2k|                                     HANDLE_UNI_DRC_CONFIG hUniDrcConfig) {
 1020|  37.2k|  DRC_ERROR err = DE_OK;
 1021|  37.2k|  int c, i, k, channelCount;
 1022|  37.2k|  int downmixIdPresent, downmixId, eqApplyToDownmix, additionalDownmixIdPresent,
 1023|  37.2k|      additionalDownmixIdCount = 0;
 1024|  37.2k|  int additionalDrcSetIdPresent, additionalDrcSetIdCount;
 1025|  37.2k|  int dependsOnEqSetPresent, eqChannelGroupCount, tdFilterCascadePresent,
 1026|  37.2k|      subbandGainsPresent, eqTransitionDurationPresent;
 1027|  37.2k|  UCHAR eqChannelGroupForChannel[8];
 1028|       |
 1029|  37.2k|  FDKpushFor(hBs, 6); /* eqSetId */
 1030|  37.2k|  FDKpushFor(hBs, 4); /* eqSetComplexityLevel */
 1031|  37.2k|  downmixIdPresent = FDKreadBits(hBs, 1);
 1032|  37.2k|  if (downmixIdPresent) {
  ------------------
  |  Branch (1032:7): [True: 6.08k, False: 31.1k]
  ------------------
 1033|  6.08k|    downmixId = FDKreadBits(hBs, 7);
 1034|  6.08k|    eqApplyToDownmix = FDKreadBits(hBs, 1);
 1035|  6.08k|    additionalDownmixIdPresent = FDKreadBits(hBs, 1);
 1036|  6.08k|    if (additionalDownmixIdPresent) {
  ------------------
  |  Branch (1036:9): [True: 1.83k, False: 4.25k]
  ------------------
 1037|  1.83k|      additionalDownmixIdCount = FDKreadBits(hBs, 7);
 1038|  1.83k|      FDKpushFor(hBs, additionalDownmixIdCount * 7); /* additionalDownmixId */
 1039|  1.83k|    }
 1040|  31.1k|  } else {
 1041|  31.1k|    downmixId = 0;
 1042|  31.1k|    eqApplyToDownmix = 0;
 1043|  31.1k|  }
 1044|  37.2k|  FDKpushFor(hBs, 6); /* drcSetId */
 1045|  37.2k|  additionalDrcSetIdPresent = FDKreadBits(hBs, 1);
 1046|  37.2k|  if (additionalDrcSetIdPresent) {
  ------------------
  |  Branch (1046:7): [True: 3.03k, False: 34.2k]
  ------------------
 1047|  3.03k|    additionalDrcSetIdCount = FDKreadBits(hBs, 6);
 1048|  20.5k|    for (i = 0; i < additionalDrcSetIdCount; i++) {
  ------------------
  |  Branch (1048:17): [True: 17.4k, False: 3.03k]
  ------------------
 1049|  17.4k|      FDKpushFor(hBs, 6); /* additionalDrcSetId */
 1050|  17.4k|    }
 1051|  3.03k|  }
 1052|  37.2k|  FDKpushFor(hBs, 16); /* eqSetPurpose */
 1053|  37.2k|  dependsOnEqSetPresent = FDKreadBits(hBs, 1);
 1054|  37.2k|  if (dependsOnEqSetPresent) {
  ------------------
  |  Branch (1054:7): [True: 4.19k, False: 33.0k]
  ------------------
 1055|  4.19k|    FDKpushFor(hBs, 6); /* dependsOnEqSet */
 1056|  33.0k|  } else {
 1057|  33.0k|    FDKpushFor(hBs, 1); /* noIndependentEqUse */
 1058|  33.0k|  }
 1059|       |
 1060|  37.2k|  channelCount = hUniDrcConfig->channelLayout.baseChannelCount;
 1061|  37.2k|  if ((downmixIdPresent == 1) && (eqApplyToDownmix == 1) && (downmixId != 0) &&
  ------------------
  |  Branch (1061:7): [True: 6.08k, False: 31.1k]
  |  Branch (1061:34): [True: 3.11k, False: 2.97k]
  |  Branch (1061:61): [True: 2.87k, False: 237]
  ------------------
 1062|  2.87k|      (downmixId != DOWNMIX_ID_ANY_DOWNMIX) &&
  ------------------
  |  |  123|  2.87k|#define DOWNMIX_ID_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (1062:7): [True: 2.40k, False: 470]
  ------------------
 1063|  2.40k|      (additionalDownmixIdCount == 0)) {
  ------------------
  |  Branch (1063:7): [True: 1.66k, False: 746]
  ------------------
 1064|  1.66k|    DOWNMIX_INSTRUCTIONS* pDown =
 1065|  1.66k|        selectDownmixInstructions(hUniDrcConfig, downmixId);
 1066|  1.66k|    if (pDown == NULL) return DE_NOT_OK;
  ------------------
  |  Branch (1066:9): [True: 1.35k, False: 304]
  ------------------
 1067|       |
 1068|    304|    channelCount =
 1069|    304|        pDown->targetChannelCount; /* targetChannelCountFromDownmixId*/
 1070|  35.5k|  } else if ((downmixId == DOWNMIX_ID_ANY_DOWNMIX) ||
  ------------------
  |  |  123|  35.5k|#define DOWNMIX_ID_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (1070:14): [True: 667, False: 34.9k]
  ------------------
 1071|  34.9k|             (additionalDownmixIdCount > 1)) {
  ------------------
  |  Branch (1071:14): [True: 921, False: 33.9k]
  ------------------
 1072|  1.58k|    channelCount = 1;
 1073|  1.58k|  }
 1074|       |
 1075|  35.8k|  eqChannelGroupCount = 0;
 1076|   114k|  for (c = 0; c < channelCount; c++) {
  ------------------
  |  Branch (1076:15): [True: 78.9k, False: 35.6k]
  ------------------
 1077|  78.9k|    int newGroup = 1;
 1078|  78.9k|    if (c >= 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (1078:9): [True: 227, False: 78.7k]
  ------------------
 1079|  78.7k|    eqChannelGroupForChannel[c] = FDKreadBits(hBs, 7);
 1080|   273k|    for (k = 0; k < c; k++) {
  ------------------
  |  Branch (1080:17): [True: 194k, False: 78.7k]
  ------------------
 1081|   194k|      if (eqChannelGroupForChannel[c] == eqChannelGroupForChannel[k]) {
  ------------------
  |  Branch (1081:11): [True: 173k, False: 21.9k]
  ------------------
 1082|   173k|        newGroup = 0;
 1083|   173k|      }
 1084|   194k|    }
 1085|  78.7k|    if (newGroup == 1) {
  ------------------
  |  Branch (1085:9): [True: 26.9k, False: 51.7k]
  ------------------
 1086|  26.9k|      eqChannelGroupCount += 1;
 1087|  26.9k|    }
 1088|  78.7k|  }
 1089|  35.6k|  tdFilterCascadePresent = FDKreadBits(hBs, 1);
 1090|  35.6k|  if (tdFilterCascadePresent) {
  ------------------
  |  Branch (1090:7): [True: 4.28k, False: 31.3k]
  ------------------
 1091|  4.28k|    _skipTdFilterCascade(hBs, eqChannelGroupCount);
 1092|  4.28k|  }
 1093|  35.6k|  subbandGainsPresent = FDKreadBits(hBs, 1);
 1094|  35.6k|  if (subbandGainsPresent) {
  ------------------
  |  Branch (1094:7): [True: 3.69k, False: 31.9k]
  ------------------
 1095|  3.69k|    FDKpushFor(hBs, eqChannelGroupCount * 6); /* subbandGainsIndex */
 1096|  3.69k|  }
 1097|  35.6k|  eqTransitionDurationPresent = FDKreadBits(hBs, 1);
 1098|  35.6k|  if (eqTransitionDurationPresent) {
  ------------------
  |  Branch (1098:7): [True: 3.66k, False: 31.9k]
  ------------------
 1099|  3.66k|    FDKpushFor(hBs, 5); /* bsEqTransitionDuration */
 1100|  3.66k|  }
 1101|  35.6k|  return err;
 1102|  35.8k|}
drcDec_reader.cpp:_ZL20_skipTdFilterCascadeP13FDK_BITSTREAMi:
  998|  4.28k|                                 const int eqChannelGroupCount) {
  999|  4.28k|  int i, eqCascadeGainPresent, filterBlockCount, eqPhaseAlignmentPresent;
 1000|  8.88k|  for (i = 0; i < eqChannelGroupCount; i++) {
  ------------------
  |  Branch (1000:15): [True: 4.59k, False: 4.28k]
  ------------------
 1001|  4.59k|    eqCascadeGainPresent = FDKreadBits(hBs, 1);
 1002|  4.59k|    if (eqCascadeGainPresent) {
  ------------------
  |  Branch (1002:9): [True: 1.78k, False: 2.81k]
  ------------------
 1003|  1.78k|      FDKpushFor(hBs, 10); /* bsEqCascadeGain */
 1004|  1.78k|    }
 1005|  4.59k|    filterBlockCount = FDKreadBits(hBs, 4);
 1006|  4.59k|    FDKpushFor(hBs, filterBlockCount * 7); /* filterBlockIndex */
 1007|  4.59k|  }
 1008|  4.28k|  eqPhaseAlignmentPresent = FDKreadBits(hBs, 1);
 1009|  4.28k|  {
 1010|  4.28k|    if (eqPhaseAlignmentPresent) {
  ------------------
  |  Branch (1010:9): [True: 2.41k, False: 1.87k]
  ------------------
 1011|  3.53k|      for (i = 0; i < eqChannelGroupCount; i++) {
  ------------------
  |  Branch (1011:19): [True: 1.12k, False: 2.41k]
  ------------------
 1012|  1.12k|        FDKpushFor(hBs, (eqChannelGroupCount - i - 1) * 1);
 1013|  1.12k|      }
 1014|  2.41k|    }
 1015|  4.28k|  }
 1016|  4.28k|}
drcDec_reader.cpp:_ZL17_readLoudnessInfoP13FDK_BITSTREAMiP13LOUDNESS_INFO:
 1853|  16.8k|                                   LOUDNESS_INFO* loudnessInfo) {
 1854|  16.8k|  DRC_ERROR err = DE_OK;
 1855|  16.8k|  int bsSamplePeakLevel, bsTruePeakLevel, i;
 1856|  16.8k|  int measurementCount;
 1857|       |
 1858|  16.8k|  loudnessInfo->drcSetId = FDKreadBits(hBs, 6);
 1859|  16.8k|  if (version >= 1) {
  ------------------
  |  Branch (1859:7): [True: 3.20k, False: 13.6k]
  ------------------
 1860|  3.20k|    loudnessInfo->eqSetId = FDKreadBits(hBs, 6);
 1861|  13.6k|  } else {
 1862|  13.6k|    loudnessInfo->eqSetId = 0;
 1863|  13.6k|  }
 1864|  16.8k|  loudnessInfo->downmixId = FDKreadBits(hBs, 7);
 1865|       |
 1866|  16.8k|  loudnessInfo->samplePeakLevelPresent = FDKreadBits(hBs, 1);
 1867|  16.8k|  if (loudnessInfo->samplePeakLevelPresent) {
  ------------------
  |  Branch (1867:7): [True: 1.69k, False: 15.1k]
  ------------------
 1868|  1.69k|    bsSamplePeakLevel = FDKreadBits(hBs, 12);
 1869|  1.69k|    if (bsSamplePeakLevel == 0) {
  ------------------
  |  Branch (1869:9): [True: 87, False: 1.60k]
  ------------------
 1870|     87|      loudnessInfo->samplePeakLevelPresent = 0;
 1871|     87|      loudnessInfo->samplePeakLevel = (FIXP_DBL)0;
 1872|  1.60k|    } else { /* 20.0 - bsSamplePeakLevel * 0.03125; */
 1873|  1.60k|      loudnessInfo->samplePeakLevel =
 1874|  1.60k|          FL2FXCONST_DBL(20.0f / (float)(1 << 7)) -
  ------------------
  |  |  192|  1.60k|  (FIXP_DBL)(                                                                \
  |  |  193|  1.60k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 1.60k, Folded]
  |  |  ------------------
  |  |  194|  1.60k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  1.60k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.60k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 1.60k]
  |  |  ------------------
  |  |  195|  1.60k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  1.60k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  1.60k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  1.60k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  1.60k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.60k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  1.60k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1875|  1.60k|          (FIXP_DBL)(bsSamplePeakLevel << (DFRACT_BITS - 1 - 5 - 7));
  ------------------
  |  |  113|  1.60k|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1876|  1.60k|    }
 1877|  1.69k|  }
 1878|       |
 1879|  16.8k|  loudnessInfo->truePeakLevelPresent = FDKreadBits(hBs, 1);
 1880|  16.8k|  if (loudnessInfo->truePeakLevelPresent) {
  ------------------
  |  Branch (1880:7): [True: 855, False: 15.9k]
  ------------------
 1881|    855|    bsTruePeakLevel = FDKreadBits(hBs, 12);
 1882|    855|    if (bsTruePeakLevel == 0) {
  ------------------
  |  Branch (1882:9): [True: 123, False: 732]
  ------------------
 1883|    123|      loudnessInfo->truePeakLevelPresent = 0;
 1884|    123|      loudnessInfo->truePeakLevel = (FIXP_DBL)0;
 1885|    732|    } else {
 1886|    732|      loudnessInfo->truePeakLevel =
 1887|    732|          FL2FXCONST_DBL(20.0f / (float)(1 << 7)) -
  ------------------
  |  |  192|    732|  (FIXP_DBL)(                                                                \
  |  |  193|    732|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 732, Folded]
  |  |  ------------------
  |  |  194|    732|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|    732|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    732|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 732]
  |  |  ------------------
  |  |  195|    732|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|    732|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|    732|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|    732|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|    732|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    732|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|    732|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1888|    732|          (FIXP_DBL)(bsTruePeakLevel << (DFRACT_BITS - 1 - 5 - 7));
  ------------------
  |  |  113|    732|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1889|    732|    }
 1890|    855|    loudnessInfo->truePeakLevelMeasurementSystem = FDKreadBits(hBs, 4);
 1891|    855|    loudnessInfo->truePeakLevelReliability = FDKreadBits(hBs, 2);
 1892|    855|  }
 1893|       |
 1894|  16.8k|  measurementCount = FDKreadBits(hBs, 4);
 1895|  16.8k|  loudnessInfo->measurementCount = fMin(measurementCount, 8);
 1896|  22.8k|  for (i = 0; i < measurementCount; i++) {
  ------------------
  |  Branch (1896:15): [True: 6.60k, False: 16.2k]
  ------------------
 1897|  6.60k|    LOUDNESS_MEASUREMENT tmpMeas;
 1898|  6.60k|    FDKmemclear(&tmpMeas, sizeof(LOUDNESS_MEASUREMENT));
 1899|  6.60k|    err = _readLoudnessMeasurement(hBs, &tmpMeas);
 1900|  6.60k|    if (err) return err;
  ------------------
  |  Branch (1900:9): [True: 611, False: 5.99k]
  ------------------
 1901|  5.99k|    if (i >= 8) continue;
  ------------------
  |  Branch (1901:9): [True: 613, False: 5.38k]
  ------------------
 1902|  5.38k|    loudnessInfo->loudnessMeasurement[i] = tmpMeas;
 1903|  5.38k|  }
 1904|       |
 1905|  16.2k|  return err;
 1906|  16.8k|}
drcDec_reader.cpp:_ZL24_readLoudnessMeasurementP13FDK_BITSTREAMP20LOUDNESS_MEASUREMENT:
 1839|  6.60k|                                          LOUDNESS_MEASUREMENT* pMeas) {
 1840|  6.60k|  DRC_ERROR err = DE_OK;
 1841|       |
 1842|  6.60k|  pMeas->methodDefinition = FDKreadBits(hBs, 4);
 1843|  6.60k|  err =
 1844|  6.60k|      _decodeMethodValue(hBs, pMeas->methodDefinition, &pMeas->methodValue, 0);
 1845|  6.60k|  if (err) return err;
  ------------------
  |  Branch (1845:7): [True: 611, False: 5.99k]
  ------------------
 1846|  5.99k|  pMeas->measurementSystem = FDKreadBits(hBs, 4);
 1847|  5.99k|  pMeas->reliability = FDKreadBits(hBs, 2);
 1848|       |
 1849|  5.99k|  return err;
 1850|  6.60k|}
drcDec_reader.cpp:_ZL18_decodeMethodValueP13FDK_BITSTREAMhPii:
 1785|  6.60k|                                    FIXP_DBL* methodValue, INT isBox) {
 1786|  6.60k|  int tmp;
 1787|  6.60k|  FIXP_DBL val;
 1788|  6.60k|  switch (methodDefinition) {
 1789|  1.70k|    case MD_UNKNOWN_OTHER:
  ------------------
  |  Branch (1789:5): [True: 1.70k, False: 4.90k]
  ------------------
 1790|  2.40k|    case MD_PROGRAM_LOUDNESS:
  ------------------
  |  Branch (1790:5): [True: 697, False: 5.91k]
  ------------------
 1791|  2.91k|    case MD_ANCHOR_LOUDNESS:
  ------------------
  |  Branch (1791:5): [True: 511, False: 6.09k]
  ------------------
 1792|  3.10k|    case MD_MAX_OF_LOUDNESS_RANGE:
  ------------------
  |  Branch (1792:5): [True: 196, False: 6.41k]
  ------------------
 1793|  3.41k|    case MD_MOMENTARY_LOUDNESS_MAX:
  ------------------
  |  Branch (1793:5): [True: 307, False: 6.30k]
  ------------------
 1794|  3.56k|    case MD_SHORT_TERM_LOUDNESS_MAX:
  ------------------
  |  Branch (1794:5): [True: 145, False: 6.46k]
  ------------------
 1795|  3.56k|      tmp = FDKreadBits(hBs, 8);
 1796|  3.56k|      val = FL2FXCONST_DBL(-57.75f / (float)(1 << 7)) +
  ------------------
  |  |  192|  3.56k|  (FIXP_DBL)(                                                                \
  |  |  193|  3.56k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 3.56k]
  |  |  ------------------
  |  |  194|  3.56k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 0]
  |  |  ------------------
  |  |  195|      0|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|      0|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  3.56k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|  3.56k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  3.56k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 3.56k]
  |  |  ------------------
  |  |  199|  3.56k|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|  3.56k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|  3.56k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|  3.56k|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|  3.56k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|  3.56k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  3.56k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1797|  3.56k|            (FIXP_DBL)(
 1798|  3.56k|                tmp << (DFRACT_BITS - 1 - 2 - 7)); /* -57.75 + tmp * 0.25; */
  ------------------
  |  |  113|  3.56k|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1799|  3.56k|      break;
 1800|    653|    case MD_LOUDNESS_RANGE:
  ------------------
  |  Branch (1800:5): [True: 653, False: 5.95k]
  ------------------
 1801|    653|      tmp = FDKreadBits(hBs, 8);
 1802|    653|      if (tmp == 0)
  ------------------
  |  Branch (1802:11): [True: 107, False: 546]
  ------------------
 1803|    107|        val = (FIXP_DBL)0;
 1804|    546|      else if (tmp <= 128)
  ------------------
  |  Branch (1804:16): [True: 295, False: 251]
  ------------------
 1805|    295|        val = (FIXP_DBL)(tmp << (DFRACT_BITS - 1 - 2 - 7)); /* tmp * 0.25; */
  ------------------
  |  |  113|    295|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1806|    251|      else if (tmp <= 204) {
  ------------------
  |  Branch (1806:16): [True: 145, False: 106]
  ------------------
 1807|    145|        val = (FIXP_DBL)(tmp << (DFRACT_BITS - 1 - 1 - 7)) -
  ------------------
  |  |  113|    145|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1808|    145|              FL2FXCONST_DBL(32.0f / (float)(1 << 7)); /* 0.5 * tmp - 32.0f; */
  ------------------
  |  |  192|    145|  (FIXP_DBL)(                                                                \
  |  |  193|    145|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 145, Folded]
  |  |  ------------------
  |  |  194|    145|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|    145|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    145|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 145]
  |  |  ------------------
  |  |  195|    145|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|    145|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|    145|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|    145|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|    145|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    145|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|    145|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1809|    145|      } else {
 1810|       |        /* downscale by 1 more bit to prevent overflow at intermediate result */
 1811|    106|        val = (FIXP_DBL)(tmp << (DFRACT_BITS - 1 - 8)) -
  ------------------
  |  |  113|    106|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1812|    106|              FL2FXCONST_DBL(134.0f / (float)(1 << 8)); /* tmp - 134.0; */
  ------------------
  |  |  192|    106|  (FIXP_DBL)(                                                                \
  |  |  193|    106|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 106, Folded]
  |  |  ------------------
  |  |  194|    106|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|    106|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    106|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 106]
  |  |  ------------------
  |  |  195|    106|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|    106|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|    106|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|    106|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|    106|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    106|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|    106|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1813|    106|        val <<= 1;
 1814|    106|      }
 1815|    653|      break;
 1816|    658|    case MD_MIXING_LEVEL:
  ------------------
  |  Branch (1816:5): [True: 658, False: 5.95k]
  ------------------
 1817|    658|      tmp = FDKreadBits(hBs, isBox ? 8 : 5);
  ------------------
  |  Branch (1817:30): [True: 0, False: 658]
  ------------------
 1818|    658|      val = (FIXP_DBL)(tmp << (DFRACT_BITS - 1 - 7)) +
  ------------------
  |  |  113|    658|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1819|    658|            FL2FXCONST_DBL(80.0f / (float)(1 << 7)); /* tmp + 80.0; */
  ------------------
  |  |  192|    658|  (FIXP_DBL)(                                                                \
  |  |  193|    658|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 658, Folded]
  |  |  ------------------
  |  |  194|    658|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|    658|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    658|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 658]
  |  |  ------------------
  |  |  195|    658|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|    658|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|    658|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|    658|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|    658|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    658|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|    658|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1820|    658|      break;
 1821|    808|    case MD_ROOM_TYPE:
  ------------------
  |  Branch (1821:5): [True: 808, False: 5.80k]
  ------------------
 1822|    808|      tmp = FDKreadBits(hBs, isBox ? 8 : 2);
  ------------------
  |  Branch (1822:30): [True: 0, False: 808]
  ------------------
 1823|    808|      val = (FIXP_DBL)(tmp << (DFRACT_BITS - 1 - 7)); /* tmp; */
  ------------------
  |  |  113|    808|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1824|    808|      break;
 1825|    318|    case MD_SHORT_TERM_LOUDNESS:
  ------------------
  |  Branch (1825:5): [True: 318, False: 6.29k]
  ------------------
 1826|    318|      tmp = FDKreadBits(hBs, 8);
 1827|    318|      val = FL2FXCONST_DBL(-116.0f / (float)(1 << 7)) +
  ------------------
  |  |  192|    318|  (FIXP_DBL)(                                                                \
  |  |  193|    318|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 318]
  |  |  ------------------
  |  |  194|    318|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 0]
  |  |  ------------------
  |  |  195|      0|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|      0|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|    318|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|    318|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    318|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 318]
  |  |  ------------------
  |  |  199|    318|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|    318|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|    318|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|    318|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|    318|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|    318|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    318|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1828|    318|            (FIXP_DBL)(
 1829|    318|                tmp << (DFRACT_BITS - 1 - 1 - 7)); /* -116.0 + tmp * 0.5; */
  ------------------
  |  |  113|    318|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1830|    318|      break;
 1831|    611|    default:
  ------------------
  |  Branch (1831:5): [True: 611, False: 5.99k]
  ------------------
 1832|    611|      return DE_NOT_OK; /* invalid methodDefinition value */
 1833|  6.60k|  }
 1834|  5.99k|  *methodValue = val;
 1835|  5.99k|  return DE_OK;
 1836|  6.60k|}
drcDec_reader.cpp:_ZL29_readLoudnessInfoSetExtensionP13FDK_BITSTREAMP17LOUDNESS_INFO_SET:
 1955|  1.02k|    HANDLE_FDK_BITSTREAM hBs, HANDLE_LOUDNESS_INFO_SET hLoudnessInfoSet) {
 1956|  1.02k|  DRC_ERROR err = DE_OK;
 1957|  1.02k|  int k, bitSizeLen, extSizeBits, bitSize;
 1958|  1.02k|  INT nBitsRemaining;
 1959|  1.02k|  LOUDNESS_INFO_SET_EXTENSION* pExt = &(hLoudnessInfoSet->loudnessInfoSetExt);
 1960|       |
 1961|  1.02k|  k = 0;
 1962|  1.02k|  pExt->loudnessInfoSetExtType[k] = FDKreadBits(hBs, 4);
 1963|  1.99k|  while (pExt->loudnessInfoSetExtType[k] != UNIDRCLOUDEXT_TERM) {
  ------------------
  |  |  116|  1.99k|#define UNIDRCLOUDEXT_TERM 0x0
  ------------------
  |  Branch (1963:10): [True: 1.42k, False: 572]
  ------------------
 1964|  1.42k|    if (k >= (8 - 1)) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (1964:9): [True: 65, False: 1.35k]
  ------------------
 1965|  1.35k|    bitSizeLen = FDKreadBits(hBs, 4);
 1966|  1.35k|    extSizeBits = bitSizeLen + 4;
 1967|       |
 1968|  1.35k|    bitSize = FDKreadBits(hBs, extSizeBits);
 1969|  1.35k|    pExt->extBitSize[k] = bitSize + 1;
 1970|  1.35k|    nBitsRemaining = (INT)FDKgetValidBits(hBs);
 1971|       |
 1972|  1.35k|    switch (pExt->loudnessInfoSetExtType[k]) {
 1973|    651|      case UNIDRCLOUDEXT_EQ:
  ------------------
  |  |  113|    651|#define UNIDRCLOUDEXT_EQ 0x1
  ------------------
  |  Branch (1973:7): [True: 651, False: 707]
  ------------------
 1974|    651|        err = _readLoudnessInfoSetExtEq(hBs, hLoudnessInfoSet);
 1975|    651|        if (err) return err;
  ------------------
  |  Branch (1975:13): [True: 133, False: 518]
  ------------------
 1976|    518|        if (nBitsRemaining !=
  ------------------
  |  Branch (1976:13): [True: 256, False: 262]
  ------------------
 1977|    518|            ((INT)pExt->extBitSize[k] + (INT)FDKgetValidBits(hBs)))
 1978|    256|          return DE_NOT_OK;
 1979|    262|        break;
 1980|       |      /* add future extensions here */
 1981|    707|      default:
  ------------------
  |  Branch (1981:7): [True: 707, False: 651]
  ------------------
 1982|    707|        FDKpushFor(hBs, pExt->extBitSize[k]);
 1983|    707|        break;
 1984|  1.35k|    }
 1985|    969|    k++;
 1986|    969|    pExt->loudnessInfoSetExtType[k] = FDKreadBits(hBs, 4);
 1987|    969|  }
 1988|       |
 1989|    572|  return err;
 1990|  1.02k|}
drcDec_reader.cpp:_ZL25_readLoudnessInfoSetExtEqP13FDK_BITSTREAMP17LOUDNESS_INFO_SET:
 1909|    651|    HANDLE_FDK_BITSTREAM hBs, HANDLE_LOUDNESS_INFO_SET hLoudnessInfoSet) {
 1910|    651|  DRC_ERROR err = DE_OK;
 1911|    651|  int i, offset;
 1912|    651|  int diff = hLoudnessInfoSet->diff;
 1913|       |
 1914|    651|  diff |= _compAssign(&hLoudnessInfoSet->loudnessInfoAlbumCountV1,
 1915|    651|                      FDKreadBits(hBs, 6));
 1916|    651|  diff |=
 1917|    651|      _compAssign(&hLoudnessInfoSet->loudnessInfoCountV1, FDKreadBits(hBs, 6));
 1918|       |
 1919|    651|  offset = hLoudnessInfoSet->loudnessInfoAlbumCountV0;
 1920|    651|  hLoudnessInfoSet->loudnessInfoAlbumCount = fMin(
 1921|    651|      (UCHAR)(offset + hLoudnessInfoSet->loudnessInfoAlbumCountV1), (UCHAR)12);
 1922|  2.26k|  for (i = 0; i < hLoudnessInfoSet->loudnessInfoAlbumCountV1; i++) {
  ------------------
  |  Branch (1922:15): [True: 1.65k, False: 603]
  ------------------
 1923|  1.65k|    LOUDNESS_INFO tmpLoud;
 1924|  1.65k|    FDKmemclear(&tmpLoud, sizeof(LOUDNESS_INFO));
 1925|  1.65k|    err = _readLoudnessInfo(hBs, 1, &tmpLoud);
 1926|  1.65k|    if (err) return err;
  ------------------
  |  Branch (1926:9): [True: 48, False: 1.61k]
  ------------------
 1927|  1.61k|    if ((offset + i) >= 12) continue;
  ------------------
  |  Branch (1927:9): [True: 961, False: 650]
  ------------------
 1928|    650|    if (!diff)
  ------------------
  |  Branch (1928:9): [True: 117, False: 533]
  ------------------
 1929|    117|      diff |= (FDKmemcmp(&tmpLoud,
 1930|    117|                         &(hLoudnessInfoSet->loudnessInfoAlbum[offset + i]),
 1931|    117|                         sizeof(LOUDNESS_INFO)) != 0);
 1932|    650|    hLoudnessInfoSet->loudnessInfoAlbum[offset + i] = tmpLoud;
 1933|    650|  }
 1934|       |
 1935|    603|  offset = hLoudnessInfoSet->loudnessInfoCountV0;
 1936|    603|  hLoudnessInfoSet->loudnessInfoCount =
 1937|    603|      fMin((UCHAR)(offset + hLoudnessInfoSet->loudnessInfoCountV1), (UCHAR)12);
 1938|  2.06k|  for (i = 0; i < hLoudnessInfoSet->loudnessInfoCountV1; i++) {
  ------------------
  |  Branch (1938:15): [True: 1.54k, False: 518]
  ------------------
 1939|  1.54k|    LOUDNESS_INFO tmpLoud;
 1940|  1.54k|    FDKmemclear(&tmpLoud, sizeof(LOUDNESS_INFO));
 1941|  1.54k|    err = _readLoudnessInfo(hBs, 1, &tmpLoud);
 1942|  1.54k|    if (err) return err;
  ------------------
  |  Branch (1942:9): [True: 85, False: 1.46k]
  ------------------
 1943|  1.46k|    if ((offset + i) >= 12) continue;
  ------------------
  |  Branch (1943:9): [True: 825, False: 637]
  ------------------
 1944|    637|    if (!diff)
  ------------------
  |  Branch (1944:9): [True: 122, False: 515]
  ------------------
 1945|    122|      diff |=
 1946|    122|          (FDKmemcmp(&tmpLoud, &(hLoudnessInfoSet->loudnessInfo[offset + i]),
 1947|    122|                     sizeof(LOUDNESS_INFO)) != 0);
 1948|    637|    hLoudnessInfoSet->loudnessInfo[offset + i] = tmpLoud;
 1949|    637|  }
 1950|    518|  hLoudnessInfoSet->diff = diff;
 1951|    518|  return err;
 1952|    603|}

_Z30drcDec_SelectionProcess_CreatePP26s_drcdec_selection_process:
  436|  7.39k|drcDec_SelectionProcess_Create(HANDLE_DRC_SELECTION_PROCESS* phInstance) {
  437|  7.39k|  HANDLE_DRC_SELECTION_PROCESS hInstance;
  438|  7.39k|  hInstance = (HANDLE_DRC_SELECTION_PROCESS)FDKcalloc(
  439|  7.39k|      1, sizeof(struct s_drcdec_selection_process));
  440|       |
  441|  7.39k|  if (!hInstance) return DRCDEC_SELECTION_PROCESS_OUTOFMEMORY;
  ------------------
  |  Branch (441:7): [True: 0, False: 7.39k]
  ------------------
  442|       |
  443|  7.39k|  hInstance->codecMode = SEL_PROC_CODEC_MODE_UNDEFINED;
  444|       |
  445|  7.39k|  *phInstance = hInstance;
  446|  7.39k|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
  447|  7.39k|}
_Z28drcDec_SelectionProcess_InitP26s_drcdec_selection_process:
  450|  7.39k|drcDec_SelectionProcess_Init(HANDLE_DRC_SELECTION_PROCESS hInstance) {
  451|  7.39k|  if (!hInstance) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (451:7): [True: 0, False: 7.39k]
  ------------------
  452|       |
  453|  7.39k|  _initDefaultParams(&hInstance->selProcInput);
  454|  7.39k|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
  455|  7.39k|}
_Z36drcDec_SelectionProcess_SetCodecModeP26s_drcdec_selection_process19SEL_PROC_CODEC_MODE:
  459|  5.14k|                                     const SEL_PROC_CODEC_MODE codecMode) {
  460|  5.14k|  DRCDEC_SELECTION_PROCESS_RETURN retVal = DRCDEC_SELECTION_PROCESS_NO_ERROR;
  461|       |
  462|  5.14k|  if (!hInstance) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (462:7): [True: 0, False: 5.14k]
  ------------------
  463|       |
  464|  5.14k|  switch (codecMode) {
  465|      0|    case SEL_PROC_MPEG_4_AAC:
  ------------------
  |  Branch (465:5): [True: 0, False: 5.14k]
  ------------------
  466|  5.14k|    case SEL_PROC_MPEG_D_USAC:
  ------------------
  |  Branch (466:5): [True: 5.14k, False: 0]
  ------------------
  467|  5.14k|    case SEL_PROC_TEST_TIME_DOMAIN:
  ------------------
  |  Branch (467:5): [True: 0, False: 5.14k]
  ------------------
  468|  5.14k|    case SEL_PROC_TEST_QMF_DOMAIN:
  ------------------
  |  Branch (468:5): [True: 0, False: 5.14k]
  ------------------
  469|  5.14k|    case SEL_PROC_TEST_STFT_DOMAIN:
  ------------------
  |  Branch (469:5): [True: 0, False: 5.14k]
  ------------------
  470|  5.14k|      hInstance->codecMode = codecMode;
  471|  5.14k|      break;
  472|       |
  473|      0|    case SEL_PROC_CODEC_MODE_UNDEFINED:
  ------------------
  |  Branch (473:5): [True: 0, False: 5.14k]
  ------------------
  474|      0|    default:
  ------------------
  |  Branch (474:5): [True: 0, False: 5.14k]
  ------------------
  475|      0|      return DRCDEC_SELECTION_PROCESS_NOT_OK;
  476|  5.14k|  }
  477|       |
  478|  5.14k|  retVal = _initCodecModeParams(&(hInstance->selProcInput),
  479|  5.14k|                                hInstance->codecMode = codecMode);
  480|       |
  481|  5.14k|  return retVal;
  482|  5.14k|}
_Z32drcDec_SelectionProcess_SetParamP26s_drcdec_selection_process19SEL_PROC_USER_PARAMiPi:
  487|  5.69k|                                 FIXP_DBL requestValue, int* pDiff) {
  488|  5.69k|  INT requestValueInt = (INT)requestValue;
  489|  5.69k|  int i, diff = 0;
  490|  5.69k|  SEL_PROC_INPUT* pSelProcInput = &(hInstance->selProcInput);
  491|       |
  492|  5.69k|  switch (requestType) {
  493|      0|    case SEL_PROC_LOUDNESS_NORMALIZATION_ON:
  ------------------
  |  Branch (493:5): [True: 0, False: 5.69k]
  ------------------
  494|      0|      if ((requestValueInt != 0) && (requestValueInt != 1))
  ------------------
  |  Branch (494:11): [True: 0, False: 0]
  |  Branch (494:37): [True: 0, False: 0]
  ------------------
  495|      0|        return DRCDEC_SELECTION_PROCESS_PARAM_OUT_OF_RANGE;
  496|      0|      diff |=
  497|      0|          _compAssign(&pSelProcInput->loudnessNormalizationOn, requestValueInt);
  498|      0|      break;
  499|      0|    case SEL_PROC_TARGET_LOUDNESS:
  ------------------
  |  Branch (499:5): [True: 0, False: 5.69k]
  ------------------
  500|       |      /* Lower boundary: drcSetTargetLoudnessValueLower default value.
  501|       |         Upper boundary: drcSetTargetLoudnessValueUpper default value */
  502|      0|      if ((requestValue < FL2FXCONST_DBL(-63.0f / (float)(1 << 7))) ||
  ------------------
  |  |  192|      0|  (FIXP_DBL)(                                                                \
  |  |  193|      0|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 0]
  |  |  ------------------
  |  |  194|      0|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 0]
  |  |  ------------------
  |  |  195|      0|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|      0|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|      0|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (502:11): [True: 0, False: 0]
  ------------------
  503|      0|          (requestValue > (FIXP_DBL)0))
  ------------------
  |  Branch (503:11): [True: 0, False: 0]
  ------------------
  504|      0|        return DRCDEC_SELECTION_PROCESS_PARAM_OUT_OF_RANGE;
  505|      0|      if (requestValue >
  ------------------
  |  Branch (505:11): [True: 0, False: 0]
  ------------------
  506|      0|          FL2FXCONST_DBL(-10.0f /
  ------------------
  |  |  192|      0|  (FIXP_DBL)(                                                                \
  |  |  193|      0|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 0]
  |  |  ------------------
  |  |  194|      0|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 0]
  |  |  ------------------
  |  |  195|      0|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|      0|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|      0|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  507|      0|                         (float)(1 << 7))) /* recommended maximum value */
  508|      0|        requestValue = FL2FXCONST_DBL(-10.0f / (float)(1 << 7));
  ------------------
  |  |  192|      0|  (FIXP_DBL)(                                                                \
  |  |  193|      0|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 0]
  |  |  ------------------
  |  |  194|      0|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 0]
  |  |  ------------------
  |  |  195|      0|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|      0|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|      0|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  509|      0|      diff |= _compAssign(&pSelProcInput->targetLoudness, requestValue);
  510|      0|      break;
  511|      0|    case SEL_PROC_EFFECT_TYPE:
  ------------------
  |  Branch (511:5): [True: 0, False: 5.69k]
  ------------------
  512|      0|      if ((requestValueInt < -1) || (requestValueInt >= DETR_COUNT))
  ------------------
  |  Branch (512:11): [True: 0, False: 0]
  |  Branch (512:37): [True: 0, False: 0]
  ------------------
  513|      0|        return DRCDEC_SELECTION_PROCESS_PARAM_OUT_OF_RANGE;
  514|       |      /* Caution. This overrides all drcFeatureRequests requested so far! */
  515|      0|      if (requestValueInt == -1) {
  ------------------
  |  Branch (515:11): [True: 0, False: 0]
  ------------------
  516|      0|        diff |= _compAssign(&pSelProcInput->dynamicRangeControlOn, 0);
  517|      0|      } else if (requestValueInt == DETR_NONE) {
  ------------------
  |  Branch (517:18): [True: 0, False: 0]
  ------------------
  518|      0|        diff |= _compAssign(&pSelProcInput->dynamicRangeControlOn, 1);
  519|      0|        diff |= _compAssign(&pSelProcInput->numDrcFeatureRequests, 0);
  520|      0|      } else {
  521|      0|        diff |= _compAssign(&pSelProcInput->dynamicRangeControlOn, 1);
  522|      0|        diff |= _compAssign(&pSelProcInput->numDrcFeatureRequests, 1);
  523|      0|        diff |= _compAssign(&pSelProcInput->drcFeatureRequestType[0],
  524|      0|                            DFRT_EFFECT_TYPE);
  525|      0|        diff |= _compAssign(&pSelProcInput->drcFeatureRequest[0]
  526|      0|                                 .drcEffectType.numRequestsDesired,
  527|      0|                            1);
  528|      0|        diff |= _compAssign(
  529|      0|            &pSelProcInput->drcFeatureRequest[0].drcEffectType.request[0],
  530|      0|            requestValueInt);
  531|      0|        if ((requestValueInt > DETR_NONE) &&
  ------------------
  |  Branch (531:13): [True: 0, False: 0]
  ------------------
  532|      0|            (requestValueInt <= DETR_GENERAL_COMPR)) {
  ------------------
  |  Branch (532:13): [True: 0, False: 0]
  ------------------
  533|       |          /* use fallback effect type requests */
  534|      0|          for (i = 0; i < 5; i++) {
  ------------------
  |  Branch (534:23): [True: 0, False: 0]
  ------------------
  535|      0|            diff |=
  536|      0|                _compAssign(&pSelProcInput->drcFeatureRequest[0]
  537|      0|                                 .drcEffectType.request[i + 1],
  538|      0|                            fallbackEffectTypeRequests[requestValueInt - 1][i]);
  539|      0|          }
  540|      0|          diff |= _compAssign(
  541|      0|              &pSelProcInput->drcFeatureRequest[0].drcEffectType.numRequests,
  542|      0|              6);
  543|      0|        } else {
  544|      0|          diff |= _compAssign(
  545|      0|              &pSelProcInput->drcFeatureRequest[0].drcEffectType.numRequests,
  546|      0|              1);
  547|      0|        }
  548|      0|      }
  549|      0|      break;
  550|      0|    case SEL_PROC_LOUDNESS_MEASUREMENT_METHOD:
  ------------------
  |  Branch (550:5): [True: 0, False: 5.69k]
  ------------------
  551|      0|      if ((requestValueInt < 0) || (requestValueInt > 2))
  ------------------
  |  Branch (551:11): [True: 0, False: 0]
  |  Branch (551:36): [True: 0, False: 0]
  ------------------
  552|      0|        return DRCDEC_SELECTION_PROCESS_PARAM_OUT_OF_RANGE;
  553|      0|      diff |= _compAssign(&pSelProcInput->loudnessMeasurementMethod,
  554|      0|                          requestValueInt);
  555|      0|      break;
  556|      0|    case SEL_PROC_ALBUM_MODE:
  ------------------
  |  Branch (556:5): [True: 0, False: 5.69k]
  ------------------
  557|      0|      if ((requestValueInt < 0) || (requestValueInt > 1))
  ------------------
  |  Branch (557:11): [True: 0, False: 0]
  |  Branch (557:36): [True: 0, False: 0]
  ------------------
  558|      0|        return DRCDEC_SELECTION_PROCESS_PARAM_OUT_OF_RANGE;
  559|      0|      diff |= _compAssign(&pSelProcInput->albumMode, requestValueInt);
  560|      0|      break;
  561|      0|    case SEL_PROC_DOWNMIX_ID:
  ------------------
  |  Branch (561:5): [True: 0, False: 5.69k]
  ------------------
  562|      0|      diff |=
  563|      0|          _compAssign(&pSelProcInput->targetConfigRequestType, TCRT_DOWNMIX_ID);
  564|      0|      if (requestValueInt < 0) { /* negative requests signal no downmixId */
  ------------------
  |  Branch (564:11): [True: 0, False: 0]
  ------------------
  565|      0|        diff |= _compAssign(&pSelProcInput->numDownmixIdRequests, 0);
  566|      0|      } else {
  567|      0|        diff |= _compAssign(&pSelProcInput->numDownmixIdRequests, 1);
  568|      0|        diff |=
  569|      0|            _compAssign(&pSelProcInput->downmixIdRequested[0], requestValueInt);
  570|      0|      }
  571|      0|      break;
  572|      0|    case SEL_PROC_TARGET_LAYOUT:
  ------------------
  |  Branch (572:5): [True: 0, False: 5.69k]
  ------------------
  573|       |      /* Request target layout according to ChannelConfiguration in ISO/IEC
  574|       |       * 23001-8 (CICP) */
  575|      0|      if ((requestValueInt < 1) || (requestValueInt > 63))
  ------------------
  |  Branch (575:11): [True: 0, False: 0]
  |  Branch (575:36): [True: 0, False: 0]
  ------------------
  576|      0|        return DRCDEC_SELECTION_PROCESS_PARAM_OUT_OF_RANGE;
  577|      0|      diff |= _compAssign(&pSelProcInput->targetConfigRequestType,
  578|      0|                          TCRT_TARGET_LAYOUT);
  579|      0|      diff |=
  580|      0|          _compAssign(&pSelProcInput->targetLayoutRequested, requestValueInt);
  581|      0|      break;
  582|      0|    case SEL_PROC_TARGET_CHANNEL_COUNT:
  ------------------
  |  Branch (582:5): [True: 0, False: 5.69k]
  ------------------
  583|      0|      if ((requestValueInt < 1) || (requestValueInt > 8))
  ------------------
  |  Branch (583:11): [True: 0, False: 0]
  |  Branch (583:36): [True: 0, False: 0]
  ------------------
  584|      0|        return DRCDEC_SELECTION_PROCESS_PARAM_OUT_OF_RANGE;
  585|      0|      diff |= _compAssign(&pSelProcInput->targetConfigRequestType,
  586|      0|                          TCRT_TARGET_CHANNEL_COUNT);
  587|      0|      diff |= _compAssign(&pSelProcInput->targetChannelCountRequested,
  588|      0|                          requestValueInt);
  589|      0|      break;
  590|  2.84k|    case SEL_PROC_BASE_CHANNEL_COUNT:
  ------------------
  |  Branch (590:5): [True: 2.84k, False: 2.84k]
  ------------------
  591|  2.84k|      if (requestValueInt < 0)
  ------------------
  |  Branch (591:11): [True: 0, False: 2.84k]
  ------------------
  592|      0|        return DRCDEC_SELECTION_PROCESS_PARAM_OUT_OF_RANGE;
  593|  2.84k|      diff |= _compAssign(&pSelProcInput->baseChannelCount, requestValueInt);
  594|  2.84k|      break;
  595|  2.84k|    case SEL_PROC_SAMPLE_RATE:
  ------------------
  |  Branch (595:5): [True: 2.84k, False: 2.84k]
  ------------------
  596|  2.84k|      if (requestValueInt < 0)
  ------------------
  |  Branch (596:11): [True: 0, False: 2.84k]
  ------------------
  597|      0|        return DRCDEC_SELECTION_PROCESS_PARAM_OUT_OF_RANGE;
  598|  2.84k|      diff |= _compAssign(&pSelProcInput->audioSampleRate, requestValueInt);
  599|  2.84k|      break;
  600|      0|    case SEL_PROC_BOOST:
  ------------------
  |  Branch (600:5): [True: 0, False: 5.69k]
  ------------------
  601|      0|      if ((requestValue < (FIXP_DBL)0) ||
  ------------------
  |  Branch (601:11): [True: 0, False: 0]
  ------------------
  602|      0|          (requestValue > FL2FXCONST_DBL(1.0f / (float)(1 << 1))))
  ------------------
  |  |  192|      0|  (FIXP_DBL)(                                                                \
  |  |  193|      0|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 0, Folded]
  |  |  ------------------
  |  |  194|      0|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 0]
  |  |  ------------------
  |  |  195|      0|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|      0|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|      0|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (602:11): [True: 0, False: 0]
  ------------------
  603|      0|        return DRCDEC_SELECTION_PROCESS_PARAM_OUT_OF_RANGE;
  604|      0|      diff |= _compAssign(
  605|      0|          &pSelProcInput->boost,
  606|      0|          FX_DBL2FX_SGL(
  ------------------
  |  |  220|      0|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  607|      0|              requestValue +
  608|      0|              (FIXP_DBL)(1 << 15))); /* convert to FIXP_SGL with rounding */
  609|      0|      break;
  610|      0|    case SEL_PROC_COMPRESS:
  ------------------
  |  Branch (610:5): [True: 0, False: 5.69k]
  ------------------
  611|      0|      if ((requestValue < (FIXP_DBL)0) ||
  ------------------
  |  Branch (611:11): [True: 0, False: 0]
  ------------------
  612|      0|          (requestValue > FL2FXCONST_DBL(1.0f / (float)(1 << 1))))
  ------------------
  |  |  192|      0|  (FIXP_DBL)(                                                                \
  |  |  193|      0|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 0, Folded]
  |  |  ------------------
  |  |  194|      0|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 0]
  |  |  ------------------
  |  |  195|      0|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|      0|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|      0|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (612:11): [True: 0, False: 0]
  ------------------
  613|      0|        return DRCDEC_SELECTION_PROCESS_PARAM_OUT_OF_RANGE;
  614|      0|      diff |= _compAssign(
  615|      0|          &pSelProcInput->compress,
  616|      0|          FX_DBL2FX_SGL(
  ------------------
  |  |  220|      0|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  617|      0|              requestValue +
  618|      0|              (FIXP_DBL)(1 << 15))); /* convert to FIXP_SGL with rounding */
  619|      0|      break;
  620|      0|    default:
  ------------------
  |  Branch (620:5): [True: 0, False: 5.69k]
  ------------------
  621|      0|      return DRCDEC_SELECTION_PROCESS_INVALID_PARAM;
  622|  5.69k|  }
  623|       |
  624|  5.69k|  if (pDiff != NULL) {
  ------------------
  |  Branch (624:7): [True: 5.69k, False: 0]
  ------------------
  625|  5.69k|    *pDiff |= diff;
  626|  5.69k|  }
  627|       |
  628|  5.69k|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
  629|  5.69k|}
_Z30drcDec_SelectionProcess_DeletePP26s_drcdec_selection_process:
  647|  7.39k|drcDec_SelectionProcess_Delete(HANDLE_DRC_SELECTION_PROCESS* phInstance) {
  648|  7.39k|  if (phInstance == NULL || *phInstance == NULL)
  ------------------
  |  Branch (648:7): [True: 0, False: 7.39k]
  |  Branch (648:29): [True: 0, False: 7.39k]
  ------------------
  649|      0|    return DRCDEC_SELECTION_PROCESS_INVALID_HANDLE;
  650|       |
  651|  7.39k|  FDKfree(*phInstance);
  652|       |  *phInstance = NULL;
  653|  7.39k|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
  654|  7.39k|}
_Z31drcDec_SelectionProcess_ProcessP26s_drcdec_selection_processP14UNI_DRC_CONFIGP17LOUDNESS_INFO_SETP26s_selection_process_output:
  660|  2.84k|                                HANDLE_SEL_PROC_OUTPUT hSelProcOutput) {
  661|  2.84k|  DRCDEC_SELECTION_PROCESS_RETURN retVal = DRCDEC_SELECTION_PROCESS_NO_ERROR;
  662|  2.84k|  DRCDEC_SELECTION* pCandidatesSelected;
  663|  2.84k|  DRCDEC_SELECTION* pCandidatesPotential;
  664|       |
  665|  2.84k|  if (hInstance == NULL) return DRCDEC_SELECTION_PROCESS_INVALID_HANDLE;
  ------------------
  |  Branch (665:7): [True: 0, False: 2.84k]
  ------------------
  666|       |
  667|  2.84k|  pCandidatesSelected = &(hInstance->selectionData[0]);
  668|  2.84k|  pCandidatesPotential = &(hInstance->selectionData[1]);
  669|  2.84k|  _drcdec_selection_setNumber(pCandidatesSelected, 0);
  670|  2.84k|  _drcdec_selection_setNumber(pCandidatesPotential, 0);
  671|       |
  672|  2.84k|  retVal = _generateVirtualDrcSets(&(hInstance->selProcInput), hUniDrcConfig,
  673|  2.84k|                                   hInstance->codecMode);
  674|  2.84k|  if (retVal) return (retVal);
  ------------------
  |  Branch (674:7): [True: 0, False: 2.84k]
  ------------------
  675|       |
  676|  2.84k|  if (hInstance->selProcInput.baseChannelCount !=
  ------------------
  |  Branch (676:7): [True: 2.77k, False: 70]
  ------------------
  677|  2.84k|      hUniDrcConfig->channelLayout.baseChannelCount) {
  678|  2.77k|    hInstance->selProcInput.baseChannelCount =
  679|  2.77k|        hUniDrcConfig->channelLayout.baseChannelCount;
  680|  2.77k|  }
  681|       |
  682|  2.84k|  if ((hInstance->selProcInput.targetConfigRequestType != 0) ||
  ------------------
  |  Branch (682:7): [True: 0, False: 2.84k]
  ------------------
  683|  2.84k|      (hInstance->selProcInput.targetConfigRequestType == 0 &&
  ------------------
  |  Branch (683:8): [True: 2.84k, False: 0]
  ------------------
  684|  2.84k|       hInstance->selProcInput.numDownmixIdRequests == 0)) {
  ------------------
  |  Branch (684:8): [True: 2.84k, False: 0]
  ------------------
  685|  2.84k|    retVal = _channelLayoutToDownmixIdMapping(&(hInstance->selProcInput),
  686|  2.84k|                                              hUniDrcConfig);
  687|       |
  688|  2.84k|    if (_isError(retVal)) return (retVal);
  ------------------
  |  Branch (688:9): [True: 0, False: 2.84k]
  ------------------
  689|  2.84k|  }
  690|       |
  691|  2.84k|  retVal = _drcSetPreSelection(&(hInstance->selProcInput), hUniDrcConfig,
  692|  2.84k|                               hLoudnessInfoSet, &pCandidatesPotential,
  693|  2.84k|                               &pCandidatesSelected, hInstance->codecMode);
  694|  2.84k|  if (retVal) return (retVal);
  ------------------
  |  Branch (694:7): [True: 17, False: 2.82k]
  ------------------
  695|       |
  696|  2.82k|  if (hInstance->selProcInput.albumMode) {
  ------------------
  |  Branch (696:7): [True: 0, False: 2.82k]
  ------------------
  697|      0|    _swapSelectionAndClear(&pCandidatesPotential, &pCandidatesSelected);
  698|       |
  699|      0|    retVal = _selectAlbumLoudness(hLoudnessInfoSet, pCandidatesPotential,
  700|      0|                                  pCandidatesSelected);
  701|      0|    if (retVal) return (retVal);
  ------------------
  |  Branch (701:9): [True: 0, False: 0]
  ------------------
  702|       |
  703|      0|    if (_drcdec_selection_getNumber(pCandidatesSelected) == 0) {
  ------------------
  |  Branch (703:9): [True: 0, False: 0]
  ------------------
  704|      0|      _swapSelection(&pCandidatesPotential, &pCandidatesSelected);
  705|      0|    }
  706|      0|  }
  707|       |
  708|  2.82k|  _swapSelectionAndClear(&pCandidatesPotential, &pCandidatesSelected);
  709|       |
  710|  2.82k|  retVal = _drcSetRequestSelection(&(hInstance->selProcInput), hUniDrcConfig,
  711|  2.82k|                                   hLoudnessInfoSet, &pCandidatesPotential,
  712|  2.82k|                                   &pCandidatesSelected);
  713|  2.82k|  if (retVal) return (retVal);
  ------------------
  |  Branch (713:7): [True: 20, False: 2.80k]
  ------------------
  714|       |
  715|  2.80k|  retVal = _drcSetFinalSelection(&(hInstance->selProcInput), hUniDrcConfig,
  716|  2.80k|                                 &pCandidatesPotential, &pCandidatesSelected,
  717|  2.80k|                                 hInstance->codecMode);
  718|  2.80k|  if (retVal) return (retVal);
  ------------------
  |  Branch (718:7): [True: 86, False: 2.72k]
  ------------------
  719|       |
  720|  2.72k|  retVal = _generateOutputInfo(
  721|  2.72k|      &(hInstance->selProcInput), hSelProcOutput, hUniDrcConfig,
  722|  2.72k|      hLoudnessInfoSet, &(pCandidatesSelected->data[0]), hInstance->codecMode);
  723|       |
  724|  2.72k|  if (_isError(retVal)) return (retVal);
  ------------------
  |  Branch (724:7): [True: 173, False: 2.55k]
  ------------------
  725|       |
  726|  2.55k|  retVal = _selectDownmixMatrix(hSelProcOutput, hUniDrcConfig);
  727|  2.55k|  if (retVal) return (retVal);
  ------------------
  |  Branch (727:7): [True: 0, False: 2.55k]
  ------------------
  728|       |
  729|  2.55k|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
  730|  2.55k|}
_Z15_initValueOrderP11VALUE_ORDER:
 2587|  5.49k|void _initValueOrder(VALUE_ORDER* pValue) {
 2588|  5.49k|  pValue->value = (FIXP_DBL)0;
 2589|  5.49k|  pValue->order = -1;
 2590|  5.49k|}
drcDec_selectionProcess.cpp:_ZL11_compAssignPii:
  276|  2.84k|static inline int _compAssign(FIXP_DBL* dest, const FIXP_DBL src) {
  277|  2.84k|  int diff = 0;
  278|  2.84k|  if (*dest != src) diff = 1;
  ------------------
  |  Branch (278:7): [True: 2.84k, False: 0]
  ------------------
  279|  2.84k|  *dest = src;
  280|  2.84k|  return diff;
  281|  2.84k|}
drcDec_selectionProcess.cpp:_ZL11_compAssignPaa:
  269|  2.84k|static inline int _compAssign(SCHAR* dest, const SCHAR src) {
  270|  2.84k|  int diff = 0;
  271|  2.84k|  if (*dest != src) diff = 1;
  ------------------
  |  Branch (271:7): [True: 2.84k, False: 0]
  ------------------
  272|  2.84k|  *dest = src;
  273|  2.84k|  return diff;
  274|  2.84k|}
drcDec_selectionProcess.cpp:_ZL8_isErrori:
  253|  5.56k|static int _isError(int x) {
  254|  5.56k|  if (x < DRCDEC_SELECTION_PROCESS_WARNING) {
  ------------------
  |  Branch (254:7): [True: 173, False: 5.39k]
  ------------------
  255|    173|    return 1;
  256|    173|  }
  257|       |
  258|  5.39k|  return 0;
  259|  5.56k|}
drcDec_selectionProcess.cpp:_ZL18_initDefaultParamsP14SEL_PROC_INPUT:
  737|  7.39k|    HANDLE_SEL_PROC_INPUT hSelProcInput) {
  738|  7.39k|  DRCDEC_SELECTION_PROCESS_RETURN retVal = DRCDEC_SELECTION_PROCESS_NO_ERROR;
  739|       |
  740|  7.39k|  if (hSelProcInput == NULL) return DRCDEC_SELECTION_PROCESS_INVALID_HANDLE;
  ------------------
  |  Branch (740:7): [True: 0, False: 7.39k]
  ------------------
  741|       |
  742|       |  /* system parameters */
  743|  7.39k|  hSelProcInput->baseChannelCount = -1;
  744|  7.39k|  hSelProcInput->baseLayout = -1;
  745|  7.39k|  hSelProcInput->targetConfigRequestType = TCRT_DOWNMIX_ID;
  746|  7.39k|  hSelProcInput->numDownmixIdRequests = 0;
  747|       |
  748|       |  /* loudness normalization parameters */
  749|  7.39k|  hSelProcInput->albumMode = 0;
  750|  7.39k|  hSelProcInput->peakLimiterPresent = 0;
  751|  7.39k|  hSelProcInput->loudnessNormalizationOn = 1;
  752|  7.39k|  hSelProcInput->targetLoudness = FL2FXCONST_DBL(-24.0f / (float)(1 << 7));
  ------------------
  |  |  192|  7.39k|  (FIXP_DBL)(                                                                \
  |  |  193|  7.39k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 7.39k]
  |  |  ------------------
  |  |  194|  7.39k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 0]
  |  |  ------------------
  |  |  195|      0|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|      0|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  7.39k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|  7.39k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  7.39k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 7.39k]
  |  |  ------------------
  |  |  199|  7.39k|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|  7.39k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|  7.39k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|  7.39k|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|  7.39k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|  7.39k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  7.39k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  753|  7.39k|  hSelProcInput->loudnessDeviationMax = DEFAULT_LOUDNESS_DEVIATION_MAX;
  ------------------
  |  |  137|  7.39k|#define DEFAULT_LOUDNESS_DEVIATION_MAX 63
  ------------------
  754|  7.39k|  hSelProcInput->loudnessMeasurementMethod = MDR_ANCHOR_LOUDNESS;
  755|  7.39k|  hSelProcInput->loudnessMeasurementSystem = MSR_EXPERT_PANEL;
  756|  7.39k|  hSelProcInput->loudnessMeasurementPreProc = LPR_DEFAULT;
  757|  7.39k|  hSelProcInput->deviceCutOffFrequency = 500;
  758|  7.39k|  hSelProcInput->loudnessNormalizationGainDbMax =
  759|  7.39k|      (FIXP_DBL)MAXVAL_DBL; /* infinity as default */
  ------------------
  |  |  156|  7.39k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  760|  7.39k|  hSelProcInput->loudnessNormalizationGainModificationDb = (FIXP_DBL)0;
  761|  7.39k|  hSelProcInput->outputPeakLevelMax = (FIXP_DBL)0;
  762|  7.39k|  if (hSelProcInput->peakLimiterPresent == 1) {
  ------------------
  |  Branch (762:7): [True: 0, False: 7.39k]
  ------------------
  763|      0|    hSelProcInput->outputPeakLevelMax = FL2FXCONST_DBL(6.0f / (float)(1 << 7));
  ------------------
  |  |  192|      0|  (FIXP_DBL)(                                                                \
  |  |  193|      0|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 0, Folded]
  |  |  ------------------
  |  |  194|      0|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 0]
  |  |  ------------------
  |  |  195|      0|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|      0|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|      0|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  764|      0|  }
  765|       |
  766|       |  /* dynamic range control parameters */
  767|  7.39k|  hSelProcInput->dynamicRangeControlOn = 1;
  768|       |
  769|  7.39k|  hSelProcInput->numDrcFeatureRequests = 0;
  770|       |
  771|       |  /* other parameters */
  772|  7.39k|  hSelProcInput->boost = FL2FXCONST_SGL(1.f / (float)(1 << 1));
  ------------------
  |  |  180|  7.39k|  (FIXP_SGL)(                                                                \
  |  |  181|  7.39k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 7.39k, Folded]
  |  |  ------------------
  |  |  182|  7.39k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  7.39k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  7.39k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 7.39k]
  |  |  ------------------
  |  |  183|  7.39k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  7.39k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  7.39k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  7.39k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  7.39k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  7.39k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  7.39k|          : ((((double)(val) * (FRACT_FIX_SCALE)-0.5) <=                     \
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (186:14): [Folded, False: 0]
  |  |  ------------------
  |  |  187|      0|              (double)(MINVAL_SGL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  188|      0|                 ? (SHORT)(MINVAL_SGL_CONST)                                 \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  189|      0|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  773|  7.39k|  hSelProcInput->compress = FL2FXCONST_SGL(1.f / (float)(1 << 1));
  ------------------
  |  |  180|  7.39k|  (FIXP_SGL)(                                                                \
  |  |  181|  7.39k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 7.39k, Folded]
  |  |  ------------------
  |  |  182|  7.39k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  7.39k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  7.39k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 7.39k]
  |  |  ------------------
  |  |  183|  7.39k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  7.39k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  7.39k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  7.39k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  7.39k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  7.39k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  7.39k|          : ((((double)(val) * (FRACT_FIX_SCALE)-0.5) <=                     \
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (186:14): [Folded, False: 0]
  |  |  ------------------
  |  |  187|      0|              (double)(MINVAL_SGL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  188|      0|                 ? (SHORT)(MINVAL_SGL_CONST)                                 \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  189|      0|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  774|  7.39k|  hSelProcInput->drcCharacteristicTarget = 0;
  775|       |
  776|  7.39k|  return retVal;
  777|  7.39k|}
drcDec_selectionProcess.cpp:_ZL20_initCodecModeParamsP14SEL_PROC_INPUT19SEL_PROC_CODEC_MODE:
  780|  5.14k|    HANDLE_SEL_PROC_INPUT hSelProcInput, const SEL_PROC_CODEC_MODE codecMode) {
  781|  5.14k|  DRCDEC_SELECTION_PROCESS_RETURN retVal = DRCDEC_SELECTION_PROCESS_NO_ERROR;
  782|       |
  783|  5.14k|  if (hSelProcInput == NULL) return DRCDEC_SELECTION_PROCESS_INVALID_HANDLE;
  ------------------
  |  Branch (783:7): [True: 0, False: 5.14k]
  ------------------
  784|       |
  785|  5.14k|  switch (codecMode) {
  786|      0|    case SEL_PROC_MPEG_H_3DA:
  ------------------
  |  Branch (786:5): [True: 0, False: 5.14k]
  ------------------
  787|      0|      hSelProcInput->loudnessDeviationMax = 0;
  788|      0|      hSelProcInput->peakLimiterPresent = 1; /* peak limiter is mandatory */
  789|       |      /* The peak limiter also has to catch overshoots due to user
  790|       |      interactivity, downmixing etc. Therefore the maximum output peak level is
  791|       |      reduced to 0 dB. */
  792|      0|      hSelProcInput->outputPeakLevelMax = (FIXP_DBL)0;
  793|      0|      break;
  794|      0|    case SEL_PROC_MPEG_4_AAC:
  ------------------
  |  Branch (794:5): [True: 0, False: 5.14k]
  ------------------
  795|  5.14k|    case SEL_PROC_MPEG_D_USAC:
  ------------------
  |  Branch (795:5): [True: 5.14k, False: 0]
  ------------------
  796|  5.14k|      hSelProcInput->loudnessDeviationMax = DEFAULT_LOUDNESS_DEVIATION_MAX;
  ------------------
  |  |  137|  5.14k|#define DEFAULT_LOUDNESS_DEVIATION_MAX 63
  ------------------
  797|  5.14k|      hSelProcInput->peakLimiterPresent = 1;
  798|       |      /* A peak limiter is present at the end of the decoder, therefore we can
  799|       |       * allow for a maximum output peak level greater than full scale
  800|       |       */
  801|  5.14k|      hSelProcInput->outputPeakLevelMax =
  802|  5.14k|          FL2FXCONST_DBL(6.0f / (float)(1 << 7));
  ------------------
  |  |  192|  5.14k|  (FIXP_DBL)(                                                                \
  |  |  193|  5.14k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 5.14k, Folded]
  |  |  ------------------
  |  |  194|  5.14k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  5.14k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  5.14k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 5.14k]
  |  |  ------------------
  |  |  195|  5.14k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  5.14k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  5.14k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  5.14k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  5.14k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  5.14k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  5.14k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  803|  5.14k|      break;
  804|      0|    case SEL_PROC_TEST_TIME_DOMAIN:
  ------------------
  |  Branch (804:5): [True: 0, False: 5.14k]
  ------------------
  805|      0|    case SEL_PROC_TEST_QMF_DOMAIN:
  ------------------
  |  Branch (805:5): [True: 0, False: 5.14k]
  ------------------
  806|      0|    case SEL_PROC_TEST_STFT_DOMAIN:
  ------------------
  |  Branch (806:5): [True: 0, False: 5.14k]
  ------------------
  807|       |      /* for testing, adapt to default settings in reference software */
  808|      0|      hSelProcInput->loudnessNormalizationOn = 0;
  809|      0|      hSelProcInput->dynamicRangeControlOn = 0;
  810|      0|      break;
  811|      0|    case SEL_PROC_CODEC_MODE_UNDEFINED:
  ------------------
  |  Branch (811:5): [True: 0, False: 5.14k]
  ------------------
  812|      0|    default:
  ------------------
  |  Branch (812:5): [True: 0, False: 5.14k]
  ------------------
  813|      0|      hSelProcInput->loudnessDeviationMax = DEFAULT_LOUDNESS_DEVIATION_MAX;
  ------------------
  |  |  137|      0|#define DEFAULT_LOUDNESS_DEVIATION_MAX 63
  ------------------
  814|      0|      hSelProcInput->peakLimiterPresent = 0;
  815|  5.14k|  }
  816|       |
  817|  5.14k|  return retVal;
  818|  5.14k|}
drcDec_selectionProcess.cpp:_ZL32_channelLayoutToDownmixIdMappingP14SEL_PROC_INPUTP14UNI_DRC_CONFIG:
  821|  2.84k|    HANDLE_SEL_PROC_INPUT hSelProcInput, HANDLE_UNI_DRC_CONFIG hUniDrcConfig) {
  822|  2.84k|  DRCDEC_SELECTION_PROCESS_RETURN retVal = DRCDEC_SELECTION_PROCESS_NO_ERROR;
  823|       |
  824|  2.84k|  DOWNMIX_INSTRUCTIONS* pDown = NULL;
  825|       |
  826|  2.84k|  int i;
  827|       |
  828|  2.84k|  hSelProcInput->numDownmixIdRequests = 0;
  829|       |
  830|  2.84k|  switch (hSelProcInput->targetConfigRequestType) {
  831|  2.84k|    case TCRT_DOWNMIX_ID:
  ------------------
  |  Branch (831:5): [True: 2.84k, False: 0]
  ------------------
  832|  2.84k|      if (hSelProcInput->numDownmixIdRequests == 0) {
  ------------------
  |  Branch (832:11): [True: 2.84k, False: 0]
  ------------------
  833|  2.84k|        hSelProcInput->downmixIdRequested[0] = 0;
  834|  2.84k|        hSelProcInput->numDownmixIdRequests = 1;
  835|  2.84k|      }
  836|       |
  837|  2.84k|      break;
  838|       |
  839|      0|    case TCRT_TARGET_LAYOUT:
  ------------------
  |  Branch (839:5): [True: 0, False: 2.84k]
  ------------------
  840|      0|      if (hSelProcInput->targetLayoutRequested == hSelProcInput->baseLayout) {
  ------------------
  |  Branch (840:11): [True: 0, False: 0]
  ------------------
  841|      0|        hSelProcInput->downmixIdRequested[0] = 0;
  842|      0|        hSelProcInput->numDownmixIdRequests = 1;
  843|      0|      }
  844|       |
  845|      0|      if (hSelProcInput->numDownmixIdRequests == 0) {
  ------------------
  |  Branch (845:11): [True: 0, False: 0]
  ------------------
  846|      0|        for (i = 0; i < hUniDrcConfig->downmixInstructionsCount; i++) {
  ------------------
  |  Branch (846:21): [True: 0, False: 0]
  ------------------
  847|      0|          pDown = &(hUniDrcConfig->downmixInstructions[i]);
  848|       |
  849|      0|          if (hSelProcInput->targetLayoutRequested == pDown->targetLayout) {
  ------------------
  |  Branch (849:15): [True: 0, False: 0]
  ------------------
  850|      0|            hSelProcInput
  851|      0|                ->downmixIdRequested[hSelProcInput->numDownmixIdRequests] =
  852|      0|                pDown->downmixId;
  853|      0|            hSelProcInput->numDownmixIdRequests++;
  854|      0|          }
  855|      0|        }
  856|      0|      }
  857|       |
  858|      0|      if (hSelProcInput->baseLayout == -1) {
  ------------------
  |  Branch (858:11): [True: 0, False: 0]
  ------------------
  859|      0|        retVal = DRCDEC_SELECTION_PROCESS_WARNING;
  860|      0|      }
  861|       |
  862|      0|      if (hSelProcInput->numDownmixIdRequests == 0) {
  ------------------
  |  Branch (862:11): [True: 0, False: 0]
  ------------------
  863|      0|        hSelProcInput->downmixIdRequested[0] = 0;
  864|      0|        hSelProcInput->numDownmixIdRequests = 1;
  865|      0|        retVal = DRCDEC_SELECTION_PROCESS_WARNING;
  866|      0|      }
  867|       |
  868|      0|      break;
  869|       |
  870|      0|    case TCRT_TARGET_CHANNEL_COUNT:
  ------------------
  |  Branch (870:5): [True: 0, False: 2.84k]
  ------------------
  871|      0|      if (hSelProcInput->targetChannelCountRequested ==
  ------------------
  |  Branch (871:11): [True: 0, False: 0]
  ------------------
  872|      0|          hSelProcInput->baseChannelCount) {
  873|      0|        hSelProcInput->downmixIdRequested[0] = 0;
  874|      0|        hSelProcInput->numDownmixIdRequests = 1;
  875|      0|      }
  876|       |
  877|      0|      if (hSelProcInput->numDownmixIdRequests == 0) {
  ------------------
  |  Branch (877:11): [True: 0, False: 0]
  ------------------
  878|      0|        for (i = 0; i < hUniDrcConfig->downmixInstructionsCount; i++) {
  ------------------
  |  Branch (878:21): [True: 0, False: 0]
  ------------------
  879|      0|          pDown = &(hUniDrcConfig->downmixInstructions[i]);
  880|       |
  881|      0|          if (hSelProcInput->targetChannelCountRequested ==
  ------------------
  |  Branch (881:15): [True: 0, False: 0]
  ------------------
  882|      0|              pDown->targetChannelCount) {
  883|      0|            hSelProcInput
  884|      0|                ->downmixIdRequested[hSelProcInput->numDownmixIdRequests] =
  885|      0|                pDown->downmixId;
  886|      0|            hSelProcInput->numDownmixIdRequests++;
  887|      0|          }
  888|      0|        }
  889|      0|      }
  890|       |
  891|      0|      if (hSelProcInput->baseChannelCount == -1) {
  ------------------
  |  Branch (891:11): [True: 0, False: 0]
  ------------------
  892|      0|        retVal = DRCDEC_SELECTION_PROCESS_WARNING;
  893|      0|      }
  894|       |
  895|      0|      if (hSelProcInput->numDownmixIdRequests == 0) {
  ------------------
  |  Branch (895:11): [True: 0, False: 0]
  ------------------
  896|      0|        retVal = DRCDEC_SELECTION_PROCESS_WARNING;
  897|      0|        hSelProcInput->downmixIdRequested[0] = 0;
  898|      0|        hSelProcInput->numDownmixIdRequests = 1;
  899|      0|      }
  900|       |
  901|      0|      break;
  902|       |
  903|      0|    default:
  ------------------
  |  Branch (903:5): [True: 0, False: 2.84k]
  ------------------
  904|      0|      return DRCDEC_SELECTION_PROCESS_NOT_OK;
  905|  2.84k|  }
  906|       |
  907|  2.84k|  return retVal;
  908|  2.84k|}
drcDec_selectionProcess.cpp:_ZL21_drcSetFinalSelectionP14SEL_PROC_INPUTP14UNI_DRC_CONFIGPP16DRCDEC_SELECTIONS5_19SEL_PROC_CODEC_MODE:
 1935|  2.80k|    DRCDEC_SELECTION** ppCandidatesSelected, SEL_PROC_CODEC_MODE codecMode) {
 1936|  2.80k|  DRCDEC_SELECTION_PROCESS_RETURN retVal = DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1937|       |
 1938|  2.80k|  if (_drcdec_selection_getNumber(*ppCandidatesPotential) == 0) {
  ------------------
  |  Branch (1938:7): [True: 0, False: 2.80k]
  ------------------
 1939|      0|    return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1940|  2.80k|  } else if (_drcdec_selection_getNumber(*ppCandidatesPotential) == 1) {
  ------------------
  |  Branch (1940:14): [True: 2.32k, False: 488]
  ------------------
 1941|  2.32k|    _swapSelection(ppCandidatesPotential, ppCandidatesSelected);
 1942|       |    /* finished */
 1943|  2.32k|  } else /* > 1 */
 1944|    488|  {
 1945|    488|    retVal = _drcSetFinalSelection_peakValue0(*ppCandidatesPotential,
 1946|    488|                                              *ppCandidatesSelected);
 1947|    488|    if (retVal) return (retVal);
  ------------------
  |  Branch (1947:9): [True: 0, False: 488]
  ------------------
 1948|       |
 1949|    488|    if (_drcdec_selection_getNumber(*ppCandidatesSelected) > 1) {
  ------------------
  |  Branch (1949:9): [True: 380, False: 108]
  ------------------
 1950|    380|      _swapSelectionAndClear(ppCandidatesPotential, ppCandidatesSelected);
 1951|    380|      retVal = _drcSetFinalSelection_downmixId(
 1952|    380|          hSelProcInput, ppCandidatesPotential, ppCandidatesSelected);
 1953|    380|      if (retVal) return (retVal);
  ------------------
  |  Branch (1953:11): [True: 0, False: 380]
  ------------------
 1954|    380|    }
 1955|       |
 1956|    488|    if (_drcdec_selection_getNumber(*ppCandidatesSelected) > 1) {
  ------------------
  |  Branch (1956:9): [True: 380, False: 108]
  ------------------
 1957|    380|      _swapSelectionAndClear(ppCandidatesPotential, ppCandidatesSelected);
 1958|    380|      retVal = _drcSetFinalSelection_effectTypes(*ppCandidatesPotential,
 1959|    380|                                                 *ppCandidatesSelected);
 1960|    380|      if (retVal) return (retVal);
  ------------------
  |  Branch (1960:11): [True: 0, False: 380]
  ------------------
 1961|    380|    }
 1962|       |
 1963|    488|    if (_drcdec_selection_getNumber(*ppCandidatesSelected) > 1) {
  ------------------
  |  Branch (1963:9): [True: 277, False: 211]
  ------------------
 1964|    277|      _swapSelectionAndClear(ppCandidatesPotential, ppCandidatesSelected);
 1965|    277|      retVal = _drcSetFinalSelection_targetLoudness(
 1966|    277|          hSelProcInput->targetLoudness, *ppCandidatesPotential,
 1967|    277|          *ppCandidatesSelected);
 1968|    277|      if (retVal) return (retVal);
  ------------------
  |  Branch (1968:11): [True: 0, False: 277]
  ------------------
 1969|    277|    }
 1970|       |
 1971|    488|    if (_drcdec_selection_getNumber(*ppCandidatesSelected) > 1) {
  ------------------
  |  Branch (1971:9): [True: 251, False: 237]
  ------------------
 1972|    251|      _swapSelectionAndClear(ppCandidatesPotential, ppCandidatesSelected);
 1973|    251|      retVal = _drcSetFinalSelection_peakValueLargest(*ppCandidatesPotential,
 1974|    251|                                                      *ppCandidatesSelected);
 1975|    251|      if (retVal) return (retVal);
  ------------------
  |  Branch (1975:11): [True: 0, False: 251]
  ------------------
 1976|    251|    }
 1977|       |
 1978|    488|    if (_drcdec_selection_getNumber(*ppCandidatesSelected) > 1) {
  ------------------
  |  Branch (1978:9): [True: 224, False: 264]
  ------------------
 1979|    224|      _swapSelectionAndClear(ppCandidatesPotential, ppCandidatesSelected);
 1980|    224|      retVal = _drcSetFinalSelection_drcSetId(*ppCandidatesPotential,
 1981|    224|                                              *ppCandidatesSelected);
 1982|    224|      if (retVal) return (retVal);
  ------------------
  |  Branch (1982:11): [True: 0, False: 224]
  ------------------
 1983|    224|    }
 1984|    488|  }
 1985|       |
 1986|  2.80k|  if (_drcdec_selection_getNumber(*ppCandidatesSelected) == 0) {
  ------------------
  |  Branch (1986:7): [True: 86, False: 2.72k]
  ------------------
 1987|     86|    return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1988|     86|  }
 1989|       |
 1990|  2.72k|  return retVal;
 1991|  2.80k|}
drcDec_selectionProcess.cpp:_ZL32_drcSetFinalSelection_peakValue0P16DRCDEC_SELECTIONS0_:
 1670|    488|    DRCDEC_SELECTION* pCandidatesSelected) {
 1671|    488|  int i;
 1672|       |
 1673|  2.52k|  for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1673:15): [True: 2.03k, False: 488]
  ------------------
 1674|  2.03k|    DRCDEC_SELECTION_DATA* pCandidate =
 1675|  2.03k|        _drcdec_selection_getAt(pCandidatesPotential, i);
 1676|  2.03k|    if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1676:9): [True: 0, False: 2.03k]
  ------------------
 1677|       |
 1678|  2.03k|    if (pCandidate->outputPeakLevel <= FIXP_DBL(0)) {
  ------------------
  |  Branch (1678:9): [True: 1.57k, False: 458]
  ------------------
 1679|  1.57k|      if (_drcdec_selection_add(pCandidatesSelected, pCandidate) == NULL)
  ------------------
  |  Branch (1679:11): [True: 0, False: 1.57k]
  ------------------
 1680|      0|        return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1681|  1.57k|    }
 1682|  2.03k|  }
 1683|       |
 1684|    488|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1685|    488|}
drcDec_selectionProcess.cpp:_ZL23_drcdec_selection_getAtP16DRCDEC_SELECTIONi:
 2469|  27.0k|    DRCDEC_SELECTION* pSelection, int at) {
 2470|  27.0k|  if (at >= 0 && at < (12 + 1 + 6)) {
  ------------------
  |  Branch (2470:7): [True: 27.0k, False: 0]
  |  Branch (2470:18): [True: 27.0k, False: 0]
  ------------------
 2471|  27.0k|    return &(pSelection->data[at]);
 2472|  27.0k|  } else {
 2473|       |    return NULL;
 2474|      0|  }
 2475|  27.0k|}
drcDec_selectionProcess.cpp:_ZL21_drcdec_selection_addP16DRCDEC_SELECTIONP21DRCDEC_SELECTION_DATA:
 2441|  15.3k|    DRCDEC_SELECTION* pSelection, DRCDEC_SELECTION_DATA* pDataIn) {
 2442|  15.3k|  if (pSelection->numData < (12 + 1 + 6)) {
  ------------------
  |  Branch (2442:7): [True: 15.3k, False: 0]
  ------------------
 2443|  15.3k|    DRCDEC_SELECTION_DATA* pData = &(pSelection->data[pSelection->numData]);
 2444|  15.3k|    FDKmemcpy(pData, pDataIn, sizeof(DRCDEC_SELECTION_DATA));
 2445|  15.3k|    pSelection->numData++;
 2446|  15.3k|    return pData;
 2447|  15.3k|  } else {
 2448|       |    return NULL;
 2449|      0|  }
 2450|  15.3k|}
drcDec_selectionProcess.cpp:_ZL31_drcSetFinalSelection_downmixIdP14SEL_PROC_INPUTPP16DRCDEC_SELECTIONS3_:
 1690|    380|    DRCDEC_SELECTION** ppCandidatesSelected) {
 1691|    380|  int i, j;
 1692|    380|  DRCDEC_SELECTION_DATA* pCandidate = NULL;
 1693|    380|  DRC_INSTRUCTIONS_UNI_DRC* pInst = NULL;
 1694|       |
 1695|  1.93k|  for (i = 0; i < _drcdec_selection_getNumber(*ppCandidatesPotential); i++) {
  ------------------
  |  Branch (1695:15): [True: 1.55k, False: 380]
  ------------------
 1696|  1.55k|    pCandidate = _drcdec_selection_getAt(*ppCandidatesPotential, i);
 1697|  1.55k|    if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1697:9): [True: 0, False: 1.55k]
  ------------------
 1698|       |
 1699|  1.55k|    pInst = pCandidate->pInst;
 1700|       |
 1701|  3.32k|    for (j = 0; j < pInst->downmixIdCount; j++) {
  ------------------
  |  Branch (1701:17): [True: 1.77k, False: 1.55k]
  ------------------
 1702|  1.77k|      if (DOWNMIX_ID_BASE_LAYOUT != pInst->downmixId[j] &&
  ------------------
  |  |  122|  1.77k|#define DOWNMIX_ID_BASE_LAYOUT 0x0
  ------------------
  |  Branch (1702:11): [True: 335, False: 1.43k]
  ------------------
 1703|    335|          DOWNMIX_ID_ANY_DOWNMIX != pInst->downmixId[j] &&
  ------------------
  |  |  123|    335|#define DOWNMIX_ID_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (1703:11): [True: 100, False: 235]
  ------------------
 1704|    100|          hSelProcInput
  ------------------
  |  Branch (1704:11): [True: 0, False: 100]
  ------------------
 1705|    100|                  ->downmixIdRequested[pCandidate->downmixIdRequestIndex] ==
 1706|    100|              pInst->downmixId[j]) {
 1707|      0|        if (_drcdec_selection_add(*ppCandidatesSelected, pCandidate) == NULL)
  ------------------
  |  Branch (1707:13): [True: 0, False: 0]
  ------------------
 1708|      0|          return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1709|      0|      }
 1710|  1.77k|    }
 1711|  1.55k|  }
 1712|       |
 1713|    380|  if (_drcdec_selection_getNumber(*ppCandidatesSelected) == 0) {
  ------------------
  |  Branch (1713:7): [True: 380, False: 0]
  ------------------
 1714|    380|    _swapSelection(ppCandidatesPotential, ppCandidatesSelected);
 1715|    380|  }
 1716|       |
 1717|    380|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1718|    380|}
drcDec_selectionProcess.cpp:_ZL33_drcSetFinalSelection_effectTypesP16DRCDEC_SELECTIONS0_:
 1736|    380|    DRCDEC_SELECTION* pCandidatesSelected) {
 1737|    380|  int i;
 1738|    380|  int minNumEffects = 1000;
 1739|    380|  int numEffects = 0;
 1740|    380|  int effects = 0;
 1741|    380|  DRCDEC_SELECTION_DATA* pCandidate = NULL;
 1742|    380|  DRC_INSTRUCTIONS_UNI_DRC* pInst = NULL;
 1743|       |
 1744|  1.93k|  for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1744:15): [True: 1.55k, False: 380]
  ------------------
 1745|  1.55k|    pCandidate = _drcdec_selection_getAt(pCandidatesPotential, i);
 1746|  1.55k|    if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1746:9): [True: 0, False: 1.55k]
  ------------------
 1747|       |
 1748|  1.55k|    pInst = pCandidate->pInst;
 1749|       |
 1750|  1.55k|    effects = pInst->drcSetEffect;
 1751|  1.55k|    effects &= 0xffff ^ (EB_GENERAL_COMPR);
 1752|  1.55k|    numEffects = _crossSum(effects);
 1753|       |
 1754|  1.55k|    if (numEffects < minNumEffects) {
  ------------------
  |  Branch (1754:9): [True: 545, False: 1.01k]
  ------------------
 1755|    545|      minNumEffects = numEffects;
 1756|    545|    }
 1757|  1.55k|  }
 1758|       |
 1759|       |  /* add all with minimum number of effects */
 1760|  1.93k|  for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1760:15): [True: 1.55k, False: 380]
  ------------------
 1761|  1.55k|    pCandidate = _drcdec_selection_getAt(pCandidatesPotential, i);
 1762|  1.55k|    if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1762:9): [True: 0, False: 1.55k]
  ------------------
 1763|       |
 1764|  1.55k|    pInst = pCandidate->pInst;
 1765|       |
 1766|  1.55k|    effects = pInst->drcSetEffect;
 1767|  1.55k|    effects &= 0xffff ^ (EB_GENERAL_COMPR);
 1768|  1.55k|    numEffects = _crossSum(effects);
 1769|       |
 1770|  1.55k|    if (numEffects == minNumEffects) {
  ------------------
  |  Branch (1770:9): [True: 1.25k, False: 307]
  ------------------
 1771|  1.25k|      if (_drcdec_selection_add(pCandidatesSelected, pCandidate) == NULL)
  ------------------
  |  Branch (1771:11): [True: 0, False: 1.25k]
  ------------------
 1772|      0|        return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1773|  1.25k|    }
 1774|  1.55k|  }
 1775|       |
 1776|    380|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1777|    380|}
drcDec_selectionProcess.cpp:_ZL9_crossSumi:
 1720|  3.11k|static int _crossSum(int value) {
 1721|  3.11k|  int sum = 0;
 1722|       |
 1723|  18.9k|  while (value != 0) {
  ------------------
  |  Branch (1723:10): [True: 15.8k, False: 3.11k]
  ------------------
 1724|  15.8k|    if ((value & 1) == 1) {
  ------------------
  |  Branch (1724:9): [True: 5.58k, False: 10.2k]
  ------------------
 1725|  5.58k|      sum++;
 1726|  5.58k|    }
 1727|       |
 1728|  15.8k|    value >>= 1;
 1729|  15.8k|  }
 1730|       |
 1731|  3.11k|  return sum;
 1732|  3.11k|}
drcDec_selectionProcess.cpp:_ZL36_drcSetFinalSelection_targetLoudnessiP16DRCDEC_SELECTIONS0_:
 1816|    277|    DRCDEC_SELECTION* pCandidatesSelected) {
 1817|    277|  DRCDEC_SELECTION_PROCESS_RETURN retVal = DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1818|    277|  int i;
 1819|    277|  DRCDEC_SELECTION_DATA* pCandidate = NULL;
 1820|       |
 1821|  1.42k|  for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1821:15): [True: 1.14k, False: 277]
  ------------------
 1822|  1.14k|    pCandidate = _drcdec_selection_getAt(pCandidatesPotential, i);
 1823|  1.14k|    if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1823:9): [True: 0, False: 1.14k]
  ------------------
 1824|       |
 1825|  1.14k|    if (pCandidate->selectionFlag == 0) {
  ------------------
  |  Branch (1825:9): [True: 1.06k, False: 84]
  ------------------
 1826|  1.06k|      if (_drcdec_selection_add(pCandidatesSelected, pCandidate) == NULL)
  ------------------
  |  Branch (1826:11): [True: 0, False: 1.06k]
  ------------------
 1827|      0|        return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1828|  1.06k|    }
 1829|  1.14k|  }
 1830|       |
 1831|    277|  if (_drcdec_selection_getNumber(pCandidatesSelected) == 0) {
  ------------------
  |  Branch (1831:7): [True: 22, False: 255]
  ------------------
 1832|     22|    retVal = _selectSmallestTargetLoudnessValueUpper(pCandidatesPotential,
 1833|     22|                                                     pCandidatesSelected);
 1834|     22|    if (retVal) return (retVal);
  ------------------
  |  Branch (1834:9): [True: 0, False: 22]
  ------------------
 1835|     22|  }
 1836|       |
 1837|    277|  if (_drcdec_selection_getNumber(pCandidatesSelected) > 1) {
  ------------------
  |  Branch (1837:7): [True: 263, False: 14]
  ------------------
 1838|    263|    DRC_INSTRUCTIONS_UNI_DRC* pDrcInstructionUniDrc = NULL;
 1839|       |
 1840|    263|    _swapSelectionAndClear(&pCandidatesPotential, &pCandidatesSelected);
 1841|       |
 1842|  1.35k|    for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1842:17): [True: 1.09k, False: 263]
  ------------------
 1843|  1.09k|      pCandidate = _drcdec_selection_getAt(pCandidatesPotential, i);
 1844|  1.09k|      if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1844:11): [True: 0, False: 1.09k]
  ------------------
 1845|       |
 1846|  1.09k|      pDrcInstructionUniDrc = pCandidate->pInst;
 1847|       |
 1848|  1.09k|      if (_targetLoudnessInRange(pDrcInstructionUniDrc, targetLoudness)) {
  ------------------
  |  Branch (1848:11): [True: 73, False: 1.02k]
  ------------------
 1849|     73|        if (_drcdec_selection_add(pCandidatesSelected, pCandidate) == NULL)
  ------------------
  |  Branch (1849:13): [True: 0, False: 73]
  ------------------
 1850|      0|          return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1851|     73|      }
 1852|  1.09k|    }
 1853|       |
 1854|    263|    if (_drcdec_selection_getNumber(pCandidatesSelected) > 1) {
  ------------------
  |  Branch (1854:9): [True: 21, False: 242]
  ------------------
 1855|     21|      _swapSelectionAndClear(&pCandidatesPotential, &pCandidatesSelected);
 1856|       |
 1857|     21|      retVal = _selectSmallestTargetLoudnessValueUpper(pCandidatesPotential,
 1858|     21|                                                       pCandidatesSelected);
 1859|     21|      if (retVal) return (retVal);
  ------------------
  |  Branch (1859:11): [True: 0, False: 21]
  ------------------
 1860|     21|    }
 1861|    263|  }
 1862|       |
 1863|    277|  return retVal;
 1864|    277|}
drcDec_selectionProcess.cpp:_ZL39_selectSmallestTargetLoudnessValueUpperP16DRCDEC_SELECTIONS0_:
 1781|     43|    DRCDEC_SELECTION* pCandidatesSelected) {
 1782|     43|  int i;
 1783|     43|  SCHAR minVal = 0x7F;
 1784|     43|  SCHAR val = 0;
 1785|     43|  DRCDEC_SELECTION_DATA* pCandidate = NULL;
 1786|       |
 1787|    189|  for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1787:15): [True: 146, False: 43]
  ------------------
 1788|    146|    pCandidate = _drcdec_selection_getAt(pCandidatesPotential, i);
 1789|    146|    if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1789:9): [True: 0, False: 146]
  ------------------
 1790|       |
 1791|    146|    val = pCandidate->pInst->drcSetTargetLoudnessValueUpper;
 1792|       |
 1793|    146|    if (val < minVal) {
  ------------------
  |  Branch (1793:9): [True: 67, False: 79]
  ------------------
 1794|     67|      minVal = val;
 1795|     67|    }
 1796|    146|  }
 1797|       |
 1798|       |  /* add all with same smallest drcSetTargetLoudnessValueUpper */
 1799|    189|  for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1799:15): [True: 146, False: 43]
  ------------------
 1800|    146|    pCandidate = _drcdec_selection_getAt(pCandidatesPotential, i);
 1801|    146|    if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1801:9): [True: 0, False: 146]
  ------------------
 1802|       |
 1803|    146|    val = pCandidate->pInst->drcSetTargetLoudnessValueUpper;
 1804|       |
 1805|    146|    if (val == minVal) {
  ------------------
  |  Branch (1805:9): [True: 87, False: 59]
  ------------------
 1806|     87|      if (_drcdec_selection_add(pCandidatesSelected, pCandidate) == NULL)
  ------------------
  |  Branch (1806:11): [True: 0, False: 87]
  ------------------
 1807|      0|        return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1808|     87|    }
 1809|    146|  }
 1810|       |
 1811|     43|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1812|     43|}
drcDec_selectionProcess.cpp:_ZL22_targetLoudnessInRangeP24DRC_INSTRUCTIONS_UNI_DRCi:
 1086|  2.54k|    DRC_INSTRUCTIONS_UNI_DRC* pDrcInstructionUniDrc, FIXP_DBL targetLoudness) {
 1087|  2.54k|  int retVal = 0;
 1088|       |
 1089|  2.54k|  FIXP_DBL drcSetTargetLoudnessValueUpper =
 1090|  2.54k|      ((FIXP_DBL)pDrcInstructionUniDrc->drcSetTargetLoudnessValueUpper)
 1091|  2.54k|      << (DFRACT_BITS - 1 - 7);
  ------------------
  |  |  113|  2.54k|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1092|  2.54k|  FIXP_DBL drcSetTargetLoudnessValueLower =
 1093|  2.54k|      ((FIXP_DBL)pDrcInstructionUniDrc->drcSetTargetLoudnessValueLower)
 1094|  2.54k|      << (DFRACT_BITS - 1 - 7);
  ------------------
  |  |  113|  2.54k|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1095|       |
 1096|  2.54k|  if (pDrcInstructionUniDrc->drcSetTargetLoudnessPresent &&
  ------------------
  |  Branch (1096:7): [True: 642, False: 1.90k]
  ------------------
 1097|    642|      drcSetTargetLoudnessValueUpper >= targetLoudness &&
  ------------------
  |  Branch (1097:7): [True: 479, False: 163]
  ------------------
 1098|    479|      drcSetTargetLoudnessValueLower < targetLoudness) {
  ------------------
  |  Branch (1098:7): [True: 340, False: 139]
  ------------------
 1099|    340|    retVal = 1;
 1100|    340|  }
 1101|       |
 1102|  2.54k|  return retVal;
 1103|  2.54k|}
drcDec_selectionProcess.cpp:_ZL38_drcSetFinalSelection_peakValueLargestP16DRCDEC_SELECTIONS0_:
 1868|    251|    DRCDEC_SELECTION* pCandidatesSelected) {
 1869|    251|  int i;
 1870|    251|  FIXP_DBL largestPeakLevel = MINVAL_DBL;
  ------------------
  |  |  158|    251|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  ------------------
 1871|    251|  FIXP_DBL peakLevel = 0;
 1872|    251|  DRCDEC_SELECTION_DATA* pCandidate = NULL;
 1873|       |
 1874|  1.30k|  for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1874:15): [True: 1.05k, False: 251]
  ------------------
 1875|  1.05k|    pCandidate = _drcdec_selection_getAt(pCandidatesPotential, i);
 1876|  1.05k|    if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1876:9): [True: 0, False: 1.05k]
  ------------------
 1877|       |
 1878|  1.05k|    peakLevel = pCandidate->outputPeakLevel;
 1879|       |
 1880|  1.05k|    if (peakLevel > largestPeakLevel) {
  ------------------
  |  Branch (1880:9): [True: 270, False: 781]
  ------------------
 1881|    270|      largestPeakLevel = peakLevel;
 1882|    270|    }
 1883|  1.05k|  }
 1884|       |
 1885|       |  /* add all with same largest peak level */
 1886|  1.30k|  for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1886:15): [True: 1.05k, False: 251]
  ------------------
 1887|  1.05k|    pCandidate = _drcdec_selection_getAt(pCandidatesPotential, i);
 1888|  1.05k|    if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1888:9): [True: 0, False: 1.05k]
  ------------------
 1889|       |
 1890|  1.05k|    peakLevel = pCandidate->outputPeakLevel;
 1891|       |
 1892|  1.05k|    if (peakLevel == largestPeakLevel) {
  ------------------
  |  Branch (1892:9): [True: 1.00k, False: 46]
  ------------------
 1893|  1.00k|      if (_drcdec_selection_add(pCandidatesSelected, pCandidate) == NULL)
  ------------------
  |  Branch (1893:11): [True: 0, False: 1.00k]
  ------------------
 1894|      0|        return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1895|  1.00k|    }
 1896|  1.05k|  }
 1897|       |
 1898|    251|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1899|    251|}
drcDec_selectionProcess.cpp:_ZL30_drcSetFinalSelection_drcSetIdP16DRCDEC_SELECTIONS0_:
 1903|    224|    DRCDEC_SELECTION* pCandidatesSelected) {
 1904|    224|  int i;
 1905|    224|  int largestId = -1000;
 1906|    224|  int id = 0;
 1907|    224|  DRCDEC_SELECTION_DATA* pCandidate = NULL;
 1908|    224|  DRCDEC_SELECTION_DATA* pCandidateSelected = NULL;
 1909|       |
 1910|  1.20k|  for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1910:15): [True: 978, False: 224]
  ------------------
 1911|    978|    pCandidate = _drcdec_selection_getAt(pCandidatesPotential, i);
 1912|    978|    if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1912:9): [True: 0, False: 978]
  ------------------
 1913|       |
 1914|    978|    id = pCandidate->pInst->drcSetId;
 1915|       |
 1916|    978|    if (id > largestId) {
  ------------------
  |  Branch (1916:9): [True: 241, False: 737]
  ------------------
 1917|    241|      largestId = id;
 1918|    241|      pCandidateSelected = pCandidate;
 1919|    241|    }
 1920|    978|  }
 1921|       |
 1922|    224|  if (pCandidateSelected != NULL) {
  ------------------
  |  Branch (1922:7): [True: 224, False: 0]
  ------------------
 1923|    224|    if (_drcdec_selection_add(pCandidatesSelected, pCandidateSelected) == NULL)
  ------------------
  |  Branch (1923:9): [True: 0, False: 224]
  ------------------
 1924|      0|      return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1925|    224|  } else {
 1926|      0|    return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1927|      0|  }
 1928|       |
 1929|    224|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1930|    224|}
drcDec_selectionProcess.cpp:_ZL23_generateVirtualDrcSetsP14SEL_PROC_INPUTP14UNI_DRC_CONFIG19SEL_PROC_CODEC_MODE:
 1995|  2.84k|    SEL_PROC_CODEC_MODE codecMode) {
 1996|  2.84k|  int i;
 1997|  2.84k|  int nMixes = hUniDrcConfig->downmixInstructionsCount + 1;
 1998|  2.84k|  int index = hUniDrcConfig->drcInstructionsUniDrcCount;
 1999|  2.84k|  int indexVirtual = -1;
 2000|  2.84k|  DRC_INSTRUCTIONS_UNI_DRC* pDrcInstruction =
 2001|  2.84k|      &(hUniDrcConfig->drcInstructionsUniDrc[index]);
 2002|       |
 2003|  2.84k|  if (codecMode == SEL_PROC_MPEG_H_3DA) {
  ------------------
  |  Branch (2003:7): [True: 0, False: 2.84k]
  ------------------
 2004|      0|    nMixes = 1;
 2005|      0|  }
 2006|       |
 2007|  2.84k|  if ((index + nMixes) > (12 + 1 + 6)) {
  ------------------
  |  Branch (2007:7): [True: 0, False: 2.84k]
  ------------------
 2008|      0|    return DRCDEC_SELECTION_PROCESS_NOT_OK;
 2009|      0|  }
 2010|       |
 2011|  2.84k|  FDKmemset(pDrcInstruction, 0, sizeof(DRC_INSTRUCTIONS_UNI_DRC));
 2012|       |
 2013|  2.84k|  pDrcInstruction->drcSetId = indexVirtual;
 2014|  2.84k|  index++;
 2015|  2.84k|  indexVirtual--;
 2016|  2.84k|  pDrcInstruction->downmixIdCount = 1;
 2017|       |
 2018|  2.84k|  if ((codecMode == SEL_PROC_MPEG_H_3DA) &&
  ------------------
  |  Branch (2018:7): [True: 0, False: 2.84k]
  ------------------
 2019|      0|      (hSelProcInput->numDownmixIdRequests)) {
  ------------------
  |  Branch (2019:7): [True: 0, False: 0]
  ------------------
 2020|      0|    pDrcInstruction->downmixId[0] = hSelProcInput->downmixIdRequested[0];
 2021|  2.84k|  } else {
 2022|  2.84k|    pDrcInstruction->downmixId[0] = DOWNMIX_ID_BASE_LAYOUT;
  ------------------
  |  |  122|  2.84k|#define DOWNMIX_ID_BASE_LAYOUT 0x0
  ------------------
 2023|  2.84k|  }
 2024|       |
 2025|  4.01k|  for (i = 1; i < nMixes; i++) {
  ------------------
  |  Branch (2025:15): [True: 1.17k, False: 2.84k]
  ------------------
 2026|  1.17k|    pDrcInstruction = &(hUniDrcConfig->drcInstructionsUniDrc[index]);
 2027|  1.17k|    FDKmemset(pDrcInstruction, 0, sizeof(DRC_INSTRUCTIONS_UNI_DRC));
 2028|  1.17k|    pDrcInstruction->drcSetId = indexVirtual;
 2029|  1.17k|    pDrcInstruction->downmixId[0] =
 2030|  1.17k|        hUniDrcConfig->downmixInstructions[i - 1].downmixId;
 2031|  1.17k|    pDrcInstruction->downmixIdCount = 1;
 2032|  1.17k|    index++;
 2033|  1.17k|    indexVirtual--;
 2034|  1.17k|  }
 2035|       |
 2036|  2.84k|  hUniDrcConfig->drcInstructionsCountInclVirtual =
 2037|  2.84k|      hUniDrcConfig->drcInstructionsUniDrcCount + nMixes;
 2038|       |
 2039|  2.84k|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 2040|  2.84k|}
drcDec_selectionProcess.cpp:_ZL19_generateOutputInfoP14SEL_PROC_INPUTP26s_selection_process_outputP14UNI_DRC_CONFIGP17LOUDNESS_INFO_SETP21DRCDEC_SELECTION_DATA19SEL_PROC_CODEC_MODE:
 2046|  2.72k|    DRCDEC_SELECTION_DATA* pSelectionData, SEL_PROC_CODEC_MODE codecMode) {
 2047|  2.72k|  DRCDEC_SELECTION_PROCESS_RETURN retVal = DRCDEC_SELECTION_PROCESS_NO_ERROR;
 2048|       |
 2049|  2.72k|  int i, j;
 2050|  2.72k|  int hasDependend = 0;
 2051|  2.72k|  int hasFading = 0;
 2052|  2.72k|  int hasDucking = 0;
 2053|  2.72k|  int selectedDrcSetIds;
 2054|  2.72k|  int selectedDownmixIds;
 2055|  2.72k|  FIXP_DBL mixingLevel = 0;
 2056|  2.72k|  int albumMode = hSelProcInput->albumMode;
 2057|  2.72k|  UCHAR* pDownmixIdRequested = hSelProcInput->downmixIdRequested;
 2058|  2.72k|  FIXP_SGL boost = hSelProcInput->boost;
 2059|  2.72k|  FIXP_SGL compress = hSelProcInput->compress;
 2060|       |
 2061|  2.72k|  hSelProcOutput->numSelectedDrcSets = 1;
 2062|  2.72k|  hSelProcOutput->selectedDrcSetIds[0] = pSelectionData->pInst->drcSetId;
 2063|  2.72k|  hSelProcOutput->selectedDownmixIds[0] =
 2064|  2.72k|      pSelectionData->pInst->drcApplyToDownmix == 1
  ------------------
  |  Branch (2064:7): [True: 25, False: 2.69k]
  ------------------
 2065|  2.72k|          ? pSelectionData->pInst->downmixId[0]
 2066|  2.72k|          : 0;
 2067|  2.72k|  hSelProcOutput->loudnessNormalizationGainDb =
 2068|  2.72k|      pSelectionData->loudnessNormalizationGainDbAdjusted +
 2069|  2.72k|      hSelProcInput->loudnessNormalizationGainModificationDb;
 2070|  2.72k|  hSelProcOutput->outputPeakLevelDb = pSelectionData->outputPeakLevel;
 2071|  2.72k|  hSelProcOutput->outputLoudness = pSelectionData->outputLoudness;
 2072|       |
 2073|  2.72k|  hSelProcOutput->boost = boost;
 2074|  2.72k|  hSelProcOutput->compress = compress;
 2075|  2.72k|  hSelProcOutput->baseChannelCount =
 2076|  2.72k|      hUniDrcConfig->channelLayout.baseChannelCount;
 2077|  2.72k|  hSelProcOutput->targetChannelCount =
 2078|  2.72k|      hUniDrcConfig->channelLayout.baseChannelCount;
 2079|  2.72k|  hSelProcOutput->activeDownmixId =
 2080|  2.72k|      pDownmixIdRequested[pSelectionData->downmixIdRequestIndex];
 2081|       |
 2082|  2.72k|  _getMixingLevel(hLoudnessInfoSet, *pDownmixIdRequested,
 2083|  2.72k|                  hSelProcOutput->selectedDrcSetIds[0], albumMode,
 2084|  2.72k|                  &mixingLevel);
 2085|  2.72k|  hSelProcOutput->mixingLevel = mixingLevel;
 2086|       |
 2087|       |  /*dependent*/
 2088|  2.72k|  if (pSelectionData->pInst->dependsOnDrcSetPresent) {
  ------------------
  |  Branch (2088:7): [True: 95, False: 2.62k]
  ------------------
 2089|     95|    int dependsOnDrcSetID = pSelectionData->pInst->dependsOnDrcSet;
 2090|       |
 2091|    463|    for (i = 0; i < hUniDrcConfig->drcInstructionsCountInclVirtual; i++) {
  ------------------
  |  Branch (2091:17): [True: 417, False: 46]
  ------------------
 2092|    417|      DRC_INSTRUCTIONS_UNI_DRC* pInst =
 2093|    417|          &(hUniDrcConfig->drcInstructionsUniDrc[i]);
 2094|    417|      if (!_drcSetIsUsable(hUniDrcConfig, pInst)) continue;
  ------------------
  |  Branch (2094:11): [True: 87, False: 330]
  ------------------
 2095|       |
 2096|    330|      if (pInst->drcSetId == dependsOnDrcSetID) {
  ------------------
  |  Branch (2096:11): [True: 49, False: 281]
  ------------------
 2097|     49|        hSelProcOutput->selectedDrcSetIds[hSelProcOutput->numSelectedDrcSets] =
 2098|     49|            hUniDrcConfig->drcInstructionsUniDrc[i].drcSetId;
 2099|     49|        hSelProcOutput->selectedDownmixIds[hSelProcOutput->numSelectedDrcSets] =
 2100|     49|            hUniDrcConfig->drcInstructionsUniDrc[i].drcApplyToDownmix == 1
  ------------------
  |  Branch (2100:13): [True: 10, False: 39]
  ------------------
 2101|     49|                ? hUniDrcConfig->drcInstructionsUniDrc[i].downmixId[0]
 2102|     49|                : 0;
 2103|     49|        hSelProcOutput->numSelectedDrcSets++;
 2104|     49|        hasDependend = 1;
 2105|     49|        break;
 2106|     49|      }
 2107|    330|    }
 2108|     95|  }
 2109|       |
 2110|       |  /* fading */
 2111|  2.72k|  if (hSelProcInput->albumMode == 0) {
  ------------------
  |  Branch (2111:7): [True: 2.72k, False: 0]
  ------------------
 2112|  5.69k|    for (i = 0; i < hUniDrcConfig->drcInstructionsUniDrcCount; i++) {
  ------------------
  |  Branch (2112:17): [True: 3.14k, False: 2.55k]
  ------------------
 2113|  3.14k|      DRC_INSTRUCTIONS_UNI_DRC* pInst =
 2114|  3.14k|          &(hUniDrcConfig->drcInstructionsUniDrc[i]);
 2115|  3.14k|      if (!_drcSetIsUsable(hUniDrcConfig, pInst)) continue;
  ------------------
  |  Branch (2115:11): [True: 1.94k, False: 1.20k]
  ------------------
 2116|       |
 2117|  1.20k|      if (pInst->drcSetEffect & EB_FADE) {
  ------------------
  |  Branch (2117:11): [True: 329, False: 875]
  ------------------
 2118|    329|        if (pInst->downmixId[0] == DOWNMIX_ID_ANY_DOWNMIX) {
  ------------------
  |  |  123|    329|#define DOWNMIX_ID_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (2118:13): [True: 156, False: 173]
  ------------------
 2119|    156|          hSelProcOutput->numSelectedDrcSets = hasDependend + 1;
 2120|    156|          hSelProcOutput
 2121|    156|              ->selectedDrcSetIds[hSelProcOutput->numSelectedDrcSets] =
 2122|    156|              hUniDrcConfig->drcInstructionsUniDrc[i].drcSetId;
 2123|    156|          hSelProcOutput
 2124|    156|              ->selectedDownmixIds[hSelProcOutput->numSelectedDrcSets] =
 2125|    156|              hUniDrcConfig->drcInstructionsUniDrc[i].drcApplyToDownmix == 1
  ------------------
  |  Branch (2125:15): [True: 146, False: 10]
  ------------------
 2126|    156|                  ? hUniDrcConfig->drcInstructionsUniDrc[i].downmixId[0]
 2127|    156|                  : 0;
 2128|    156|          hSelProcOutput->numSelectedDrcSets++;
 2129|    156|          hasFading = 1;
 2130|       |
 2131|    173|        } else {
 2132|    173|          retVal = DRCDEC_SELECTION_PROCESS_NOT_OK;
 2133|    173|          if (retVal) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (2133:15): [True: 173, False: 0]
  ------------------
 2134|    173|        }
 2135|    329|      }
 2136|  1.20k|    }
 2137|  2.72k|  }
 2138|       |
 2139|       |  /* ducking */
 2140|  5.39k|  for (i = 0; i < hUniDrcConfig->drcInstructionsUniDrcCount; i++) {
  ------------------
  |  Branch (2140:15): [True: 2.84k, False: 2.55k]
  ------------------
 2141|  2.84k|    DRC_INSTRUCTIONS_UNI_DRC* pInst =
 2142|  2.84k|        &(hUniDrcConfig->drcInstructionsUniDrc[i]);
 2143|  2.84k|    if (!_drcSetIsUsable(hUniDrcConfig, pInst)) continue;
  ------------------
  |  Branch (2143:9): [True: 1.91k, False: 936]
  ------------------
 2144|       |
 2145|    936|    if (pInst->drcSetEffect & (EB_DUCK_OTHER | EB_DUCK_SELF)) {
  ------------------
  |  Branch (2145:9): [True: 462, False: 474]
  ------------------
 2146|  1.24k|      for (j = 0; j < pInst->downmixIdCount; j++) {
  ------------------
  |  Branch (2146:19): [True: 786, False: 462]
  ------------------
 2147|    786|        if (pInst->downmixId[j] == hSelProcOutput->activeDownmixId) {
  ------------------
  |  Branch (2147:13): [True: 325, False: 461]
  ------------------
 2148|    325|          hSelProcOutput->numSelectedDrcSets =
 2149|    325|              hasDependend + 1; /* ducking overrides fading */
 2150|       |
 2151|    325|          hSelProcOutput
 2152|    325|              ->selectedDrcSetIds[hSelProcOutput->numSelectedDrcSets] =
 2153|    325|              hUniDrcConfig->drcInstructionsUniDrc[i].drcSetId;
 2154|       |          /* force ducking DRC set to be processed on base layout */
 2155|    325|          hSelProcOutput
 2156|    325|              ->selectedDownmixIds[hSelProcOutput->numSelectedDrcSets] = 0;
 2157|    325|          hSelProcOutput->numSelectedDrcSets++;
 2158|    325|          hasDucking = 1;
 2159|    325|        }
 2160|    786|      }
 2161|    462|    }
 2162|    936|  }
 2163|       |
 2164|       |  /* repeat for DOWNMIX_ID_BASE_LAYOUT if no ducking found*/
 2165|       |
 2166|  2.55k|  if (!hasDucking) {
  ------------------
  |  Branch (2166:7): [True: 2.39k, False: 152]
  ------------------
 2167|  4.58k|    for (i = 0; i < hUniDrcConfig->drcInstructionsUniDrcCount; i++) {
  ------------------
  |  Branch (2167:17): [True: 2.19k, False: 2.39k]
  ------------------
 2168|  2.19k|      DRC_INSTRUCTIONS_UNI_DRC* pInst =
 2169|  2.19k|          &(hUniDrcConfig->drcInstructionsUniDrc[i]);
 2170|  2.19k|      if (!_drcSetIsUsable(hUniDrcConfig, pInst)) continue;
  ------------------
  |  Branch (2170:11): [True: 1.61k, False: 579]
  ------------------
 2171|       |
 2172|    579|      if (pInst->drcSetEffect & (EB_DUCK_OTHER | EB_DUCK_SELF)) {
  ------------------
  |  Branch (2172:11): [True: 202, False: 377]
  ------------------
 2173|    589|        for (j = 0; j < pInst->downmixIdCount; j++) {
  ------------------
  |  Branch (2173:21): [True: 387, False: 202]
  ------------------
 2174|    387|          if (pInst->downmixId[j] == DOWNMIX_ID_BASE_LAYOUT) {
  ------------------
  |  |  122|    387|#define DOWNMIX_ID_BASE_LAYOUT 0x0
  ------------------
  |  Branch (2174:15): [True: 0, False: 387]
  ------------------
 2175|      0|            hSelProcOutput->numSelectedDrcSets = hasDependend + hasFading + 1;
 2176|      0|            hSelProcOutput
 2177|      0|                ->selectedDrcSetIds[hSelProcOutput->numSelectedDrcSets] =
 2178|      0|                hUniDrcConfig->drcInstructionsUniDrc[i].drcSetId;
 2179|       |            /* force ducking DRC set to be processed on base layout */
 2180|      0|            hSelProcOutput
 2181|      0|                ->selectedDownmixIds[hSelProcOutput->numSelectedDrcSets] = 0;
 2182|      0|            hSelProcOutput->numSelectedDrcSets++;
 2183|      0|          }
 2184|    387|        }
 2185|    202|      }
 2186|    579|    }
 2187|  2.39k|  }
 2188|       |
 2189|  2.55k|  if (hSelProcOutput->numSelectedDrcSets > 3) {
  ------------------
  |  Branch (2189:7): [True: 0, False: 2.55k]
  ------------------
 2190|       |    /* maximum permitted number of applied DRC sets is 3, see section 6.3.5 of
 2191|       |     * ISO/IEC 23003-4 */
 2192|      0|    hSelProcOutput->numSelectedDrcSets = 0;
 2193|      0|    return DRCDEC_SELECTION_PROCESS_NOT_OK;
 2194|      0|  }
 2195|       |
 2196|       |  /* sorting: Ducking/Fading -> Dependent -> Selected */
 2197|  2.55k|  if (hSelProcOutput->numSelectedDrcSets == 3) {
  ------------------
  |  Branch (2197:7): [True: 10, False: 2.54k]
  ------------------
 2198|     10|    selectedDrcSetIds = hSelProcOutput->selectedDrcSetIds[0];
 2199|     10|    selectedDownmixIds = hSelProcOutput->selectedDownmixIds[0];
 2200|     10|    hSelProcOutput->selectedDrcSetIds[0] = hSelProcOutput->selectedDrcSetIds[2];
 2201|     10|    hSelProcOutput->selectedDownmixIds[0] =
 2202|     10|        hSelProcOutput->selectedDownmixIds[2];
 2203|     10|    hSelProcOutput->selectedDrcSetIds[2] = selectedDrcSetIds;
 2204|     10|    hSelProcOutput->selectedDownmixIds[2] = selectedDownmixIds;
 2205|  2.54k|  } else if (hSelProcOutput->numSelectedDrcSets == 2) {
  ------------------
  |  Branch (2205:14): [True: 237, False: 2.30k]
  ------------------
 2206|    237|    selectedDrcSetIds = hSelProcOutput->selectedDrcSetIds[0];
 2207|    237|    selectedDownmixIds = hSelProcOutput->selectedDownmixIds[0];
 2208|    237|    hSelProcOutput->selectedDrcSetIds[0] = hSelProcOutput->selectedDrcSetIds[1];
 2209|    237|    hSelProcOutput->selectedDownmixIds[0] =
 2210|    237|        hSelProcOutput->selectedDownmixIds[1];
 2211|    237|    hSelProcOutput->selectedDrcSetIds[1] = selectedDrcSetIds;
 2212|    237|    hSelProcOutput->selectedDownmixIds[1] = selectedDownmixIds;
 2213|    237|  }
 2214|       |
 2215|  2.55k|  return retVal;
 2216|  2.55k|}
drcDec_selectionProcess.cpp:_ZL15_getMixingLevelP17LOUDNESS_INFO_SETiiiPi:
 3127|  2.72k|    int drcSetIdRequested, int albumMode, FIXP_DBL* pMixingLevel) {
 3128|  2.72k|  const FIXP_DBL mixingLevelDefault = FL2FXCONST_DBL(85.0f / (float)(1 << 7));
  ------------------
  |  |  192|  2.72k|  (FIXP_DBL)(                                                                \
  |  |  193|  2.72k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 0, Folded]
  |  |  ------------------
  |  |  194|  2.72k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 0]
  |  |  ------------------
  |  |  195|      0|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|      0|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  2.72k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|  2.72k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  2.72k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 2.72k]
  |  |  ------------------
  |  |  199|  2.72k|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|  2.72k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|  2.72k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|  2.72k|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|  2.72k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|  2.72k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  2.72k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3129|       |
 3130|  2.72k|  int i;
 3131|  2.72k|  int count;
 3132|       |
 3133|  2.72k|  LOUDNESS_INFO* pLoudnessInfo = NULL;
 3134|       |
 3135|  2.72k|  *pMixingLevel = mixingLevelDefault;
 3136|       |
 3137|  2.72k|  if (drcSetIdRequested < 0) {
  ------------------
  |  Branch (3137:7): [True: 2.50k, False: 217]
  ------------------
 3138|  2.50k|    drcSetIdRequested = 0;
 3139|  2.50k|  }
 3140|       |
 3141|  2.72k|  if (albumMode) {
  ------------------
  |  Branch (3141:7): [True: 0, False: 2.72k]
  ------------------
 3142|      0|    count = hLoudnessInfoSet->loudnessInfoAlbumCount;
 3143|      0|    pLoudnessInfo = hLoudnessInfoSet->loudnessInfoAlbum;
 3144|  2.72k|  } else {
 3145|  2.72k|    count = hLoudnessInfoSet->loudnessInfoCount;
 3146|  2.72k|    pLoudnessInfo = hLoudnessInfoSet->loudnessInfo;
 3147|  2.72k|  }
 3148|       |
 3149|  4.11k|  for (i = 0; i < count; i++) {
  ------------------
  |  Branch (3149:15): [True: 1.40k, False: 2.71k]
  ------------------
 3150|  1.40k|    if ((drcSetIdRequested == pLoudnessInfo[i].drcSetId) &&
  ------------------
  |  Branch (3150:9): [True: 624, False: 782]
  ------------------
 3151|    624|        ((downmixIdRequested == pLoudnessInfo[i].downmixId) ||
  ------------------
  |  Branch (3151:10): [True: 386, False: 238]
  ------------------
 3152|    505|         (DOWNMIX_ID_ANY_DOWNMIX == pLoudnessInfo[i].downmixId))) {
  ------------------
  |  |  123|    238|#define DOWNMIX_ID_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (3152:10): [True: 119, False: 119]
  ------------------
 3153|    505|      int index = _findMethodDefinition(&pLoudnessInfo[i], MD_MIXING_LEVEL, 0);
 3154|       |
 3155|    505|      if (index >= 0) {
  ------------------
  |  Branch (3155:11): [True: 13, False: 492]
  ------------------
 3156|     13|        *pMixingLevel = pLoudnessInfo[i].loudnessMeasurement[index].methodValue;
 3157|     13|        break;
 3158|     13|      }
 3159|    505|    }
 3160|  1.40k|  }
 3161|       |
 3162|  2.72k|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 3163|  2.72k|}
drcDec_selectionProcess.cpp:_ZL21_findMethodDefinitionP13LOUDNESS_INFOii:
 3108|  3.66k|                                 int methodDefinition, int startIndex) {
 3109|  3.66k|  int i;
 3110|  3.66k|  int index = -1;
 3111|       |
 3112|  6.37k|  for (i = startIndex; i < pLoudnessInfo->measurementCount; i++) {
  ------------------
  |  Branch (3112:24): [True: 4.43k, False: 1.94k]
  ------------------
 3113|  4.43k|    if (pLoudnessInfo->loudnessMeasurement[i].methodDefinition ==
  ------------------
  |  Branch (3113:9): [True: 1.72k, False: 2.71k]
  ------------------
 3114|  4.43k|        methodDefinition) {
 3115|  1.72k|      index = i;
 3116|  1.72k|      break;
 3117|  1.72k|    }
 3118|  4.43k|  }
 3119|       |
 3120|  3.66k|  return index;
 3121|  3.66k|}
drcDec_selectionProcess.cpp:_ZL15_drcSetIsUsableP14UNI_DRC_CONFIGP24DRC_INSTRUCTIONS_UNI_DRC:
 1106|  8.60k|                           DRC_INSTRUCTIONS_UNI_DRC* pInst) {
 1107|  8.60k|  int usable = 0;
 1108|  8.60k|  DRC_COEFFICIENTS_UNI_DRC* pCoef =
 1109|  8.60k|      selectDrcCoefficients(hUniDrcConfig, LOCATION_SELECTED);
  ------------------
  |  |  131|  8.60k|  LOCATION_MP4_INSTREAM_UNIDRC /* set to location selected by system */
  |  |  ------------------
  |  |  |  |  127|  8.60k|#define LOCATION_MP4_INSTREAM_UNIDRC 0x1
  |  |  ------------------
  ------------------
 1110|       |
 1111|       |  /* check if ID is unique */
 1112|  8.60k|  if (selectDrcInstructions(hUniDrcConfig, pInst->drcSetId) != pInst) return 0;
  ------------------
  |  Branch (1112:7): [True: 3.90k, False: 4.70k]
  ------------------
 1113|       |  /* sanity check on drcInstructions */
 1114|  4.70k|  _preSelectionRequirement5(pInst, pCoef, &usable);
 1115|  4.70k|  return usable;
 1116|  8.60k|}
drcDec_selectionProcess.cpp:_ZL25_preSelectionRequirement5P24DRC_INSTRUCTIONS_UNI_DRCP24DRC_COEFFICIENTS_UNI_DRCPi:
  961|  10.4k|    DRC_COEFFICIENTS_UNI_DRC* pCoef, int* pMatchFound) {
  962|  10.4k|  int b, i;
  963|       |
  964|  10.4k|  *pMatchFound = 1;
  965|       |
  966|  10.4k|  if (pDrcInstructionUniDrc->drcSetId < 0) /* virtual DRC sets are okay */
  ------------------
  |  Branch (966:7): [True: 4.01k, False: 6.44k]
  ------------------
  967|  4.01k|  {
  968|  4.01k|    return DRCDEC_SELECTION_PROCESS_NO_ERROR;
  969|  4.01k|  }
  970|       |
  971|  6.44k|  if (pCoef == NULL) /* check for parametricDRC */
  ------------------
  |  Branch (971:7): [True: 664, False: 5.78k]
  ------------------
  972|    664|  {
  973|    664|    *pMatchFound = 0; /* parametricDRC not supported */
  974|    664|    return DRCDEC_SELECTION_PROCESS_NO_ERROR;
  975|    664|  }
  976|       |
  977|  5.78k|  if (pCoef->drcLocation !=
  ------------------
  |  Branch (977:7): [True: 911, False: 4.87k]
  ------------------
  978|  5.78k|      pDrcInstructionUniDrc
  979|  5.78k|          ->drcLocation) /* drcLocation must be LOCATION_SELECTED */
  980|    911|  {
  981|    911|    *pMatchFound = 0;
  982|    911|    return DRCDEC_SELECTION_PROCESS_NO_ERROR;
  983|    911|  }
  984|       |
  985|  7.97k|  for (i = 0; i < pDrcInstructionUniDrc->nDrcChannelGroups; i++) {
  ------------------
  |  Branch (985:15): [True: 3.40k, False: 4.57k]
  ------------------
  986|  3.40k|    int indexDrcCoeff = pDrcInstructionUniDrc->gainSetIndexForChannelGroup[i];
  987|  3.40k|    int bandCount = 0;
  988|       |
  989|  3.40k|    if (indexDrcCoeff >= 12) {
  ------------------
  |  Branch (989:9): [True: 170, False: 3.23k]
  ------------------
  990|    170|      *pMatchFound = 0;
  991|    170|      return DRCDEC_SELECTION_PROCESS_NO_ERROR;
  992|    170|    }
  993|       |
  994|  3.23k|    if (indexDrcCoeff > pCoef->gainSetCount - 1) /* check for parametricDRC */
  ------------------
  |  Branch (994:9): [True: 1.72k, False: 1.50k]
  ------------------
  995|  1.72k|    {
  996|  1.72k|      continue;
  997|  1.72k|    }
  998|       |
  999|  1.50k|    GAIN_SET* gainSet = &(pCoef->gainSet[indexDrcCoeff]);
 1000|  1.50k|    bandCount = gainSet->bandCount;
 1001|       |
 1002|  1.50k|    if (bandCount > 4) {
  ------------------
  |  Branch (1002:9): [True: 0, False: 1.50k]
  ------------------
 1003|      0|      *pMatchFound = 0;
 1004|      0|    }
 1005|       |
 1006|  3.02k|    for (b = 0; b < bandCount; b++) {
  ------------------
  |  Branch (1006:17): [True: 1.64k, False: 1.37k]
  ------------------
 1007|  1.64k|      if ((gainSet->gainSequenceIndex[b] >= 12) ||
  ------------------
  |  Branch (1007:11): [True: 86, False: 1.56k]
  ------------------
 1008|  1.56k|          (gainSet->gainSequenceIndex[b] >= pCoef->gainSequenceCount)) {
  ------------------
  |  Branch (1008:11): [True: 44, False: 1.51k]
  ------------------
 1009|    130|        *pMatchFound = 0;
 1010|    130|        return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1011|    130|      }
 1012|  1.64k|    }
 1013|  1.50k|  }
 1014|       |
 1015|  4.57k|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1016|  4.87k|}
drcDec_selectionProcess.cpp:_ZL20_selectDownmixMatrixP26s_selection_process_outputP14UNI_DRC_CONFIG:
 2220|  2.55k|    HANDLE_UNI_DRC_CONFIG hUniDrcConfig) {
 2221|  2.55k|  int i;
 2222|  2.55k|  hSelProcOutput->baseChannelCount =
 2223|  2.55k|      hUniDrcConfig->channelLayout.baseChannelCount;
 2224|  2.55k|  hSelProcOutput->targetChannelCount =
 2225|  2.55k|      hUniDrcConfig->channelLayout.baseChannelCount;
 2226|  2.55k|  hSelProcOutput->targetLayout = -1;
 2227|  2.55k|  hSelProcOutput->downmixMatrixPresent = 0;
 2228|       |
 2229|  2.55k|  if (hSelProcOutput->activeDownmixId != 0) {
  ------------------
  |  Branch (2229:7): [True: 0, False: 2.55k]
  ------------------
 2230|      0|    for (i = 0; i < hUniDrcConfig->downmixInstructionsCount; i++) {
  ------------------
  |  Branch (2230:17): [True: 0, False: 0]
  ------------------
 2231|      0|      DOWNMIX_INSTRUCTIONS* pDown = &(hUniDrcConfig->downmixInstructions[i]);
 2232|      0|      if (pDown->targetChannelCount > 8) {
  ------------------
  |  Branch (2232:11): [True: 0, False: 0]
  ------------------
 2233|      0|        continue;
 2234|      0|      }
 2235|       |
 2236|      0|      if (hSelProcOutput->activeDownmixId == pDown->downmixId) {
  ------------------
  |  Branch (2236:11): [True: 0, False: 0]
  ------------------
 2237|      0|        hSelProcOutput->targetChannelCount = pDown->targetChannelCount;
 2238|      0|        hSelProcOutput->targetLayout = pDown->targetLayout;
 2239|       |
 2240|      0|        if (pDown->downmixCoefficientsPresent) {
  ------------------
  |  Branch (2240:13): [True: 0, False: 0]
  ------------------
 2241|      0|          int j, k;
 2242|      0|          FIXP_DBL downmixOffset = getDownmixOffset(
 2243|      0|              pDown, hSelProcOutput->baseChannelCount); /* e = 1 */
 2244|       |
 2245|      0|          for (j = 0; j < hSelProcOutput->baseChannelCount; j++) {
  ------------------
  |  Branch (2245:23): [True: 0, False: 0]
  ------------------
 2246|      0|            for (k = 0; k < hSelProcOutput->targetChannelCount; k++) {
  ------------------
  |  Branch (2246:25): [True: 0, False: 0]
  ------------------
 2247|      0|              hSelProcOutput->downmixMatrix[j][k] =
 2248|      0|                  fMultDiv2(
 2249|      0|                      downmixOffset,
 2250|      0|                      pDown->downmixCoefficient[j + k * hSelProcOutput
 2251|      0|                                                            ->baseChannelCount])
 2252|      0|                  << 2;
 2253|      0|            }
 2254|      0|          }
 2255|       |
 2256|      0|          hSelProcOutput->downmixMatrixPresent = 1;
 2257|      0|        }
 2258|      0|        break;
 2259|      0|      }
 2260|      0|    }
 2261|      0|  }
 2262|       |
 2263|  2.55k|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 2264|  2.55k|}
drcDec_selectionProcess.cpp:_ZL19_drcSetPreSelectionP14SEL_PROC_INPUTP14UNI_DRC_CONFIGP17LOUDNESS_INFO_SETPP16DRCDEC_SELECTIONS7_19SEL_PROC_CODEC_MODE:
 2270|  2.84k|    DRCDEC_SELECTION** ppCandidatesSelected, SEL_PROC_CODEC_MODE codecMode) {
 2271|  2.84k|  DRCDEC_SELECTION_PROCESS_RETURN retVal = DRCDEC_SELECTION_PROCESS_NO_ERROR;
 2272|  2.84k|  int i, j;
 2273|       |
 2274|  5.67k|  for (i = 0; i < hSelProcInput->numDownmixIdRequests; i++) {
  ------------------
  |  Branch (2274:15): [True: 2.84k, False: 2.82k]
  ------------------
 2275|  10.7k|    for (j = 0; j < hUniDrcConfig->drcInstructionsCountInclVirtual; j++) {
  ------------------
  |  Branch (2275:17): [True: 7.90k, False: 2.82k]
  ------------------
 2276|  7.90k|      DRC_INSTRUCTIONS_UNI_DRC* pDrcInstruction =
 2277|  7.90k|          &(hUniDrcConfig->drcInstructionsUniDrc[j]);
 2278|       |      /* check if ID is unique */
 2279|  7.90k|      if (selectDrcInstructions(hUniDrcConfig, pDrcInstruction->drcSetId) !=
  ------------------
  |  Branch (2279:11): [True: 1.48k, False: 6.42k]
  ------------------
 2280|  7.90k|          pDrcInstruction)
 2281|  1.48k|        continue;
 2282|       |
 2283|  6.42k|      retVal = _drcSetPreSelectionSingleInstruction(
 2284|  6.42k|          hSelProcInput, i, hUniDrcConfig, hLoudnessInfoSet, pDrcInstruction,
 2285|  6.42k|          *ppCandidatesPotential, *ppCandidatesSelected, codecMode);
 2286|  6.42k|      if (retVal) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (2286:11): [True: 17, False: 6.40k]
  ------------------
 2287|  6.42k|    }
 2288|  2.84k|  }
 2289|       |
 2290|  2.82k|  retVal = _preSelectionRequirement9(hSelProcInput, *ppCandidatesPotential,
 2291|  2.82k|                                     *ppCandidatesSelected);
 2292|  2.82k|  if (retVal) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (2292:7): [True: 0, False: 2.82k]
  ------------------
 2293|       |
 2294|  2.82k|  if (_drcdec_selection_getNumber(*ppCandidatesSelected) == 0) {
  ------------------
  |  Branch (2294:7): [True: 224, False: 2.60k]
  ------------------
 2295|    224|    retVal = _drcSetSelectionAddCandidates(
 2296|    224|        hSelProcInput, *ppCandidatesPotential, *ppCandidatesSelected);
 2297|    224|    if (retVal) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (2297:9): [True: 0, False: 224]
  ------------------
 2298|    224|  }
 2299|       |
 2300|  2.82k|  return retVal;
 2301|  2.82k|}
drcDec_selectionProcess.cpp:_ZL36_drcSetPreSelectionSingleInstructionP14SEL_PROC_INPUTiP14UNI_DRC_CONFIGP17LOUDNESS_INFO_SETP24DRC_INSTRUCTIONS_UNI_DRCP16DRCDEC_SELECTIONS8_19SEL_PROC_CODEC_MODE:
 1261|  6.42k|    DRCDEC_SELECTION* pCandidatesSelected, SEL_PROC_CODEC_MODE codecMode) {
 1262|  6.42k|  DRCDEC_SELECTION_PROCESS_RETURN retVal = DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1263|  6.42k|  int matchFound = 0;
 1264|  6.42k|  DRC_COEFFICIENTS_UNI_DRC* pCoef =
 1265|  6.42k|      selectDrcCoefficients(hUniDrcConfig, LOCATION_SELECTED);
  ------------------
  |  |  131|  6.42k|  LOCATION_MP4_INSTREAM_UNIDRC /* set to location selected by system */
  |  |  ------------------
  |  |  |  |  127|  6.42k|#define LOCATION_MP4_INSTREAM_UNIDRC 0x1
  |  |  ------------------
  ------------------
 1266|       |
 1267|  6.42k|  retVal = _preSelectionRequirement123(
 1268|  6.42k|      hSelProcInput->downmixIdRequested[downmixIdIndex], pDrcInstructionUniDrc,
 1269|  6.42k|      &matchFound);
 1270|       |
 1271|  6.42k|  if (!retVal && matchFound)
  ------------------
  |  Branch (1271:7): [True: 6.42k, False: 0]
  |  Branch (1271:18): [True: 6.10k, False: 315]
  ------------------
 1272|  6.10k|    retVal = _preSelectionRequirement4(pDrcInstructionUniDrc,
 1273|  6.10k|                                       hSelProcInput->dynamicRangeControlOn,
 1274|  6.10k|                                       &matchFound);
 1275|       |
 1276|  6.42k|  if (!retVal && matchFound)
  ------------------
  |  Branch (1276:7): [True: 6.42k, False: 0]
  |  Branch (1276:18): [True: 5.75k, False: 664]
  ------------------
 1277|  5.75k|    retVal =
 1278|  5.75k|        _preSelectionRequirement5(pDrcInstructionUniDrc, pCoef, &matchFound);
 1279|       |
 1280|  6.42k|  if (!retVal && matchFound)
  ------------------
  |  Branch (1280:7): [True: 6.42k, False: 0]
  |  Branch (1280:18): [True: 5.53k, False: 886]
  ------------------
 1281|  5.53k|    retVal = _preSelectionRequirement6(pDrcInstructionUniDrc, &matchFound);
 1282|       |
 1283|  6.42k|  if (!retVal && matchFound)
  ------------------
  |  Branch (1283:7): [True: 6.42k, False: 0]
  |  Branch (1283:18): [True: 5.50k, False: 912]
  ------------------
 1284|  5.50k|    retVal = _preSelectionRequirement7(pDrcInstructionUniDrc, &matchFound);
 1285|       |
 1286|  6.42k|  if (!retVal && matchFound)
  ------------------
  |  Branch (1286:7): [True: 6.42k, False: 0]
  |  Branch (1286:18): [True: 5.49k, False: 929]
  ------------------
 1287|  5.49k|    retVal = _preSelectionRequirement8(
 1288|  5.49k|        hSelProcInput, downmixIdIndex, hUniDrcConfig, hLoudnessInfoSet,
 1289|  5.49k|        pDrcInstructionUniDrc, pCandidatesPotential, pCandidatesSelected,
 1290|  5.49k|        codecMode);
 1291|       |
 1292|  6.42k|  return retVal;
 1293|  6.42k|}
drcDec_selectionProcess.cpp:_ZL27_preSelectionRequirement123iP24DRC_INSTRUCTIONS_UNI_DRCPi:
  920|  6.42k|    int* pMatchFound) {
  921|  6.42k|  int i;
  922|  6.42k|  *pMatchFound = 0;
  923|       |
  924|  7.15k|  for (i = 0; i < pDrcInstructionUniDrc->downmixIdCount; i++) {
  ------------------
  |  Branch (924:15): [True: 6.83k, False: 315]
  ------------------
  925|  6.83k|    if ((pDrcInstructionUniDrc->downmixId[i] == nRequestedDownmixId) ||
  ------------------
  |  Branch (925:9): [True: 5.68k, False: 1.14k]
  ------------------
  926|  1.14k|        (pDrcInstructionUniDrc->downmixId[i] == DOWNMIX_ID_ANY_DOWNMIX) ||
  ------------------
  |  |  123|  1.14k|#define DOWNMIX_ID_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (926:9): [True: 417, False: 732]
  ------------------
  927|    732|        ((pDrcInstructionUniDrc->downmixId[i] == DOWNMIX_ID_BASE_LAYOUT) &&
  ------------------
  |  |  122|    732|#define DOWNMIX_ID_BASE_LAYOUT 0x0
  ------------------
  |  Branch (927:10): [True: 0, False: 732]
  ------------------
  928|  6.10k|         (pDrcInstructionUniDrc->drcSetId > 0))) {
  ------------------
  |  Branch (928:10): [True: 0, False: 0]
  ------------------
  929|  6.10k|      *pMatchFound = 1;
  930|  6.10k|      break;
  931|  6.10k|    }
  932|  6.83k|  }
  933|       |
  934|  6.42k|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
  935|  6.42k|}
drcDec_selectionProcess.cpp:_ZL25_preSelectionRequirement4P24DRC_INSTRUCTIONS_UNI_DRCiPi:
  940|  6.10k|    int* pMatchFound) {
  941|  6.10k|  *pMatchFound = 0;
  942|       |
  943|  6.10k|  if (nDynamicRangeControlOn == 1) {
  ------------------
  |  Branch (943:7): [True: 6.10k, False: 0]
  ------------------
  944|  6.10k|    if ((pDrcInstruction->drcSetEffect != EB_FADE) &&
  ------------------
  |  Branch (944:9): [True: 6.09k, False: 13]
  ------------------
  945|  6.09k|        (pDrcInstruction->drcSetEffect != EB_DUCK_OTHER) &&
  ------------------
  |  Branch (945:9): [True: 6.08k, False: 10]
  ------------------
  946|  6.08k|        (pDrcInstruction->drcSetEffect != EB_DUCK_SELF) &&
  ------------------
  |  Branch (946:9): [True: 6.05k, False: 26]
  ------------------
  947|  6.05k|        (pDrcInstruction->drcSetEffect != 0 || pDrcInstruction->drcSetId < 0)) {
  ------------------
  |  Branch (947:10): [True: 1.83k, False: 4.22k]
  |  Branch (947:48): [True: 3.92k, False: 300]
  ------------------
  948|  5.75k|      *pMatchFound = 1;
  949|  5.75k|    }
  950|  6.10k|  } else {
  951|      0|    *pMatchFound = 1;
  952|      0|  }
  953|       |
  954|  6.10k|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
  955|  6.10k|}
drcDec_selectionProcess.cpp:_ZL25_preSelectionRequirement6P24DRC_INSTRUCTIONS_UNI_DRCPi:
 1020|  5.53k|    DRC_INSTRUCTIONS_UNI_DRC* pDrcInstructionUniDrc, int* pMatchFound) {
 1021|  5.53k|  *pMatchFound = 0;
 1022|       |
 1023|  5.53k|  if (((pDrcInstructionUniDrc->dependsOnDrcSetPresent == 0) &&
  ------------------
  |  Branch (1023:8): [True: 5.14k, False: 385]
  ------------------
 1024|  5.14k|       (pDrcInstructionUniDrc->noIndependentUse == 0)) ||
  ------------------
  |  Branch (1024:8): [True: 5.12k, False: 26]
  ------------------
 1025|  5.50k|      (pDrcInstructionUniDrc->dependsOnDrcSetPresent == 1)) {
  ------------------
  |  Branch (1025:7): [True: 385, False: 26]
  ------------------
 1026|  5.50k|    *pMatchFound = 1;
 1027|  5.50k|  }
 1028|       |
 1029|  5.53k|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1030|  5.53k|}
drcDec_selectionProcess.cpp:_ZL25_preSelectionRequirement7P24DRC_INSTRUCTIONS_UNI_DRCPi:
 1034|  5.50k|    DRC_INSTRUCTIONS_UNI_DRC* pDrcInstructionUniDrc, int* pMatchFound) {
 1035|  5.50k|  *pMatchFound = 1;
 1036|       |
 1037|  5.50k|  if (pDrcInstructionUniDrc->requiresEq) {
  ------------------
  |  Branch (1037:7): [True: 17, False: 5.49k]
  ------------------
 1038|       |    /* EQ is not supported */
 1039|     17|    *pMatchFound = 0;
 1040|     17|  }
 1041|       |
 1042|  5.50k|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1043|  5.50k|}
drcDec_selectionProcess.cpp:_ZL25_preSelectionRequirement8P14SEL_PROC_INPUTiP14UNI_DRC_CONFIGP17LOUDNESS_INFO_SETP24DRC_INSTRUCTIONS_UNI_DRCP16DRCDEC_SELECTIONS8_19SEL_PROC_CODEC_MODE:
 1126|  5.49k|    DRCDEC_SELECTION* pCandidatesSelected, SEL_PROC_CODEC_MODE codecMode) {
 1127|  5.49k|  DRCDEC_SELECTION_PROCESS_RETURN retVal = DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1128|  5.49k|  int explicitPeakInformationPresent;
 1129|  5.49k|  FIXP_DBL signalPeakLevel;
 1130|  5.49k|  int addToCandidate = 0;
 1131|       |
 1132|  5.49k|  FIXP_DBL loudnessNormalizationGainDb;
 1133|  5.49k|  FIXP_DBL loudness;
 1134|       |
 1135|  5.49k|  FIXP_DBL loudnessDeviationMax =
 1136|  5.49k|      ((FIXP_DBL)hSelProcInput->loudnessDeviationMax) << (DFRACT_BITS - 1 - 7);
  ------------------
  |  |  113|  5.49k|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1137|       |
 1138|  5.49k|  {
 1139|  5.49k|    retVal = _getLoudness(hLoudnessInfoSet, hSelProcInput->albumMode,
 1140|  5.49k|                          hSelProcInput->loudnessMeasurementMethod,
 1141|  5.49k|                          hSelProcInput->loudnessMeasurementSystem,
 1142|  5.49k|                          hSelProcInput->targetLoudness,
 1143|  5.49k|                          pDrcInstructionUniDrc->drcSetId,
 1144|  5.49k|                          hSelProcInput->downmixIdRequested[downmixIdIndex],
 1145|  5.49k|                          &loudnessNormalizationGainDb, &loudness);
 1146|  5.49k|    if (retVal) return (retVal);
  ------------------
  |  Branch (1146:9): [True: 17, False: 5.47k]
  ------------------
 1147|  5.49k|  }
 1148|       |
 1149|  5.47k|  if (!hSelProcInput->loudnessNormalizationOn) {
  ------------------
  |  Branch (1149:7): [True: 0, False: 5.47k]
  ------------------
 1150|      0|    loudnessNormalizationGainDb = (FIXP_DBL)0;
 1151|      0|  }
 1152|       |
 1153|  5.47k|  retVal = _getSignalPeakLevel(
 1154|  5.47k|      hSelProcInput, hUniDrcConfig, hLoudnessInfoSet, pDrcInstructionUniDrc,
 1155|  5.47k|      hSelProcInput->downmixIdRequested[downmixIdIndex],
 1156|  5.47k|      &explicitPeakInformationPresent, &signalPeakLevel, codecMode
 1157|       |
 1158|  5.47k|  );
 1159|  5.47k|  if (retVal) return (retVal);
  ------------------
  |  Branch (1159:7): [True: 0, False: 5.47k]
  ------------------
 1160|       |
 1161|  5.47k|  if (hSelProcInput->dynamicRangeControlOn) {
  ------------------
  |  Branch (1161:7): [True: 5.47k, False: 0]
  ------------------
 1162|  5.47k|    if (explicitPeakInformationPresent == 0) {
  ------------------
  |  Branch (1162:9): [True: 4.17k, False: 1.29k]
  ------------------
 1163|  4.17k|      if (pDrcInstructionUniDrc->drcSetTargetLoudnessPresent &&
  ------------------
  |  Branch (1163:11): [True: 228, False: 3.94k]
  ------------------
 1164|    228|          ((hSelProcInput->loudnessNormalizationOn &&
  ------------------
  |  Branch (1164:13): [True: 228, False: 0]
  ------------------
 1165|    228|            _targetLoudnessInRange(pDrcInstructionUniDrc,
  ------------------
  |  Branch (1165:13): [True: 159, False: 69]
  ------------------
 1166|    228|                                   hSelProcInput->targetLoudness)) ||
 1167|    159|           !hSelProcInput->loudnessNormalizationOn)) {
  ------------------
  |  Branch (1167:12): [True: 0, False: 69]
  ------------------
 1168|    159|        DRCDEC_SELECTION_DATA* pData =
 1169|    159|            _drcdec_selection_addNew(pCandidatesSelected);
 1170|    159|        if (pData == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1170:13): [True: 0, False: 159]
  ------------------
 1171|       |
 1172|    159|        _setSelectionDataInfo(pData, loudness, loudnessNormalizationGainDb,
 1173|    159|                              hSelProcInput->loudnessNormalizationGainDbMax,
 1174|    159|                              loudnessDeviationMax, signalPeakLevel,
 1175|    159|                              hSelProcInput->outputPeakLevelMax, 0);
 1176|    159|        pData->downmixIdRequestIndex = downmixIdIndex;
 1177|    159|        pData->pInst = pDrcInstructionUniDrc;
 1178|    159|        pData->selectionFlag =
 1179|    159|            1; /* signal pre-selection step dealing with drcSetTargetLoudness */
 1180|       |
 1181|    159|        if (hSelProcInput->loudnessNormalizationOn) {
  ------------------
  |  Branch (1181:13): [True: 159, False: 0]
  ------------------
 1182|    159|          pData->outputPeakLevel =
 1183|    159|              hSelProcInput->targetLoudness -
 1184|    159|              (((FIXP_DBL)pData->pInst->drcSetTargetLoudnessValueUpper)
 1185|    159|               << (DFRACT_BITS - 1 - 7));
  ------------------
  |  |  113|    159|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1186|    159|        } else {
 1187|      0|          pData->outputPeakLevel = (FIXP_DBL)0;
 1188|      0|        }
 1189|  4.01k|      } else {
 1190|  4.01k|        if ((!hSelProcInput->loudnessNormalizationOn) ||
  ------------------
  |  Branch (1190:13): [True: 0, False: 4.01k]
  ------------------
 1191|  4.01k|            (!pDrcInstructionUniDrc->drcSetTargetLoudnessPresent) ||
  ------------------
  |  Branch (1191:13): [True: 3.94k, False: 69]
  ------------------
 1192|     69|            (hSelProcInput->loudnessNormalizationOn &&
  ------------------
  |  Branch (1192:14): [True: 69, False: 0]
  ------------------
 1193|     69|             _targetLoudnessInRange(pDrcInstructionUniDrc,
  ------------------
  |  Branch (1193:14): [True: 0, False: 69]
  ------------------
 1194|  3.94k|                                    hSelProcInput->targetLoudness))) {
 1195|  3.94k|          addToCandidate = 1;
 1196|  3.94k|        }
 1197|  4.01k|      }
 1198|  4.17k|    } else {
 1199|  1.29k|      addToCandidate = 1;
 1200|  1.29k|    }
 1201|       |
 1202|  5.47k|    if (addToCandidate) {
  ------------------
  |  Branch (1202:9): [True: 5.24k, False: 228]
  ------------------
 1203|  5.24k|      DRCDEC_SELECTION_DATA* pData =
 1204|  5.24k|          _drcdec_selection_addNew(pCandidatesPotential);
 1205|  5.24k|      if (pData == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1205:11): [True: 0, False: 5.24k]
  ------------------
 1206|       |
 1207|  5.24k|      _setSelectionDataInfo(pData, loudness, loudnessNormalizationGainDb,
 1208|  5.24k|                            hSelProcInput->loudnessNormalizationGainDbMax,
 1209|  5.24k|                            loudnessDeviationMax, signalPeakLevel,
 1210|  5.24k|                            hSelProcInput->outputPeakLevelMax, 0);
 1211|  5.24k|      pData->downmixIdRequestIndex = downmixIdIndex;
 1212|  5.24k|      pData->pInst = pDrcInstructionUniDrc;
 1213|  5.24k|      pData->selectionFlag = 0;
 1214|  5.24k|    }
 1215|  5.47k|  } else {
 1216|      0|    if (pDrcInstructionUniDrc->drcSetId < 0) {
  ------------------
  |  Branch (1216:9): [True: 0, False: 0]
  ------------------
 1217|      0|      DRCDEC_SELECTION_DATA* pData =
 1218|      0|          _drcdec_selection_addNew(pCandidatesSelected);
 1219|      0|      if (pData == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1219:11): [True: 0, False: 0]
  ------------------
 1220|       |
 1221|      0|      _setSelectionDataInfo(pData, loudness, loudnessNormalizationGainDb,
 1222|      0|                            hSelProcInput->loudnessNormalizationGainDbMax,
 1223|      0|                            loudnessDeviationMax, signalPeakLevel,
 1224|      0|                            hSelProcInput->outputPeakLevelMax, 1);
 1225|       |
 1226|      0|      pData->downmixIdRequestIndex = downmixIdIndex;
 1227|      0|      pData->pInst = pDrcInstructionUniDrc;
 1228|      0|      pData->selectionFlag = 0;
 1229|      0|    }
 1230|      0|  }
 1231|       |
 1232|  5.47k|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1233|  5.47k|}
drcDec_selectionProcess.cpp:_ZL12_getLoudnessP17LOUDNESS_INFO_SETi25METHOD_DEFINITION_REQUEST26MEASUREMENT_SYSTEM_REQUESTiiiPiS3_:
 2650|  5.49k|{
 2651|  5.49k|  int index;
 2652|       |
 2653|  5.49k|  LOUDNESS_INFO* pLoudnessInfo = NULL;
 2654|  5.49k|  VALUE_ORDER valueOrder;
 2655|       |
 2656|       |  /* map MDR_DEFAULT to MDR_PROGRAM_LOUDNESS */
 2657|  5.49k|  METHOD_DEFINITION_REQUEST requestedMethodDefinition =
 2658|  5.49k|      measurementMethodRequested < MDR_ANCHOR_LOUDNESS ? MDR_PROGRAM_LOUDNESS
  ------------------
  |  Branch (2658:7): [True: 0, False: 5.49k]
  ------------------
 2659|  5.49k|                                                       : MDR_ANCHOR_LOUDNESS;
 2660|       |
 2661|  5.49k|  if (measurementMethodRequested > MDR_ANCHOR_LOUDNESS) {
  ------------------
  |  Branch (2661:7): [True: 0, False: 5.49k]
  ------------------
 2662|      0|    return DRCDEC_SELECTION_PROCESS_NOT_OK;
 2663|      0|  }
 2664|       |
 2665|  5.49k|  _initValueOrder(&valueOrder);
 2666|       |
 2667|  5.49k|  *pLoudness = UNDEFINED_LOUDNESS_VALUE;
  ------------------
  |  |  114|  5.49k|#define UNDEFINED_LOUDNESS_VALUE (FIXP_DBL)(MAXVAL_DBL - 1)
  |  |  ------------------
  |  |  |  |  156|  5.49k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  ------------------
 2668|  5.49k|  *pLoudnessNormalizationGain = (FIXP_DBL)0;
 2669|       |
 2670|  5.49k|  if (drcSetId < 0) {
  ------------------
  |  Branch (2670:7): [True: 3.92k, False: 1.56k]
  ------------------
 2671|  3.92k|    drcSetId = 0;
 2672|  3.92k|  }
 2673|       |
 2674|  5.49k|  pLoudnessInfo = _getApplicableLoudnessInfoStructure(
 2675|  5.49k|      hLoudnessInfoSet, drcSetId, downmixIdRequested, albumMode);
 2676|       |
 2677|  5.49k|  if (albumMode && (pLoudnessInfo == NULL)) {
  ------------------
  |  Branch (2677:7): [True: 0, False: 5.49k]
  |  Branch (2677:20): [True: 0, False: 0]
  ------------------
 2678|      0|    pLoudnessInfo = _getApplicableLoudnessInfoStructure(
 2679|      0|        hLoudnessInfoSet, drcSetId, downmixIdRequested, 0);
 2680|      0|  }
 2681|       |
 2682|  5.49k|  if (pLoudnessInfo == NULL) {
  ------------------
  |  Branch (2682:7): [True: 4.59k, False: 899]
  ------------------
 2683|  4.59k|    return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 2684|  4.59k|  }
 2685|       |
 2686|    899|  index = -1;
 2687|       |
 2688|  1.60k|  do {
 2689|  1.60k|    index = _findMethodDefinition(pLoudnessInfo, requestedMethodDefinition,
 2690|  1.60k|                                  index + 1);
 2691|       |
 2692|  1.60k|    if (index >= 0) {
  ------------------
  |  Branch (2692:9): [True: 705, False: 899]
  ------------------
 2693|    705|      _getMethodValue(
 2694|    705|          &valueOrder, pLoudnessInfo->loudnessMeasurement[index].methodValue,
 2695|    705|          pLoudnessInfo->loudnessMeasurement[index].measurementSystem,
 2696|    705|          measurementSystemRequested);
 2697|    705|    }
 2698|  1.60k|  } while (index >= 0);
  ------------------
  |  Branch (2698:12): [True: 705, False: 899]
  ------------------
 2699|       |
 2700|       |  /* repeat with other method definition */
 2701|    899|  if (valueOrder.order == -1) {
  ------------------
  |  Branch (2701:7): [True: 550, False: 349]
  ------------------
 2702|    550|    index = -1;
 2703|       |
 2704|  1.55k|    do {
 2705|  1.55k|      index = _findMethodDefinition(
 2706|  1.55k|          pLoudnessInfo,
 2707|  1.55k|          requestedMethodDefinition == MDR_PROGRAM_LOUDNESS
  ------------------
  |  Branch (2707:11): [True: 0, False: 1.55k]
  ------------------
 2708|  1.55k|              ? MDR_ANCHOR_LOUDNESS
 2709|  1.55k|              : MDR_PROGRAM_LOUDNESS,
 2710|  1.55k|          index + 1);
 2711|       |
 2712|  1.55k|      if (index >= 0) {
  ------------------
  |  Branch (2712:11): [True: 1.00k, False: 550]
  ------------------
 2713|  1.00k|        _getMethodValue(
 2714|  1.00k|            &valueOrder, pLoudnessInfo->loudnessMeasurement[index].methodValue,
 2715|  1.00k|            pLoudnessInfo->loudnessMeasurement[index].measurementSystem,
 2716|  1.00k|            measurementSystemRequested);
 2717|  1.00k|      }
 2718|  1.55k|    } while (index >= 0);
  ------------------
  |  Branch (2718:14): [True: 1.00k, False: 550]
  ------------------
 2719|    550|  }
 2720|       |
 2721|    899|  if (valueOrder.order == -1) {
  ------------------
  |  Branch (2721:7): [True: 17, False: 882]
  ------------------
 2722|     17|    return DRCDEC_SELECTION_PROCESS_NOT_OK;
 2723|    882|  } else {
 2724|    882|    *pLoudnessNormalizationGain = targetLoudness - valueOrder.value;
 2725|    882|    *pLoudness = valueOrder.value;
 2726|    882|  }
 2727|       |
 2728|    882|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 2729|    899|}
drcDec_selectionProcess.cpp:_ZL35_getApplicableLoudnessInfoStructureP17LOUDNESS_INFO_SETiii:
 2529|  5.49k|    int downmixIdRequested, int albumMode) {
 2530|  5.49k|  LOUDNESS_INFO* pLoudnessInfo = NULL;
 2531|       |
 2532|       |  /* default value */
 2533|  5.49k|  pLoudnessInfo = _getLoudnessInfoStructure(hLoudnessInfoSet, drcSetId,
 2534|  5.49k|                                            downmixIdRequested, albumMode);
 2535|       |
 2536|       |  /* fallback values */
 2537|  5.49k|  if (pLoudnessInfo == NULL) {
  ------------------
  |  Branch (2537:7): [True: 5.23k, False: 256]
  ------------------
 2538|  5.23k|    pLoudnessInfo =
 2539|  5.23k|        _getLoudnessInfoStructure(hLoudnessInfoSet, drcSetId, 0x7F, albumMode);
 2540|  5.23k|  }
 2541|       |
 2542|  5.49k|  if (pLoudnessInfo == NULL) {
  ------------------
  |  Branch (2542:7): [True: 5.09k, False: 394]
  ------------------
 2543|  5.09k|    pLoudnessInfo = _getLoudnessInfoStructure(hLoudnessInfoSet, 0x3F,
 2544|  5.09k|                                              downmixIdRequested, albumMode);
 2545|  5.09k|  }
 2546|       |
 2547|  5.49k|  if (pLoudnessInfo == NULL) {
  ------------------
  |  Branch (2547:7): [True: 4.91k, False: 572]
  ------------------
 2548|  4.91k|    pLoudnessInfo = _getLoudnessInfoStructure(hLoudnessInfoSet, 0,
 2549|  4.91k|                                              downmixIdRequested, albumMode);
 2550|  4.91k|  }
 2551|       |
 2552|  5.49k|  if (pLoudnessInfo == NULL) {
  ------------------
  |  Branch (2552:7): [True: 4.78k, False: 706]
  ------------------
 2553|  4.78k|    pLoudnessInfo =
 2554|  4.78k|        _getLoudnessInfoStructure(hLoudnessInfoSet, 0x3F, 0x7F, albumMode);
 2555|  4.78k|  }
 2556|       |
 2557|  5.49k|  if (pLoudnessInfo == NULL) {
  ------------------
  |  Branch (2557:7): [True: 4.67k, False: 816]
  ------------------
 2558|  4.67k|    pLoudnessInfo =
 2559|  4.67k|        _getLoudnessInfoStructure(hLoudnessInfoSet, 0, 0x7F, albumMode);
 2560|  4.67k|  }
 2561|       |
 2562|  5.49k|  if (pLoudnessInfo == NULL) {
  ------------------
  |  Branch (2562:7): [True: 4.59k, False: 899]
  ------------------
 2563|  4.59k|    pLoudnessInfo =
 2564|  4.59k|        _getLoudnessInfoStructure(hLoudnessInfoSet, drcSetId, 0, albumMode);
 2565|  4.59k|  }
 2566|       |
 2567|  5.49k|  if (pLoudnessInfo == NULL) {
  ------------------
  |  Branch (2567:7): [True: 4.59k, False: 899]
  ------------------
 2568|  4.59k|    pLoudnessInfo =
 2569|  4.59k|        _getLoudnessInfoStructure(hLoudnessInfoSet, 0x3F, 0, albumMode);
 2570|  4.59k|  }
 2571|       |
 2572|  5.49k|  if (pLoudnessInfo == NULL) {
  ------------------
  |  Branch (2572:7): [True: 4.59k, False: 899]
  ------------------
 2573|  4.59k|    pLoudnessInfo =
 2574|  4.59k|        _getLoudnessInfoStructure(hLoudnessInfoSet, 0, 0, albumMode);
 2575|  4.59k|  }
 2576|       |
 2577|  5.49k|  return pLoudnessInfo;
 2578|  5.49k|}
drcDec_selectionProcess.cpp:_ZL25_getLoudnessInfoStructureP17LOUDNESS_INFO_SETiii:
 2498|  43.9k|    int albumMode) {
 2499|  43.9k|  int i, j;
 2500|  43.9k|  int count;
 2501|       |
 2502|  43.9k|  LOUDNESS_INFO* pLoudnessInfo = NULL;
 2503|       |
 2504|  43.9k|  if (albumMode) {
  ------------------
  |  Branch (2504:7): [True: 0, False: 43.9k]
  ------------------
 2505|      0|    count = hLoudnessInfoSet->loudnessInfoAlbumCount;
 2506|      0|    pLoudnessInfo = hLoudnessInfoSet->loudnessInfoAlbum;
 2507|  43.9k|  } else {
 2508|  43.9k|    count = hLoudnessInfoSet->loudnessInfoCount;
 2509|  43.9k|    pLoudnessInfo = hLoudnessInfoSet->loudnessInfo;
 2510|  43.9k|  }
 2511|       |
 2512|  94.4k|  for (i = 0; i < count; i++) {
  ------------------
  |  Branch (2512:15): [True: 51.3k, False: 43.0k]
  ------------------
 2513|  51.3k|    if ((pLoudnessInfo[i].drcSetId == drcSetId) &&
  ------------------
  |  Branch (2513:9): [True: 19.7k, False: 31.5k]
  ------------------
 2514|  19.7k|        (pLoudnessInfo[i].downmixId == downmixId)) {
  ------------------
  |  Branch (2514:9): [True: 9.00k, False: 10.7k]
  ------------------
 2515|  12.8k|      for (j = 0; j < pLoudnessInfo[i].measurementCount; j++) {
  ------------------
  |  Branch (2515:19): [True: 4.76k, False: 8.10k]
  ------------------
 2516|  4.76k|        if ((pLoudnessInfo[i].loudnessMeasurement[j].methodDefinition == 1) ||
  ------------------
  |  Branch (2516:13): [True: 575, False: 4.19k]
  ------------------
 2517|  4.19k|            (pLoudnessInfo[i].loudnessMeasurement[j].methodDefinition == 2)) {
  ------------------
  |  Branch (2517:13): [True: 324, False: 3.86k]
  ------------------
 2518|    899|          return &pLoudnessInfo[i];
 2519|    899|        }
 2520|  4.76k|      }
 2521|  9.00k|    }
 2522|  51.3k|  }
 2523|       |
 2524|  43.0k|  return NULL;
 2525|  43.9k|}
drcDec_selectionProcess.cpp:_ZL15_getMethodValueP11VALUE_ORDERiii:
 2608|  1.70k|    int measurementSystemRequested) {
 2609|  1.70k|  const int rows = 11;
 2610|  1.70k|  const int columns = 12;
 2611|  1.70k|  const int pOrdering[rows][columns] = {
 2612|  1.70k|      {0, 0, 8, 0, 1, 3, 0, 5, 6, 7, 4, 2}, /* default = bonus1770 */
 2613|  1.70k|      {0, 0, 8, 0, 1, 3, 0, 5, 6, 7, 4, 2}, /* bonus1770 */
 2614|  1.70k|      {0, 0, 1, 0, 8, 5, 0, 2, 3, 4, 6, 7}, /* bonusUser */
 2615|  1.70k|      {0, 0, 3, 0, 1, 8, 0, 4, 5, 6, 7, 2}, /* bonusExpert */
 2616|  1.70k|      {0, 0, 5, 0, 1, 3, 0, 8, 6, 7, 4, 2}, /* ResA */
 2617|  1.70k|      {0, 0, 5, 0, 1, 3, 0, 6, 8, 7, 4, 2}, /* ResB */
 2618|  1.70k|      {0, 0, 5, 0, 1, 3, 0, 6, 7, 8, 4, 2}, /* ResC */
 2619|  1.70k|      {0, 0, 3, 0, 1, 7, 0, 4, 5, 6, 8, 2}, /* ResD */
 2620|  1.70k|      {0, 0, 1, 0, 7, 5, 0, 2, 3, 4, 6, 8}, /* ResE */
 2621|  1.70k|      {0, 0, 1, 0, 0, 0, 0, 2, 3, 4, 0, 0}, /* ProgramLoudness */
 2622|  1.70k|      {0, 7, 0, 0, 0, 0, 6, 5, 4, 3, 2, 1}  /* PeakLoudness */
 2623|  1.70k|  };
 2624|       |
 2625|  1.70k|  if (measurementSystemRequested < 0 || measurementSystemRequested >= rows ||
  ------------------
  |  Branch (2625:7): [True: 0, False: 1.70k]
  |  Branch (2625:41): [True: 0, False: 1.70k]
  ------------------
 2626|  1.70k|      measurementSystem < 0 || measurementSystem >= columns) {
  ------------------
  |  Branch (2626:7): [True: 0, False: 1.70k]
  |  Branch (2626:32): [True: 267, False: 1.44k]
  ------------------
 2627|    267|    return DRCDEC_SELECTION_PROCESS_NOT_OK;
 2628|    267|  }
 2629|       |
 2630|  1.44k|  if (pOrdering[measurementSystemRequested][measurementSystem] >
  ------------------
  |  Branch (2630:7): [True: 1.00k, False: 437]
  ------------------
 2631|  1.44k|      pValueOrder->order) {
 2632|  1.00k|    pValueOrder->order =
 2633|  1.00k|        pOrdering[measurementSystemRequested][measurementSystem];
 2634|  1.00k|    pValueOrder->value = value;
 2635|  1.00k|  }
 2636|       |
 2637|  1.44k|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 2638|  1.70k|}
drcDec_selectionProcess.cpp:_ZL19_getSignalPeakLevelP14SEL_PROC_INPUTP14UNI_DRC_CONFIGP17LOUDNESS_INFO_SETP24DRC_INSTRUCTIONS_UNI_DRCiPiS7_19SEL_PROC_CODEC_MODE:
 2910|  5.47k|) {
 2911|  5.47k|  DRCDEC_SELECTION_PROCESS_RETURN retVal = DRCDEC_SELECTION_PROCESS_NO_ERROR;
 2912|       |
 2913|  5.47k|  int albumMode = hSelProcInput->albumMode;
 2914|       |
 2915|  5.47k|  FIXP_DBL signalPeakLevelTmp = (FIXP_DBL)0;
 2916|  5.47k|  FIXP_DBL signalPeakLevel = FIXP_DBL(0);
 2917|       |
 2918|  5.47k|  int dmxId = downmixIdRequested;
 2919|       |
 2920|  5.47k|  int drcSetId = pInst->drcSetId;
 2921|       |
 2922|  5.47k|  if (drcSetId < 0) {
  ------------------
  |  Branch (2922:7): [True: 3.90k, False: 1.56k]
  ------------------
 2923|  3.90k|    drcSetId = 0;
 2924|  3.90k|  }
 2925|       |
 2926|  5.47k|  *explicitPeakInformationPresent = 1;
 2927|       |
 2928|  5.47k|  if (_truePeakLevelIsPresent(hLoudnessInfoSet, drcSetId, dmxId, albumMode)) {
  ------------------
  |  Branch (2928:7): [True: 134, False: 5.34k]
  ------------------
 2929|    134|    retVal = _getTruePeakLevel(hLoudnessInfoSet, drcSetId, dmxId, albumMode,
 2930|    134|                               &signalPeakLevel);
 2931|    134|    if (retVal) return (retVal);
  ------------------
  |  Branch (2931:9): [True: 0, False: 134]
  ------------------
 2932|  5.34k|  } else if (_samplePeakLevelIsPresent(hLoudnessInfoSet, drcSetId, dmxId,
  ------------------
  |  Branch (2932:14): [True: 352, False: 4.98k]
  ------------------
 2933|  5.34k|                                       albumMode)) {
 2934|    352|    retVal = _getSamplePeakLevel(hLoudnessInfoSet, drcSetId, dmxId, albumMode,
 2935|    352|                                 &signalPeakLevel);
 2936|    352|    if (retVal) return (retVal);
  ------------------
  |  Branch (2936:9): [True: 0, False: 352]
  ------------------
 2937|  4.98k|  } else if (_truePeakLevelIsPresent(hLoudnessInfoSet, 0x3F, dmxId,
  ------------------
  |  Branch (2937:14): [True: 162, False: 4.82k]
  ------------------
 2938|  4.98k|                                     albumMode)) {
 2939|    162|    retVal = _getTruePeakLevel(hLoudnessInfoSet, 0x3F, dmxId, albumMode,
 2940|    162|                               &signalPeakLevel);
 2941|    162|    if (retVal) return (retVal);
  ------------------
  |  Branch (2941:9): [True: 0, False: 162]
  ------------------
 2942|  4.82k|  } else if (_samplePeakLevelIsPresent(hLoudnessInfoSet, 0x3F, dmxId,
  ------------------
  |  Branch (2942:14): [True: 472, False: 4.35k]
  ------------------
 2943|  4.82k|                                       albumMode)) {
 2944|    472|    retVal = _getSamplePeakLevel(hLoudnessInfoSet, 0x3F, dmxId, albumMode,
 2945|    472|                                 &signalPeakLevel);
 2946|    472|    if (retVal) return (retVal);
  ------------------
  |  Branch (2946:9): [True: 0, False: 472]
  ------------------
 2947|  4.35k|  } else if (_limiterPeakTargetIsPresent(pInst, drcSetId, dmxId)) {
  ------------------
  |  Branch (2947:14): [True: 177, False: 4.17k]
  ------------------
 2948|    177|    retVal = _getLimiterPeakTarget(pInst, drcSetId, dmxId, &signalPeakLevel);
 2949|    177|    if (retVal) return (retVal);
  ------------------
  |  Branch (2949:9): [True: 0, False: 177]
  ------------------
 2950|  4.17k|  } else if (dmxId != 0) {
  ------------------
  |  Branch (2950:14): [True: 0, False: 4.17k]
  ------------------
 2951|      0|    int downmixInstructionIndex = 0;
 2952|      0|    FIXP_DBL downmixPeakLevelDB = 0;
 2953|       |
 2954|      0|    *explicitPeakInformationPresent = 0;
 2955|       |
 2956|      0|    signalPeakLevelTmp = FIXP_DBL(0);
 2957|       |
 2958|      0|    if (_downmixCoefficientsArePresent(hUniDrcConfig, dmxId,
  ------------------
  |  Branch (2958:9): [True: 0, False: 0]
  ------------------
 2959|      0|                                       &downmixInstructionIndex)) {
 2960|      0|      FIXP_DBL dB_m;
 2961|      0|      int dB_e;
 2962|      0|      FIXP_DBL coeff;
 2963|      0|      FIXP_DBL sum, maxSum; /* e = 7, so it is possible to sum up up to 32
 2964|       |                               downmix coefficients (with e = 2) */
 2965|      0|      int i, j;
 2966|      0|      DOWNMIX_INSTRUCTIONS* pDown =
 2967|      0|          &(hUniDrcConfig->downmixInstructions[downmixInstructionIndex]);
 2968|      0|      FIXP_DBL downmixOffset = getDownmixOffset(
 2969|      0|          pDown, hUniDrcConfig->channelLayout.baseChannelCount); /* e = 1 */
 2970|      0|      maxSum = (FIXP_DBL)0;
 2971|       |
 2972|      0|      for (i = 0; i < pDown->targetChannelCount; i++) {
  ------------------
  |  Branch (2972:19): [True: 0, False: 0]
  ------------------
 2973|      0|        sum = (FIXP_DBL)0;
 2974|      0|        for (j = 0; j < hUniDrcConfig->channelLayout.baseChannelCount; j++) {
  ------------------
  |  Branch (2974:21): [True: 0, False: 0]
  ------------------
 2975|      0|          coeff = pDown->downmixCoefficient[j + i * hUniDrcConfig->channelLayout
 2976|      0|                                                        .baseChannelCount];
 2977|      0|          sum += coeff >> 5;
 2978|      0|        }
 2979|      0|        if (maxSum < sum) maxSum = sum;
  ------------------
  |  Branch (2979:13): [True: 0, False: 0]
  ------------------
 2980|      0|      }
 2981|       |
 2982|      0|      maxSum = fMultDiv2(maxSum, downmixOffset) << 2;
 2983|       |
 2984|      0|      if (maxSum == FL2FXCONST_DBL(1.0f / (float)(1 << 7))) {
  ------------------
  |  |  192|      0|  (FIXP_DBL)(                                                                \
  |  |  193|      0|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 0, Folded]
  |  |  ------------------
  |  |  194|      0|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 0]
  |  |  ------------------
  |  |  195|      0|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|      0|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|      0|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (2984:11): [True: 0, False: 0]
  ------------------
 2985|      0|        downmixPeakLevelDB = (FIXP_DBL)0;
 2986|      0|      } else {
 2987|      0|        dB_m = lin2dB(maxSum, 7, &dB_e); /* e_maxSum = 7 */
 2988|      0|        downmixPeakLevelDB =
 2989|      0|            scaleValue(dB_m, dB_e - 7); /* e_downmixPeakLevelDB = 7 */
 2990|      0|      }
 2991|      0|    }
 2992|       |
 2993|      0|    if (_truePeakLevelIsPresent(hLoudnessInfoSet, drcSetId, 0, albumMode)) {
  ------------------
  |  Branch (2993:9): [True: 0, False: 0]
  ------------------
 2994|      0|      retVal = _getTruePeakLevel(hLoudnessInfoSet, drcSetId, 0, albumMode,
 2995|      0|                                 &signalPeakLevelTmp);
 2996|      0|      if (retVal) return (retVal);
  ------------------
  |  Branch (2996:11): [True: 0, False: 0]
  ------------------
 2997|      0|    } else if (_samplePeakLevelIsPresent(hLoudnessInfoSet, drcSetId, 0,
  ------------------
  |  Branch (2997:16): [True: 0, False: 0]
  ------------------
 2998|      0|                                         albumMode)) {
 2999|      0|      retVal = _getSamplePeakLevel(hLoudnessInfoSet, drcSetId, 0, albumMode,
 3000|      0|                                   &signalPeakLevelTmp);
 3001|      0|      if (retVal) return (retVal);
  ------------------
  |  Branch (3001:11): [True: 0, False: 0]
  ------------------
 3002|      0|    } else if (_truePeakLevelIsPresent(hLoudnessInfoSet, 0x3F, 0, albumMode)) {
  ------------------
  |  Branch (3002:16): [True: 0, False: 0]
  ------------------
 3003|      0|      retVal = _getTruePeakLevel(hLoudnessInfoSet, 0x3F, 0, albumMode,
 3004|      0|                                 &signalPeakLevelTmp);
 3005|      0|      if (retVal) return (retVal);
  ------------------
  |  Branch (3005:11): [True: 0, False: 0]
  ------------------
 3006|      0|    } else if (_samplePeakLevelIsPresent(hLoudnessInfoSet, 0x3F, 0,
  ------------------
  |  Branch (3006:16): [True: 0, False: 0]
  ------------------
 3007|      0|                                         albumMode)) {
 3008|      0|      retVal = _getSamplePeakLevel(hLoudnessInfoSet, 0x3F, 0, albumMode,
 3009|      0|                                   &signalPeakLevelTmp);
 3010|      0|      if (retVal) return (retVal);
  ------------------
  |  Branch (3010:11): [True: 0, False: 0]
  ------------------
 3011|      0|    } else if (_limiterPeakTargetIsPresent(pInst, drcSetId, 0)) {
  ------------------
  |  Branch (3011:16): [True: 0, False: 0]
  ------------------
 3012|      0|      retVal = _getLimiterPeakTarget(pInst, drcSetId, 0, &signalPeakLevelTmp);
 3013|      0|      if (retVal) return (retVal);
  ------------------
  |  Branch (3013:11): [True: 0, False: 0]
  ------------------
 3014|      0|    }
 3015|       |
 3016|      0|    signalPeakLevel = signalPeakLevelTmp + downmixPeakLevelDB;
 3017|  4.17k|  } else {
 3018|  4.17k|    signalPeakLevel = FIXP_DBL(0); /* worst case estimate */
 3019|  4.17k|    *explicitPeakInformationPresent = FIXP_DBL(0);
 3020|  4.17k|  }
 3021|       |
 3022|  5.47k|  *signalPeakLevelOut = signalPeakLevel;
 3023|       |
 3024|  5.47k|  return retVal;
 3025|  5.47k|}
drcDec_selectionProcess.cpp:_ZL23_truePeakLevelIsPresentP17LOUDNESS_INFO_SETiii:
 2734|  10.4k|                                   int drcSetId, int downmixId, int albumMode) {
 2735|  10.4k|  int i;
 2736|  10.4k|  int count;
 2737|  10.4k|  LOUDNESS_INFO* pLoudnessInfo = NULL;
 2738|       |
 2739|  10.4k|  if (albumMode) {
  ------------------
  |  Branch (2739:7): [True: 0, False: 10.4k]
  ------------------
 2740|      0|    count = hLoudnessInfoSet->loudnessInfoAlbumCount;
 2741|      0|    pLoudnessInfo = hLoudnessInfoSet->loudnessInfoAlbum;
 2742|  10.4k|  } else {
 2743|  10.4k|    count = hLoudnessInfoSet->loudnessInfoCount;
 2744|  10.4k|    pLoudnessInfo = hLoudnessInfoSet->loudnessInfo;
 2745|  10.4k|  }
 2746|       |
 2747|  21.7k|  for (i = 0; i < count; i++) {
  ------------------
  |  Branch (2747:15): [True: 11.6k, False: 10.1k]
  ------------------
 2748|  11.6k|    if ((pLoudnessInfo[i].drcSetId == drcSetId) &&
  ------------------
  |  Branch (2748:9): [True: 4.45k, False: 7.15k]
  ------------------
 2749|  4.45k|        (pLoudnessInfo[i].downmixId == downmixId)) {
  ------------------
  |  Branch (2749:9): [True: 2.55k, False: 1.90k]
  ------------------
 2750|  2.55k|      if (pLoudnessInfo[i].truePeakLevelPresent) return 1;
  ------------------
  |  Branch (2750:11): [True: 296, False: 2.26k]
  ------------------
 2751|  2.55k|    }
 2752|  11.6k|  }
 2753|       |
 2754|  10.1k|  return 0;
 2755|  10.4k|}
drcDec_selectionProcess.cpp:_ZL17_getTruePeakLevelP17LOUDNESS_INFO_SETiiiPi:
 2759|    296|    int albumMode, FIXP_DBL* pTruePeakLevel) {
 2760|    296|  int i;
 2761|    296|  int count;
 2762|    296|  LOUDNESS_INFO* pLoudnessInfo = NULL;
 2763|       |
 2764|    296|  if (albumMode) {
  ------------------
  |  Branch (2764:7): [True: 0, False: 296]
  ------------------
 2765|      0|    count = hLoudnessInfoSet->loudnessInfoAlbumCount;
 2766|      0|    pLoudnessInfo = hLoudnessInfoSet->loudnessInfoAlbum;
 2767|    296|  } else {
 2768|    296|    count = hLoudnessInfoSet->loudnessInfoCount;
 2769|    296|    pLoudnessInfo = hLoudnessInfoSet->loudnessInfo;
 2770|    296|  }
 2771|       |
 2772|  1.12k|  for (i = 0; i < count; i++) {
  ------------------
  |  Branch (2772:15): [True: 1.12k, False: 0]
  ------------------
 2773|  1.12k|    if ((pLoudnessInfo[i].drcSetId == drcSetId) &&
  ------------------
  |  Branch (2773:9): [True: 781, False: 340]
  ------------------
 2774|    781|        (pLoudnessInfo[i].downmixId == downmixId)) {
  ------------------
  |  Branch (2774:9): [True: 489, False: 292]
  ------------------
 2775|    489|      if (pLoudnessInfo[i].truePeakLevelPresent) {
  ------------------
  |  Branch (2775:11): [True: 296, False: 193]
  ------------------
 2776|    296|        *pTruePeakLevel = pLoudnessInfo[i].truePeakLevel;
 2777|    296|        return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 2778|    296|      }
 2779|    489|    }
 2780|  1.12k|  }
 2781|       |
 2782|      0|  return DRCDEC_SELECTION_PROCESS_NOT_OK;
 2783|    296|}
drcDec_selectionProcess.cpp:_ZL25_samplePeakLevelIsPresentP17LOUDNESS_INFO_SETiii:
 2787|  10.1k|                                     int albumMode) {
 2788|  10.1k|  int i;
 2789|  10.1k|  int count;
 2790|  10.1k|  LOUDNESS_INFO* pLoudnessInfo = NULL;
 2791|       |
 2792|  10.1k|  if (albumMode) {
  ------------------
  |  Branch (2792:7): [True: 0, False: 10.1k]
  ------------------
 2793|      0|    count = hLoudnessInfoSet->loudnessInfoAlbumCount;
 2794|      0|    pLoudnessInfo = hLoudnessInfoSet->loudnessInfoAlbum;
 2795|  10.1k|  } else {
 2796|  10.1k|    count = hLoudnessInfoSet->loudnessInfoCount;
 2797|  10.1k|    pLoudnessInfo = hLoudnessInfoSet->loudnessInfo;
 2798|  10.1k|  }
 2799|       |
 2800|  19.6k|  for (i = 0; i < count; i++) {
  ------------------
  |  Branch (2800:15): [True: 10.3k, False: 9.34k]
  ------------------
 2801|  10.3k|    if ((pLoudnessInfo[i].drcSetId == drcSetId) &&
  ------------------
  |  Branch (2801:9): [True: 3.62k, False: 6.71k]
  ------------------
 2802|  3.62k|        (pLoudnessInfo[i].downmixId == downmixId)) {
  ------------------
  |  Branch (2802:9): [True: 2.04k, False: 1.58k]
  ------------------
 2803|  2.04k|      if (pLoudnessInfo[i].samplePeakLevelPresent) return 1;
  ------------------
  |  Branch (2803:11): [True: 824, False: 1.21k]
  ------------------
 2804|  2.04k|    }
 2805|  10.3k|  }
 2806|       |
 2807|  9.34k|  return 0;
 2808|  10.1k|}
drcDec_selectionProcess.cpp:_ZL19_getSamplePeakLevelP17LOUDNESS_INFO_SETiiiPi:
 2813|    824|) {
 2814|    824|  int i;
 2815|    824|  int count;
 2816|    824|  LOUDNESS_INFO* pLoudnessInfo = NULL;
 2817|       |
 2818|    824|  if (albumMode) {
  ------------------
  |  Branch (2818:7): [True: 0, False: 824]
  ------------------
 2819|      0|    count = hLoudnessInfoSet->loudnessInfoAlbumCount;
 2820|      0|    pLoudnessInfo = hLoudnessInfoSet->loudnessInfoAlbum;
 2821|    824|  } else {
 2822|    824|    count = hLoudnessInfoSet->loudnessInfoCount;
 2823|    824|    pLoudnessInfo = hLoudnessInfoSet->loudnessInfo;
 2824|    824|  }
 2825|       |
 2826|  1.86k|  for (i = 0; i < count; i++) {
  ------------------
  |  Branch (2826:15): [True: 1.86k, False: 0]
  ------------------
 2827|  1.86k|    if ((pLoudnessInfo[i].drcSetId == drcSetId) &&
  ------------------
  |  Branch (2827:9): [True: 1.41k, False: 445]
  ------------------
 2828|  1.41k|        (pLoudnessInfo[i].downmixId == downmixId)) {
  ------------------
  |  Branch (2828:9): [True: 1.04k, False: 370]
  ------------------
 2829|  1.04k|      if (pLoudnessInfo[i].samplePeakLevelPresent) {
  ------------------
  |  Branch (2829:11): [True: 824, False: 222]
  ------------------
 2830|    824|        *pSamplePeakLevel = pLoudnessInfo[i].samplePeakLevel;
 2831|    824|        return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 2832|    824|      }
 2833|  1.04k|    }
 2834|  1.86k|  }
 2835|       |
 2836|      0|  return DRCDEC_SELECTION_PROCESS_NOT_OK;
 2837|    824|}
drcDec_selectionProcess.cpp:_ZL27_limiterPeakTargetIsPresentP24DRC_INSTRUCTIONS_UNI_DRCii:
 2840|  4.35k|    DRC_INSTRUCTIONS_UNI_DRC* pDrcInstruction, int drcSetId, int downmixId) {
 2841|  4.35k|  int i;
 2842|       |
 2843|  4.35k|  if (pDrcInstruction->limiterPeakTargetPresent) {
  ------------------
  |  Branch (2843:7): [True: 192, False: 4.16k]
  ------------------
 2844|    192|    if ((pDrcInstruction->downmixId[0] == downmixId) ||
  ------------------
  |  Branch (2844:9): [True: 130, False: 62]
  ------------------
 2845|    143|        (pDrcInstruction->downmixId[0] == 0x7F)) {
  ------------------
  |  Branch (2845:9): [True: 13, False: 49]
  ------------------
 2846|    143|      return 1;
 2847|    143|    }
 2848|       |
 2849|    220|    for (i = 0; i < pDrcInstruction->downmixIdCount; i++) {
  ------------------
  |  Branch (2849:17): [True: 205, False: 15]
  ------------------
 2850|    205|      if (pDrcInstruction->downmixId[i] == downmixId) {
  ------------------
  |  Branch (2850:11): [True: 34, False: 171]
  ------------------
 2851|     34|        return 1;
 2852|     34|      }
 2853|    205|    }
 2854|     49|  }
 2855|       |
 2856|  4.17k|  return 0;
 2857|  4.35k|}
drcDec_selectionProcess.cpp:_ZL21_getLimiterPeakTargetP24DRC_INSTRUCTIONS_UNI_DRCiiPi:
 2861|    177|    FIXP_DBL* pLimiterPeakTarget) {
 2862|    177|  int i;
 2863|       |
 2864|    177|  if (pDrcInstruction->limiterPeakTargetPresent) {
  ------------------
  |  Branch (2864:7): [True: 177, False: 0]
  ------------------
 2865|    177|    if ((pDrcInstruction->downmixId[0] == downmixId) ||
  ------------------
  |  Branch (2865:9): [True: 130, False: 47]
  ------------------
 2866|    143|        (pDrcInstruction->downmixId[0] == 0x7F)) {
  ------------------
  |  Branch (2866:9): [True: 13, False: 34]
  ------------------
 2867|    143|      *pLimiterPeakTarget =
 2868|    143|          ((FX_SGL2FX_DBL(pDrcInstruction->limiterPeakTarget) >> 2));
  ------------------
  |  |  219|    143|  ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|    143|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |                 ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|    143|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
 2869|    143|      return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 2870|    143|    }
 2871|       |
 2872|    146|    for (i = 0; i < pDrcInstruction->downmixIdCount; i++) {
  ------------------
  |  Branch (2872:17): [True: 146, False: 0]
  ------------------
 2873|    146|      if (pDrcInstruction->downmixId[i] == downmixId) {
  ------------------
  |  Branch (2873:11): [True: 34, False: 112]
  ------------------
 2874|     34|        *pLimiterPeakTarget =
 2875|     34|            ((FX_SGL2FX_DBL(pDrcInstruction->limiterPeakTarget) >> 2));
  ------------------
  |  |  219|     34|  ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|     34|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |                 ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|     34|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
 2876|     34|        return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 2877|     34|      }
 2878|    146|    }
 2879|     34|  }
 2880|       |
 2881|      0|  return DRCDEC_SELECTION_PROCESS_NOT_OK;
 2882|    177|}
drcDec_selectionProcess.cpp:_ZL24_drcdec_selection_addNewP16DRCDEC_SELECTION:
 2428|  5.40k|    DRCDEC_SELECTION* pSelection) {
 2429|  5.40k|  if (pSelection->numData < (12 + 1 + 6)) {
  ------------------
  |  Branch (2429:7): [True: 5.40k, False: 0]
  ------------------
 2430|  5.40k|    DRCDEC_SELECTION_DATA* pData = &(pSelection->data[pSelection->numData]);
 2431|  5.40k|    FDKmemset(pData, 0, sizeof(DRCDEC_SELECTION_DATA));
 2432|  5.40k|    pSelection->numData++;
 2433|       |
 2434|  5.40k|    return pData;
 2435|  5.40k|  } else {
 2436|       |    return NULL;
 2437|      0|  }
 2438|  5.40k|}
drcDec_selectionProcess.cpp:_ZL21_setSelectionDataInfoP21DRCDEC_SELECTION_DATAiiiiiii:
 1052|  5.40k|    int applyAdjustment) {
 1053|  5.40k|  FIXP_DBL adjustment = 0; /* e = 8 */
 1054|       |
 1055|       |  /* use e = 8 for all function parameters to prevent overflow */
 1056|  5.40k|  loudness >>= 1;
 1057|  5.40k|  loudnessNormalizationGainDb >>= 1;
 1058|  5.40k|  loudnessNormalizationGainDbMax >>= 1;
 1059|  5.40k|  loudnessDeviationMax >>= 1;
 1060|  5.40k|  signalPeakLevel >>= 1;
 1061|  5.40k|  outputPeakLevelMax >>= 1;
 1062|       |
 1063|  5.40k|  if (applyAdjustment) {
  ------------------
  |  Branch (1063:7): [True: 0, False: 5.40k]
  ------------------
 1064|      0|    adjustment =
 1065|      0|        fMax((FIXP_DBL)0, signalPeakLevel + loudnessNormalizationGainDb -
 1066|      0|                              outputPeakLevelMax);
 1067|      0|    adjustment = fMin(adjustment, fMax((FIXP_DBL)0, loudnessDeviationMax));
 1068|      0|  }
 1069|       |
 1070|  5.40k|  pData->loudnessNormalizationGainDbAdjusted = fMin(
 1071|  5.40k|      loudnessNormalizationGainDb - adjustment, loudnessNormalizationGainDbMax);
 1072|  5.40k|  pData->outputLoudness = loudness + pData->loudnessNormalizationGainDbAdjusted;
 1073|  5.40k|  pData->outputPeakLevel =
 1074|  5.40k|      signalPeakLevel + pData->loudnessNormalizationGainDbAdjusted;
 1075|       |
 1076|       |  /* shift back to e = 7 using saturation */
 1077|  5.40k|  pData->loudnessNormalizationGainDbAdjusted = SATURATE_LEFT_SHIFT(
  ------------------
  |  |  251|  5.40k|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))        \
  |  |  ------------------
  |  |  |  Branch (251:4): [True: 0, False: 5.40k]
  |  |  ------------------
  |  |  252|  5.40k|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                               \
  |  |  253|  5.40k|       : ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (253:10): [True: 0, False: 5.40k]
  |  |  ------------------
  |  |  254|  5.40k|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                      \
  |  |  255|  5.40k|             : ((LONG)(src) << (scale)))
  ------------------
 1078|  5.40k|      pData->loudnessNormalizationGainDbAdjusted, 1, DFRACT_BITS);
 1079|  5.40k|  pData->outputLoudness =
 1080|  5.40k|      SATURATE_LEFT_SHIFT(pData->outputLoudness, 1, DFRACT_BITS);
  ------------------
  |  |  251|  5.40k|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))        \
  |  |  ------------------
  |  |  |  Branch (251:4): [True: 0, False: 5.40k]
  |  |  ------------------
  |  |  252|  5.40k|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                               \
  |  |  253|  5.40k|       : ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (253:10): [True: 0, False: 5.40k]
  |  |  ------------------
  |  |  254|  5.40k|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                      \
  |  |  255|  5.40k|             : ((LONG)(src) << (scale)))
  ------------------
 1081|  5.40k|  pData->outputPeakLevel =
 1082|  5.40k|      SATURATE_LEFT_SHIFT(pData->outputPeakLevel, 1, DFRACT_BITS);
  ------------------
  |  |  251|  5.40k|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))        \
  |  |  ------------------
  |  |  |  Branch (251:4): [True: 0, False: 5.40k]
  |  |  ------------------
  |  |  252|  5.40k|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                               \
  |  |  253|  5.40k|       : ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (253:10): [True: 42, False: 5.36k]
  |  |  ------------------
  |  |  254|  5.40k|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                      \
  |  |  255|  5.40k|             : ((LONG)(src) << (scale)))
  ------------------
 1083|  5.40k|}
drcDec_selectionProcess.cpp:_ZL25_preSelectionRequirement9P14SEL_PROC_INPUTP16DRCDEC_SELECTIONS2_:
 1238|  2.82k|    DRCDEC_SELECTION* pCandidatesSelected) {
 1239|  2.82k|  int i;
 1240|       |
 1241|  8.07k|  for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1241:15): [True: 5.24k, False: 2.82k]
  ------------------
 1242|  5.24k|    DRCDEC_SELECTION_DATA* pCandidate =
 1243|  5.24k|        _drcdec_selection_getAt(pCandidatesPotential, i);
 1244|  5.24k|    if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1244:9): [True: 0, False: 5.24k]
  ------------------
 1245|       |
 1246|  5.24k|    if (pCandidate->outputPeakLevel <= hSelProcInput->outputPeakLevelMax) {
  ------------------
  |  Branch (1246:9): [True: 4.10k, False: 1.14k]
  ------------------
 1247|  4.10k|      if (_drcdec_selection_add(pCandidatesSelected, pCandidate) == NULL)
  ------------------
  |  Branch (1247:11): [True: 0, False: 4.10k]
  ------------------
 1248|      0|        return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1249|  4.10k|    }
 1250|  5.24k|  }
 1251|       |
 1252|  2.82k|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1253|  2.82k|}
drcDec_selectionProcess.cpp:_ZL29_drcSetSelectionAddCandidatesP14SEL_PROC_INPUTP16DRCDEC_SELECTIONS2_:
 1297|    224|    DRCDEC_SELECTION* pCandidatesSelected) {
 1298|    224|  DRCDEC_SELECTION_PROCESS_RETURN retVal = DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1299|    224|  int nHitCount = 0;
 1300|    224|  int i;
 1301|       |
 1302|    224|  DRCDEC_SELECTION_DATA* pCandidate = NULL;
 1303|    224|  DRC_INSTRUCTIONS_UNI_DRC* pDrcInstructionUniDrc = NULL;
 1304|       |
 1305|  1.16k|  for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1305:15): [True: 942, False: 224]
  ------------------
 1306|    942|    pCandidate = _drcdec_selection_getAt(pCandidatesPotential, i);
 1307|    942|    if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1307:9): [True: 0, False: 942]
  ------------------
 1308|       |
 1309|    942|    pDrcInstructionUniDrc = pCandidate->pInst;
 1310|       |
 1311|    942|    if (_targetLoudnessInRange(pDrcInstructionUniDrc,
  ------------------
  |  Branch (1311:9): [True: 54, False: 888]
  ------------------
 1312|    942|                               hSelProcInput->targetLoudness)) {
 1313|     54|      nHitCount++;
 1314|     54|    }
 1315|    942|  }
 1316|       |
 1317|    224|  if (nHitCount != 0) {
  ------------------
  |  Branch (1317:7): [True: 38, False: 186]
  ------------------
 1318|    250|    for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1318:17): [True: 212, False: 38]
  ------------------
 1319|    212|      pCandidate = _drcdec_selection_getAt(pCandidatesPotential, i);
 1320|    212|      if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1320:11): [True: 0, False: 212]
  ------------------
 1321|       |
 1322|    212|      pDrcInstructionUniDrc = pCandidate->pInst;
 1323|       |
 1324|    212|      if (_targetLoudnessInRange(pDrcInstructionUniDrc,
  ------------------
  |  Branch (1324:11): [True: 54, False: 158]
  ------------------
 1325|    212|                                 hSelProcInput->targetLoudness)) {
 1326|     54|        if (_drcdec_selection_add(pCandidatesSelected, pCandidate) == NULL)
  ------------------
  |  Branch (1326:13): [True: 0, False: 54]
  ------------------
 1327|      0|          return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1328|     54|      }
 1329|    212|    }
 1330|    186|  } else {
 1331|    186|    FIXP_DBL lowestPeakLevel = MAXVAL_DBL; /* e = 7 */
  ------------------
  |  |  156|    186|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
 1332|    186|    FIXP_DBL peakLevel = 0;                /* e = 7 */
 1333|       |
 1334|    916|    for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1334:17): [True: 730, False: 186]
  ------------------
 1335|    730|      pCandidate = _drcdec_selection_getAt(pCandidatesPotential, i);
 1336|    730|      if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1336:11): [True: 0, False: 730]
  ------------------
 1337|       |
 1338|    730|      peakLevel = pCandidate->outputPeakLevel;
 1339|       |
 1340|    730|      if (peakLevel < lowestPeakLevel) {
  ------------------
  |  Branch (1340:11): [True: 206, False: 524]
  ------------------
 1341|    206|        lowestPeakLevel = peakLevel;
 1342|    206|      }
 1343|    730|    }
 1344|       |
 1345|       |    /* add all with lowest peak level or max 1dB above */
 1346|    916|    for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1346:17): [True: 730, False: 186]
  ------------------
 1347|    730|      FIXP_DBL loudnessDeviationMax =
 1348|    730|          ((FIXP_DBL)hSelProcInput->loudnessDeviationMax)
 1349|    730|          << (DFRACT_BITS - 1 - 7); /* e = 7 */
  ------------------
  |  |  113|    730|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1350|       |
 1351|    730|      pCandidate = _drcdec_selection_getAt(pCandidatesPotential, i);
 1352|    730|      if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1352:11): [True: 0, False: 730]
  ------------------
 1353|       |
 1354|    730|      peakLevel = pCandidate->outputPeakLevel;
 1355|       |
 1356|    730|      if (peakLevel == lowestPeakLevel ||
  ------------------
  |  Branch (1356:11): [True: 563, False: 167]
  ------------------
 1357|    167|          peakLevel <=
  ------------------
  |  Branch (1357:11): [True: 57, False: 110]
  ------------------
 1358|    620|              lowestPeakLevel + FL2FXCONST_DBL(1.0f / (float)(1 << 7))) {
  ------------------
  |  |  192|    167|  (FIXP_DBL)(                                                                \
  |  |  193|    167|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 167, Folded]
  |  |  ------------------
  |  |  194|    167|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|    167|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    167|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 167]
  |  |  ------------------
  |  |  195|    167|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|    167|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|    167|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|    167|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|    167|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    167|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|    167|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1359|    620|        FIXP_DBL adjustment =
 1360|    620|            fMax((FIXP_DBL)0, peakLevel - hSelProcInput->outputPeakLevelMax);
 1361|    620|        adjustment = fMin(adjustment, fMax((FIXP_DBL)0, loudnessDeviationMax));
 1362|       |
 1363|    620|        pCandidate->loudnessNormalizationGainDbAdjusted -= adjustment;
 1364|    620|        pCandidate->outputPeakLevel -= adjustment;
 1365|    620|        pCandidate->outputLoudness -= adjustment;
 1366|    620|        if (_drcdec_selection_add(pCandidatesSelected, pCandidate) == NULL)
  ------------------
  |  Branch (1366:13): [True: 0, False: 620]
  ------------------
 1367|      0|          return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1368|    620|      }
 1369|    730|    }
 1370|    186|  }
 1371|       |
 1372|    224|  return retVal;
 1373|    224|}
drcDec_selectionProcess.cpp:_ZL23_drcSetRequestSelectionP14SEL_PROC_INPUTP14UNI_DRC_CONFIGP17LOUDNESS_INFO_SETPP16DRCDEC_SELECTIONS7_:
 2307|  2.82k|    DRCDEC_SELECTION** ppCandidatesSelected) {
 2308|  2.82k|  DRCDEC_SELECTION_PROCESS_RETURN retVal;
 2309|  2.82k|  int i;
 2310|       |
 2311|  2.82k|  if (_drcdec_selection_getNumber(*ppCandidatesPotential) == 0) {
  ------------------
  |  Branch (2311:7): [True: 0, False: 2.82k]
  ------------------
 2312|      0|    retVal = DRCDEC_SELECTION_PROCESS_NOT_OK;
 2313|      0|    if (retVal) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (2313:9): [True: 0, False: 0]
  ------------------
 2314|      0|  }
 2315|       |
 2316|  2.82k|  if (hSelProcInput->dynamicRangeControlOn) {
  ------------------
  |  Branch (2316:7): [True: 2.82k, False: 0]
  ------------------
 2317|  2.82k|    if (hSelProcInput->numDrcFeatureRequests == 0) {
  ------------------
  |  Branch (2317:9): [True: 2.82k, False: 0]
  ------------------
 2318|  2.82k|      retVal = _selectDrcSetEffectNone(hUniDrcConfig, *ppCandidatesPotential,
 2319|  2.82k|                                       *ppCandidatesSelected);
 2320|  2.82k|      if (retVal) return (retVal);
  ------------------
  |  Branch (2320:11): [True: 0, False: 2.82k]
  ------------------
 2321|       |
 2322|  2.82k|      if (_drcdec_selection_getNumber(*ppCandidatesSelected) == 0) {
  ------------------
  |  Branch (2322:11): [True: 190, False: 2.63k]
  ------------------
 2323|    190|        DRC_FEATURE_REQUEST fallbackRequest;
 2324|    190|        fallbackRequest.drcEffectType.numRequests = 5;
 2325|    190|        fallbackRequest.drcEffectType.numRequestsDesired = 5;
 2326|    190|        fallbackRequest.drcEffectType.request[0] = DETR_GENERAL_COMPR;
 2327|    190|        fallbackRequest.drcEffectType.request[1] = DETR_NIGHT;
 2328|    190|        fallbackRequest.drcEffectType.request[2] = DETR_NOISY;
 2329|    190|        fallbackRequest.drcEffectType.request[3] = DETR_LIMITED;
 2330|    190|        fallbackRequest.drcEffectType.request[4] = DETR_LOWLEVEL;
 2331|       |
 2332|    190|        retVal = _selectEffectTypeFeature(hUniDrcConfig, fallbackRequest,
 2333|    190|                                          ppCandidatesPotential,
 2334|    190|                                          ppCandidatesSelected);
 2335|    190|        if (retVal) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (2335:13): [True: 20, False: 170]
  ------------------
 2336|    190|      }
 2337|       |
 2338|  2.80k|      _swapSelectionAndClear(ppCandidatesPotential, ppCandidatesSelected);
 2339|  2.80k|    } else {
 2340|      0|      for (i = 0; i < hSelProcInput->numDrcFeatureRequests; i++) {
  ------------------
  |  Branch (2340:19): [True: 0, False: 0]
  ------------------
 2341|      0|        if (hSelProcInput->drcFeatureRequestType[i] == DFRT_EFFECT_TYPE) {
  ------------------
  |  Branch (2341:13): [True: 0, False: 0]
  ------------------
 2342|      0|          retVal = _selectEffectTypeFeature(
 2343|      0|              hUniDrcConfig, hSelProcInput->drcFeatureRequest[i],
 2344|      0|              ppCandidatesPotential, ppCandidatesSelected);
 2345|       |
 2346|      0|          _swapSelectionAndClear(ppCandidatesPotential, ppCandidatesSelected);
 2347|      0|          if (retVal) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (2347:15): [True: 0, False: 0]
  ------------------
 2348|      0|        }
 2349|       |
 2350|      0|        else if (hSelProcInput->drcFeatureRequestType[i] ==
  ------------------
  |  Branch (2350:18): [True: 0, False: 0]
  ------------------
 2351|      0|                 DFRT_DYNAMIC_RANGE) {
 2352|      0|          retVal = _selectDynamicRange(
 2353|      0|              hUniDrcConfig, hLoudnessInfoSet,
 2354|      0|              hSelProcInput->drcFeatureRequest[i],
 2355|      0|              hSelProcInput->downmixIdRequested, hSelProcInput->albumMode,
 2356|      0|              *ppCandidatesPotential, *ppCandidatesSelected);
 2357|       |
 2358|      0|          if (_drcdec_selection_getNumber(*ppCandidatesSelected) > 0) {
  ------------------
  |  Branch (2358:15): [True: 0, False: 0]
  ------------------
 2359|      0|            _swapSelectionAndClear(ppCandidatesPotential, ppCandidatesSelected);
 2360|      0|          }
 2361|      0|          if (retVal) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (2361:15): [True: 0, False: 0]
  ------------------
 2362|      0|        } else if (hSelProcInput->drcFeatureRequestType[i] ==
  ------------------
  |  Branch (2362:20): [True: 0, False: 0]
  ------------------
 2363|      0|                   DFRT_DRC_CHARACTERISTIC) {
 2364|      0|          retVal = _selectDrcCharacteristic(
 2365|      0|              hUniDrcConfig,
 2366|      0|              hSelProcInput->drcFeatureRequest[i].drcCharacteristic,
 2367|      0|              ppCandidatesPotential, ppCandidatesSelected);
 2368|       |
 2369|      0|          if (_drcdec_selection_getNumber(*ppCandidatesSelected) > 0) {
  ------------------
  |  Branch (2369:15): [True: 0, False: 0]
  ------------------
 2370|      0|            _swapSelectionAndClear(ppCandidatesPotential, ppCandidatesSelected);
 2371|      0|          }
 2372|      0|          if (retVal) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (2372:15): [True: 0, False: 0]
  ------------------
 2373|      0|        }
 2374|      0|      }
 2375|      0|    }
 2376|  2.82k|  }
 2377|       |
 2378|  2.80k|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 2379|  2.82k|}
drcDec_selectionProcess.cpp:_ZL23_selectDrcSetEffectNoneP14UNI_DRC_CONFIGP16DRCDEC_SELECTIONS2_:
 1405|  2.82k|    DRCDEC_SELECTION* pCandidatesSelected) {
 1406|  2.82k|  int i;
 1407|       |
 1408|  7.76k|  for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1408:15): [True: 4.93k, False: 2.82k]
  ------------------
 1409|  4.93k|    DRCDEC_SELECTION_DATA* pCandidate =
 1410|  4.93k|        _drcdec_selection_getAt(pCandidatesPotential, i);
 1411|  4.93k|    if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1411:9): [True: 0, False: 4.93k]
  ------------------
 1412|       |
 1413|  4.93k|    if ((pCandidate->pInst->drcSetEffect & 0xff) == 0) {
  ------------------
  |  Branch (1413:9): [True: 3.98k, False: 948]
  ------------------
 1414|  3.98k|      if (_drcdec_selection_add(pCandidatesSelected, pCandidate) == NULL)
  ------------------
  |  Branch (1414:11): [True: 0, False: 3.98k]
  ------------------
 1415|      0|        return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1416|  3.98k|    }
 1417|  4.93k|  }
 1418|       |
 1419|  2.82k|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1420|  2.82k|}
drcDec_selectionProcess.cpp:_ZL24_selectEffectTypeFeatureP14UNI_DRC_CONFIG19DRC_FEATURE_REQUESTPP16DRCDEC_SELECTIONS4_:
 1470|    190|    DRCDEC_SELECTION** ppCandidatesSelected) {
 1471|    190|  DRCDEC_SELECTION_PROCESS_RETURN retVal = DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1472|    190|  int i;
 1473|    190|  int desiredEffectTypeFound = 0;
 1474|       |
 1475|  1.04k|  for (i = 0; i < drcFeatureRequest.drcEffectType.numRequestsDesired; i++) {
  ------------------
  |  Branch (1475:15): [True: 870, False: 170]
  ------------------
 1476|    870|    retVal = _selectSingleEffectType(
 1477|    870|        hUniDrcConfig, drcFeatureRequest.drcEffectType.request[i],
 1478|    870|        *ppCandidatesPotential, *ppCandidatesSelected);
 1479|    870|    if (retVal) return (retVal);
  ------------------
  |  Branch (1479:9): [True: 20, False: 850]
  ------------------
 1480|       |
 1481|    850|    if (_drcdec_selection_getNumber(*ppCandidatesSelected)) {
  ------------------
  |  Branch (1481:9): [True: 519, False: 331]
  ------------------
 1482|    519|      desiredEffectTypeFound = 1;
 1483|    519|      _swapSelectionAndClear(ppCandidatesPotential, ppCandidatesSelected);
 1484|    519|    }
 1485|    850|  }
 1486|       |
 1487|    170|  if (!desiredEffectTypeFound) {
  ------------------
  |  Branch (1487:7): [True: 7, False: 163]
  ------------------
 1488|      7|    for (i = drcFeatureRequest.drcEffectType.numRequestsDesired;
 1489|      7|         i < drcFeatureRequest.drcEffectType.numRequests; i++) {
  ------------------
  |  Branch (1489:10): [True: 0, False: 7]
  ------------------
 1490|      0|      retVal = _selectSingleEffectType(
 1491|      0|          hUniDrcConfig, drcFeatureRequest.drcEffectType.request[i],
 1492|      0|          *ppCandidatesPotential, *ppCandidatesSelected);
 1493|      0|      if (retVal) return (retVal);
  ------------------
  |  Branch (1493:11): [True: 0, False: 0]
  ------------------
 1494|       |
 1495|      0|      if (_drcdec_selection_getNumber(*ppCandidatesSelected)) {
  ------------------
  |  Branch (1495:11): [True: 0, False: 0]
  ------------------
 1496|      0|        _swapSelectionAndClear(ppCandidatesPotential, ppCandidatesSelected);
 1497|      0|        break;
 1498|      0|      }
 1499|      0|    }
 1500|      7|  }
 1501|       |
 1502|    170|  _swapSelection(ppCandidatesPotential, ppCandidatesSelected);
 1503|       |
 1504|    170|  return retVal;
 1505|    170|}
drcDec_selectionProcess.cpp:_ZL23_selectSingleEffectTypeP14UNI_DRC_CONFIG23DRC_EFFECT_TYPE_REQUESTP16DRCDEC_SELECTIONS3_:
 1425|    870|    DRCDEC_SELECTION* pCandidatesSelected) {
 1426|    870|  int i;
 1427|    870|  DRCDEC_SELECTION_PROCESS_RETURN retVal = DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1428|    870|  DRC_INSTRUCTIONS_UNI_DRC* pInst;
 1429|    870|  DRC_INSTRUCTIONS_UNI_DRC* pDrcInstructionsDependent;
 1430|       |
 1431|    870|  if (effectType == DETR_NONE) {
  ------------------
  |  Branch (1431:7): [True: 0, False: 870]
  ------------------
 1432|      0|    retVal = _selectDrcSetEffectNone(hUniDrcConfig, pCandidatesPotential,
 1433|      0|                                     pCandidatesSelected);
 1434|      0|    if (retVal) return (retVal);
  ------------------
  |  Branch (1434:9): [True: 0, False: 0]
  ------------------
 1435|    870|  } else {
 1436|    870|    int effectBitPosition = 1 << (effectType - 1);
 1437|       |
 1438|  2.80k|    for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1438:17): [True: 1.95k, False: 850]
  ------------------
 1439|  1.95k|      DRCDEC_SELECTION_DATA* pCandidate =
 1440|  1.95k|          _drcdec_selection_getAt(pCandidatesPotential, i);
 1441|  1.95k|      if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1441:11): [True: 0, False: 1.95k]
  ------------------
 1442|       |
 1443|  1.95k|      pInst = pCandidate->pInst;
 1444|       |
 1445|  1.95k|      if (!pInst->dependsOnDrcSetPresent) {
  ------------------
  |  Branch (1445:11): [True: 1.14k, False: 810]
  ------------------
 1446|  1.14k|        if ((pInst->drcSetEffect & effectBitPosition)) {
  ------------------
  |  Branch (1446:13): [True: 675, False: 472]
  ------------------
 1447|    675|          if (_drcdec_selection_add(pCandidatesSelected, pCandidate) == NULL)
  ------------------
  |  Branch (1447:15): [True: 0, False: 675]
  ------------------
 1448|      0|            return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1449|    675|        }
 1450|  1.14k|      } else {
 1451|    810|        retVal = _dependentDrcInstruction(hUniDrcConfig, pInst,
 1452|    810|                                          &pDrcInstructionsDependent);
 1453|    810|        if (retVal) return (retVal);
  ------------------
  |  Branch (1453:13): [True: 20, False: 790]
  ------------------
 1454|       |
 1455|    790|        if (((pInst->drcSetEffect & effectBitPosition)) ||
  ------------------
  |  Branch (1455:13): [True: 416, False: 374]
  ------------------
 1456|    631|            ((pDrcInstructionsDependent->drcSetEffect & effectBitPosition))) {
  ------------------
  |  Branch (1456:13): [True: 215, False: 159]
  ------------------
 1457|    631|          if (_drcdec_selection_add(pCandidatesSelected, pCandidate) == NULL)
  ------------------
  |  Branch (1457:15): [True: 0, False: 631]
  ------------------
 1458|      0|            return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1459|    631|        }
 1460|    790|      }
 1461|  1.95k|    }
 1462|    870|  }
 1463|       |
 1464|    850|  return retVal;
 1465|    870|}
drcDec_selectionProcess.cpp:_ZL24_dependentDrcInstructionP14UNI_DRC_CONFIGP24DRC_INSTRUCTIONS_UNI_DRCPS2_:
 1377|    810|    DRC_INSTRUCTIONS_UNI_DRC** ppDrcInstructionsDependent) {
 1378|    810|  int i;
 1379|    810|  DRC_INSTRUCTIONS_UNI_DRC* pDependentDrc = NULL;
 1380|       |
 1381|  3.61k|  for (i = 0; i < hUniDrcConfig->drcInstructionsUniDrcCount; i++) {
  ------------------
  |  Branch (1381:15): [True: 3.59k, False: 18]
  ------------------
 1382|  3.59k|    pDependentDrc =
 1383|  3.59k|        (DRC_INSTRUCTIONS_UNI_DRC*)&(hUniDrcConfig->drcInstructionsUniDrc[i]);
 1384|       |
 1385|  3.59k|    if (pDependentDrc->drcSetId == pInst->dependsOnDrcSet) {
  ------------------
  |  Branch (1385:9): [True: 792, False: 2.80k]
  ------------------
 1386|    792|      break;
 1387|    792|    }
 1388|  3.59k|  }
 1389|       |
 1390|    810|  if (i == hUniDrcConfig->drcInstructionsUniDrcCount) {
  ------------------
  |  Branch (1390:7): [True: 18, False: 792]
  ------------------
 1391|     18|    return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1392|     18|  }
 1393|       |
 1394|    792|  if (pDependentDrc->dependsOnDrcSetPresent == 1) {
  ------------------
  |  Branch (1394:7): [True: 2, False: 790]
  ------------------
 1395|      2|    return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1396|      2|  }
 1397|       |
 1398|    790|  *ppDrcInstructionsDependent = pDependentDrc;
 1399|       |
 1400|    790|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1401|    792|}
drcDec_selectionProcess.cpp:_ZL27_drcdec_selection_getNumberP16DRCDEC_SELECTION:
 2456|  58.5k|static int _drcdec_selection_getNumber(DRCDEC_SELECTION* pSelection) {
 2457|  58.5k|  return pSelection->numData;
 2458|  58.5k|}
drcDec_selectionProcess.cpp:_ZL27_drcdec_selection_setNumberP16DRCDEC_SELECTIONi:
 2460|  5.69k|static int _drcdec_selection_setNumber(DRCDEC_SELECTION* pSelection, int num) {
 2461|  5.69k|  if (num >= 0 && num < pSelection->numData) {
  ------------------
  |  Branch (2461:7): [True: 5.69k, False: 0]
  |  Branch (2461:19): [True: 0, False: 5.69k]
  ------------------
 2462|      0|    return pSelection->numData = num;
 2463|  5.69k|  } else {
 2464|  5.69k|    return pSelection->numData;
 2465|  5.69k|  }
 2466|  5.69k|}
drcDec_selectionProcess.cpp:_ZL22_swapSelectionAndClearPP16DRCDEC_SELECTIONS1_:
 2478|  7.95k|                                  DRCDEC_SELECTION** ppCandidatesSelected) {
 2479|  7.95k|  DRCDEC_SELECTION* pTmp = *ppCandidatesPotential;
 2480|  7.95k|  *ppCandidatesPotential = *ppCandidatesSelected;
 2481|  7.95k|  *ppCandidatesSelected = pTmp;
 2482|  7.95k|  _drcdec_selection_clear(*ppCandidatesSelected);
 2483|  7.95k|  return 0;
 2484|  7.95k|}
drcDec_selectionProcess.cpp:_ZL23_drcdec_selection_clearP16DRCDEC_SELECTION:
 2452|  7.95k|static int _drcdec_selection_clear(DRCDEC_SELECTION* pSelection) {
 2453|  7.95k|  return pSelection->numData = 0;
 2454|  7.95k|}
drcDec_selectionProcess.cpp:_ZL14_swapSelectionPP16DRCDEC_SELECTIONS1_:
 2487|  2.87k|                          DRCDEC_SELECTION** ppCandidatesSelected) {
 2488|  2.87k|  DRCDEC_SELECTION* pTmp = *ppCandidatesPotential;
 2489|  2.87k|  *ppCandidatesPotential = *ppCandidatesSelected;
 2490|  2.87k|  *ppCandidatesSelected = pTmp;
 2491|  2.87k|  return 0;
 2492|  2.87k|}

_Z12getDeltaTmini:
  108|  2.84k|int getDeltaTmin(const int sampleRate) {
  109|       |  /* half_ms = round (0.0005 * sampleRate); */
  110|  2.84k|  int half_ms = (sampleRate + 1000) / 2000;
  111|  2.84k|  int deltaTmin = 1;
  112|  2.84k|  if (sampleRate < 1000) {
  ------------------
  |  Branch (112:7): [True: 24, False: 2.82k]
  ------------------
  113|     24|    return DE_NOT_OK;
  114|     24|  }
  115|  14.8k|  while (deltaTmin <= half_ms) {
  ------------------
  |  Branch (115:10): [True: 12.0k, False: 2.82k]
  ------------------
  116|  12.0k|    deltaTmin = deltaTmin << 1;
  117|  12.0k|  }
  118|  2.82k|  return deltaTmin;
  119|  2.84k|}
_Z21selectDrcCoefficientsP14UNI_DRC_CONFIGi:
  122|   810k|    HANDLE_UNI_DRC_CONFIG hUniDrcConfig, const int location) {
  123|   810k|  int n;
  124|   810k|  int c = -1;
  125|  1.94M|  for (n = 0; n < hUniDrcConfig->drcCoefficientsUniDrcCount; n++) {
  ------------------
  |  Branch (125:15): [True: 1.12M, False: 810k]
  ------------------
  126|  1.12M|    if (hUniDrcConfig->drcCoefficientsUniDrc[n].drcLocation == location) {
  ------------------
  |  Branch (126:9): [True: 1.09M, False: 35.6k]
  ------------------
  127|  1.09M|      c = n;
  128|  1.09M|    }
  129|  1.12M|  }
  130|   810k|  if (c >= 0) {
  ------------------
  |  Branch (130:7): [True: 570k, False: 240k]
  ------------------
  131|   570k|    return &(hUniDrcConfig->drcCoefficientsUniDrc[c]);
  132|   570k|  }
  133|   240k|  return NULL; /* possible during bitstream parsing */
  134|   810k|}
_Z21selectDrcInstructionsP14UNI_DRC_CONFIGi:
  137|  19.5k|    HANDLE_UNI_DRC_CONFIG hUniDrcConfig, const int drcSetId) {
  138|  19.5k|  int i;
  139|  60.5k|  for (i = 0; i < hUniDrcConfig->drcInstructionsCountInclVirtual; i++) {
  ------------------
  |  Branch (139:15): [True: 60.5k, False: 0]
  ------------------
  140|  60.5k|    if (hUniDrcConfig->drcInstructionsUniDrc[i].drcSetId == drcSetId) {
  ------------------
  |  Branch (140:9): [True: 19.5k, False: 41.0k]
  ------------------
  141|  19.5k|      return &(hUniDrcConfig->drcInstructionsUniDrc[i]);
  142|  19.5k|    }
  143|  60.5k|  }
  144|      0|  return NULL;
  145|  19.5k|}
_Z25selectDownmixInstructionsP14UNI_DRC_CONFIGi:
  148|  2.36k|    HANDLE_UNI_DRC_CONFIG hUniDrcConfig, const int downmixId) {
  149|  2.36k|  int i;
  150|  5.86k|  for (i = 0; i < hUniDrcConfig->downmixInstructionsCount; i++) {
  ------------------
  |  Branch (150:15): [True: 4.26k, False: 1.60k]
  ------------------
  151|  4.26k|    if (hUniDrcConfig->downmixInstructions[i].downmixId == downmixId) {
  ------------------
  |  Branch (151:9): [True: 762, False: 3.50k]
  ------------------
  152|    762|      return &(hUniDrcConfig->downmixInstructions[i]);
  153|    762|    }
  154|  4.26k|  }
  155|  1.60k|  return NULL;
  156|  2.36k|}
_Z22deriveDrcChannelGroupsiiPKaPK20DUCKING_MODIFICATIONPhPaS5_PS1_:
  168|   794k|{
  169|   794k|  int duckingSequence = -1;
  170|   794k|  int c, n, g, match, idx;
  171|   794k|  FIXP_SGL factor;
  172|   794k|  FIXP_SGL uniqueScaling[8];
  173|       |
  174|  7.14M|  for (g = 0; g < 8; g++) {
  ------------------
  |  Branch (174:15): [True: 6.35M, False: 794k]
  ------------------
  175|  6.35M|    uniqueIndex[g] = -10;
  176|  6.35M|    uniqueScaling[g] = FIXP_SGL(-1.0f);
  177|  6.35M|  }
  178|       |
  179|   794k|  g = 0;
  180|       |
  181|   794k|  if (drcSetEffect & EB_DUCK_OTHER) {
  ------------------
  |  Branch (181:7): [True: 2.12k, False: 792k]
  ------------------
  182|  10.4k|    for (c = 0; c < channelCount; c++) {
  ------------------
  |  Branch (182:17): [True: 8.62k, False: 1.86k]
  ------------------
  183|  8.62k|      match = 0;
  184|  8.62k|      if (c >= 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (184:11): [True: 0, False: 8.62k]
  ------------------
  185|  8.62k|      idx = gainSetIndex[c];
  186|  8.62k|      factor = duckingModificationForChannel[c].duckingScaling;
  187|  8.62k|      if (idx < 0) {
  ------------------
  |  Branch (187:11): [True: 4.77k, False: 3.85k]
  ------------------
  188|  8.17k|        for (n = 0; n < g; n++) {
  ------------------
  |  Branch (188:21): [True: 6.48k, False: 1.68k]
  ------------------
  189|  6.48k|          if (uniqueScaling[n] == factor) {
  ------------------
  |  Branch (189:15): [True: 3.08k, False: 3.39k]
  ------------------
  190|  3.08k|            match = 1;
  191|  3.08k|            groupForChannel[c] = n;
  192|  3.08k|            break;
  193|  3.08k|          }
  194|  6.48k|        }
  195|  4.77k|        if (match == 0) {
  ------------------
  |  Branch (195:13): [True: 1.68k, False: 3.08k]
  ------------------
  196|  1.68k|          if (g >= 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (196:15): [True: 0, False: 1.68k]
  ------------------
  197|  1.68k|          uniqueIndex[g] = idx;
  198|  1.68k|          uniqueScaling[g] = factor;
  199|  1.68k|          groupForChannel[c] = g;
  200|  1.68k|          g++;
  201|  1.68k|        }
  202|  4.77k|      } else {
  203|  3.85k|        if ((duckingSequence > 0) && (duckingSequence != idx)) {
  ------------------
  |  Branch (203:13): [True: 2.15k, False: 1.70k]
  |  Branch (203:38): [True: 261, False: 1.88k]
  ------------------
  204|    261|          return DE_NOT_OK;
  205|    261|        }
  206|  3.59k|        duckingSequence = idx;
  207|  3.59k|        groupForChannel[c] = -1;
  208|  3.59k|      }
  209|  8.62k|    }
  210|  1.86k|    if (duckingSequence == -1) {
  ------------------
  |  Branch (210:9): [True: 720, False: 1.14k]
  ------------------
  211|    720|      return DE_NOT_OK;
  212|    720|    }
  213|   792k|  } else if (drcSetEffect & EB_DUCK_SELF) {
  ------------------
  |  Branch (213:14): [True: 4.75k, False: 787k]
  ------------------
  214|  13.9k|    for (c = 0; c < channelCount; c++) {
  ------------------
  |  Branch (214:17): [True: 9.21k, False: 4.75k]
  ------------------
  215|  9.21k|      match = 0;
  216|  9.21k|      if (c >= 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (216:11): [True: 0, False: 9.21k]
  ------------------
  217|  9.21k|      idx = gainSetIndex[c];
  218|  9.21k|      factor = duckingModificationForChannel[c].duckingScaling;
  219|  9.21k|      if (idx >= 0) {
  ------------------
  |  Branch (219:11): [True: 6.00k, False: 3.21k]
  ------------------
  220|  12.3k|        for (n = 0; n < g; n++) {
  ------------------
  |  Branch (220:21): [True: 8.81k, False: 3.50k]
  ------------------
  221|  8.81k|          if ((uniqueIndex[n] == idx) && (uniqueScaling[n] == factor)) {
  ------------------
  |  Branch (221:15): [True: 3.08k, False: 5.72k]
  |  Branch (221:42): [True: 2.49k, False: 593]
  ------------------
  222|  2.49k|            match = 1;
  223|  2.49k|            groupForChannel[c] = n;
  224|  2.49k|            break;
  225|  2.49k|          }
  226|  8.81k|        }
  227|  6.00k|        if (match == 0) {
  ------------------
  |  Branch (227:13): [True: 3.50k, False: 2.49k]
  ------------------
  228|  3.50k|          if (g >= 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (228:15): [True: 0, False: 3.50k]
  ------------------
  229|  3.50k|          uniqueIndex[g] = idx;
  230|  3.50k|          uniqueScaling[g] = factor;
  231|  3.50k|          groupForChannel[c] = g;
  232|  3.50k|          g++;
  233|  3.50k|        }
  234|  6.00k|      } else {
  235|  3.21k|        groupForChannel[c] = -1;
  236|  3.21k|      }
  237|  9.21k|    }
  238|   787k|  } else { /* no ducking */
  239|  6.33M|    for (c = 0; c < channelCount; c++) {
  ------------------
  |  Branch (239:17): [True: 5.55M, False: 787k]
  ------------------
  240|  5.55M|      if (c >= 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (240:11): [True: 0, False: 5.55M]
  ------------------
  241|  5.55M|      idx = gainSetIndex[c];
  242|  5.55M|      match = 0;
  243|  5.55M|      if (idx >= 0) {
  ------------------
  |  Branch (243:11): [True: 61.8k, False: 5.48M]
  ------------------
  244|   117k|        for (n = 0; n < g; n++) {
  ------------------
  |  Branch (244:21): [True: 83.1k, False: 34.5k]
  ------------------
  245|  83.1k|          if (uniqueIndex[n] == idx) {
  ------------------
  |  Branch (245:15): [True: 27.2k, False: 55.8k]
  ------------------
  246|  27.2k|            match = 1;
  247|  27.2k|            groupForChannel[c] = n;
  248|  27.2k|            break;
  249|  27.2k|          }
  250|  83.1k|        }
  251|  61.8k|        if (match == 0) {
  ------------------
  |  Branch (251:13): [True: 34.5k, False: 27.2k]
  ------------------
  252|  34.5k|          if (g >= 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (252:15): [True: 0, False: 34.5k]
  ------------------
  253|  34.5k|          uniqueIndex[g] = idx;
  254|  34.5k|          groupForChannel[c] = g;
  255|  34.5k|          g++;
  256|  34.5k|        }
  257|  5.48M|      } else {
  258|  5.48M|        groupForChannel[c] = -1;
  259|  5.48M|      }
  260|  5.55M|    }
  261|   787k|  }
  262|   793k|  *nDrcChannelGroups = g;
  263|       |
  264|   793k|  if (drcSetEffect & (EB_DUCK_OTHER | EB_DUCK_SELF)) {
  ------------------
  |  Branch (264:7): [True: 5.90k, False: 787k]
  ------------------
  265|  10.1k|    for (g = 0; g < *nDrcChannelGroups; g++) {
  ------------------
  |  Branch (265:17): [True: 4.28k, False: 5.90k]
  ------------------
  266|  4.28k|      if (drcSetEffect & EB_DUCK_OTHER) {
  ------------------
  |  Branch (266:11): [True: 773, False: 3.50k]
  ------------------
  267|    773|        uniqueIndex[g] = duckingSequence;
  268|    773|      }
  269|  4.28k|      duckingModificationForChannelGroup[g].duckingScaling = uniqueScaling[g];
  270|  4.28k|      if (uniqueScaling[g] != FL2FXCONST_SGL(1.0f / (float)(1 << 2))) {
  ------------------
  |  |  180|  4.28k|  (FIXP_SGL)(                                                                \
  |  |  181|  4.28k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 4.28k, Folded]
  |  |  ------------------
  |  |  182|  4.28k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  4.28k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  4.28k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 4.28k]
  |  |  ------------------
  |  |  183|  4.28k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  4.28k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  4.28k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  4.28k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  4.28k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  4.28k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  4.28k|          : ((((double)(val) * (FRACT_FIX_SCALE)-0.5) <=                     \
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (186:14): [Folded, False: 0]
  |  |  ------------------
  |  |  187|      0|              (double)(MINVAL_SGL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  188|      0|                 ? (SHORT)(MINVAL_SGL_CONST)                                 \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  189|      0|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (270:11): [True: 1.89k, False: 2.39k]
  ------------------
  271|  1.89k|        duckingModificationForChannelGroup[g].duckingScalingPresent = 1;
  272|  2.39k|      } else {
  273|  2.39k|        duckingModificationForChannelGroup[g].duckingScalingPresent = 0;
  274|  2.39k|      }
  275|  4.28k|    }
  276|  5.90k|  }
  277|       |
  278|   793k|  return DE_OK;
  279|   794k|}

_Z11initGainDecP16DRC_GAIN_DECODER:
  187|  2.84k|initGainDec(HANDLE_DRC_GAIN_DECODER hGainDec) {
  188|  2.84k|  int i, j, k;
  189|       |
  190|       |  /* sanity check */
  191|  2.84k|  if (hGainDec->deltaTminDefault > hGainDec->frameSize) return DE_NOT_OK;
  ------------------
  |  Branch (191:7): [True: 0, False: 2.84k]
  ------------------
  192|       |
  193|  11.3k|  for (i = 0; i < MAX_ACTIVE_DRCS; i++) {
  ------------------
  |  |  108|  11.3k|#define MAX_ACTIVE_DRCS 3
  ------------------
  |  Branch (193:15): [True: 8.53k, False: 2.84k]
  ------------------
  194|  76.8k|    for (j = 0; j < 8; j++) {
  ------------------
  |  Branch (194:17): [True: 68.3k, False: 8.53k]
  ------------------
  195|       |      /* use startup node at the beginning */
  196|  68.3k|      hGainDec->activeDrc[i].lnbIndexForChannel[j][0] = 0;
  197|   341k|      for (k = 1; k < NUM_LNB_FRAMES; k++) {
  ------------------
  |  |  111|   341k|  5 /* previous frame + this frame + one frame for DM_REGULAR_DELAY + (maximum \
  ------------------
  |  Branch (197:19): [True: 273k, False: 68.3k]
  ------------------
  198|   273k|        hGainDec->activeDrc[i].lnbIndexForChannel[j][k] = -1;
  199|   273k|      }
  200|  68.3k|    }
  201|  8.53k|  }
  202|       |
  203|  25.6k|  for (j = 0; j < 8; j++) {
  ------------------
  |  Branch (203:15): [True: 22.7k, False: 2.84k]
  ------------------
  204|  22.7k|    hGainDec->channelGain[j] = FL2FXCONST_DBL(1.0f / (float)(1 << 8));
  ------------------
  |  |  192|  22.7k|  (FIXP_DBL)(                                                                \
  |  |  193|  22.7k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 22.7k, Folded]
  |  |  ------------------
  |  |  194|  22.7k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  22.7k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  22.7k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 22.7k]
  |  |  ------------------
  |  |  195|  22.7k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  22.7k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  22.7k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  22.7k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  22.7k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  22.7k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  22.7k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|  22.7k|  }
  206|       |
  207|  48.3k|  for (i = 0; i < 4 * 1024 / 256; i++) {
  ------------------
  |  Branch (207:15): [True: 45.5k, False: 2.84k]
  ------------------
  208|  45.5k|    hGainDec->dummySubbandGains[i] = FL2FXCONST_DBL(1.0f / (float)(1 << 7));
  ------------------
  |  |  192|  45.5k|  (FIXP_DBL)(                                                                \
  |  |  193|  45.5k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 45.5k, Folded]
  |  |  ------------------
  |  |  194|  45.5k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  45.5k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  45.5k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 45.5k]
  |  |  ------------------
  |  |  195|  45.5k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  45.5k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  45.5k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  45.5k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  45.5k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  45.5k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  45.5k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  209|  45.5k|  }
  210|       |
  211|  2.84k|  hGainDec->status = 0; /* startup */
  212|       |
  213|  2.84k|  return DE_OK;
  214|  2.84k|}
_Z18initDrcGainBuffersiP16DRC_GAIN_BUFFERS:
  216|  2.84k|void initDrcGainBuffers(const int frameSize, DRC_GAIN_BUFFERS* drcGainBuffers) {
  217|  2.84k|  int i, c, j;
  218|       |  /* prepare 12 instances of node buffers */
  219|  36.9k|  for (i = 0; i < 12; i++) {
  ------------------
  |  Branch (219:15): [True: 34.1k, False: 2.84k]
  ------------------
  220|   204k|    for (j = 0; j < NUM_LNB_FRAMES; j++) {
  ------------------
  |  |  111|   204k|  5 /* previous frame + this frame + one frame for DM_REGULAR_DELAY + (maximum \
  ------------------
  |  Branch (220:17): [True: 170k, False: 34.1k]
  ------------------
  221|   170k|      drcGainBuffers->linearNodeBuffer[i].nNodes[j] = 1;
  222|   170k|      drcGainBuffers->linearNodeBuffer[i].linearNode[j][0].gainLin =
  223|   170k|          FL2FXCONST_DBL(1.0f / (float)(1 << 7));
  ------------------
  |  |  192|   170k|  (FIXP_DBL)(                                                                \
  |  |  193|   170k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 170k, Folded]
  |  |  ------------------
  |  |  194|   170k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   170k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   170k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 170k]
  |  |  ------------------
  |  |  195|   170k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   170k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   170k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   170k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   170k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   170k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   170k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  224|   170k|      if (j == 0) {
  ------------------
  |  Branch (224:11): [True: 34.1k, False: 136k]
  ------------------
  225|  34.1k|        drcGainBuffers->linearNodeBuffer[i].linearNode[j][0].time =
  226|  34.1k|            0; /* initialize last node with startup node */
  227|   136k|      } else {
  228|   136k|        drcGainBuffers->linearNodeBuffer[i].linearNode[j][0].time =
  229|   136k|            frameSize - 1;
  230|   136k|      }
  231|   170k|    }
  232|  34.1k|  }
  233|       |
  234|       |  /* prepare dummyLnb, a linearNodeBuffer containing a constant gain of 0 dB,
  235|       |   * for the "no DRC processing" case */
  236|  2.84k|  drcGainBuffers->dummyLnb.gainInterpolationType = GIT_LINEAR;
  237|  17.0k|  for (i = 0; i < NUM_LNB_FRAMES; i++) {
  ------------------
  |  |  111|  17.0k|  5 /* previous frame + this frame + one frame for DM_REGULAR_DELAY + (maximum \
  ------------------
  |  Branch (237:15): [True: 14.2k, False: 2.84k]
  ------------------
  238|  14.2k|    drcGainBuffers->dummyLnb.nNodes[i] = 1;
  239|  14.2k|    drcGainBuffers->dummyLnb.linearNode[i][0].gainLin =
  240|  14.2k|        FL2FXCONST_DBL(1.0f / (float)(1 << 7));
  ------------------
  |  |  192|  14.2k|  (FIXP_DBL)(                                                                \
  |  |  193|  14.2k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 14.2k, Folded]
  |  |  ------------------
  |  |  194|  14.2k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  14.2k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  14.2k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 14.2k]
  |  |  ------------------
  |  |  195|  14.2k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  14.2k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  14.2k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  14.2k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  14.2k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  14.2k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  14.2k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  241|  14.2k|    drcGainBuffers->dummyLnb.linearNode[i][0].time = frameSize - 1;
  242|  14.2k|  }
  243|       |
  244|       |  /* prepare channelGain delay line */
  245|  25.6k|  for (c = 0; c < 8; c++) {
  ------------------
  |  Branch (245:15): [True: 22.7k, False: 2.84k]
  ------------------
  246|   136k|    for (i = 0; i < NUM_LNB_FRAMES; i++) {
  ------------------
  |  |  111|   136k|  5 /* previous frame + this frame + one frame for DM_REGULAR_DELAY + (maximum \
  ------------------
  |  Branch (246:17): [True: 113k, False: 22.7k]
  ------------------
  247|   113k|      drcGainBuffers->channelGain[c][i] =
  248|   113k|          FL2FXCONST_DBL(1.0f / (float)(1 << 8));
  ------------------
  |  |  192|   113k|  (FIXP_DBL)(                                                                \
  |  |  193|   113k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 113k, Folded]
  |  |  ------------------
  |  |  194|   113k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   113k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   113k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 113k]
  |  |  ------------------
  |  |  195|   113k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   113k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   113k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   113k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   113k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   113k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   113k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  249|   113k|    }
  250|  22.7k|  }
  251|       |
  252|  2.84k|  drcGainBuffers->lnbPointer = 0;
  253|  2.84k|}
_Z13initActiveDrcP16DRC_GAIN_DECODERP14UNI_DRC_CONFIGii:
  258|  2.99k|              const int downmixIdSelected) {
  259|  2.99k|  int g, isMultiband = 0;
  260|  2.99k|  DRC_ERROR err = DE_OK;
  261|  2.99k|  DRC_INSTRUCTIONS_UNI_DRC* pInst = NULL;
  262|  2.99k|  DRC_COEFFICIENTS_UNI_DRC* pCoef = NULL;
  263|       |
  264|  2.99k|  pInst = selectDrcInstructions(hUniDrcConfig, drcSetIdSelected);
  265|  2.99k|  if (pInst == NULL) {
  ------------------
  |  Branch (265:7): [True: 0, False: 2.99k]
  ------------------
  266|      0|    return DE_NOT_OK;
  267|      0|  }
  268|       |
  269|  2.99k|  if (pInst->drcSetId >= 0) {
  ------------------
  |  Branch (269:7): [True: 500, False: 2.49k]
  ------------------
  270|    500|    pCoef = selectDrcCoefficients(hUniDrcConfig, pInst->drcLocation);
  271|    500|    if (pCoef == NULL) {
  ------------------
  |  Branch (271:9): [True: 0, False: 500]
  ------------------
  272|      0|      return DE_NOT_OK;
  273|      0|    }
  274|       |
  275|    500|    if (pCoef->drcFrameSizePresent) {
  ------------------
  |  Branch (275:9): [True: 41, False: 459]
  ------------------
  276|     41|      if (pCoef->drcFrameSize != hGainDec->frameSize) {
  ------------------
  |  Branch (276:11): [True: 33, False: 8]
  ------------------
  277|     33|        return DE_NOT_OK;
  278|     33|      }
  279|     41|    }
  280|       |
  281|    467|    err = _generateDrcInstructionsDerivedData(
  282|    467|        hGainDec, hUniDrcConfig, pInst, pCoef,
  283|    467|        &(hGainDec->activeDrc[hGainDec->nActiveDrcs]));
  284|    467|    if (err) return err;
  ------------------
  |  Branch (284:9): [True: 0, False: 467]
  ------------------
  285|    467|  }
  286|       |
  287|  2.95k|  hGainDec->activeDrc[hGainDec->nActiveDrcs].pInst = pInst;
  288|  2.95k|  hGainDec->activeDrc[hGainDec->nActiveDrcs].pCoef = pCoef;
  289|       |
  290|  3.26k|  for (g = 0; g < pInst->nDrcChannelGroups; g++) {
  ------------------
  |  Branch (290:15): [True: 303, False: 2.95k]
  ------------------
  291|    303|    if (hGainDec->activeDrc[hGainDec->nActiveDrcs].bandCountForChannelGroup[g] >
  ------------------
  |  Branch (291:9): [True: 12, False: 291]
  ------------------
  292|    303|        1) {
  293|     12|      if (hGainDec->multiBandActiveDrcIndex != -1) {
  ------------------
  |  Branch (293:11): [True: 1, False: 11]
  ------------------
  294|      1|        return DE_NOT_OK;
  295|      1|      }
  296|     11|      isMultiband = 1;
  297|     11|    }
  298|    303|  }
  299|       |
  300|  2.95k|  if (isMultiband) {
  ------------------
  |  Branch (300:7): [True: 5, False: 2.95k]
  ------------------
  301|       |    /* Keep activeDrc index of multiband DRC set */
  302|      5|    hGainDec->multiBandActiveDrcIndex = hGainDec->nActiveDrcs;
  303|      5|  }
  304|       |
  305|  2.95k|  if ((hGainDec->channelGainActiveDrcIndex == -1) &&
  ------------------
  |  Branch (305:7): [True: 2.77k, False: 184]
  ------------------
  306|  2.77k|      (downmixIdSelected == DOWNMIX_ID_BASE_LAYOUT) &&
  ------------------
  |  |  122|  2.77k|#define DOWNMIX_ID_BASE_LAYOUT 0x0
  ------------------
  |  Branch (306:7): [True: 2.66k, False: 110]
  ------------------
  307|  2.66k|      (hUniDrcConfig->drcInstructionsUniDrcCount >
  ------------------
  |  Branch (307:7): [True: 676, False: 1.98k]
  ------------------
  308|  2.66k|       0)) { /* use this activeDrc to apply channelGains */
  309|    676|    hGainDec->channelGainActiveDrcIndex = hGainDec->nActiveDrcs;
  310|    676|  }
  311|       |
  312|  2.95k|  hGainDec->nActiveDrcs++;
  313|  2.95k|  if (hGainDec->nActiveDrcs > MAX_ACTIVE_DRCS) return DE_NOT_OK;
  ------------------
  |  |  108|  2.95k|#define MAX_ACTIVE_DRCS 3
  ------------------
  |  Branch (313:7): [True: 0, False: 2.95k]
  ------------------
  314|       |
  315|  2.95k|  return DE_OK;
  316|  2.95k|}
_Z19initActiveDrcOffsetP16DRC_GAIN_DECODER:
  319|  2.69k|initActiveDrcOffset(HANDLE_DRC_GAIN_DECODER hGainDec) {
  320|  2.69k|  int a, accGainElementCount;
  321|       |
  322|  2.69k|  accGainElementCount = 0;
  323|  5.64k|  for (a = 0; a < hGainDec->nActiveDrcs; a++) {
  ------------------
  |  Branch (323:15): [True: 2.95k, False: 2.68k]
  ------------------
  324|  2.95k|    hGainDec->activeDrc[a].activeDrcOffset = accGainElementCount;
  325|  2.95k|    accGainElementCount += hGainDec->activeDrc[a].gainElementCount;
  326|  2.95k|    if (accGainElementCount > 12) {
  ------------------
  |  Branch (326:9): [True: 6, False: 2.95k]
  ------------------
  327|      6|      hGainDec->nActiveDrcs = a;
  328|      6|      return DE_NOT_OK;
  329|      6|    }
  330|  2.95k|  }
  331|       |
  332|  2.68k|  return DE_OK;
  333|  2.69k|}
drcGainDec_init.cpp:_ZL35_generateDrcInstructionsDerivedDataP16DRC_GAIN_DECODERP14UNI_DRC_CONFIGP24DRC_INSTRUCTIONS_UNI_DRCP24DRC_COEFFICIENTS_UNI_DRCP10ACTIVE_DRC:
  111|    467|    ACTIVE_DRC* pActiveDrc) {
  112|    467|  DRC_ERROR err = DE_OK;
  113|    467|  int g;
  114|    467|  int gainElementCount = 0;
  115|    467|  UCHAR nDrcChannelGroups = 0;
  116|    467|  SCHAR gainSetIndexForChannelGroup[8];
  117|       |
  118|    467|  err = deriveDrcChannelGroups(
  119|    467|      pInst->drcSetEffect, pInst->drcChannelCount, pInst->gainSetIndex,
  120|    467|      pInst->drcSetEffect & (EB_DUCK_OTHER | EB_DUCK_SELF)
  ------------------
  |  Branch (120:7): [True: 282, False: 185]
  ------------------
  121|    467|          ? pInst->duckingModificationForChannel
  122|    467|          : NULL,
  123|    467|      &nDrcChannelGroups, gainSetIndexForChannelGroup,
  124|    467|      pActiveDrc->channelGroupForChannel,
  125|    467|      pInst->drcSetEffect & (EB_DUCK_OTHER | EB_DUCK_SELF)
  ------------------
  |  Branch (125:7): [True: 282, False: 185]
  ------------------
  126|    467|          ? pActiveDrc->duckingModificationForChannelGroup
  127|    467|          : NULL);
  128|    467|  if (err) return (err);
  ------------------
  |  Branch (128:7): [True: 0, False: 467]
  ------------------
  129|       |
  130|       |  /* sanity check */
  131|    467|  if (nDrcChannelGroups != pInst->nDrcChannelGroups) return DE_NOT_OK;
  ------------------
  |  Branch (131:7): [True: 0, False: 467]
  ------------------
  132|    772|  for (g = 0; g < pInst->nDrcChannelGroups; g++) {
  ------------------
  |  Branch (132:15): [True: 305, False: 467]
  ------------------
  133|    305|    if (gainSetIndexForChannelGroup[g] != pInst->gainSetIndexForChannelGroup[g])
  ------------------
  |  Branch (133:9): [True: 0, False: 305]
  ------------------
  134|      0|      return DE_NOT_OK;
  135|    305|  }
  136|       |
  137|    772|  for (g = 0; g < pInst->nDrcChannelGroups; g++) {
  ------------------
  |  Branch (137:15): [True: 305, False: 467]
  ------------------
  138|    305|    int seq = pInst->gainSetIndexForChannelGroup[g];
  139|    305|    if (seq != -1 && (hUniDrcConfig->drcCoefficientsUniDrcCount == 0 ||
  ------------------
  |  Branch (139:9): [True: 305, False: 0]
  |  Branch (139:23): [True: 0, False: 305]
  ------------------
  140|    305|                      seq >= pCoef->gainSetCount)) {
  ------------------
  |  Branch (140:23): [True: 180, False: 125]
  ------------------
  141|    180|      pActiveDrc->channelGroupIsParametricDrc[g] = 1;
  142|    180|    } else {
  143|    125|      pActiveDrc->channelGroupIsParametricDrc[g] = 0;
  144|    125|      if (seq >= pCoef->gainSetCount) {
  ------------------
  |  Branch (144:11): [True: 0, False: 125]
  ------------------
  145|      0|        return DE_NOT_OK;
  146|      0|      }
  147|    125|    }
  148|    305|  }
  149|       |
  150|       |  /* gainElementCount */
  151|    467|  if (pInst->drcSetEffect & (EB_DUCK_OTHER | EB_DUCK_SELF)) {
  ------------------
  |  Branch (151:7): [True: 282, False: 185]
  ------------------
  152|    472|    for (g = 0; g < pInst->nDrcChannelGroups; g++) {
  ------------------
  |  Branch (152:17): [True: 190, False: 282]
  ------------------
  153|    190|      pActiveDrc->bandCountForChannelGroup[g] = 1;
  154|    190|    }
  155|    282|    pActiveDrc->gainElementCount =
  156|    282|        pInst->nDrcChannelGroups; /* one gain element per channel group */
  157|    282|  } else {
  158|    300|    for (g = 0; g < pInst->nDrcChannelGroups; g++) {
  ------------------
  |  Branch (158:17): [True: 115, False: 185]
  ------------------
  159|    115|      if (pActiveDrc->channelGroupIsParametricDrc[g]) {
  ------------------
  |  Branch (159:11): [True: 81, False: 34]
  ------------------
  160|     81|        gainElementCount++;
  161|     81|        pActiveDrc->bandCountForChannelGroup[g] = 1;
  162|     81|      } else {
  163|     34|        int seq, bandCount;
  164|     34|        seq = pInst->gainSetIndexForChannelGroup[g];
  165|     34|        bandCount = pCoef->gainSet[seq].bandCount;
  166|     34|        pActiveDrc->bandCountForChannelGroup[g] = bandCount;
  167|     34|        gainElementCount += bandCount;
  168|     34|      }
  169|    115|    }
  170|    185|    pActiveDrc->gainElementCount = gainElementCount;
  171|    185|  }
  172|       |
  173|       |  /* prepare gainElementForGroup (cumulated sum of bandCountForChannelGroup) */
  174|    467|  pActiveDrc->gainElementForGroup[0] = 0;
  175|    672|  for (g = 1; g < pInst->nDrcChannelGroups; g++) {
  ------------------
  |  Branch (175:15): [True: 205, False: 467]
  ------------------
  176|    205|    pActiveDrc->gainElementForGroup[g] =
  177|    205|        pActiveDrc->gainElementForGroup[g - 1] +
  178|    205|        pActiveDrc->bandCountForChannelGroup[g - 1]; /* index of first gain
  179|       |                                                        sequence in channel
  180|       |                                                        group */
  181|    205|  }
  182|       |
  183|    467|  return DE_OK;
  184|    467|}

FDK_crc.cpp:_ZL15FDKgetValidBitsP13FDK_BITSTREAM:
  577|    698|FDK_INLINE UINT FDKgetValidBits(HANDLE_FDK_BITSTREAM hBitStream) {
  578|    698|  FDKsyncCache(hBitStream);
  579|    698|  return FDK_getValidBits(&hBitStream->hBitBuf);
  580|    698|}
FDK_crc.cpp:_ZL12FDKsyncCacheP13FDK_BITSTREAM:
  452|    797|FDK_INLINE void FDKsyncCache(HANDLE_FDK_BITSTREAM hBitStream) {
  453|    797|  if (hBitStream->ConfigCache == BS_READER)
  ------------------
  |  Branch (453:7): [True: 797, False: 0]
  ------------------
  454|    797|    FDK_pushBack(&hBitStream->hBitBuf, hBitStream->BitsInCache,
  455|    797|                 hBitStream->ConfigCache);
  456|      0|  else if (hBitStream->BitsInCache) /* BS_WRITER */
  ------------------
  |  Branch (456:12): [True: 0, False: 0]
  ------------------
  457|      0|    FDK_put(&hBitStream->hBitBuf, hBitStream->CacheWord,
  458|      0|            hBitStream->BitsInCache);
  459|       |
  460|    797|  hBitStream->BitsInCache = 0;
  461|    797|  hBitStream->CacheWord = 0;
  462|    797|}
FDK_crc.cpp:_ZL20FDKpushBiDirectionalP13FDK_BITSTREAMi:
  563|     99|                                     const INT numberOfBits) {
  564|     99|  if (numberOfBits >= 0)
  ------------------
  |  Branch (564:7): [True: 0, False: 99]
  ------------------
  565|      0|    FDKpushFor(hBitStream, numberOfBits);
  566|     99|  else
  567|     99|    FDKpushBack(hBitStream, -numberOfBits);
  568|     99|}
FDK_crc.cpp:_ZL11FDKpushBackP13FDK_BITSTREAMj:
  539|     99|                            const UINT numberOfBits) {
  540|     99|  if ((hBitStream->BitsInCache + numberOfBits) < CACHE_BITS &&
  ------------------
  |  |  111|    198|#define CACHE_BITS 32
  ------------------
  |  Branch (540:7): [True: 90, False: 9]
  ------------------
  541|     90|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (541:7): [True: 90, False: 0]
  ------------------
  542|     90|    hBitStream->BitsInCache += numberOfBits;
  543|     90|    FDKsyncCache(hBitStream); /* sync cache to avoid invalid cache */
  544|     90|  } else {
  545|      9|    FDKsyncCache(hBitStream);
  546|      9|    FDK_pushBack(&hBitStream->hBitBuf, numberOfBits, hBitStream->ConfigCache);
  547|      9|  }
  548|     99|}
FDK_crc.cpp:_ZL10FDKreadBitP13FDK_BITSTREAM:
  228|  2.03k|FDK_INLINE UINT FDKreadBit(HANDLE_FDK_BITSTREAM hBitStream) {
  229|  2.03k|  if (!hBitStream->BitsInCache) {
  ------------------
  |  Branch (229:7): [True: 110, False: 1.92k]
  ------------------
  230|    110|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  231|    110|    hBitStream->BitsInCache = CACHE_BITS - 1;
  ------------------
  |  |  111|    110|#define CACHE_BITS 32
  ------------------
  232|    110|    return hBitStream->CacheWord >> 31;
  233|    110|  }
  234|  1.92k|  hBitStream->BitsInCache--;
  235|       |
  236|  1.92k|  return (hBitStream->CacheWord >> hBitStream->BitsInCache) & 1;
  237|  2.03k|}
aacdecoder_lib.cpp:_ZL16FDKinitBitStreamP13FDK_BITSTREAMPhjj10FDK_BS_CFG:
  166|  4.07k|                      FDK_BS_CFG config = BS_READER) {
  167|  4.07k|  FDK_InitBitBuffer(&hBitStream->hBitBuf, pBuffer, bufSize, validBits);
  168|       |
  169|       |  /* init cache */
  170|  4.07k|  hBitStream->CacheWord = hBitStream->BitsInCache = 0;
  171|  4.07k|  hBitStream->ConfigCache = config;
  172|  4.07k|}
drcDec_reader.cpp:_ZL11FDKreadBitsP13FDK_BITSTREAMj:
  211|  26.1M|                            const UINT numberOfBits) {
  212|  26.1M|  UINT bits = 0;
  213|  26.1M|  INT missingBits = (INT)numberOfBits - (INT)hBitStream->BitsInCache;
  214|       |
  215|  26.1M|  FDK_ASSERT(numberOfBits <= 32);
  ------------------
  |  |  221|  26.1M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 26.1M, False: 0]
  ------------------
  216|  26.1M|  if (missingBits > 0) {
  ------------------
  |  Branch (216:7): [True: 3.43M, False: 22.7M]
  ------------------
  217|  3.43M|    if (missingBits != 32) bits = hBitStream->CacheWord << missingBits;
  ------------------
  |  Branch (217:9): [True: 3.43M, False: 0]
  ------------------
  218|  3.43M|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  219|  3.43M|    hBitStream->BitsInCache += CACHE_BITS;
  ------------------
  |  |  111|  3.43M|#define CACHE_BITS 32
  ------------------
  220|  3.43M|  }
  221|       |
  222|  26.1M|  hBitStream->BitsInCache -= numberOfBits;
  223|       |
  224|  26.1M|  return (bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) &
  225|  26.1M|         BitMask[numberOfBits];
  226|  26.1M|}
drcDec_reader.cpp:_ZL10FDKpushForP13FDK_BITSTREAMj:
  551|   841k|                           const UINT numberOfBits) {
  552|   841k|  if ((hBitStream->BitsInCache > numberOfBits) &&
  ------------------
  |  Branch (552:7): [True: 518k, False: 322k]
  ------------------
  553|   518k|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (553:7): [True: 518k, False: 0]
  ------------------
  554|   518k|    hBitStream->BitsInCache -= numberOfBits;
  555|   518k|  } else {
  556|   322k|    FDKsyncCache(hBitStream);
  557|   322k|    FDK_pushForward(&hBitStream->hBitBuf, numberOfBits,
  558|   322k|                    hBitStream->ConfigCache);
  559|   322k|  }
  560|   841k|}
drcDec_reader.cpp:_ZL12FDKsyncCacheP13FDK_BITSTREAM:
  452|   383k|FDK_INLINE void FDKsyncCache(HANDLE_FDK_BITSTREAM hBitStream) {
  453|   383k|  if (hBitStream->ConfigCache == BS_READER)
  ------------------
  |  Branch (453:7): [True: 383k, False: 0]
  ------------------
  454|   383k|    FDK_pushBack(&hBitStream->hBitBuf, hBitStream->BitsInCache,
  455|   383k|                 hBitStream->ConfigCache);
  456|      0|  else if (hBitStream->BitsInCache) /* BS_WRITER */
  ------------------
  |  Branch (456:12): [True: 0, False: 0]
  ------------------
  457|      0|    FDK_put(&hBitStream->hBitBuf, hBitStream->CacheWord,
  458|      0|            hBitStream->BitsInCache);
  459|       |
  460|   383k|  hBitStream->BitsInCache = 0;
  461|   383k|  hBitStream->CacheWord = 0;
  462|   383k|}
drcDec_reader.cpp:_ZL15FDKgetValidBitsP13FDK_BITSTREAM:
  577|  60.9k|FDK_INLINE UINT FDKgetValidBits(HANDLE_FDK_BITSTREAM hBitStream) {
  578|  60.9k|  FDKsyncCache(hBitStream);
  579|  60.9k|  return FDK_getValidBits(&hBitStream->hBitBuf);
  580|  60.9k|}
env_extr.cpp:_ZL11FDKreadBitsP13FDK_BITSTREAMj:
  211|  9.82k|                            const UINT numberOfBits) {
  212|  9.82k|  UINT bits = 0;
  213|  9.82k|  INT missingBits = (INT)numberOfBits - (INT)hBitStream->BitsInCache;
  214|       |
  215|  9.82k|  FDK_ASSERT(numberOfBits <= 32);
  ------------------
  |  |  221|  9.82k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 9.82k, False: 0]
  ------------------
  216|  9.82k|  if (missingBits > 0) {
  ------------------
  |  Branch (216:7): [True: 1.14k, False: 8.68k]
  ------------------
  217|  1.14k|    if (missingBits != 32) bits = hBitStream->CacheWord << missingBits;
  ------------------
  |  Branch (217:9): [True: 1.14k, False: 0]
  ------------------
  218|  1.14k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  219|  1.14k|    hBitStream->BitsInCache += CACHE_BITS;
  ------------------
  |  |  111|  1.14k|#define CACHE_BITS 32
  ------------------
  220|  1.14k|  }
  221|       |
  222|  9.82k|  hBitStream->BitsInCache -= numberOfBits;
  223|       |
  224|  9.82k|  return (bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) &
  225|  9.82k|         BitMask[numberOfBits];
  226|  9.82k|}
env_extr.cpp:_ZL10FDKpushForP13FDK_BITSTREAMj:
  551|  2.82k|                           const UINT numberOfBits) {
  552|  2.82k|  if ((hBitStream->BitsInCache > numberOfBits) &&
  ------------------
  |  Branch (552:7): [True: 2.47k, False: 352]
  ------------------
  553|  2.47k|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (553:7): [True: 2.47k, False: 0]
  ------------------
  554|  2.47k|    hBitStream->BitsInCache -= numberOfBits;
  555|  2.47k|  } else {
  556|    352|    FDKsyncCache(hBitStream);
  557|    352|    FDK_pushForward(&hBitStream->hBitBuf, numberOfBits,
  558|    352|                    hBitStream->ConfigCache);
  559|    352|  }
  560|  2.82k|}
env_extr.cpp:_ZL12FDKsyncCacheP13FDK_BITSTREAM:
  452|    352|FDK_INLINE void FDKsyncCache(HANDLE_FDK_BITSTREAM hBitStream) {
  453|    352|  if (hBitStream->ConfigCache == BS_READER)
  ------------------
  |  Branch (453:7): [True: 352, False: 0]
  ------------------
  454|    352|    FDK_pushBack(&hBitStream->hBitBuf, hBitStream->BitsInCache,
  455|    352|                 hBitStream->ConfigCache);
  456|      0|  else if (hBitStream->BitsInCache) /* BS_WRITER */
  ------------------
  |  Branch (456:12): [True: 0, False: 0]
  ------------------
  457|      0|    FDK_put(&hBitStream->hBitBuf, hBitStream->CacheWord,
  458|      0|            hBitStream->BitsInCache);
  459|       |
  460|    352|  hBitStream->BitsInCache = 0;
  461|    352|  hBitStream->CacheWord = 0;
  462|    352|}
env_extr.cpp:_ZL10FDKreadBitP13FDK_BITSTREAM:
  228|  2.82k|FDK_INLINE UINT FDKreadBit(HANDLE_FDK_BITSTREAM hBitStream) {
  229|  2.82k|  if (!hBitStream->BitsInCache) {
  ------------------
  |  Branch (229:7): [True: 185, False: 2.64k]
  ------------------
  230|    185|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  231|    185|    hBitStream->BitsInCache = CACHE_BITS - 1;
  ------------------
  |  |  111|    185|#define CACHE_BITS 32
  ------------------
  232|    185|    return hBitStream->CacheWord >> 31;
  233|    185|  }
  234|  2.64k|  hBitStream->BitsInCache--;
  235|       |
  236|  2.64k|  return (hBitStream->CacheWord >> hBitStream->BitsInCache) & 1;
  237|  2.82k|}
sac_bitdec.cpp:_ZL11FDKreadBitsP13FDK_BITSTREAMj:
  211|  8.87k|                            const UINT numberOfBits) {
  212|  8.87k|  UINT bits = 0;
  213|  8.87k|  INT missingBits = (INT)numberOfBits - (INT)hBitStream->BitsInCache;
  214|       |
  215|  8.87k|  FDK_ASSERT(numberOfBits <= 32);
  ------------------
  |  |  221|  8.87k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 8.87k, False: 0]
  ------------------
  216|  8.87k|  if (missingBits > 0) {
  ------------------
  |  Branch (216:7): [True: 1.59k, False: 7.27k]
  ------------------
  217|  1.59k|    if (missingBits != 32) bits = hBitStream->CacheWord << missingBits;
  ------------------
  |  Branch (217:9): [True: 1.59k, False: 0]
  ------------------
  218|  1.59k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  219|  1.59k|    hBitStream->BitsInCache += CACHE_BITS;
  ------------------
  |  |  111|  1.59k|#define CACHE_BITS 32
  ------------------
  220|  1.59k|  }
  221|       |
  222|  8.87k|  hBitStream->BitsInCache -= numberOfBits;
  223|       |
  224|  8.87k|  return (bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) &
  225|  8.87k|         BitMask[numberOfBits];
  226|  8.87k|}
sac_bitdec.cpp:_ZL15FDKgetValidBitsP13FDK_BITSTREAM:
  577|  3.88k|FDK_INLINE UINT FDKgetValidBits(HANDLE_FDK_BITSTREAM hBitStream) {
  578|  3.88k|  FDKsyncCache(hBitStream);
  579|  3.88k|  return FDK_getValidBits(&hBitStream->hBitBuf);
  580|  3.88k|}
sac_bitdec.cpp:_ZL12FDKsyncCacheP13FDK_BITSTREAM:
  452|  6.28k|FDK_INLINE void FDKsyncCache(HANDLE_FDK_BITSTREAM hBitStream) {
  453|  6.28k|  if (hBitStream->ConfigCache == BS_READER)
  ------------------
  |  Branch (453:7): [True: 6.28k, False: 0]
  ------------------
  454|  6.28k|    FDK_pushBack(&hBitStream->hBitBuf, hBitStream->BitsInCache,
  455|  6.28k|                 hBitStream->ConfigCache);
  456|      0|  else if (hBitStream->BitsInCache) /* BS_WRITER */
  ------------------
  |  Branch (456:12): [True: 0, False: 0]
  ------------------
  457|      0|    FDK_put(&hBitStream->hBitBuf, hBitStream->CacheWord,
  458|      0|            hBitStream->BitsInCache);
  459|       |
  460|  6.28k|  hBitStream->BitsInCache = 0;
  461|  6.28k|  hBitStream->CacheWord = 0;
  462|  6.28k|}
sac_bitdec.cpp:_ZL20FDKpushBiDirectionalP13FDK_BITSTREAMi:
  563|    707|                                     const INT numberOfBits) {
  564|    707|  if (numberOfBits >= 0)
  ------------------
  |  Branch (564:7): [True: 534, False: 173]
  ------------------
  565|    534|    FDKpushFor(hBitStream, numberOfBits);
  566|    173|  else
  567|    173|    FDKpushBack(hBitStream, -numberOfBits);
  568|    707|}
sac_bitdec.cpp:_ZL11FDKpushBackP13FDK_BITSTREAMj:
  539|    173|                            const UINT numberOfBits) {
  540|    173|  if ((hBitStream->BitsInCache + numberOfBits) < CACHE_BITS &&
  ------------------
  |  |  111|    346|#define CACHE_BITS 32
  ------------------
  |  Branch (540:7): [True: 84, False: 89]
  ------------------
  541|     84|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (541:7): [True: 84, False: 0]
  ------------------
  542|     84|    hBitStream->BitsInCache += numberOfBits;
  543|     84|    FDKsyncCache(hBitStream); /* sync cache to avoid invalid cache */
  544|     89|  } else {
  545|     89|    FDKsyncCache(hBitStream);
  546|     89|    FDK_pushBack(&hBitStream->hBitBuf, numberOfBits, hBitStream->ConfigCache);
  547|     89|  }
  548|    173|}
sac_bitdec.cpp:_ZL10FDKpushForP13FDK_BITSTREAMj:
  551|  1.07k|                           const UINT numberOfBits) {
  552|  1.07k|  if ((hBitStream->BitsInCache > numberOfBits) &&
  ------------------
  |  Branch (552:7): [True: 0, False: 1.07k]
  ------------------
  553|      0|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (553:7): [True: 0, False: 0]
  ------------------
  554|      0|    hBitStream->BitsInCache -= numberOfBits;
  555|  1.07k|  } else {
  556|  1.07k|    FDKsyncCache(hBitStream);
  557|  1.07k|    FDK_pushForward(&hBitStream->hBitBuf, numberOfBits,
  558|  1.07k|                    hBitStream->ConfigCache);
  559|  1.07k|  }
  560|  1.07k|}
sac_bitdec.cpp:_ZL12FDKbyteAlignP13FDK_BITSTREAMj:
  496|  1.15k|                             UINT alignmentAnchor) {
  497|  1.15k|  FDKsyncCache(hBitStream);
  498|  1.15k|  if (hBitStream->ConfigCache == BS_READER) {
  ------------------
  |  Branch (498:7): [True: 1.15k, False: 0]
  ------------------
  499|  1.15k|    FDK_pushForward(
  500|  1.15k|        &hBitStream->hBitBuf,
  501|  1.15k|        (UINT)((INT)8 - (((INT)alignmentAnchor -
  502|  1.15k|                          (INT)FDK_getValidBits(&hBitStream->hBitBuf)) &
  503|  1.15k|                         0x07)) &
  504|  1.15k|            0x07,
  505|  1.15k|        hBitStream->ConfigCache);
  506|  1.15k|  } else {
  507|      0|    FDK_put(&hBitStream->hBitBuf, 0,
  508|      0|            (8 - ((FDK_getValidBits(&hBitStream->hBitBuf) - alignmentAnchor) &
  509|      0|                  0x07)) &
  510|      0|                0x07);
  511|      0|  }
  512|  1.15k|}
tpdec_asc.cpp:_ZL11FDKreadBitsP13FDK_BITSTREAMj:
  211|  2.18M|                            const UINT numberOfBits) {
  212|  2.18M|  UINT bits = 0;
  213|  2.18M|  INT missingBits = (INT)numberOfBits - (INT)hBitStream->BitsInCache;
  214|       |
  215|  2.18M|  FDK_ASSERT(numberOfBits <= 32);
  ------------------
  |  |  221|  2.18M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 2.18M, False: 0]
  ------------------
  216|  2.18M|  if (missingBits > 0) {
  ------------------
  |  Branch (216:7): [True: 653k, False: 1.53M]
  ------------------
  217|   653k|    if (missingBits != 32) bits = hBitStream->CacheWord << missingBits;
  ------------------
  |  Branch (217:9): [True: 543k, False: 109k]
  ------------------
  218|   653k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  219|   653k|    hBitStream->BitsInCache += CACHE_BITS;
  ------------------
  |  |  111|   653k|#define CACHE_BITS 32
  ------------------
  220|   653k|  }
  221|       |
  222|  2.18M|  hBitStream->BitsInCache -= numberOfBits;
  223|       |
  224|  2.18M|  return (bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) &
  225|  2.18M|         BitMask[numberOfBits];
  226|  2.18M|}
tpdec_asc.cpp:_ZL12FDKbyteAlignP13FDK_BITSTREAMj:
  496|    599|                             UINT alignmentAnchor) {
  497|    599|  FDKsyncCache(hBitStream);
  498|    599|  if (hBitStream->ConfigCache == BS_READER) {
  ------------------
  |  Branch (498:7): [True: 599, False: 0]
  ------------------
  499|    599|    FDK_pushForward(
  500|    599|        &hBitStream->hBitBuf,
  501|    599|        (UINT)((INT)8 - (((INT)alignmentAnchor -
  502|    599|                          (INT)FDK_getValidBits(&hBitStream->hBitBuf)) &
  503|    599|                         0x07)) &
  504|    599|            0x07,
  505|    599|        hBitStream->ConfigCache);
  506|    599|  } else {
  507|      0|    FDK_put(&hBitStream->hBitBuf, 0,
  508|      0|            (8 - ((FDK_getValidBits(&hBitStream->hBitBuf) - alignmentAnchor) &
  509|      0|                  0x07)) &
  510|      0|                0x07);
  511|      0|  }
  512|    599|}
tpdec_asc.cpp:_ZL12FDKsyncCacheP13FDK_BITSTREAM:
  452|   224k|FDK_INLINE void FDKsyncCache(HANDLE_FDK_BITSTREAM hBitStream) {
  453|   224k|  if (hBitStream->ConfigCache == BS_READER)
  ------------------
  |  Branch (453:7): [True: 216k, False: 7.85k]
  ------------------
  454|   216k|    FDK_pushBack(&hBitStream->hBitBuf, hBitStream->BitsInCache,
  455|   216k|                 hBitStream->ConfigCache);
  456|  7.85k|  else if (hBitStream->BitsInCache) /* BS_WRITER */
  ------------------
  |  Branch (456:12): [True: 7.51k, False: 334]
  ------------------
  457|  7.51k|    FDK_put(&hBitStream->hBitBuf, hBitStream->CacheWord,
  458|  7.51k|            hBitStream->BitsInCache);
  459|       |
  460|   224k|  hBitStream->BitsInCache = 0;
  461|   224k|  hBitStream->CacheWord = 0;
  462|   224k|}
tpdec_asc.cpp:_ZL11FDKpushBackP13FDK_BITSTREAMj:
  539|  9.16k|                            const UINT numberOfBits) {
  540|  9.16k|  if ((hBitStream->BitsInCache + numberOfBits) < CACHE_BITS &&
  ------------------
  |  |  111|  18.3k|#define CACHE_BITS 32
  ------------------
  |  Branch (540:7): [True: 809, False: 8.35k]
  ------------------
  541|    809|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (541:7): [True: 809, False: 0]
  ------------------
  542|    809|    hBitStream->BitsInCache += numberOfBits;
  543|    809|    FDKsyncCache(hBitStream); /* sync cache to avoid invalid cache */
  544|  8.35k|  } else {
  545|  8.35k|    FDKsyncCache(hBitStream);
  546|  8.35k|    FDK_pushBack(&hBitStream->hBitBuf, numberOfBits, hBitStream->ConfigCache);
  547|  8.35k|  }
  548|  9.16k|}
tpdec_asc.cpp:_ZL15FDKgetValidBitsP13FDK_BITSTREAM:
  577|   151k|FDK_INLINE UINT FDKgetValidBits(HANDLE_FDK_BITSTREAM hBitStream) {
  578|   151k|  FDKsyncCache(hBitStream);
  579|   151k|  return FDK_getValidBits(&hBitStream->hBitBuf);
  580|   151k|}
tpdec_asc.cpp:_ZL10FDKreadBitP13FDK_BITSTREAM:
  228|   108k|FDK_INLINE UINT FDKreadBit(HANDLE_FDK_BITSTREAM hBitStream) {
  229|   108k|  if (!hBitStream->BitsInCache) {
  ------------------
  |  Branch (229:7): [True: 1.10k, False: 107k]
  ------------------
  230|  1.10k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  231|  1.10k|    hBitStream->BitsInCache = CACHE_BITS - 1;
  ------------------
  |  |  111|  1.10k|#define CACHE_BITS 32
  ------------------
  232|  1.10k|    return hBitStream->CacheWord >> 31;
  233|  1.10k|  }
  234|   107k|  hBitStream->BitsInCache--;
  235|       |
  236|   107k|  return (hBitStream->CacheWord >> hBitStream->BitsInCache) & 1;
  237|   108k|}
tpdec_asc.cpp:_ZL10FDKpushForP13FDK_BITSTREAMj:
  551|  60.6k|                           const UINT numberOfBits) {
  552|  60.6k|  if ((hBitStream->BitsInCache > numberOfBits) &&
  ------------------
  |  Branch (552:7): [True: 5.09k, False: 55.5k]
  ------------------
  553|  5.09k|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (553:7): [True: 5.09k, False: 0]
  ------------------
  554|  5.09k|    hBitStream->BitsInCache -= numberOfBits;
  555|  55.5k|  } else {
  556|  55.5k|    FDKsyncCache(hBitStream);
  557|  55.5k|    FDK_pushForward(&hBitStream->hBitBuf, numberOfBits,
  558|  55.5k|                    hBitStream->ConfigCache);
  559|  55.5k|  }
  560|  60.6k|}
tpdec_asc.cpp:_ZL12escapedValueP13FDK_BITSTREAMiii:
  306|   130k|                             int nBits2, int nBits3) {
  307|   130k|  UINT value = FDKreadBits(hBitStream, nBits1);
  308|       |
  309|   130k|  if (value == (UINT)(1 << nBits1) - 1) {
  ------------------
  |  Branch (309:7): [True: 34.7k, False: 95.4k]
  ------------------
  310|  34.7k|    UINT valueAdd = FDKreadBits(hBitStream, nBits2);
  311|  34.7k|    value += valueAdd;
  312|  34.7k|    if (valueAdd == (UINT)(1 << nBits2) - 1) {
  ------------------
  |  Branch (312:9): [True: 28.5k, False: 6.19k]
  ------------------
  313|  28.5k|      value += FDKreadBits(hBitStream, nBits3);
  314|  28.5k|    }
  315|  34.7k|  }
  316|       |
  317|   130k|  return value;
  318|   130k|}
tpdec_asc.cpp:_ZL16FDKinitBitStreamP13FDK_BITSTREAMPhjj10FDK_BS_CFG:
  166|  7.85k|                      FDK_BS_CFG config = BS_READER) {
  167|  7.85k|  FDK_InitBitBuffer(&hBitStream->hBitBuf, pBuffer, bufSize, validBits);
  168|       |
  169|       |  /* init cache */
  170|  7.85k|  hBitStream->CacheWord = hBitStream->BitsInCache = 0;
  171|  7.85k|  hBitStream->ConfigCache = config;
  172|  7.85k|}
tpdec_asc.cpp:_ZL12FDKwriteBitsP13FDK_BITSTREAMjj:
  343|   117k|                              const UINT numberOfBits) {
  344|   117k|  const UINT validMask = BitMask[numberOfBits];
  345|       |
  346|   117k|  if (hBitStream == NULL) {
  ------------------
  |  Branch (346:7): [True: 0, False: 117k]
  ------------------
  347|      0|    return numberOfBits;
  348|      0|  }
  349|       |
  350|   117k|  if ((hBitStream->BitsInCache + numberOfBits) < CACHE_BITS) {
  ------------------
  |  |  111|   117k|#define CACHE_BITS 32
  ------------------
  |  Branch (350:7): [True: 7.51k, False: 109k]
  ------------------
  351|  7.51k|    hBitStream->BitsInCache += numberOfBits;
  352|  7.51k|    hBitStream->CacheWord =
  353|  7.51k|        (hBitStream->CacheWord << numberOfBits) | (value & validMask);
  354|   109k|  } else {
  355|       |    /* Put always 32 bits into memory             */
  356|       |    /* - fill cache's LSBits with MSBits of value */
  357|       |    /* - store 32 bits in memory using subroutine */
  358|       |    /* - fill remaining bits into cache's LSBits  */
  359|       |    /* - upper bits in cache are don't care       */
  360|       |
  361|       |    /* Compute number of bits to be filled into cache */
  362|   109k|    int missing_bits = CACHE_BITS - hBitStream->BitsInCache;
  ------------------
  |  |  111|   109k|#define CACHE_BITS 32
  ------------------
  363|   109k|    int remaining_bits = numberOfBits - missing_bits;
  364|   109k|    value = value & validMask;
  365|       |    /* Avoid shift left by 32 positions */
  366|   109k|    UINT CacheWord =
  367|   109k|        (missing_bits == 32) ? 0 : (hBitStream->CacheWord << missing_bits);
  ------------------
  |  Branch (367:9): [True: 109k, False: 0]
  ------------------
  368|   109k|    CacheWord |= (value >> (remaining_bits));
  369|   109k|    FDK_put(&hBitStream->hBitBuf, CacheWord, 32);
  370|       |
  371|   109k|    hBitStream->CacheWord = value;
  372|   109k|    hBitStream->BitsInCache = remaining_bits;
  373|   109k|  }
  374|       |
  375|   117k|  return numberOfBits;
  376|   117k|}
tpdec_lib.cpp:_ZL16FDKinitBitStreamP13FDK_BITSTREAMPhjj10FDK_BS_CFG:
  166|  14.7k|                      FDK_BS_CFG config = BS_READER) {
  167|  14.7k|  FDK_InitBitBuffer(&hBitStream->hBitBuf, pBuffer, bufSize, validBits);
  168|       |
  169|       |  /* init cache */
  170|  14.7k|  hBitStream->CacheWord = hBitStream->BitsInCache = 0;
  171|  14.7k|  hBitStream->ConfigCache = config;
  172|  14.7k|}
tpdec_lib.cpp:_ZL11FDKpushBackP13FDK_BITSTREAMj:
  539|  3.06k|                            const UINT numberOfBits) {
  540|  3.06k|  if ((hBitStream->BitsInCache + numberOfBits) < CACHE_BITS &&
  ------------------
  |  |  111|  6.12k|#define CACHE_BITS 32
  ------------------
  |  Branch (540:7): [True: 69, False: 2.99k]
  ------------------
  541|     69|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (541:7): [True: 69, False: 0]
  ------------------
  542|     69|    hBitStream->BitsInCache += numberOfBits;
  543|     69|    FDKsyncCache(hBitStream); /* sync cache to avoid invalid cache */
  544|  2.99k|  } else {
  545|  2.99k|    FDKsyncCache(hBitStream);
  546|  2.99k|    FDK_pushBack(&hBitStream->hBitBuf, numberOfBits, hBitStream->ConfigCache);
  547|  2.99k|  }
  548|  3.06k|}
tpdec_lib.cpp:_ZL12FDKsyncCacheP13FDK_BITSTREAM:
  452|  6.12k|FDK_INLINE void FDKsyncCache(HANDLE_FDK_BITSTREAM hBitStream) {
  453|  6.12k|  if (hBitStream->ConfigCache == BS_READER)
  ------------------
  |  Branch (453:7): [True: 6.12k, False: 0]
  ------------------
  454|  6.12k|    FDK_pushBack(&hBitStream->hBitBuf, hBitStream->BitsInCache,
  455|  6.12k|                 hBitStream->ConfigCache);
  456|      0|  else if (hBitStream->BitsInCache) /* BS_WRITER */
  ------------------
  |  Branch (456:12): [True: 0, False: 0]
  ------------------
  457|      0|    FDK_put(&hBitStream->hBitBuf, hBitStream->CacheWord,
  458|      0|            hBitStream->BitsInCache);
  459|       |
  460|  6.12k|  hBitStream->BitsInCache = 0;
  461|  6.12k|  hBitStream->CacheWord = 0;
  462|  6.12k|}
tpdec_lib.cpp:_ZL15FDKgetValidBitsP13FDK_BITSTREAM:
  577|  3.06k|FDK_INLINE UINT FDKgetValidBits(HANDLE_FDK_BITSTREAM hBitStream) {
  578|  3.06k|  FDKsyncCache(hBitStream);
  579|  3.06k|  return FDK_getValidBits(&hBitStream->hBitBuf);
  580|  3.06k|}

_Z4fMinjj:
  416|  7.39k|inline UINT fMin(UINT a, UINT b) { return fixmin_UI(a, b); }
  ------------------
  |  |  129|  7.39k|#define fixmin_UI(a, b) fixmin(a, b)
  ------------------
_Z4fMaxjj:
  415|    108|inline UINT fMax(UINT a, UINT b) { return fixmax_UI(a, b); }
  ------------------
  |  |  128|    108|#define fixmax_UI(a, b) fixmax(a, b)
  ------------------
_Z4fMaxhh:
  418|  1.80k|inline UCHAR fMax(UCHAR a, UCHAR b) {
  419|  1.80k|  return (UCHAR)fixmax_UI((UINT)a, (UINT)b);
  ------------------
  |  |  128|  1.80k|#define fixmax_UI(a, b) fixmax(a, b)
  ------------------
  420|  1.80k|}
_Z4fMinhh:
  421|   138k|inline UCHAR fMin(UCHAR a, UCHAR b) {
  422|   138k|  return (UCHAR)fixmin_UI((UINT)a, (UINT)b);
  ------------------
  |  |  129|   138k|#define fixmin_UI(a, b) fixmin(a, b)
  ------------------
  423|   138k|}
aac_ram.cpp:_ZL4fMaxii:
  401|  2.84k|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|  2.84k|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
aacdecoder.cpp:_ZL4fMinii:
  400|  7.85k|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|  7.85k|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
aacdecoder.cpp:_ZL4fMaxii:
  401|  3.92k|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|  3.92k|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
conceal.cpp:_ZL5fMultss:
  238|   229k|FDK_INLINE LONG fMult(SHORT a, SHORT b) { return fixmul_SS(a, b); }
drcDec_reader.cpp:_ZL4fMinii:
  400|  96.7k|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|  96.7k|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
drcDec_selectionProcess.cpp:_ZL4fMaxii:
  401|  1.24k|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|  1.24k|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
drcDec_selectionProcess.cpp:_ZL4fMinii:
  400|  6.02k|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|  6.02k|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
fixpoint_math.cpp:_ZL5fMultii:
  241|   267k|FDK_INLINE LONG fMult(LONG a, LONG b) { return fixmul_DD(a, b); }
fixpoint_math.cpp:_ZL4fAbsi:
  275|  16.7k|FDK_INLINE FIXP_DBL fAbs(FIXP_DBL x) { return fixabs_D(x); }
fixpoint_math.cpp:_ZL12fMultAddDiv2isi:
  317|   250k|FDK_INLINE FIXP_DBL fMultAddDiv2(FIXP_DBL x, FIXP_SGL a, FIXP_DBL b) {
  318|   250k|  return fixmadddiv2_SD(x, a, b);
  319|   250k|}
fixpoint_math.cpp:_ZL9fMultDiv2ii:
  248|   267k|FDK_INLINE LONG fMultDiv2(LONG a, LONG b) { return fixmuldiv2_DD(a, b); }
fixpoint_math.cpp:_ZL6fNormzi:
  292|  16.7k|FDK_INLINE INT fNormz(FIXP_DBL x) { return fixnormz_D(x); }
fixpoint_math.cpp:_ZL12fMultAddDiv2iii:
  314|  16.7k|FDK_INLINE FIXP_DBL fMultAddDiv2(FIXP_DBL x, FIXP_DBL a, FIXP_DBL b) {
  315|  16.7k|  return fixmadddiv2_DD(x, a, b);
  316|  16.7k|}
fixpoint_math.cpp:_ZL5fNormi:
  294|  16.7k|FDK_INLINE INT fNorm(FIXP_DBL x) { return fixnorm_D(x); }
sac_bitdec.cpp:_ZL4fMaxii:
  401|     74|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|     74|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
sac_bitdec.cpp:_ZL4fMinii:
  400|    571|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|    571|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
sac_dec_lib.cpp:_ZL4fMinii:
  400|     57|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|     57|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
sbrdec_freq_sca.cpp:_ZL4fMinii:
  400|  1.84k|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|  1.84k|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
sbrdec_freq_sca.cpp:_ZL5fMultss:
  238|  32.0k|FDK_INLINE LONG fMult(SHORT a, SHORT b) { return fixmul_SS(a, b); }
sbrdec_freq_sca.cpp:_ZL9fMultDiv2ii:
  248|  1.37M|FDK_INLINE LONG fMultDiv2(LONG a, LONG b) { return fixmuldiv2_DD(a, b); }
sbrdecoder.cpp:_ZL4fMaxii:
  401|  1.30k|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|  1.30k|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
tpdec_asc.cpp:_ZL4fAbsi:
  275|  15.7k|FDK_INLINE FIXP_DBL fAbs(FIXP_DBL x) { return fixabs_D(x); }

_Z14fixmadddiv2_DDiii:
  124|   267k|inline FIXP_DBL fixmadddiv2_DD(FIXP_DBL x, const FIXP_DBL a, const FIXP_DBL b) {
  125|   267k|  return (x + fMultDiv2(a, b));
  126|   267k|}
_Z14fixmadddiv2_SDisi:
  130|   250k|inline FIXP_DBL fixmadddiv2_SD(FIXP_DBL x, const FIXP_SGL a, const FIXP_DBL b) {
  131|       |#ifdef FUNCTION_fixmadddiv2_DS
  132|       |  return fixmadddiv2_DS(x, b, a);
  133|       |#else
  134|   250k|  return fixmadddiv2_DD(x, FX_SGL2FX_DBL(a), b);
  ------------------
  |  |  219|   250k|  ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|   250k|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |                 ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|   250k|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  135|   250k|#endif
  136|   250k|}

_Z6fixminIjET_S0_S0_:
  113|   146k|inline T fixmin(T a, T b) {
  114|   146k|  return (a < b ? a : b);
  ------------------
  |  Branch (114:11): [True: 85.7k, False: 60.4k]
  ------------------
  115|   146k|}
_Z6fixmaxIiET_S0_S0_:
  118|  9.39k|inline T fixmax(T a, T b) {
  119|  9.39k|  return (a > b ? a : b);
  ------------------
  |  Branch (119:11): [True: 1.31k, False: 8.08k]
  ------------------
  120|  9.39k|}
_Z6fixminIiET_S0_S0_:
  113|   113k|inline T fixmin(T a, T b) {
  114|   113k|  return (a < b ? a : b);
  ------------------
  |  Branch (114:11): [True: 108k, False: 4.14k]
  ------------------
  115|   113k|}
_Z6fixmaxIjET_S0_S0_:
  118|  1.91k|inline T fixmax(T a, T b) {
  119|  1.91k|  return (a > b ? a : b);
  ------------------
  |  Branch (119:11): [True: 121, False: 1.79k]
  ------------------
  120|  1.91k|}

_Z9fixmul_SSss:
  163|   261k|inline LONG fixmul_SS(const SHORT a, const SHORT b) { return (a * b) << 1; }

fixpoint_math.cpp:_ZL5fLog2iiPi:
  807|  16.7k|FDK_INLINE FIXP_DBL fLog2(FIXP_DBL x_m, INT x_e, INT *result_e) {
  808|  16.7k|  FIXP_DBL result_m;
  809|       |
  810|       |  /* Short cut for zero and negative numbers. */
  811|  16.7k|  if (x_m <= FL2FXCONST_DBL(0.0f)) {
  ------------------
  |  |  192|  16.7k|  (FIXP_DBL)(                                                                \
  |  |  193|  16.7k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 16.7k, Folded]
  |  |  ------------------
  |  |  194|  16.7k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  16.7k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  16.7k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 16.7k]
  |  |  ------------------
  |  |  195|  16.7k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  16.7k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  16.7k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  16.7k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  16.7k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  16.7k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  16.7k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (811:7): [True: 0, False: 16.7k]
  ------------------
  812|      0|    *result_e = DFRACT_BITS - 1;
  ------------------
  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  ------------------
  813|      0|    return FL2FXCONST_DBL(-1.0f);
  ------------------
  |  |  192|      0|  (FIXP_DBL)(                                                                \
  |  |  193|      0|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 0]
  |  |  ------------------
  |  |  194|      0|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 0]
  |  |  ------------------
  |  |  195|      0|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|      0|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|      0|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [True: 0, Folded]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  814|      0|  }
  815|       |
  816|       |  /* Calculate log2() */
  817|  16.7k|  {
  818|  16.7k|    FIXP_DBL x2_m;
  819|       |
  820|       |    /* Move input value x_m * 2^x_e toward 1.0, where the taylor approximation
  821|       |       of the function log(1-x) centered at 0 is most accurate. */
  822|  16.7k|    {
  823|  16.7k|      INT b_norm;
  824|       |
  825|  16.7k|      b_norm = fNormz(x_m) - 1;
  826|  16.7k|      x2_m = x_m << b_norm;
  827|  16.7k|      x_e = x_e - b_norm;
  828|  16.7k|    }
  829|       |
  830|       |    /* map x from log(x) domain to log(1-x) domain. */
  831|  16.7k|    x2_m = -(x2_m + FL2FXCONST_DBL(-1.0));
  ------------------
  |  |  192|  16.7k|  (FIXP_DBL)(                                                                \
  |  |  193|  16.7k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 16.7k]
  |  |  ------------------
  |  |  194|  16.7k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 0]
  |  |  ------------------
  |  |  195|      0|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|      0|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  16.7k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|  16.7k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  16.7k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [True: 16.7k, Folded]
  |  |  ------------------
  |  |  199|  16.7k|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|  16.7k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|  16.7k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|  16.7k|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|  16.7k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|  16.7k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|  16.7k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  832|       |
  833|       |    /* Taylor polynomial approximation of ln(1-x) */
  834|  16.7k|    {
  835|  16.7k|      FIXP_DBL px2_m;
  836|  16.7k|      result_m = FL2FXCONST_DBL(0.0);
  ------------------
  |  |  192|  16.7k|  (FIXP_DBL)(                                                                \
  |  |  193|  16.7k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 16.7k, Folded]
  |  |  ------------------
  |  |  194|  16.7k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  16.7k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  16.7k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 16.7k]
  |  |  ------------------
  |  |  195|  16.7k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  16.7k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  16.7k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  16.7k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  16.7k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  16.7k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  16.7k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  837|  16.7k|      px2_m = x2_m;
  838|   183k|      for (int i = 0; i < LD_PRECISION; i++) {
  ------------------
  |  |  117|   183k|#define LD_PRECISION 10
  ------------------
  |  Branch (838:23): [True: 167k, False: 16.7k]
  ------------------
  839|   167k|        result_m = fMultAddDiv2(result_m, ldCoeff[i], px2_m);
  840|   167k|        px2_m = fMult(px2_m, x2_m);
  841|   167k|      }
  842|  16.7k|    }
  843|       |    /* Multiply result with 1/ln(2) = 1.0 + 0.442695040888 (get log2(x) from
  844|       |     * ln(x) result). */
  845|  16.7k|    result_m =
  846|  16.7k|        fMultAddDiv2(result_m, result_m,
  847|  16.7k|                     FL2FXCONST_DBL(2.0 * 0.4426950408889634073599246810019));
  ------------------
  |  |  192|  16.7k|  (FIXP_DBL)(                                                                \
  |  |  193|  16.7k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 16.7k, Folded]
  |  |  ------------------
  |  |  194|  16.7k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  16.7k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  16.7k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 16.7k]
  |  |  ------------------
  |  |  195|  16.7k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  16.7k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  16.7k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  16.7k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  16.7k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  16.7k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  16.7k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  848|       |
  849|       |    /* Add exponent part. log2(x_m * 2^x_e) = log2(x_m) + x_e */
  850|  16.7k|    if (x_e != 0) {
  ------------------
  |  Branch (850:9): [True: 16.7k, False: 0]
  ------------------
  851|  16.7k|      int enorm;
  852|       |
  853|  16.7k|      enorm = DFRACT_BITS - fNorm((FIXP_DBL)x_e);
  ------------------
  |  |  113|  16.7k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  854|       |      /* The -1 in the right shift of result_m compensates the fMultDiv2() above
  855|       |       * in the taylor polynomial evaluation loop.*/
  856|  16.7k|      result_m = (result_m >> (enorm - 1)) +
  857|  16.7k|                 ((FIXP_DBL)x_e << (DFRACT_BITS - 1 - enorm));
  ------------------
  |  |  113|  16.7k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  858|       |
  859|  16.7k|      *result_e = enorm;
  860|  16.7k|    } else {
  861|       |      /* 1 compensates the fMultDiv2() above in the taylor polynomial evaluation
  862|       |       * loop.*/
  863|      0|      *result_e = 1;
  864|      0|    }
  865|  16.7k|  }
  866|       |
  867|  16.7k|  return result_m;
  868|  16.7k|}

_Z10scaleValueii:
  155|  16.7k|) {
  156|  16.7k|  if (scalefactor > 0)
  ------------------
  |  Branch (156:7): [True: 16.7k, False: 0]
  ------------------
  157|  16.7k|    return (value << scalefactor);
  158|      0|  else
  159|      0|    return (value >> (-scalefactor));
  160|  16.7k|}

_Z8fixabs_Di:
  110|  32.4k|inline INT fixabs_D(INT x) { return ((x) > (INT)(0)) ? (x) : -(x); }
  ------------------
  |  Branch (110:37): [True: 16.7k, False: 15.7k]
  ------------------

_Z10fixnormz_Di:
  111|  50.1k|inline INT fixnormz_D(LONG value) {
  112|  50.1k|  INT result;
  113|       |
  114|  50.1k|  if (value != 0) {
  ------------------
  |  Branch (114:7): [True: 50.1k, False: 0]
  ------------------
  115|  50.1k|    result = __builtin_clz(value);
  116|  50.1k|  } else {
  117|      0|    result = 32;
  118|      0|  }
  119|  50.1k|  return result;
  120|  50.1k|}
_Z9fixnorm_Di:
  122|  33.4k|inline INT fixnorm_D(LONG value) {
  123|  33.4k|  INT result;
  124|  33.4k|  if (value == 0) {
  ------------------
  |  Branch (124:7): [True: 0, False: 33.4k]
  ------------------
  125|      0|    return 0;
  126|      0|  }
  127|  33.4k|  if (value < 0) {
  ------------------
  |  Branch (127:7): [True: 16.7k, False: 16.7k]
  ------------------
  128|  16.7k|    value = ~value;
  129|  16.7k|  }
  130|  33.4k|  result = fixnormz_D(value);
  131|  33.4k|  return result - 1;
  132|  33.4k|}

_Z9fixmul_DDii:
  164|   267k|inline INT fixmul_DD(INT a, const INT b) {
  165|   267k|  INT result;
  166|       |
  167|   267k|  asm("imul %2;\n"
  168|   267k|      "shl $1, %0;\n"
  169|   267k|      : "=d"(result), "+a"(a)
  170|   267k|      : "r"(b));
  171|       |
  172|   267k|  return result;
  173|   267k|}
_Z13fixmuldiv2_DDii:
  175|  1.64M|inline INT fixmuldiv2_DD(INT a, const INT b) {
  176|  1.64M|  INT result;
  177|       |
  178|  1.64M|  asm("imul %2;" : "=d"(result), "+a"(a) : "r"(b));
  179|       |
  180|  1.64M|  return result;
  181|  1.64M|}

_Z7invFixpi:
  154|  16.7k|inline FIXP_DBL invFixp(FIXP_DBL op) {
  155|  16.7k|  float result;
  156|  16.7k|  INT result_e;
  157|  16.7k|  if ((op == (FIXP_DBL)0) || (op == (FIXP_DBL)1)) {
  ------------------
  |  Branch (157:7): [True: 0, False: 16.7k]
  |  Branch (157:30): [True: 0, False: 16.7k]
  ------------------
  158|      0|    return ((LONG)0x7fffffff);
  159|      0|  }
  160|  16.7k|  result = (float)(1.0 / (float)(INT)op);
  161|  16.7k|  result = frexpf(result, &result_e);
  162|  16.7k|  result = ldexpf(result, 31 + result_e);
  163|       |
  164|  16.7k|  return (FIXP_DBL)(INT)result;
  165|  16.7k|}

FDK_InitBitBuffer:
  127|  26.7k|                       UINT validBits) {
  128|  26.7k|  hBitBuf->ValidBits = validBits;
  129|  26.7k|  hBitBuf->ReadOffset = 0;
  130|  26.7k|  hBitBuf->WriteOffset = 0;
  131|  26.7k|  hBitBuf->BitNdx = 0;
  132|       |
  133|  26.7k|  hBitBuf->Buffer = pBuffer;
  134|  26.7k|  hBitBuf->bufSize = bufSize;
  135|  26.7k|  hBitBuf->bufBits = (bufSize << 3);
  136|       |  /*assure bufsize (2^n) */
  137|  26.7k|  FDK_ASSERT(hBitBuf->ValidBits <= hBitBuf->bufBits);
  ------------------
  |  |  221|  26.7k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (137:3): [True: 26.7k, False: 0]
  ------------------
  138|  26.7k|  FDK_ASSERT((bufSize > 0) && (bufSize <= MAX_BUFSIZE_BYTES));
  ------------------
  |  |  221|  26.7k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (138:3): [True: 26.7k, False: 0]
  |  Branch (138:3): [True: 26.7k, False: 0]
  |  Branch (138:3): [True: 26.7k, False: 0]
  ------------------
  139|  26.7k|  {
  140|  26.7k|    UINT x = 0, n = bufSize;
  141|   317k|    for (x = 0; n > 0; x++, n >>= 1) {
  ------------------
  |  Branch (141:17): [True: 290k, False: 26.7k]
  ------------------
  142|   290k|    }
  143|  26.7k|    if (bufSize != ((UINT)1 << (x - 1))) {
  ------------------
  |  Branch (143:9): [True: 0, False: 26.7k]
  ------------------
  144|       |      FDK_ASSERT(0);
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (144:7): [Folded, False: 0]
  ------------------
  145|      0|    }
  146|  26.7k|  }
  147|  26.7k|}
FDK_get32:
  181|  4.09M|INT FDK_get32(HANDLE_FDK_BITBUF hBitBuf) {
  182|  4.09M|  UINT BitNdx = hBitBuf->BitNdx + 32;
  183|  4.09M|  hBitBuf->BitNdx = BitNdx & (hBitBuf->bufBits - 1);
  184|  4.09M|  hBitBuf->ValidBits = (UINT)((INT)hBitBuf->ValidBits - (INT)32);
  185|       |
  186|  4.09M|  UINT byteOffset = (BitNdx - 1) >> 3;
  187|  4.09M|  if (BitNdx <= hBitBuf->bufBits) {
  ------------------
  |  Branch (187:7): [True: 4.08M, False: 12.2k]
  ------------------
  188|  4.08M|    UINT cache = (hBitBuf->Buffer[(byteOffset - 3)] << 24) |
  189|  4.08M|                 (hBitBuf->Buffer[(byteOffset - 2)] << 16) |
  190|  4.08M|                 (hBitBuf->Buffer[(byteOffset - 1)] << 8) |
  191|  4.08M|                 hBitBuf->Buffer[(byteOffset - 0)];
  192|       |
  193|  4.08M|    if ((BitNdx = (BitNdx & 7)) != 0) {
  ------------------
  |  Branch (193:9): [True: 1.02M, False: 3.05M]
  ------------------
  194|  1.02M|      cache = (cache >> (8 - BitNdx)) |
  195|  1.02M|              ((UINT)hBitBuf->Buffer[byteOffset - 4] << (24 + BitNdx));
  196|  1.02M|    }
  197|  4.08M|    return (cache);
  198|  4.08M|  } else {
  199|  12.2k|    UINT byte_mask = hBitBuf->bufSize - 1;
  200|  12.2k|    UINT cache = (hBitBuf->Buffer[(byteOffset - 3) & byte_mask] << 24) |
  201|  12.2k|                 (hBitBuf->Buffer[(byteOffset - 2) & byte_mask] << 16) |
  202|  12.2k|                 (hBitBuf->Buffer[(byteOffset - 1) & byte_mask] << 8) |
  203|  12.2k|                 hBitBuf->Buffer[(byteOffset - 0) & byte_mask];
  204|       |
  205|  12.2k|    if ((BitNdx = (BitNdx & 7)) != 0) {
  ------------------
  |  Branch (205:9): [True: 2.02k, False: 10.2k]
  ------------------
  206|  2.02k|      cache = (cache >> (8 - BitNdx)) |
  207|  2.02k|              ((UINT)hBitBuf->Buffer[(byteOffset - 4) & byte_mask]
  208|  2.02k|               << (24 + BitNdx));
  209|  2.02k|    }
  210|  12.2k|    return (cache);
  211|  12.2k|  }
  212|  4.09M|}
FDK_put:
  248|   117k|void FDK_put(HANDLE_FDK_BITBUF hBitBuf, UINT value, const UINT numberOfBits) {
  249|   117k|  if (numberOfBits != 0) {
  ------------------
  |  Branch (249:7): [True: 117k, False: 0]
  ------------------
  250|   117k|    UINT byteOffset0 = hBitBuf->BitNdx >> 3;
  251|   117k|    UINT bitOffset = hBitBuf->BitNdx & 0x7;
  252|       |
  253|   117k|    hBitBuf->BitNdx = (hBitBuf->BitNdx + numberOfBits) & (hBitBuf->bufBits - 1);
  254|   117k|    hBitBuf->ValidBits += numberOfBits;
  255|       |
  256|   117k|    UINT byteMask = hBitBuf->bufSize - 1;
  257|       |
  258|   117k|    UINT byteOffset1 = (byteOffset0 + 1) & byteMask;
  259|   117k|    UINT byteOffset2 = (byteOffset0 + 2) & byteMask;
  260|   117k|    UINT byteOffset3 = (byteOffset0 + 3) & byteMask;
  261|       |
  262|       |    // Create tmp containing free bits at the left border followed by bits to
  263|       |    // write, LSB's are cleared, if available Create mask to apply upon all
  264|       |    // buffer bytes
  265|   117k|    UINT tmp = (value << (32 - numberOfBits)) >> bitOffset;
  266|   117k|    UINT mask = ~((BitMask[numberOfBits] << (32 - numberOfBits)) >> bitOffset);
  267|       |
  268|       |    // read all 4 bytes from buffer and create a 32-bit cache
  269|   117k|    UINT cache = (((UINT)hBitBuf->Buffer[byteOffset0]) << 24) |
  270|   117k|                 (((UINT)hBitBuf->Buffer[byteOffset1]) << 16) |
  271|   117k|                 (((UINT)hBitBuf->Buffer[byteOffset2]) << 8) |
  272|   117k|                 (((UINT)hBitBuf->Buffer[byteOffset3]) << 0);
  273|       |
  274|   117k|    cache = (cache & mask) | tmp;
  275|   117k|    hBitBuf->Buffer[byteOffset0] = (UCHAR)(cache >> 24);
  276|   117k|    hBitBuf->Buffer[byteOffset1] = (UCHAR)(cache >> 16);
  277|   117k|    hBitBuf->Buffer[byteOffset2] = (UCHAR)(cache >> 8);
  278|   117k|    hBitBuf->Buffer[byteOffset3] = (UCHAR)(cache >> 0);
  279|       |
  280|   117k|    if ((bitOffset + numberOfBits) > 32) {
  ------------------
  |  Branch (280:9): [True: 0, False: 117k]
  ------------------
  281|      0|      UINT byteOffset4 = (byteOffset0 + 4) & byteMask;
  282|       |      // remaining bits: in range 1..7
  283|       |      // replace MSBits of next byte in buffer by LSBits of "value"
  284|      0|      int bits = (bitOffset + numberOfBits) & 7;
  285|      0|      cache =
  286|      0|          (UINT)hBitBuf->Buffer[byteOffset4] & (~(BitMask[bits] << (8 - bits)));
  287|      0|      cache |= value << (8 - bits);
  288|      0|      hBitBuf->Buffer[byteOffset4] = (UCHAR)cache;
  289|      0|    }
  290|   117k|  }
  291|   117k|}
FDK_pushBack:
  339|   624k|                  UCHAR config) {
  340|   624k|  hBitBuf->ValidBits =
  341|   624k|      (config == 0) ? (UINT)((INT)hBitBuf->ValidBits + (INT)numberOfBits)
  ------------------
  |  Branch (341:7): [True: 624k, False: 0]
  ------------------
  342|   624k|                    : ((UINT)((INT)hBitBuf->ValidBits - (INT)numberOfBits));
  343|   624k|  hBitBuf->BitNdx = ((UINT)((INT)hBitBuf->BitNdx - (INT)numberOfBits)) &
  344|   624k|                    (hBitBuf->bufBits - 1);
  345|   624k|}
FDK_pushForward:
  349|   381k|                     UCHAR config) {
  350|   381k|  hBitBuf->ValidBits =
  351|   381k|      (config == 0) ? ((UINT)((INT)hBitBuf->ValidBits - (INT)numberOfBits))
  ------------------
  |  Branch (351:7): [True: 381k, False: 0]
  ------------------
  352|   381k|                    : (UINT)((INT)hBitBuf->ValidBits + (INT)numberOfBits);
  353|   381k|  hBitBuf->BitNdx =
  354|   381k|      (UINT)((INT)hBitBuf->BitNdx + (INT)numberOfBits) & (hBitBuf->bufBits - 1);
  355|   381k|}
FDK_getValidBits:
  358|   221k|UINT FDK_getValidBits(HANDLE_FDK_BITBUF hBitBuf) { return hBitBuf->ValidBits; }

_Z10FDKcrcInitP11FDK_CRCINFOjjj:
  229|    500|                const UINT crcStartValue, const UINT crcLen) {
  230|       |  /* crc polynom example:
  231|       |  x^16 + x^15 + x^5 + x^0        (1) 1000 0000 0010 0001 -> 0x8021
  232|       |  x^16 + x^15 + x^2 + x^0        (1) 1000 0000 0000 0101 -> 0x8005
  233|       |  x^16 + x^12 + x^5 + x^0        (1) 0001 0000 0010 0001 -> 0x1021
  234|       |  x^8 + x^4 + x^3 + x^2 + x^0              (1) 0001 1101 -> 0x001d */
  235|       |
  236|    500|  hCrcInfo->crcLen = crcLen;
  237|    500|  hCrcInfo->crcPoly = crcPoly;
  238|    500|  hCrcInfo->startValue = crcStartValue;
  239|    500|  hCrcInfo->crcMask = (crcLen) ? (1 << (crcLen - 1)) : 0;
  ------------------
  |  Branch (239:23): [True: 500, False: 0]
  ------------------
  240|       |
  241|    500|  FDKcrcReset(hCrcInfo);
  242|       |
  243|    500|  hCrcInfo->pCrcLookup =
  244|    500|      0; /* Preset 0 for "crcLen" != 16 or unknown 16-bit polynoms "crcPoly" */
  245|       |
  246|    500|  if (hCrcInfo->crcLen == 16) {
  ------------------
  |  Branch (246:7): [True: 0, False: 500]
  ------------------
  247|      0|    switch (crcPoly) {
  248|      0|      case 0x8021:
  ------------------
  |  Branch (248:7): [True: 0, False: 0]
  ------------------
  249|      0|        hCrcInfo->pCrcLookup = crcLookup_16_15_5_0;
  250|      0|        break;
  251|      0|      case 0x8005:
  ------------------
  |  Branch (251:7): [True: 0, False: 0]
  ------------------
  252|      0|        hCrcInfo->pCrcLookup = crcLookup_16_15_2_0;
  253|      0|        break;
  254|      0|      case 0x1021:
  ------------------
  |  Branch (254:7): [True: 0, False: 0]
  ------------------
  255|      0|        hCrcInfo->pCrcLookup = crcLookup_16_12_5_0;
  256|      0|        break;
  257|      0|      case 0x001d:
  ------------------
  |  Branch (257:7): [True: 0, False: 0]
  ------------------
  258|      0|      default:
  ------------------
  |  Branch (258:7): [True: 0, False: 0]
  ------------------
  259|       |        /* no lookup table */
  260|      0|        break;
  261|      0|    }
  262|      0|  }
  263|    500|}
_Z11FDKcrcResetP11FDK_CRCINFO:
  265|    500|void FDKcrcReset(HANDLE_FDK_CRCINFO hCrcInfo) {
  266|    500|  int i;
  267|       |
  268|    500|  hCrcInfo->crcValue = hCrcInfo->startValue;
  269|       |
  270|  2.00k|  for (i = 0; i < MAX_CRC_REGS; i++) {
  ------------------
  |  |  109|  2.00k|  3 /*!< Maximal number of overlapping crc region in ADTS channel pair element \
  ------------------
  |  Branch (270:15): [True: 1.50k, False: 500]
  ------------------
  271|  1.50k|    hCrcInfo->crcRegData[i].isActive = 0;
  272|  1.50k|  }
  273|    500|  hCrcInfo->regStart = 0;
  274|    500|  hCrcInfo->regStop = 0;
  275|    500|}
_Z14FDKcrcStartRegP11FDK_CRCINFOP13FDK_BITSTREAMi:
  278|    500|                   const INT mBits) {
  279|    500|  int reg = hCrcInfo->regStart;
  280|       |
  281|    500|  FDK_ASSERT(hCrcInfo->crcRegData[reg].isActive == 0);
  ------------------
  |  |  221|    500|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (281:3): [True: 500, False: 0]
  ------------------
  282|    500|  hCrcInfo->crcRegData[reg].isActive = 1;
  283|    500|  hCrcInfo->crcRegData[reg].maxBits = mBits;
  284|    500|  hCrcInfo->crcRegData[reg].validBits = (INT)FDKgetValidBits(hBs);
  285|    500|  hCrcInfo->crcRegData[reg].bitBufCntBits = 0;
  286|       |
  287|    500|  hCrcInfo->regStart = (hCrcInfo->regStart + 1) % MAX_CRC_REGS;
  ------------------
  |  |  109|    500|  3 /*!< Maximal number of overlapping crc region in ADTS channel pair element \
  ------------------
  288|       |
  289|    500|  return (reg);
  290|    500|}
_Z12FDKcrcEndRegP11FDK_CRCINFOP13FDK_BITSTREAMi:
  293|     99|                 const INT reg) {
  294|     99|  FDK_ASSERT((reg == (INT)hCrcInfo->regStop) &&
  ------------------
  |  |  221|     99|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (294:3): [True: 99, False: 0]
  |  Branch (294:3): [True: 99, False: 0]
  |  Branch (294:3): [True: 99, False: 0]
  ------------------
  295|     99|             (hCrcInfo->crcRegData[reg].isActive == 1));
  296|       |
  297|     99|  if (hBs->ConfigCache == BS_WRITER) {
  ------------------
  |  Branch (297:7): [True: 0, False: 99]
  ------------------
  298|      0|    hCrcInfo->crcRegData[reg].bitBufCntBits =
  299|      0|        (INT)FDKgetValidBits(hBs) - hCrcInfo->crcRegData[reg].validBits;
  300|     99|  } else {
  301|     99|    hCrcInfo->crcRegData[reg].bitBufCntBits =
  302|     99|        hCrcInfo->crcRegData[reg].validBits - (INT)FDKgetValidBits(hBs);
  303|     99|  }
  304|       |
  305|     99|  if (hCrcInfo->crcRegData[reg].maxBits == 0) {
  ------------------
  |  Branch (305:7): [True: 99, False: 0]
  ------------------
  306|     99|    hCrcInfo->crcRegData[reg].maxBits = hCrcInfo->crcRegData[reg].bitBufCntBits;
  307|     99|  }
  308|       |
  309|     99|  crcCalc(hCrcInfo, hBs, reg);
  310|       |
  311|     99|  hCrcInfo->crcRegData[reg].isActive = 0;
  312|     99|  hCrcInfo->regStop = (hCrcInfo->regStop + 1) % MAX_CRC_REGS;
  ------------------
  |  |  109|     99|  3 /*!< Maximal number of overlapping crc region in ADTS channel pair element \
  ------------------
  313|       |
  314|     99|  return 0;
  315|     99|}
_Z12FDKcrcGetCRCP11FDK_CRCINFO:
  317|     99|USHORT FDKcrcGetCRC(const HANDLE_FDK_CRCINFO hCrcInfo) {
  318|     99|  return (hCrcInfo->crcValue & (((hCrcInfo->crcMask - 1) << 1) + 1));
  319|     99|}
FDK_crc.cpp:_ZL7crcCalcP11FDK_CRCINFOP13FDK_BITSTREAMi:
  427|     99|                    const INT reg) {
  428|     99|  USHORT crc = hCrcInfo->crcValue;
  429|     99|  CCrcRegData *rD = &hCrcInfo->crcRegData[reg];
  430|     99|  FDK_BITSTREAM bsReader;
  431|       |
  432|     99|  if (hBs->ConfigCache == BS_READER) {
  ------------------
  |  Branch (432:7): [True: 99, False: 0]
  ------------------
  433|     99|    bsReader = *hBs;
  434|     99|    FDKpushBiDirectional(&bsReader,
  435|     99|                         -(rD->validBits - (INT)FDKgetValidBits(&bsReader)));
  436|     99|  } else {
  437|      0|    FDKinitBitStream(&bsReader, hBs->hBitBuf.Buffer, hBs->hBitBuf.bufSize,
  438|      0|                     hBs->hBitBuf.ValidBits, BS_READER);
  439|      0|    FDKpushBiDirectional(&bsReader, rD->validBits);
  440|      0|  }
  441|       |
  442|     99|  int bits, rBits;
  443|     99|  rBits = (rD->maxBits >= 0) ? rD->maxBits : -rD->maxBits; /* ramaining bits */
  ------------------
  |  Branch (443:11): [True: 99, False: 0]
  ------------------
  444|     99|  if ((rD->maxBits > 0) && ((rD->bitBufCntBits >> 3 << 3) < rBits)) {
  ------------------
  |  Branch (444:7): [True: 99, False: 0]
  |  Branch (444:28): [True: 0, False: 99]
  ------------------
  445|      0|    bits = rD->bitBufCntBits;
  446|     99|  } else {
  447|     99|    bits = rBits;
  448|     99|  }
  449|       |
  450|     99|  int words = bits >> 3;  /* processing bytes */
  451|     99|  int mBits = bits & 0x7; /* modulo bits */
  452|       |
  453|     99|  if (hCrcInfo->pCrcLookup) {
  ------------------
  |  Branch (453:7): [True: 0, False: 99]
  ------------------
  454|      0|    rBits -= (calcCrc_Bytes(&crc, hCrcInfo->pCrcLookup, &bsReader, words) << 3);
  455|     99|  } else {
  456|     99|    rBits -= calcCrc_Bits(&crc, hCrcInfo->crcMask, hCrcInfo->crcPoly, &bsReader,
  457|     99|                          words << 3);
  458|     99|  }
  459|       |
  460|       |  /* remaining valid bits*/
  461|     99|  if (mBits != 0) {
  ------------------
  |  Branch (461:7): [True: 0, False: 99]
  ------------------
  462|      0|    rBits -= calcCrc_Bits(&crc, hCrcInfo->crcMask, hCrcInfo->crcPoly, &bsReader,
  463|      0|                          mBits);
  464|      0|  }
  465|       |
  466|     99|  if (rBits != 0) {
  ------------------
  |  Branch (466:7): [True: 0, False: 99]
  ------------------
  467|       |    /* zero bytes */
  468|      0|    if ((hCrcInfo->pCrcLookup) && (rBits > 8)) {
  ------------------
  |  Branch (468:9): [True: 0, False: 0]
  |  Branch (468:35): [True: 0, False: 0]
  ------------------
  469|      0|      rBits -=
  470|      0|          (calcCrc_Bytes(&crc, hCrcInfo->pCrcLookup, NULL, rBits >> 3) << 3);
  471|      0|    }
  472|       |    /* remaining zero bits */
  473|      0|    if (rBits != 0) {
  ------------------
  |  Branch (473:9): [True: 0, False: 0]
  ------------------
  474|      0|      calcCrc_Bits(&crc, hCrcInfo->crcMask, hCrcInfo->crcPoly, NULL, rBits);
  475|      0|    }
  476|      0|  }
  477|       |
  478|     99|  hCrcInfo->crcValue = crc;
  479|     99|}
FDK_crc.cpp:_ZL12calcCrc_BitsPtttP13FDK_BITSTREAMi:
  337|     99|                               INT nBits) {
  338|     99|  int i;
  339|     99|  USHORT crc = *pCrc; /* get crc value */
  340|       |
  341|     99|  if (hBs != NULL) {
  ------------------
  |  Branch (341:7): [True: 99, False: 0]
  ------------------
  342|  2.13k|    for (i = 0; (i < nBits); i++) {
  ------------------
  |  Branch (342:17): [True: 2.03k, False: 99]
  ------------------
  343|  2.03k|      USHORT tmp = FDKreadBit(hBs);  // process single bit
  344|  2.03k|      tmp ^= ((crc & crcMask) ? 1 : 0);
  ------------------
  |  Branch (344:15): [True: 1.45k, False: 575]
  ------------------
  345|  2.03k|      if (tmp != 0) tmp = crcPoly;
  ------------------
  |  Branch (345:11): [True: 809, False: 1.22k]
  ------------------
  346|  2.03k|      crc <<= 1;
  347|  2.03k|      crc ^= tmp;
  348|  2.03k|    }
  349|     99|  } else {
  350|      0|    for (i = 0; (i < nBits); i++) {
  ------------------
  |  Branch (350:17): [True: 0, False: 0]
  ------------------
  351|      0|      USHORT tmp = (crc & crcMask) ? crcPoly : 0;  // process single bit
  ------------------
  |  Branch (351:20): [True: 0, False: 0]
  ------------------
  352|      0|      crc <<= 1;
  353|      0|      crc ^= tmp;
  354|      0|    }
  355|      0|  }
  356|     99|  *pCrc = crc; /* update crc value */
  357|       |
  358|     99|  return nBits;
  359|     99|}

_Z18FDKdecorrelateOpenP10DECORR_DECPii:
 1426|     92|                       const INT bufLen) {
 1427|     92|  HANDLE_DECORR_DEC self = hDecorrDec;
 1428|       |
 1429|     92|  if (bufLen < (2 * ((825) + (373)))) return 1;
  ------------------
  |  Branch (1429:7): [True: 0, False: 92]
  ------------------
 1430|       |
 1431|       |  /* assign all memory to stateBufferCplx. It is reassigned during
 1432|       |   * FDKdecorrelateInit() */
 1433|     92|  self->stateBufferCplx = bufferCplx;
 1434|     92|  self->L_stateBufferCplx = 0;
 1435|       |
 1436|     92|  self->delayBufferCplx = NULL;
 1437|     92|  self->L_delayBufferCplx = 0;
 1438|       |
 1439|     92|  return 0;
 1440|     92|}
_Z19FDKdecorrelateCloseP10DECORR_DEC:
 1621|     92|INT FDKdecorrelateClose(HANDLE_DECORR_DEC hDecorrDec) {
 1622|     92|  INT err = 0;
 1623|       |
 1624|     92|  if (hDecorrDec == NULL) {
  ------------------
  |  Branch (1624:7): [True: 0, False: 92]
  ------------------
 1625|      0|    return 1;
 1626|      0|  }
 1627|       |
 1628|     92|  hDecorrDec->stateBufferCplx = NULL;
 1629|     92|  hDecorrDec->L_stateBufferCplx = 0;
 1630|     92|  hDecorrDec->delayBufferCplx = NULL;
 1631|     92|  hDecorrDec->L_delayBufferCplx = 0;
 1632|       |
 1633|     92|  return err;
 1634|     92|}

_Z21FDKhybridAnalysisOpenP18FDK_ANA_HYB_FILTERPijS1_j:
  206|    184|                          FIXP_DBL *const pHFmemory, const UINT HFmemorySize) {
  207|    184|  INT err = 0;
  208|       |
  209|       |  /* Save pointer to extern memory. */
  210|    184|  hAnalysisHybFilter->pLFmemory = pLFmemory;
  211|    184|  hAnalysisHybFilter->LFmemorySize = LFmemorySize;
  212|       |
  213|    184|  hAnalysisHybFilter->pHFmemory = pHFmemory;
  214|    184|  hAnalysisHybFilter->HFmemorySize = HFmemorySize;
  215|       |
  216|    184|  return err;
  217|    184|}

_Z25fdkCallocMatrix1D_alignedjj:
  107|    144|void *fdkCallocMatrix1D_aligned(UINT dim1, UINT size) {
  108|    144|  return FDKaalloc(dim1 * size, ALIGNMENT_DEFAULT);
  ------------------
  |  |  256|    144|#define ALIGNMENT_DEFAULT 8
  ------------------
  109|    144|}
_Z21fdkCallocMatrix1D_intjj14MEMORY_SECTION:
  111|  3.03k|void *fdkCallocMatrix1D_int(UINT dim, UINT size, MEMORY_SECTION s) {
  112|  3.03k|  return FDKcalloc_L(dim, size, s);
  113|  3.03k|}
_Z29fdkCallocMatrix1D_int_alignedjj14MEMORY_SECTION:
  115|    368|void *fdkCallocMatrix1D_int_aligned(UINT dim, UINT size, MEMORY_SECTION s) {
  116|    368|  return FDKaalloc_L(dim * size, ALIGNMENT_DEFAULT, s);
  ------------------
  |  |  256|    368|#define ALIGNMENT_DEFAULT 8
  ------------------
  117|    368|}
_Z15fdkFreeMatrix1DPv:
  119|  53.3k|void fdkFreeMatrix1D(void *p) {
  120|  53.3k|  if (p != NULL) {
  ------------------
  |  Branch (120:7): [True: 53.3k, False: 0]
  ------------------
  121|  53.3k|    FDKfree_L(p);
  122|  53.3k|  }
  123|  53.3k|}
_Z23fdkFreeMatrix1D_alignedPv:
  125|    512|void fdkFreeMatrix1D_aligned(void *p) {
  126|    512|  if (p != NULL) {
  ------------------
  |  Branch (126:7): [True: 512, False: 0]
  ------------------
  127|    512|    FDKafree_L(p);
  128|    512|  }
  129|    512|}
_Z17fdkCallocMatrix1Djj:
  131|  50.2k|void *fdkCallocMatrix1D(UINT dim1, UINT size) { return FDKcalloc(dim1, size); }
_Z17fdkCallocMatrix2Djjj:
  134|  1.01k|void **fdkCallocMatrix2D(UINT dim1, UINT dim2, UINT size) {
  135|  1.01k|  void **p1;
  136|  1.01k|  UINT i;
  137|  1.01k|  char *p2;
  138|  1.01k|  if (!dim1 || !dim2) return NULL;
  ------------------
  |  Branch (138:7): [True: 0, False: 1.01k]
  |  Branch (138:16): [True: 0, False: 1.01k]
  ------------------
  139|  1.01k|  if ((p1 = (void **)fdkCallocMatrix1D(dim1, sizeof(void *))) == NULL) {
  ------------------
  |  Branch (139:7): [True: 0, False: 1.01k]
  ------------------
  140|      0|    goto bail;
  141|      0|  }
  142|  1.01k|  if ((p2 = (char *)fdkCallocMatrix1D(dim1 * dim2, size)) == NULL) {
  ------------------
  |  Branch (142:7): [True: 0, False: 1.01k]
  ------------------
  143|      0|    fdkFreeMatrix1D(p1);
  144|      0|    p1 = NULL;
  145|      0|    goto bail;
  146|      0|  }
  147|  2.76k|  for (i = 0; i < dim1; i++) {
  ------------------
  |  Branch (147:15): [True: 1.74k, False: 1.01k]
  ------------------
  148|  1.74k|    p1[i] = p2;
  149|  1.74k|    p2 += dim2 * size;
  150|  1.74k|  }
  151|  1.01k|bail:
  152|  1.01k|  return p1;
  153|  1.01k|}
_Z25fdkCallocMatrix2D_alignedjjj:
  155|    144|void **fdkCallocMatrix2D_aligned(UINT dim1, UINT dim2, UINT size) {
  156|    144|  void **p1;
  157|    144|  UINT i;
  158|    144|  char *p2;
  159|    144|  if (!dim1 || !dim2) return NULL;
  ------------------
  |  Branch (159:7): [True: 0, False: 144]
  |  Branch (159:16): [True: 0, False: 144]
  ------------------
  160|    144|  if ((p1 = (void **)fdkCallocMatrix1D(dim1, sizeof(void *))) == NULL) {
  ------------------
  |  Branch (160:7): [True: 0, False: 144]
  ------------------
  161|      0|    goto bail;
  162|      0|  }
  163|    144|  if ((p2 = (char *)fdkCallocMatrix1D_aligned(dim1 * dim2, size)) == NULL) {
  ------------------
  |  Branch (163:7): [True: 0, False: 144]
  ------------------
  164|      0|    fdkFreeMatrix1D(p1);
  165|      0|    p1 = NULL;
  166|      0|    goto bail;
  167|      0|  }
  168|  6.80k|  for (i = 0; i < dim1; i++) {
  ------------------
  |  Branch (168:15): [True: 6.65k, False: 144]
  ------------------
  169|  6.65k|    p1[i] = p2;
  170|  6.65k|    p2 += dim2 * size;
  171|  6.65k|  }
  172|    144|bail:
  173|    144|  return p1;
  174|    144|}
_Z15fdkFreeMatrix2DPPv:
  176|  2.02k|void fdkFreeMatrix2D(void **p) {
  177|  2.02k|  if (!p) return;
  ------------------
  |  Branch (177:7): [True: 0, False: 2.02k]
  ------------------
  178|  2.02k|  fdkFreeMatrix1D(p[0]);
  179|  2.02k|  fdkFreeMatrix1D(p);
  180|  2.02k|}
_Z23fdkFreeMatrix2D_alignedPPv:
  182|  2.16k|void fdkFreeMatrix2D_aligned(void **p) {
  183|  2.16k|  if (!p) return;
  ------------------
  |  Branch (183:7): [True: 1.65k, False: 512]
  ------------------
  184|    512|  fdkFreeMatrix1D_aligned(p[0]);
  185|    512|  fdkFreeMatrix1D(p);
  186|    512|}
_Z21fdkCallocMatrix2D_intjjj14MEMORY_SECTION:
  189|  1.01k|                             MEMORY_SECTION s) {
  190|  1.01k|  void **p1;
  191|  1.01k|  UINT i;
  192|  1.01k|  char *p2;
  193|       |
  194|  1.01k|  if (!dim1 || !dim2) return NULL;
  ------------------
  |  Branch (194:7): [True: 0, False: 1.01k]
  |  Branch (194:16): [True: 0, False: 1.01k]
  ------------------
  195|  1.01k|  if ((p1 = (void **)fdkCallocMatrix1D_int(dim1, sizeof(void *), s)) == NULL) {
  ------------------
  |  Branch (195:7): [True: 0, False: 1.01k]
  ------------------
  196|      0|    goto bail;
  197|      0|  }
  198|  1.01k|  if ((p2 = (char *)fdkCallocMatrix1D_int(dim1 * dim2, size, s)) == NULL) {
  ------------------
  |  Branch (198:7): [True: 0, False: 1.01k]
  ------------------
  199|      0|    fdkFreeMatrix1D(p1);
  200|      0|    p1 = NULL;
  201|      0|    goto bail;
  202|      0|  }
  203|  2.57k|  for (i = 0; i < dim1; i++) {
  ------------------
  |  Branch (203:15): [True: 1.56k, False: 1.01k]
  ------------------
  204|  1.56k|    p1[i] = p2;
  205|  1.56k|    p2 += dim2 * size;
  206|  1.56k|  }
  207|  1.01k|bail:
  208|  1.01k|  return p1;
  209|  1.01k|}
_Z29fdkCallocMatrix2D_int_alignedjjj14MEMORY_SECTION:
  212|    368|                                     MEMORY_SECTION s) {
  213|    368|  void **p1;
  214|    368|  UINT i;
  215|    368|  char *p2;
  216|       |
  217|    368|  if (!dim1 || !dim2) return NULL;
  ------------------
  |  Branch (217:7): [True: 0, False: 368]
  |  Branch (217:16): [True: 0, False: 368]
  ------------------
  218|    368|  if ((p1 = (void **)fdkCallocMatrix1D_int(dim1, sizeof(void *), s)) == NULL) {
  ------------------
  |  Branch (218:7): [True: 0, False: 368]
  ------------------
  219|      0|    goto bail;
  220|      0|  }
  221|    368|  if ((p2 = (char *)fdkCallocMatrix1D_int_aligned(dim1 * dim2, size, s)) ==
  ------------------
  |  Branch (221:7): [True: 0, False: 368]
  ------------------
  222|    368|      NULL) {
  223|      0|    fdkFreeMatrix1D(p1);
  224|      0|    p1 = NULL;
  225|      0|    goto bail;
  226|      0|  }
  227|    736|  for (i = 0; i < dim1; i++) {
  ------------------
  |  Branch (227:15): [True: 368, False: 368]
  ------------------
  228|    368|    p1[i] = p2;
  229|    368|    p2 += dim2 * size;
  230|    368|  }
  231|    368|bail:
  232|    368|  return p1;
  233|    368|}
_Z17fdkCallocMatrix3Djjjj:
  236|    736|void ***fdkCallocMatrix3D(UINT dim1, UINT dim2, UINT dim3, UINT size) {
  237|    736|  void ***p1;
  238|    736|  UINT i, j;
  239|    736|  void **p2;
  240|    736|  char *p3;
  241|       |
  242|    736|  if (!dim1 || !dim2 || !dim3) return NULL;
  ------------------
  |  Branch (242:7): [True: 0, False: 736]
  |  Branch (242:16): [True: 0, False: 736]
  |  Branch (242:25): [True: 0, False: 736]
  ------------------
  243|    736|  if ((p1 = (void ***)fdkCallocMatrix1D(dim1, sizeof(void **))) == NULL) {
  ------------------
  |  Branch (243:7): [True: 0, False: 736]
  ------------------
  244|      0|    goto bail;
  245|      0|  }
  246|    736|  if ((p2 = (void **)fdkCallocMatrix1D(dim1 * dim2, sizeof(void *))) == NULL) {
  ------------------
  |  Branch (246:7): [True: 0, False: 736]
  ------------------
  247|      0|    fdkFreeMatrix1D(p1);
  248|      0|    p1 = NULL;
  249|      0|    goto bail;
  250|      0|  }
  251|    736|  p1[0] = p2;
  252|    736|  if ((p3 = (char *)fdkCallocMatrix1D(dim1 * dim2 * dim3, size)) == NULL) {
  ------------------
  |  Branch (252:7): [True: 0, False: 736]
  ------------------
  253|      0|    fdkFreeMatrix1D(p1);
  254|      0|    fdkFreeMatrix1D(p2);
  255|      0|    p1 = NULL;
  256|      0|    p2 = NULL;
  257|      0|    goto bail;
  258|      0|  }
  259|  1.65k|  for (i = 0; i < dim1; i++) {
  ------------------
  |  Branch (259:15): [True: 920, False: 736]
  ------------------
  260|    920|    p1[i] = p2;
  261|  6.62k|    for (j = 0; j < dim2; j++) {
  ------------------
  |  Branch (261:17): [True: 5.70k, False: 920]
  ------------------
  262|  5.70k|      p2[j] = p3;
  263|  5.70k|      p3 += dim3 * size;
  264|  5.70k|    }
  265|    920|    p2 += dim2;
  266|    920|  }
  267|    736|bail:
  268|    736|  return p1;
  269|    736|}
_Z15fdkFreeMatrix3DPPPv:
  271|    920|void fdkFreeMatrix3D(void ***p) {
  272|    920|  if (!p) return;
  ------------------
  |  Branch (272:7): [True: 0, False: 920]
  ------------------
  273|    920|  if (p[0] != NULL) fdkFreeMatrix1D(p[0][0]);
  ------------------
  |  Branch (273:7): [True: 920, False: 0]
  ------------------
  274|    920|  fdkFreeMatrix1D(p[0]);
  275|    920|  fdkFreeMatrix1D(p);
  276|    920|}
_Z21fdkCallocMatrix3D_intjjjj14MEMORY_SECTION:
  279|    184|                              MEMORY_SECTION s) {
  280|    184|  void ***p1;
  281|    184|  UINT i, j;
  282|    184|  void **p2;
  283|    184|  char *p3;
  284|       |
  285|    184|  if (!dim1 || !dim2 || !dim3) return NULL;
  ------------------
  |  Branch (285:7): [True: 0, False: 184]
  |  Branch (285:16): [True: 0, False: 184]
  |  Branch (285:25): [True: 0, False: 184]
  ------------------
  286|    184|  if ((p1 = (void ***)fdkCallocMatrix1D_int(dim1, sizeof(void **), s)) ==
  ------------------
  |  Branch (286:7): [True: 0, False: 184]
  ------------------
  287|    184|      NULL) {
  288|      0|    goto bail;
  289|      0|  }
  290|    184|  if ((p2 = (void **)fdkCallocMatrix1D_int(dim1 * dim2, sizeof(void *), s)) ==
  ------------------
  |  Branch (290:7): [True: 0, False: 184]
  ------------------
  291|    184|      NULL) {
  292|      0|    fdkFreeMatrix1D(p1);
  293|      0|    p1 = NULL;
  294|      0|    goto bail;
  295|      0|  }
  296|    184|  p1[0] = p2;
  297|    184|  if ((p3 = (char *)fdkCallocMatrix1D_int(dim1 * dim2 * dim3, size, s)) ==
  ------------------
  |  Branch (297:7): [True: 0, False: 184]
  ------------------
  298|    184|      NULL) {
  299|      0|    fdkFreeMatrix1D(p1);
  300|      0|    fdkFreeMatrix1D(p2);
  301|      0|    p1 = NULL;
  302|      0|    p2 = NULL;
  303|      0|    goto bail;
  304|      0|  }
  305|    552|  for (i = 0; i < dim1; i++) {
  ------------------
  |  Branch (305:15): [True: 368, False: 184]
  ------------------
  306|    368|    p1[i] = p2;
  307|  1.10k|    for (j = 0; j < dim2; j++) {
  ------------------
  |  Branch (307:17): [True: 736, False: 368]
  ------------------
  308|    736|      p2[j] = p3;
  309|    736|      p3 += dim3 * size;
  310|    736|    }
  311|    368|    p2 += dim2;
  312|    368|  }
  313|    184|bail:
  314|    184|  return p1;
  315|    184|}

_Z28FDK_QmfDomain_ClearRequestedP17FDK_QMF_DOMAIN_GC:
  779|  10.4k|void FDK_QmfDomain_ClearRequested(HANDLE_FDK_QMF_DOMAIN_GC hgc) {
  780|  10.4k|  hgc->qmfDomainExplicitConfig = 0;
  781|  10.4k|  hgc->flags_requested = 0;
  782|  10.4k|  hgc->nInputChannels_requested = 0;
  783|  10.4k|  hgc->nOutputChannels_requested = 0;
  784|  10.4k|  hgc->parkChannel_requested = 0;
  785|  10.4k|  hgc->nBandsAnalysis_requested = 0;
  786|  10.4k|  hgc->nBandsSynthesis_requested = 0;
  787|  10.4k|  hgc->nQmfTimeSlots_requested = 0;
  788|  10.4k|  hgc->nQmfOvTimeSlots_requested = 0;
  789|  10.4k|  hgc->nQmfProcBands_requested = 0;
  790|  10.4k|  hgc->nQmfProcChannels_requested = 0;
  791|  10.4k|}
_Z21FDK_QmfDomain_FreeMemP14FDK_QMF_DOMAIN:
  997|  3.06k|void FDK_QmfDomain_FreeMem(HANDLE_FDK_QMF_DOMAIN hqd) {
  998|  3.06k|  FDK_QmfDomain_FreeWorkBuffer(hqd);
  999|       |
 1000|  3.06k|  FDK_QmfDomain_FreePersistentMemory(hqd);
 1001|       |
 1002|  3.06k|  FDK_QmfDomain_ClearFilterBank(hqd);
 1003|       |
 1004|  3.06k|  FDK_QmfDomain_ClearConfigured(&hqd->globalConf);
 1005|       |
 1006|  3.06k|  FDK_QmfDomain_ClearRequested(&hqd->globalConf);
 1007|  3.06k|}
_Z19FDK_QmfDomain_CloseP14FDK_QMF_DOMAIN:
 1009|  7.39k|void FDK_QmfDomain_Close(HANDLE_FDK_QMF_DOMAIN hqd) {
 1010|  7.39k|  FDK_QmfDomain_FreeWorkBuffer(hqd);
 1011|       |
 1012|  7.39k|  FDK_QmfDomain_FreePersistentMemory(hqd);
 1013|  7.39k|}
FDK_qmf_domain.cpp:_ZL28FDK_QmfDomain_FreeWorkBufferP14FDK_QMF_DOMAIN:
  987|  10.4k|static void FDK_QmfDomain_FreeWorkBuffer(HANDLE_FDK_QMF_DOMAIN hqd) {
  988|  10.4k|  FIXP_DBL **pWorkBuffer = hqd->globalConf.pWorkBuffer;
  989|       |
  990|  10.4k|  if (pWorkBuffer[0]) FreeQmfWorkBufferCore6(&pWorkBuffer[0]);
  ------------------
  |  Branch (990:7): [True: 0, False: 10.4k]
  ------------------
  991|  10.4k|  if (pWorkBuffer[1]) FreeQmfWorkBufferCore1(&pWorkBuffer[1]);
  ------------------
  |  Branch (991:7): [True: 0, False: 10.4k]
  ------------------
  992|  10.4k|  if (pWorkBuffer[2]) FreeQmfWorkBufferCore3(&pWorkBuffer[2]);
  ------------------
  |  Branch (992:7): [True: 0, False: 10.4k]
  ------------------
  993|  10.4k|  if (pWorkBuffer[3]) FreeQmfWorkBufferCore4(&pWorkBuffer[3]);
  ------------------
  |  Branch (993:7): [True: 0, False: 10.4k]
  ------------------
  994|  10.4k|  if (pWorkBuffer[4]) FreeQmfWorkBufferCore7(&pWorkBuffer[4]);
  ------------------
  |  Branch (994:7): [True: 0, False: 10.4k]
  ------------------
  995|  10.4k|}
FDK_qmf_domain.cpp:_ZL34FDK_QmfDomain_FreePersistentMemoryP14FDK_QMF_DOMAIN:
  199|  10.4k|static int FDK_QmfDomain_FreePersistentMemory(HANDLE_FDK_QMF_DOMAIN qd) {
  200|  10.4k|  int err = 0;
  201|  10.4k|  int ch;
  202|       |
  203|   104k|  for (ch = 0; ch < ((8) + (1)); ch++) {
  ------------------
  |  Branch (203:16): [True: 94.0k, False: 10.4k]
  ------------------
  204|  94.0k|    if (qd->QmfDomainIn[ch].pAnaQmfStates) {
  ------------------
  |  Branch (204:9): [True: 0, False: 94.0k]
  ------------------
  205|      0|      if (qd->globalConf.nBandsAnalysis == QMF_DOMAIN_ANALYSIS_QMF_BANDS_16) {
  ------------------
  |  |  137|      0|#define QMF_DOMAIN_ANALYSIS_QMF_BANDS_16 (16)
  ------------------
  |  Branch (205:11): [True: 0, False: 0]
  ------------------
  206|      0|        FreeAnaQmfStates16(&qd->QmfDomainIn[ch].pAnaQmfStates);
  207|      0|      } else if (qd->globalConf.nBandsAnalysis ==
  ------------------
  |  Branch (207:18): [True: 0, False: 0]
  ------------------
  208|      0|                 QMF_DOMAIN_ANALYSIS_QMF_BANDS_24) {
  ------------------
  |  |  138|      0|#define QMF_DOMAIN_ANALYSIS_QMF_BANDS_24 (24)
  ------------------
  209|      0|        FreeAnaQmfStates24(&qd->QmfDomainIn[ch].pAnaQmfStates);
  210|      0|      } else if (qd->globalConf.nBandsAnalysis ==
  ------------------
  |  Branch (210:18): [True: 0, False: 0]
  ------------------
  211|      0|                 QMF_DOMAIN_ANALYSIS_QMF_BANDS_32) {
  ------------------
  |  |  139|      0|#define QMF_DOMAIN_ANALYSIS_QMF_BANDS_32 (32)
  ------------------
  212|      0|        FreeAnaQmfStates32(&qd->QmfDomainIn[ch].pAnaQmfStates);
  213|      0|      } else {
  214|      0|        FreeAnaQmfStates(&qd->QmfDomainIn[ch].pAnaQmfStates);
  215|      0|      }
  216|      0|    }
  217|       |
  218|  94.0k|    if (qd->QmfDomainIn[ch].pOverlapBuffer) {
  ------------------
  |  Branch (218:9): [True: 0, False: 94.0k]
  ------------------
  219|      0|      if (qd->globalConf.nQmfOvTimeSlots == QMF_DOMAIN_OV_TIMESLOTS_16) {
  ------------------
  |  |  144|      0|#define QMF_DOMAIN_OV_TIMESLOTS_16 (3)
  ------------------
  |  Branch (219:11): [True: 0, False: 0]
  ------------------
  220|      0|        FreeQmfOverlapBuffer16(&qd->QmfDomainIn[ch].pOverlapBuffer);
  221|      0|      } else if (qd->globalConf.nQmfOvTimeSlots == QMF_DOMAIN_OV_TIMESLOTS_32) {
  ------------------
  |  |  145|      0|#define QMF_DOMAIN_OV_TIMESLOTS_32 (6)
  ------------------
  |  Branch (221:18): [True: 0, False: 0]
  ------------------
  222|      0|        FreeQmfOverlapBuffer32(&qd->QmfDomainIn[ch].pOverlapBuffer);
  223|      0|      } else {
  224|      0|        FreeQmfOverlapBuffer(&qd->QmfDomainIn[ch].pOverlapBuffer);
  225|      0|      }
  226|      0|    }
  227|       |
  228|  94.0k|    if (qd->QmfDomainIn[ch].hQmfSlotsReal) {
  ------------------
  |  Branch (228:9): [True: 0, False: 94.0k]
  ------------------
  229|      0|      if (qd->globalConf.nQmfTimeSlots == QMF_DOMAIN_TIMESLOTS_16) {
  ------------------
  |  |  141|      0|#define QMF_DOMAIN_TIMESLOTS_16 (16)
  ------------------
  |  Branch (229:11): [True: 0, False: 0]
  ------------------
  230|      0|        FreeQmfSlotsReal16(&qd->QmfDomainIn[ch].hQmfSlotsReal);
  231|      0|      } else if (qd->globalConf.nQmfTimeSlots == QMF_DOMAIN_TIMESLOTS_32) {
  ------------------
  |  |  142|      0|#define QMF_DOMAIN_TIMESLOTS_32 (32)
  ------------------
  |  Branch (231:18): [True: 0, False: 0]
  ------------------
  232|      0|        FreeQmfSlotsReal32(&qd->QmfDomainIn[ch].hQmfSlotsReal);
  233|      0|      } else {
  234|      0|        FreeQmfSlotsReal(&qd->QmfDomainIn[ch].hQmfSlotsReal);
  235|      0|      }
  236|      0|    }
  237|       |
  238|  94.0k|    if (qd->QmfDomainIn[ch].hQmfSlotsImag) {
  ------------------
  |  Branch (238:9): [True: 0, False: 94.0k]
  ------------------
  239|      0|      if (qd->globalConf.nQmfTimeSlots == QMF_DOMAIN_TIMESLOTS_16) {
  ------------------
  |  |  141|      0|#define QMF_DOMAIN_TIMESLOTS_16 (16)
  ------------------
  |  Branch (239:11): [True: 0, False: 0]
  ------------------
  240|      0|        FreeQmfSlotsImag16(&qd->QmfDomainIn[ch].hQmfSlotsImag);
  241|      0|      }
  242|      0|      if (qd->globalConf.nQmfTimeSlots == QMF_DOMAIN_TIMESLOTS_32) {
  ------------------
  |  |  142|      0|#define QMF_DOMAIN_TIMESLOTS_32 (32)
  ------------------
  |  Branch (242:11): [True: 0, False: 0]
  ------------------
  243|      0|        FreeQmfSlotsImag32(&qd->QmfDomainIn[ch].hQmfSlotsImag);
  244|      0|      } else {
  245|      0|        FreeQmfSlotsImag(&qd->QmfDomainIn[ch].hQmfSlotsImag);
  246|      0|      }
  247|      0|    }
  248|  94.0k|  }
  249|       |
  250|   104k|  for (ch = 0; ch < ((8) + (1)); ch++) {
  ------------------
  |  Branch (250:16): [True: 94.0k, False: 10.4k]
  ------------------
  251|  94.0k|    if (qd->QmfDomainOut[ch].pSynQmfStates) {
  ------------------
  |  Branch (251:9): [True: 0, False: 94.0k]
  ------------------
  252|      0|      FreeSynQmfStates(&qd->QmfDomainOut[ch].pSynQmfStates);
  253|      0|    }
  254|  94.0k|  }
  255|       |
  256|  10.4k|  return err;
  257|  10.4k|}
FDK_qmf_domain.cpp:_ZL29FDK_QmfDomain_ClearFilterBankP14FDK_QMF_DOMAIN:
  806|  3.06k|static void FDK_QmfDomain_ClearFilterBank(HANDLE_FDK_QMF_DOMAIN hqd) {
  807|  3.06k|  int ch;
  808|       |
  809|  30.6k|  for (ch = 0; ch < ((8) + (1)); ch++) {
  ------------------
  |  Branch (809:16): [True: 27.5k, False: 3.06k]
  ------------------
  810|  27.5k|    FDKmemclear(&hqd->QmfDomainIn[ch].fb, sizeof(hqd->QmfDomainIn[ch].fb));
  811|  27.5k|  }
  812|       |
  813|  30.6k|  for (ch = 0; ch < ((8) + (1)); ch++) {
  ------------------
  |  Branch (813:16): [True: 27.5k, False: 3.06k]
  ------------------
  814|  27.5k|    FDKmemclear(&hqd->QmfDomainOut[ch].fb, sizeof(hqd->QmfDomainIn[ch].fb));
  815|  27.5k|  }
  816|  3.06k|}
FDK_qmf_domain.cpp:_ZL29FDK_QmfDomain_ClearConfiguredP17FDK_QMF_DOMAIN_GC:
  793|  3.06k|static void FDK_QmfDomain_ClearConfigured(HANDLE_FDK_QMF_DOMAIN_GC hgc) {
  794|  3.06k|  hgc->flags = 0;
  795|  3.06k|  hgc->nInputChannels = 0;
  796|  3.06k|  hgc->nOutputChannels = 0;
  797|  3.06k|  hgc->parkChannel = 0;
  798|  3.06k|  hgc->nBandsAnalysis = 0;
  799|  3.06k|  hgc->nBandsSynthesis = 0;
  800|  3.06k|  hgc->nQmfTimeSlots = 0;
  801|  3.06k|  hgc->nQmfOvTimeSlots = 0;
  802|  3.06k|  hgc->nQmfProcBands = 0;
  803|  3.06k|  hgc->nQmfProcChannels = 0;
  804|  3.06k|}

_Z9CalcLdInti:
  378|  5.24k|FIXP_DBL CalcLdInt(INT i) {
  379|       |  /* calculates ld(op)/LD_DATA_SCALING */
  380|       |  /* op is assumed to be an integer value between 1 and LD_INT_TAB_LEN */
  381|       |
  382|  5.24k|  FDK_ASSERT((LD_INT_TAB_LEN > 0) &&
  ------------------
  |  |  221|  5.24k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (382:3): [True: 0, Folded]
  |  Branch (382:3): [True: 0, Folded]
  |  Branch (382:3): [True: 5.24k, Folded]
  ------------------
  383|  5.24k|             ((FIXP_DBL)ldIntCoeff[0] ==
  384|  5.24k|              (FIXP_DBL)0x80000001)); /* tab has to be initialized */
  385|       |
  386|  5.24k|  if ((i > 0) && (i < LD_INT_TAB_LEN))
  ------------------
  |  |  250|  5.24k|  193 /* Default tab length. Lower value should be set in fix.h */
  ------------------
  |  Branch (386:7): [True: 5.24k, False: 0]
  |  Branch (386:18): [True: 5.24k, False: 0]
  ------------------
  387|  5.24k|    return ldIntCoeff[i];
  388|      0|  else {
  389|      0|    return (0);
  390|      0|  }
  391|  5.24k|}
_Z5f2PowiiPi:
  593|  16.7k|FIXP_DBL f2Pow(const FIXP_DBL exp_m, const INT exp_e, INT *result_e) {
  594|  16.7k|  FIXP_DBL frac_part, result_m;
  595|  16.7k|  INT int_part;
  596|       |
  597|  16.7k|  if (exp_e > 0) {
  ------------------
  |  Branch (597:7): [True: 0, False: 16.7k]
  ------------------
  598|      0|    INT exp_bits = DFRACT_BITS - 1 - exp_e;
  ------------------
  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  ------------------
  599|      0|    int_part = exp_m >> exp_bits;
  600|      0|    frac_part = exp_m - (FIXP_DBL)(int_part << exp_bits);
  601|      0|    frac_part = frac_part << exp_e;
  602|  16.7k|  } else {
  603|  16.7k|    int_part = 0;
  604|  16.7k|    frac_part = exp_m >> -exp_e;
  605|  16.7k|  }
  606|       |
  607|       |  /* Best accuracy is around 0, so try to get there with the fractional part. */
  608|  16.7k|  if (frac_part > FL2FXCONST_DBL(0.5f)) {
  ------------------
  |  |  192|  16.7k|  (FIXP_DBL)(                                                                \
  |  |  193|  16.7k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 16.7k, Folded]
  |  |  ------------------
  |  |  194|  16.7k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  16.7k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  16.7k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 16.7k]
  |  |  ------------------
  |  |  195|  16.7k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  16.7k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  16.7k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  16.7k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  16.7k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  16.7k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  16.7k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (608:7): [True: 0, False: 16.7k]
  ------------------
  609|      0|    int_part = int_part + 1;
  610|      0|    frac_part = frac_part + FL2FXCONST_DBL(-1.0f);
  ------------------
  |  |  192|      0|  (FIXP_DBL)(                                                                \
  |  |  193|      0|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 0]
  |  |  ------------------
  |  |  194|      0|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 0]
  |  |  ------------------
  |  |  195|      0|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|      0|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|      0|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [True: 0, Folded]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  611|      0|  }
  612|  16.7k|  if (frac_part < FL2FXCONST_DBL(-0.5f)) {
  ------------------
  |  |  192|  16.7k|  (FIXP_DBL)(                                                                \
  |  |  193|  16.7k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 16.7k]
  |  |  ------------------
  |  |  194|  16.7k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 0]
  |  |  ------------------
  |  |  195|      0|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|      0|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  16.7k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|  16.7k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  16.7k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 16.7k]
  |  |  ------------------
  |  |  199|  16.7k|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|  16.7k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|  16.7k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|  16.7k|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|  16.7k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|  16.7k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  16.7k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (612:7): [True: 0, False: 16.7k]
  ------------------
  613|      0|    int_part = int_part - 1;
  614|      0|    frac_part = -(FL2FXCONST_DBL(-1.0f) - frac_part);
  ------------------
  |  |  192|      0|  (FIXP_DBL)(                                                                \
  |  |  193|      0|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 0]
  |  |  ------------------
  |  |  194|      0|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 0]
  |  |  ------------------
  |  |  195|      0|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|      0|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|      0|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [True: 0, Folded]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  615|      0|  }
  616|       |
  617|       |  /* "+ 1" compensates fMultAddDiv2() of the polynomial evaluation below. */
  618|  16.7k|  *result_e = int_part + 1;
  619|       |
  620|       |  /* Evaluate taylor polynomial which approximates 2^x */
  621|  16.7k|  {
  622|  16.7k|    FIXP_DBL p;
  623|       |
  624|       |    /* result_m ~= 2^frac_part */
  625|  16.7k|    p = frac_part;
  626|       |    /* First taylor series coefficient a_0 = 1.0, scaled by 0.5 due to
  627|       |     * fMultDiv2(). */
  628|  16.7k|    result_m = FL2FXCONST_DBL(1.0f / 2.0f);
  ------------------
  |  |  192|  16.7k|  (FIXP_DBL)(                                                                \
  |  |  193|  16.7k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 16.7k, Folded]
  |  |  ------------------
  |  |  194|  16.7k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  16.7k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  16.7k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 16.7k]
  |  |  ------------------
  |  |  195|  16.7k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  16.7k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  16.7k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  16.7k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  16.7k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  16.7k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  16.7k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  629|   100k|    for (INT i = 0; i < POW2_PRECISION; i++) {
  ------------------
  |  |  128|   100k|#define POW2_PRECISION 5
  ------------------
  |  Branch (629:21): [True: 83.6k, False: 16.7k]
  ------------------
  630|       |      /* next taylor series term: a_i * x^i, x=0 */
  631|  83.6k|      result_m = fMultAddDiv2(result_m, pow2Coeff[i], p);
  632|  83.6k|      p = fMult(p, frac_part);
  633|  83.6k|    }
  634|  16.7k|  }
  635|  16.7k|  return result_m;
  636|  16.7k|}
_Z4fPowiiiiPi:
  649|  16.7k|              INT *result_e) {
  650|  16.7k|  INT ans_lg2_e, baselg2_e;
  651|  16.7k|  FIXP_DBL base_lg2, ans_lg2, result;
  652|       |
  653|  16.7k|  if (base_m <= (FIXP_DBL)0) {
  ------------------
  |  Branch (653:7): [True: 0, False: 16.7k]
  ------------------
  654|      0|    result = (FIXP_DBL)0;
  655|      0|    *result_e = 0;
  656|      0|    return result;
  657|      0|  }
  658|       |
  659|       |  /* Calc log2 of base */
  660|  16.7k|  base_lg2 = fLog2(base_m, base_e, &baselg2_e);
  661|       |
  662|       |  /* Prepare exp */
  663|  16.7k|  {
  664|  16.7k|    INT leadingBits;
  665|       |
  666|  16.7k|    leadingBits = CountLeadingBits(fAbs(exp_m));
  ------------------
  |  |  309|  16.7k|#define CountLeadingBits(x) fixnorm_D(x)
  ------------------
  667|  16.7k|    exp_m = exp_m << leadingBits;
  668|  16.7k|    exp_e -= leadingBits;
  669|  16.7k|  }
  670|       |
  671|       |  /* Calc base pow exp */
  672|  16.7k|  ans_lg2 = fMult(base_lg2, exp_m);
  673|  16.7k|  ans_lg2_e = exp_e + baselg2_e;
  674|       |
  675|       |  /* Calc antilog */
  676|  16.7k|  result = f2Pow(ans_lg2, ans_lg2_e, result_e);
  677|       |
  678|  16.7k|  return result;
  679|  16.7k|}

_Z9mdct_initP6mdct_tPii:
  109|  5.79k|void mdct_init(H_MDCT hMdct, FIXP_DBL *overlap, INT overlapBufferSize) {
  110|  5.79k|  hMdct->overlap.freq = overlap;
  111|       |  // FDKmemclear(overlap, overlapBufferSize*sizeof(FIXP_DBL));
  112|  5.79k|  hMdct->prev_fr = 0;
  113|  5.79k|  hMdct->prev_nr = 0;
  114|  5.79k|  hMdct->prev_tl = 0;
  115|  5.79k|  hMdct->ov_size = overlapBufferSize;
  116|  5.79k|  hMdct->prevAliasSymmetry = 0;
  117|  5.79k|  hMdct->prevPrevAliasSymmetry = 0;
  118|  5.79k|  hMdct->pFacZir = NULL;
  119|       |  hMdct->pAsymOvlp = NULL;
  120|  5.79k|}

tpdec_asc.cpp:_ZL20getSamplingRateIndexjj:
  419|  2.63k|static inline int getSamplingRateIndex(UINT samplingRate, UINT nBits) {
  420|  2.63k|  UINT sf_index;
  421|  2.63k|  UINT tableSize = (1 << nBits) - 1;
  422|       |
  423|  38.1k|  for (sf_index = 0; sf_index < tableSize; sf_index++) {
  ------------------
  |  Branch (423:22): [True: 36.1k, False: 2.01k]
  ------------------
  424|  36.1k|    if (SamplingRateTable[sf_index] == samplingRate) break;
  ------------------
  |  Branch (424:9): [True: 623, False: 35.4k]
  ------------------
  425|  36.1k|  }
  426|       |
  427|  2.63k|  if (sf_index > tableSize) {
  ------------------
  |  Branch (427:7): [True: 0, False: 2.63k]
  ------------------
  428|      0|    return tableSize - 1;
  429|      0|  }
  430|       |
  431|  2.63k|  return sf_index;
  432|  2.63k|}

_Z19CProgramConfig_InitP14CProgramConfig:
  186|  24.4k|void CProgramConfig_Init(CProgramConfig *pPce) {
  187|  24.4k|  FDKmemclear(pPce, sizeof(CProgramConfig));
  188|  24.4k|  pPce->SamplingFrequencyIndex = 0xf;
  189|  24.4k|}
_Z22CProgramConfig_IsValidPK14CProgramConfig:
  191|  7.02k|int CProgramConfig_IsValid(const CProgramConfig *pPce) {
  192|  7.02k|  return ((pPce->isValid) ? 1 : 0);
  ------------------
  |  Branch (192:11): [True: 811, False: 6.21k]
  ------------------
  193|  7.02k|}
_Z19CProgramConfig_ReadP14CProgramConfigP13FDK_BITSTREAMj:
  374|    500|                         UINT alignmentAnchor) {
  375|    500|  int i;
  376|    500|  int commentBytes;
  377|    500|  UCHAR tag, isCpe;
  378|    500|  UCHAR checkElementTagSelect[3][PC_FSB_CHANNELS_MAX] = {{0}};
  379|       |
  380|    500|  pPce->isValid = 1;
  381|    500|  pPce->NumEffectiveChannels = 0;
  382|    500|  pPce->NumChannels = 0;
  383|    500|  pPce->ElementInstanceTag = (UCHAR)FDKreadBits(bs, 4);
  384|    500|  pPce->Profile = (UCHAR)FDKreadBits(bs, 2);
  385|    500|  pPce->SamplingFrequencyIndex = (UCHAR)FDKreadBits(bs, 4);
  386|    500|  pPce->NumFrontChannelElements = (UCHAR)FDKreadBits(bs, 4);
  387|    500|  pPce->NumSideChannelElements = (UCHAR)FDKreadBits(bs, 4);
  388|    500|  pPce->NumBackChannelElements = (UCHAR)FDKreadBits(bs, 4);
  389|    500|  pPce->NumLfeChannelElements = (UCHAR)FDKreadBits(bs, 2);
  390|    500|  pPce->NumAssocDataElements = (UCHAR)FDKreadBits(bs, 3);
  391|    500|  pPce->NumValidCcElements = (UCHAR)FDKreadBits(bs, 4);
  392|       |
  393|    500|  if ((pPce->MonoMixdownPresent = (UCHAR)FDKreadBits(bs, 1)) != 0) {
  ------------------
  |  Branch (393:7): [True: 56, False: 444]
  ------------------
  394|     56|    pPce->MonoMixdownElementNumber = (UCHAR)FDKreadBits(bs, 4);
  395|     56|  }
  396|       |
  397|    500|  if ((pPce->StereoMixdownPresent = (UCHAR)FDKreadBits(bs, 1)) != 0) {
  ------------------
  |  Branch (397:7): [True: 44, False: 456]
  ------------------
  398|     44|    pPce->StereoMixdownElementNumber = (UCHAR)FDKreadBits(bs, 4);
  399|     44|  }
  400|       |
  401|    500|  if ((pPce->MatrixMixdownIndexPresent = (UCHAR)FDKreadBits(bs, 1)) != 0) {
  ------------------
  |  Branch (401:7): [True: 44, False: 456]
  ------------------
  402|     44|    pPce->MatrixMixdownIndex = (UCHAR)FDKreadBits(bs, 2);
  403|     44|    pPce->PseudoSurroundEnable = (UCHAR)FDKreadBits(bs, 1);
  404|     44|  }
  405|       |
  406|  1.46k|  for (i = 0; i < pPce->NumFrontChannelElements; i++) {
  ------------------
  |  Branch (406:15): [True: 960, False: 500]
  ------------------
  407|    960|    pPce->FrontElementIsCpe[i] = isCpe = (UCHAR)FDKreadBits(bs, 1);
  408|    960|    pPce->FrontElementTagSelect[i] = tag = (UCHAR)FDKreadBits(bs, 4);
  409|    960|    pPce->NumChannels += pPce->FrontElementIsCpe[i] ? 2 : 1;
  ------------------
  |  Branch (409:26): [True: 195, False: 765]
  ------------------
  410|       |
  411|       |    /* Check element instance tag according to ISO/IEC 13818-7:2003(E),
  412|       |     * chapter 8.2.1.1 */
  413|    960|    if (checkElementTagSelect[isCpe][tag] == 0) {
  ------------------
  |  Branch (413:9): [True: 515, False: 445]
  ------------------
  414|    515|      checkElementTagSelect[isCpe][tag] = 1;
  415|    515|    } else {
  416|    445|      pPce->isValid = 0;
  417|    445|    }
  418|    960|  }
  419|       |
  420|  1.29k|  for (i = 0; i < pPce->NumSideChannelElements; i++) {
  ------------------
  |  Branch (420:15): [True: 798, False: 500]
  ------------------
  421|    798|    pPce->SideElementIsCpe[i] = isCpe = (UCHAR)FDKreadBits(bs, 1);
  422|    798|    pPce->SideElementTagSelect[i] = tag = (UCHAR)FDKreadBits(bs, 4);
  423|    798|    pPce->NumChannels += pPce->SideElementIsCpe[i] ? 2 : 1;
  ------------------
  |  Branch (423:26): [True: 122, False: 676]
  ------------------
  424|       |
  425|       |    /* Check element instance tag according to ISO/IEC 13818-7:2003(E),
  426|       |     * chapter 8.2.1.1 */
  427|    798|    if (checkElementTagSelect[isCpe][tag] == 0) {
  ------------------
  |  Branch (427:9): [True: 266, False: 532]
  ------------------
  428|    266|      checkElementTagSelect[isCpe][tag] = 1;
  429|    532|    } else {
  430|    532|      pPce->isValid = 0;
  431|    532|    }
  432|    798|  }
  433|       |
  434|  1.39k|  for (i = 0; i < pPce->NumBackChannelElements; i++) {
  ------------------
  |  Branch (434:15): [True: 895, False: 500]
  ------------------
  435|    895|    pPce->BackElementIsCpe[i] = isCpe = (UCHAR)FDKreadBits(bs, 1);
  436|    895|    pPce->BackElementTagSelect[i] = tag = (UCHAR)FDKreadBits(bs, 4);
  437|    895|    pPce->NumChannels += pPce->BackElementIsCpe[i] ? 2 : 1;
  ------------------
  |  Branch (437:26): [True: 145, False: 750]
  ------------------
  438|       |
  439|       |    /* Check element instance tag according to ISO/IEC 13818-7:2003(E),
  440|       |     * chapter 8.2.1.1 */
  441|    895|    if (checkElementTagSelect[isCpe][tag] == 0) {
  ------------------
  |  Branch (441:9): [True: 354, False: 541]
  ------------------
  442|    354|      checkElementTagSelect[isCpe][tag] = 1;
  443|    541|    } else {
  444|    541|      pPce->isValid = 0;
  445|    541|    }
  446|    895|  }
  447|       |
  448|    500|  pPce->NumEffectiveChannels = pPce->NumChannels;
  449|       |
  450|    738|  for (i = 0; i < pPce->NumLfeChannelElements; i++) {
  ------------------
  |  Branch (450:15): [True: 238, False: 500]
  ------------------
  451|    238|    pPce->LfeElementTagSelect[i] = tag = (UCHAR)FDKreadBits(bs, 4);
  452|    238|    pPce->NumChannels += 1;
  453|       |
  454|       |    /* Check element instance tag according to ISO/IEC 13818-7:2003(E),
  455|       |     * chapter 8.2.1.1 */
  456|    238|    if (checkElementTagSelect[2][tag] == 0) {
  ------------------
  |  Branch (456:9): [True: 181, False: 57]
  ------------------
  457|    181|      checkElementTagSelect[2][tag] = 1;
  458|    181|    } else {
  459|     57|      pPce->isValid = 0;
  460|     57|    }
  461|    238|  }
  462|       |
  463|  1.05k|  for (i = 0; i < pPce->NumAssocDataElements; i++) {
  ------------------
  |  Branch (463:15): [True: 553, False: 500]
  ------------------
  464|    553|    pPce->AssocDataElementTagSelect[i] = (UCHAR)FDKreadBits(bs, 4);
  465|    553|  }
  466|       |
  467|  1.85k|  for (i = 0; i < pPce->NumValidCcElements; i++) {
  ------------------
  |  Branch (467:15): [True: 1.35k, False: 500]
  ------------------
  468|  1.35k|    pPce->CcElementIsIndSw[i] = (UCHAR)FDKreadBits(bs, 1);
  469|  1.35k|    pPce->ValidCcElementTagSelect[i] = (UCHAR)FDKreadBits(bs, 4);
  470|  1.35k|  }
  471|       |
  472|    500|  FDKbyteAlign(bs, alignmentAnchor);
  473|       |
  474|    500|  pPce->CommentFieldBytes = (UCHAR)FDKreadBits(bs, 8);
  475|    500|  commentBytes = pPce->CommentFieldBytes;
  476|       |
  477|       |  /* Search for height info extension and read it if available */
  478|    500|  if (CProgramConfig_ReadHeightExt(pPce, bs, &commentBytes, alignmentAnchor)) {
  ------------------
  |  Branch (478:7): [True: 40, False: 460]
  ------------------
  479|     40|    pPce->isValid = 0;
  480|     40|  }
  481|       |
  482|       |  /* Check order of elements according to ISO / IEC 13818 - 7:2003(E),
  483|       |   * chapter 8.5.1 */
  484|    500|  if (CProgramConfig_Check(pPce)) {
  ------------------
  |  Branch (484:7): [True: 46, False: 454]
  ------------------
  485|     46|    pPce->isValid = 0;
  486|     46|  }
  487|       |
  488|  13.2k|  for (i = 0; i < commentBytes; i++) {
  ------------------
  |  Branch (488:15): [True: 12.7k, False: 500]
  ------------------
  489|  12.7k|    UCHAR text;
  490|       |
  491|  12.7k|    text = (UCHAR)FDKreadBits(bs, 8);
  492|       |
  493|  12.7k|    if (i < PC_COMMENTLENGTH) {
  ------------------
  |  |  151|  12.7k|#define PC_COMMENTLENGTH 256
  ------------------
  |  Branch (493:9): [True: 12.7k, False: 0]
  ------------------
  494|  12.7k|      pPce->Comment[i] = text;
  495|  12.7k|    }
  496|  12.7k|  }
  497|    500|}
_Z22CProgramConfig_ComparePK14CProgramConfigS1_:
  508|    395|                           const CProgramConfig *const pPce2) {
  509|    395|  int result = 0; /* Innocent until proven false. */
  510|       |
  511|    395|  if (FDKmemcmp(pPce1, pPce2, sizeof(CProgramConfig)) !=
  ------------------
  |  Branch (511:7): [True: 392, False: 3]
  ------------------
  512|    395|      0) { /* Configurations are not completely equal.
  513|       |              So look into details and analyse the channel configurations: */
  514|    392|    result = -1;
  515|       |
  516|    392|    if (pPce1->NumChannels ==
  ------------------
  |  Branch (516:9): [True: 392, False: 0]
  ------------------
  517|    392|        pPce2->NumChannels) { /* Now the logic changes. We first assume to have
  518|       |                                 the same channel configuration and then prove
  519|       |                                 if this assumption is true. */
  520|    392|      result = 1;
  521|       |
  522|       |      /* Front channels */
  523|    392|      if (pPce1->NumFrontChannelElements != pPce2->NumFrontChannelElements) {
  ------------------
  |  Branch (523:11): [True: 295, False: 97]
  ------------------
  524|    295|        result = 2; /* different number of front channel elements */
  525|    295|      } else {
  526|     97|        int el, numCh1 = 0, numCh2 = 0;
  527|    276|        for (el = 0; el < pPce1->NumFrontChannelElements; el += 1) {
  ------------------
  |  Branch (527:22): [True: 198, False: 78]
  ------------------
  528|    198|          if (pPce1->FrontElementHeightInfo[el] !=
  ------------------
  |  Branch (528:15): [True: 19, False: 179]
  ------------------
  529|    198|              pPce2->FrontElementHeightInfo[el]) {
  530|     19|            result = 2; /* different height info */
  531|     19|            break;
  532|     19|          }
  533|    179|          numCh1 += pPce1->FrontElementIsCpe[el] ? 2 : 1;
  ------------------
  |  Branch (533:21): [True: 100, False: 79]
  ------------------
  534|    179|          numCh2 += pPce2->FrontElementIsCpe[el] ? 2 : 1;
  ------------------
  |  Branch (534:21): [True: 92, False: 87]
  ------------------
  535|    179|        }
  536|     97|        if (numCh1 != numCh2) {
  ------------------
  |  Branch (536:13): [True: 31, False: 66]
  ------------------
  537|     31|          result = 2; /* different number of front channels */
  538|     31|        }
  539|     97|      }
  540|       |      /* Side channels */
  541|    392|      if (pPce1->NumSideChannelElements != pPce2->NumSideChannelElements) {
  ------------------
  |  Branch (541:11): [True: 160, False: 232]
  ------------------
  542|    160|        result = 2; /* different number of side channel elements */
  543|    232|      } else {
  544|    232|        int el, numCh1 = 0, numCh2 = 0;
  545|    238|        for (el = 0; el < pPce1->NumSideChannelElements; el += 1) {
  ------------------
  |  Branch (545:22): [True: 11, False: 227]
  ------------------
  546|     11|          if (pPce1->SideElementHeightInfo[el] !=
  ------------------
  |  Branch (546:15): [True: 5, False: 6]
  ------------------
  547|     11|              pPce2->SideElementHeightInfo[el]) {
  548|      5|            result = 2; /* different height info */
  549|      5|            break;
  550|      5|          }
  551|      6|          numCh1 += pPce1->SideElementIsCpe[el] ? 2 : 1;
  ------------------
  |  Branch (551:21): [True: 6, False: 0]
  ------------------
  552|      6|          numCh2 += pPce2->SideElementIsCpe[el] ? 2 : 1;
  ------------------
  |  Branch (552:21): [True: 6, False: 0]
  ------------------
  553|      6|        }
  554|    232|        if (numCh1 != numCh2) {
  ------------------
  |  Branch (554:13): [True: 0, False: 232]
  ------------------
  555|      0|          result = 2; /* different number of side channels */
  556|      0|        }
  557|    232|      }
  558|       |      /* Back channels */
  559|    392|      if (pPce1->NumBackChannelElements != pPce2->NumBackChannelElements) {
  ------------------
  |  Branch (559:11): [True: 286, False: 106]
  ------------------
  560|    286|        result = 2; /* different number of back channel elements */
  561|    286|      } else {
  562|    106|        int el, numCh1 = 0, numCh2 = 0;
  563|    167|        for (el = 0; el < pPce1->NumBackChannelElements; el += 1) {
  ------------------
  |  Branch (563:22): [True: 73, False: 94]
  ------------------
  564|     73|          if (pPce1->BackElementHeightInfo[el] !=
  ------------------
  |  Branch (564:15): [True: 12, False: 61]
  ------------------
  565|     73|              pPce2->BackElementHeightInfo[el]) {
  566|     12|            result = 2; /* different height info */
  567|     12|            break;
  568|     12|          }
  569|     61|          numCh1 += pPce1->BackElementIsCpe[el] ? 2 : 1;
  ------------------
  |  Branch (569:21): [True: 30, False: 31]
  ------------------
  570|     61|          numCh2 += pPce2->BackElementIsCpe[el] ? 2 : 1;
  ------------------
  |  Branch (570:21): [True: 44, False: 17]
  ------------------
  571|     61|        }
  572|    106|        if (numCh1 != numCh2) {
  ------------------
  |  Branch (572:13): [True: 22, False: 84]
  ------------------
  573|     22|          result = 2; /* different number of back channels */
  574|     22|        }
  575|    106|      }
  576|       |      /* LFE channels */
  577|    392|      if (pPce1->NumLfeChannelElements != pPce2->NumLfeChannelElements) {
  ------------------
  |  Branch (577:11): [True: 235, False: 157]
  ------------------
  578|    235|        result = 2; /* different number of lfe channels */
  579|    235|      }
  580|       |      /* LFEs are always SCEs so we don't need to count the channels. */
  581|    392|    }
  582|    392|  }
  583|       |
  584|    395|  return result;
  585|    395|}
_Z25CProgramConfig_GetDefaultP14CProgramConfigj:
  587|    395|void CProgramConfig_GetDefault(CProgramConfig *pPce, const UINT channelConfig) {
  588|    395|  FDK_ASSERT(pPce != NULL);
  ------------------
  |  |  221|    395|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (588:3): [True: 395, False: 0]
  ------------------
  589|       |
  590|       |  /* Init PCE */
  591|    395|  CProgramConfig_Init(pPce);
  592|    395|  pPce->Profile =
  593|    395|      1; /* Set AAC LC because it is the only supported object type. */
  594|       |
  595|    395|  switch (channelConfig) {
  596|       |    /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  597|     64|    case 32: /* 7.1 side channel configuration as defined in FDK_audio.h */
  ------------------
  |  Branch (597:5): [True: 64, False: 331]
  ------------------
  598|     64|      pPce->NumFrontChannelElements = 2;
  599|     64|      pPce->FrontElementIsCpe[0] = 0;
  600|     64|      pPce->FrontElementIsCpe[1] = 1;
  601|     64|      pPce->NumSideChannelElements = 1;
  602|     64|      pPce->SideElementIsCpe[0] = 1;
  603|     64|      pPce->NumBackChannelElements = 1;
  604|     64|      pPce->BackElementIsCpe[0] = 1;
  605|     64|      pPce->NumLfeChannelElements = 1;
  606|     64|      pPce->NumChannels = 8;
  607|     64|      pPce->NumEffectiveChannels = 7;
  608|     64|      pPce->isValid = 1;
  609|     64|      break;
  610|       |    /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  611|     64|    case 12: /* 3/0/4.1ch surround back */
  ------------------
  |  Branch (611:5): [True: 64, False: 331]
  ------------------
  612|     64|      pPce->BackElementIsCpe[1] = 1;
  613|     64|      pPce->NumChannels += 1;
  614|     64|      pPce->NumEffectiveChannels += 1;
  615|     64|      FDK_FALLTHROUGH;
  ------------------
  |  |  386|     64|#define FDK_FALLTHROUGH [[clang::fallthrough]]
  ------------------
  616|     74|    case 11: /* 3/0/3.1ch */
  ------------------
  |  Branch (616:5): [True: 10, False: 385]
  ------------------
  617|     74|      pPce->NumFrontChannelElements += 2;
  618|     74|      pPce->FrontElementIsCpe[0] = 0;
  619|     74|      pPce->FrontElementIsCpe[1] = 1;
  620|     74|      pPce->NumBackChannelElements += 2;
  621|     74|      pPce->BackElementIsCpe[0] = 1;
  622|     74|      pPce->BackElementIsCpe[1] += 0;
  623|     74|      pPce->NumLfeChannelElements += 1;
  624|     74|      pPce->NumChannels += 7;
  625|     74|      pPce->NumEffectiveChannels += 6;
  626|     74|      pPce->isValid = 1;
  627|     74|      break;
  628|       |    /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  629|     64|    case 14:                               /* 2/0/0-3/0/2-0.1ch front height */
  ------------------
  |  Branch (629:5): [True: 64, False: 331]
  ------------------
  630|     64|      pPce->FrontElementHeightInfo[2] = 1; /* Top speaker */
  631|     64|      FDK_FALLTHROUGH;
  ------------------
  |  |  386|     64|#define FDK_FALLTHROUGH [[clang::fallthrough]]
  ------------------
  632|    128|    case 7: /* 5/0/2.1ch front */
  ------------------
  |  Branch (632:5): [True: 64, False: 331]
  ------------------
  633|    128|      pPce->NumFrontChannelElements += 1;
  634|    128|      pPce->FrontElementIsCpe[2] = 1;
  635|    128|      pPce->NumChannels += 2;
  636|    128|      pPce->NumEffectiveChannels += 2;
  637|    128|      FDK_FALLTHROUGH;
  ------------------
  |  |  386|    128|#define FDK_FALLTHROUGH [[clang::fallthrough]]
  ------------------
  638|    143|    case 6: /* 3/0/2.1ch */
  ------------------
  |  Branch (638:5): [True: 15, False: 380]
  ------------------
  639|    143|      pPce->NumLfeChannelElements += 1;
  640|    143|      pPce->NumChannels += 1;
  641|    143|      FDK_FALLTHROUGH;
  ------------------
  |  |  386|    143|#define FDK_FALLTHROUGH [[clang::fallthrough]]
  ------------------
  642|    162|    case 5: /* 3/0/2.0ch */
  ------------------
  |  Branch (642:5): [True: 19, False: 376]
  ------------------
  643|    196|    case 4: /* 3/0/1.0ch */
  ------------------
  |  Branch (643:5): [True: 34, False: 361]
  ------------------
  644|    196|      pPce->NumBackChannelElements += 1;
  645|    196|      pPce->BackElementIsCpe[0] = (channelConfig > 4) ? 1 : 0;
  ------------------
  |  Branch (645:35): [True: 162, False: 34]
  ------------------
  646|    196|      pPce->NumChannels += (channelConfig > 4) ? 2 : 1;
  ------------------
  |  Branch (646:28): [True: 162, False: 34]
  ------------------
  647|    196|      pPce->NumEffectiveChannels += (channelConfig > 4) ? 2 : 1;
  ------------------
  |  Branch (647:37): [True: 162, False: 34]
  ------------------
  648|    196|      FDK_FALLTHROUGH;
  ------------------
  |  |  386|    196|#define FDK_FALLTHROUGH [[clang::fallthrough]]
  ------------------
  649|    257|    case 3: /* 3/0/0.0ch */
  ------------------
  |  Branch (649:5): [True: 61, False: 334]
  ------------------
  650|    257|      pPce->NumFrontChannelElements += 1;
  651|    257|      pPce->FrontElementIsCpe[1] = 1;
  652|    257|      pPce->NumChannels += 2;
  653|    257|      pPce->NumEffectiveChannels += 2;
  654|    257|      FDK_FALLTHROUGH;
  ------------------
  |  |  386|    257|#define FDK_FALLTHROUGH [[clang::fallthrough]]
  ------------------
  655|    257|    case 1: /* 1/0/0.0ch */
  ------------------
  |  Branch (655:5): [True: 0, False: 395]
  ------------------
  656|    257|      pPce->NumFrontChannelElements += 1;
  657|    257|      pPce->FrontElementIsCpe[0] = 0;
  658|    257|      pPce->NumChannels += 1;
  659|    257|      pPce->NumEffectiveChannels += 1;
  660|    257|      pPce->isValid = 1;
  661|    257|      break;
  662|       |    /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  663|      0|    case 2: /* 2/0/0.ch */
  ------------------
  |  Branch (663:5): [True: 0, False: 395]
  ------------------
  664|      0|      pPce->NumFrontChannelElements = 1;
  665|      0|      pPce->FrontElementIsCpe[0] = 1;
  666|      0|      pPce->NumChannels += 2;
  667|      0|      pPce->NumEffectiveChannels += 2;
  668|      0|      pPce->isValid = 1;
  669|      0|      break;
  670|       |    /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  671|      0|    default:
  ------------------
  |  Branch (671:5): [True: 0, False: 395]
  ------------------
  672|      0|      pPce->isValid = 0; /* To be explicit! */
  673|      0|      break;
  674|    395|  }
  675|       |
  676|    395|  if (pPce->isValid) {
  ------------------
  |  Branch (676:7): [True: 395, False: 0]
  ------------------
  677|       |    /* Create valid element instance tags */
  678|    395|    int el, elTagSce = 0, elTagCpe = 0;
  679|       |
  680|  1.31k|    for (el = 0; el < pPce->NumFrontChannelElements; el += 1) {
  ------------------
  |  Branch (680:18): [True: 918, False: 395]
  ------------------
  681|    918|      pPce->FrontElementTagSelect[el] =
  682|    918|          (pPce->FrontElementIsCpe[el]) ? elTagCpe++ : elTagSce++;
  ------------------
  |  Branch (682:11): [True: 523, False: 395]
  ------------------
  683|    918|    }
  684|    459|    for (el = 0; el < pPce->NumSideChannelElements; el += 1) {
  ------------------
  |  Branch (684:18): [True: 64, False: 395]
  ------------------
  685|     64|      pPce->SideElementTagSelect[el] =
  686|     64|          (pPce->SideElementIsCpe[el]) ? elTagCpe++ : elTagSce++;
  ------------------
  |  Branch (686:11): [True: 64, False: 0]
  ------------------
  687|     64|    }
  688|    803|    for (el = 0; el < pPce->NumBackChannelElements; el += 1) {
  ------------------
  |  Branch (688:18): [True: 408, False: 395]
  ------------------
  689|    408|      pPce->BackElementTagSelect[el] =
  690|    408|          (pPce->BackElementIsCpe[el]) ? elTagCpe++ : elTagSce++;
  ------------------
  |  Branch (690:11): [True: 364, False: 44]
  ------------------
  691|    408|    }
  692|    395|    elTagSce = 0;
  693|    676|    for (el = 0; el < pPce->NumLfeChannelElements; el += 1) {
  ------------------
  |  Branch (693:18): [True: 281, False: 395]
  ------------------
  694|    281|      pPce->LfeElementTagSelect[el] = elTagSce++;
  695|    281|    }
  696|    395|  }
  697|    395|}
_Z30CProgramConfig_GetElementTablePK14CProgramConfigP14MP4_ELEMENT_IDiPh:
 1246|    321|                                   const INT elListSize, UCHAR *pChMapIdx) {
 1247|    321|  int i, el = 0;
 1248|       |
 1249|    321|  FDK_ASSERT(elList != NULL);
  ------------------
  |  |  221|    321|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1249:3): [True: 321, False: 0]
  ------------------
 1250|    321|  FDK_ASSERT(pChMapIdx != NULL);
  ------------------
  |  |  221|    321|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1250:3): [True: 321, False: 0]
  ------------------
 1251|    321|  FDK_ASSERT(pPce != NULL);
  ------------------
  |  |  221|    321|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1251:3): [True: 321, False: 0]
  ------------------
 1252|       |
 1253|    321|  *pChMapIdx = 0;
 1254|       |
 1255|    321|  if ((elListSize <
  ------------------
  |  Branch (1255:7): [True: 1, False: 320]
  ------------------
 1256|    321|       pPce->NumFrontChannelElements + pPce->NumSideChannelElements +
 1257|    321|           pPce->NumBackChannelElements + pPce->NumLfeChannelElements) ||
 1258|    320|      (pPce->NumChannels == 0)) {
  ------------------
  |  Branch (1258:7): [True: 0, False: 320]
  ------------------
 1259|      1|    return 0;
 1260|      1|  }
 1261|       |
 1262|    693|  for (i = 0; i < pPce->NumFrontChannelElements; i += 1) {
  ------------------
  |  Branch (1262:15): [True: 373, False: 320]
  ------------------
 1263|    373|    elList[el++] = (pPce->FrontElementIsCpe[i]) ? ID_CPE : ID_SCE;
  ------------------
  |  Branch (1263:20): [True: 136, False: 237]
  ------------------
 1264|    373|  }
 1265|       |
 1266|    510|  for (i = 0; i < pPce->NumSideChannelElements; i += 1) {
  ------------------
  |  Branch (1266:15): [True: 190, False: 320]
  ------------------
 1267|    190|    elList[el++] = (pPce->SideElementIsCpe[i]) ? ID_CPE : ID_SCE;
  ------------------
  |  Branch (1267:20): [True: 80, False: 110]
  ------------------
 1268|    190|  }
 1269|       |
 1270|    608|  for (i = 0; i < pPce->NumBackChannelElements; i += 1) {
  ------------------
  |  Branch (1270:15): [True: 288, False: 320]
  ------------------
 1271|    288|    elList[el++] = (pPce->BackElementIsCpe[i]) ? ID_CPE : ID_SCE;
  ------------------
  |  Branch (1271:20): [True: 85, False: 203]
  ------------------
 1272|    288|  }
 1273|       |
 1274|    446|  for (i = 0; i < pPce->NumLfeChannelElements; i += 1) {
  ------------------
  |  Branch (1274:15): [True: 126, False: 320]
  ------------------
 1275|    126|    elList[el++] = ID_LFE;
 1276|    126|  }
 1277|       |
 1278|       |  /* Find an corresponding channel configuration if possible */
 1279|    320|  switch (pPce->NumChannels) {
 1280|     82|    case 1:
  ------------------
  |  Branch (1280:5): [True: 82, False: 238]
  ------------------
 1281|    113|    case 2:
  ------------------
  |  Branch (1281:5): [True: 31, False: 289]
  ------------------
 1282|       |      /* One and two channels have no alternatives. */
 1283|    113|      *pChMapIdx = pPce->NumChannels;
 1284|    113|      break;
 1285|     61|    case 3:
  ------------------
  |  Branch (1285:5): [True: 61, False: 259]
  ------------------
 1286|     95|    case 4:
  ------------------
  |  Branch (1286:5): [True: 34, False: 286]
  ------------------
 1287|    114|    case 5:
  ------------------
  |  Branch (1287:5): [True: 19, False: 301]
  ------------------
 1288|    129|    case 6: { /* Test if the number of channels can be used as channel config:
  ------------------
  |  Branch (1288:5): [True: 15, False: 305]
  ------------------
 1289|       |               */
 1290|    129|      C_ALLOC_SCRATCH_START(tmpPce, CProgramConfig, 1);
  ------------------
  |  |  324|    129|#define C_ALLOC_SCRATCH_START(name, type, n) type name[n];
  ------------------
 1291|       |      /* Create a PCE for the config to test ... */
 1292|    129|      CProgramConfig_GetDefault(tmpPce, pPce->NumChannels);
 1293|       |      /* ... and compare it with the given one. */
 1294|    129|      *pChMapIdx = (!(CProgramConfig_Compare(pPce, tmpPce) & 0xE))
  ------------------
  |  Branch (1294:20): [True: 44, False: 85]
  ------------------
 1295|    129|                       ? pPce->NumChannels
 1296|    129|                       : 0;
 1297|       |      /* If compare result is 0 or 1 we can be sure that it is channel
 1298|       |       * config 11. */
 1299|    129|      C_ALLOC_SCRATCH_END(tmpPce, CProgramConfig, 1);
 1300|    129|    } break;
 1301|     10|    case 7: {
  ------------------
  |  Branch (1301:5): [True: 10, False: 310]
  ------------------
 1302|     10|      C_ALLOC_SCRATCH_START(tmpPce, CProgramConfig, 1);
  ------------------
  |  |  324|     10|#define C_ALLOC_SCRATCH_START(name, type, n) type name[n];
  ------------------
 1303|       |      /* Create a PCE for the config to test ... */
 1304|     10|      CProgramConfig_GetDefault(tmpPce, 11);
 1305|       |      /* ... and compare it with the given one. */
 1306|     10|      *pChMapIdx = (!(CProgramConfig_Compare(pPce, tmpPce) & 0xE)) ? 11 : 0;
  ------------------
  |  Branch (1306:20): [True: 1, False: 9]
  ------------------
 1307|       |      /* If compare result is 0 or 1 we can be sure that it is channel
 1308|       |       * config 11. */
 1309|     10|      C_ALLOC_SCRATCH_END(tmpPce, CProgramConfig, 1);
 1310|     10|    } break;
 1311|     64|    case 8: { /* Try the four possible 7.1ch configurations. One after the
  ------------------
  |  Branch (1311:5): [True: 64, False: 256]
  ------------------
 1312|       |                 other. */
 1313|     64|      UCHAR testCfg[4] = {32, 14, 12, 7};
 1314|     64|      C_ALLOC_SCRATCH_START(tmpPce, CProgramConfig, 1);
  ------------------
  |  |  324|     64|#define C_ALLOC_SCRATCH_START(name, type, n) type name[n];
  ------------------
 1315|    320|      for (i = 0; i < 4; i += 1) {
  ------------------
  |  Branch (1315:19): [True: 256, False: 64]
  ------------------
 1316|       |        /* Create a PCE for the config to test ... */
 1317|    256|        CProgramConfig_GetDefault(tmpPce, testCfg[i]);
 1318|       |        /* ... and compare it with the given one. */
 1319|    256|        if (!(CProgramConfig_Compare(pPce, tmpPce) & 0xE)) {
  ------------------
  |  Branch (1319:13): [True: 6, False: 250]
  ------------------
 1320|       |          /* If the compare result is 0 or 1 than the two channel configurations
 1321|       |           * match. */
 1322|       |          /* Explicit mapping of 7.1 side channel configuration to 7.1 rear
 1323|       |           * channel mapping. */
 1324|      6|          *pChMapIdx = (testCfg[i] == 32) ? 12 : testCfg[i];
  ------------------
  |  Branch (1324:24): [True: 3, False: 3]
  ------------------
 1325|      6|        }
 1326|    256|      }
 1327|     64|      C_ALLOC_SCRATCH_END(tmpPce, CProgramConfig, 1);
 1328|     64|    } break;
 1329|      4|    default:
  ------------------
  |  Branch (1329:5): [True: 4, False: 316]
  ------------------
 1330|       |      /* The PCE does not match any predefined channel configuration. */
 1331|      4|      *pChMapIdx = 0;
 1332|      4|      break;
 1333|    320|  }
 1334|       |
 1335|    320|  return el;
 1336|    320|}
_Z24AudioSpecificConfig_InitP21CSAudioSpecificConfig:
 2301|  10.4k|void AudioSpecificConfig_Init(CSAudioSpecificConfig *asc) {
 2302|  10.4k|  FDKmemclear(asc, sizeof(CSAudioSpecificConfig));
 2303|       |
 2304|       |  /* Init all values that should not be zero. */
 2305|  10.4k|  asc->m_aot = AOT_NONE;
 2306|  10.4k|  asc->m_samplingFrequencyIndex = 0xf;
 2307|  10.4k|  asc->m_epConfig = -1;
 2308|  10.4k|  asc->m_extensionAudioObjectType = AOT_NULL_OBJECT;
 2309|  10.4k|  CProgramConfig_Init(&asc->m_progrConfigElement);
 2310|  10.4k|}
_Z25AudioSpecificConfig_ParseP21CSAudioSpecificConfigP13FDK_BITSTREAMiP13CSTpCallBackshh17AUDIO_OBJECT_TYPE:
 2315|  10.4k|    UCHAR configChanged, AUDIO_OBJECT_TYPE m_aot) {
 2316|  10.4k|  TRANSPORTDEC_ERROR ErrorStatus = TRANSPORTDEC_OK;
 2317|  10.4k|  UINT ascStartAnchor = FDKgetValidBits(bs);
 2318|  10.4k|  int frameLengthFlag = -1;
 2319|       |
 2320|  10.4k|  AudioSpecificConfig_Init(self);
 2321|       |
 2322|  10.4k|  self->configMode = configMode;
 2323|  10.4k|  self->AacConfigChanged = configChanged;
 2324|  10.4k|  self->SbrConfigChanged = configChanged;
 2325|  10.4k|  self->SacConfigChanged = configChanged;
 2326|       |
 2327|  10.4k|  if (m_aot != AOT_NULL_OBJECT) {
  ------------------
  |  Branch (2327:7): [True: 0, False: 10.4k]
  ------------------
 2328|      0|    self->m_aot = m_aot;
 2329|  10.4k|  } else {
 2330|  10.4k|    self->m_aot = getAOT(bs);
 2331|  10.4k|    self->m_samplingFrequency =
 2332|  10.4k|        getSampleRate(bs, &self->m_samplingFrequencyIndex, 4);
 2333|  10.4k|    if (self->m_samplingFrequency <= 0 ||
  ------------------
  |  Branch (2333:9): [True: 5, False: 10.4k]
  ------------------
 2334|  10.4k|        (self->m_samplingFrequency > 96000 && self->m_aot != 39) ||
  ------------------
  |  Branch (2334:10): [True: 138, False: 10.3k]
  |  Branch (2334:47): [True: 16, False: 122]
  ------------------
 2335|  10.4k|        self->m_samplingFrequency > 4 * 96000) {
  ------------------
  |  Branch (2335:9): [True: 17, False: 10.4k]
  ------------------
 2336|     38|      return TRANSPORTDEC_PARSE_ERROR;
 2337|     38|    }
 2338|       |
 2339|  10.4k|    self->m_channelConfiguration = FDKreadBits(bs, 4);
 2340|       |
 2341|       |    /* MPEG-04 standard ISO/IEC 14496-3: channelConfiguration == 0 is reserved
 2342|       |       in er_raw_data_block (table 4.19) and er_raw_data_block_eld (table 4.75)
 2343|       |       MPEG-04 conformance ISO/IEC 14496-4: channelConfiguration == 0 is not
 2344|       |       permitted for AOT_ER_AAC_LC, AOT_ER_AAC_LTP, AOT_ER_AAC_LD,
 2345|       |       AOT_ER_AAC_SCAL (chapter 6.6.4.1.2.1.1) */
 2346|  10.4k|    if ((self->m_channelConfiguration == 0) &&
  ------------------
  |  Branch (2346:9): [True: 943, False: 9.47k]
  ------------------
 2347|    943|        ((self->m_aot == AOT_ER_AAC_LC) || (self->m_aot == AOT_ER_AAC_LTP) ||
  ------------------
  |  Branch (2347:10): [True: 1, False: 942]
  |  Branch (2347:44): [True: 1, False: 941]
  ------------------
 2348|    941|         (self->m_aot == AOT_ER_AAC_LD) || (self->m_aot == AOT_ER_AAC_SCAL) ||
  ------------------
  |  Branch (2348:10): [True: 1, False: 940]
  |  Branch (2348:44): [True: 2, False: 938]
  ------------------
 2349|    938|         (self->m_aot == AOT_ER_AAC_ELD))) {
  ------------------
  |  Branch (2349:10): [True: 10, False: 928]
  ------------------
 2350|     15|      return TRANSPORTDEC_UNSUPPORTED_FORMAT;
 2351|     15|    }
 2352|       |    /* MPEG-04 conformance ISO/IEC 14496-4: channelConfiguration > 2 is not
 2353|       |     * permitted for AOT_AAC_SCAL and AOT_ER_AAC_SCAL (chapter 6.6.4.1.2.1.1) */
 2354|  10.3k|    if ((self->m_channelConfiguration > 2) &&
  ------------------
  |  Branch (2354:9): [True: 7.17k, False: 3.22k]
  ------------------
 2355|  7.17k|        ((self->m_aot == AOT_AAC_SCAL) || (self->m_aot == AOT_ER_AAC_SCAL))) {
  ------------------
  |  Branch (2355:10): [True: 1, False: 7.17k]
  |  Branch (2355:43): [True: 1, False: 7.17k]
  ------------------
 2356|      2|      return TRANSPORTDEC_UNSUPPORTED_FORMAT;
 2357|      2|    }
 2358|       |
 2359|       |    /* SBR extension ( explicit non-backwards compatible mode ) */
 2360|  10.3k|    self->m_sbrPresentFlag = 0;
 2361|  10.3k|    self->m_psPresentFlag = 0;
 2362|       |
 2363|  10.3k|    if (self->m_aot == AOT_SBR || self->m_aot == AOT_PS) {
  ------------------
  |  Branch (2363:9): [True: 165, False: 10.2k]
  |  Branch (2363:35): [True: 75, False: 10.1k]
  ------------------
 2364|    240|      self->m_extensionAudioObjectType = AOT_SBR;
 2365|       |
 2366|    240|      self->m_sbrPresentFlag = 1;
 2367|    240|      if (self->m_aot == AOT_PS) {
  ------------------
  |  Branch (2367:11): [True: 75, False: 165]
  ------------------
 2368|     75|        self->m_psPresentFlag = 1;
 2369|     75|      }
 2370|       |
 2371|    240|      self->m_extensionSamplingFrequency =
 2372|    240|          getSampleRate(bs, &self->m_extensionSamplingFrequencyIndex, 4);
 2373|    240|      if (self->m_extensionSamplingFrequency == 0 ||
  ------------------
  |  Branch (2373:11): [True: 3, False: 237]
  ------------------
 2374|    237|          self->m_extensionSamplingFrequency > 96000) {
  ------------------
  |  Branch (2374:11): [True: 19, False: 218]
  ------------------
 2375|     22|        return TRANSPORTDEC_PARSE_ERROR;
 2376|     22|      }
 2377|    218|      self->m_aot = getAOT(bs);
 2378|       |
 2379|    218|      switch (self->m_aot) {
 2380|    182|        case AOT_AAC_LC:
  ------------------
  |  Branch (2380:9): [True: 182, False: 36]
  ------------------
 2381|    182|          break;
 2382|     18|        case AOT_ER_BSAC:
  ------------------
  |  Branch (2382:9): [True: 18, False: 200]
  ------------------
 2383|     18|          break;
 2384|     18|        default:
  ------------------
  |  Branch (2384:9): [True: 18, False: 200]
  ------------------
 2385|     18|          return TRANSPORTDEC_UNSUPPORTED_FORMAT;
 2386|    218|      }
 2387|       |
 2388|    200|      if (self->m_aot == AOT_ER_BSAC) {
  ------------------
  |  Branch (2388:11): [True: 18, False: 182]
  ------------------
 2389|     18|        self->m_extensionChannelConfiguration = FDKreadBits(bs, 4);
 2390|     18|      }
 2391|  10.1k|    } else {
 2392|  10.1k|      self->m_extensionAudioObjectType = AOT_NULL_OBJECT;
 2393|  10.1k|    }
 2394|  10.3k|  }
 2395|       |
 2396|       |  /* Parse whatever specific configs */
 2397|  10.3k|  switch (self->m_aot) {
 2398|  1.29k|    case AOT_AAC_LC:
  ------------------
  |  Branch (2398:5): [True: 1.29k, False: 9.05k]
  ------------------
 2399|  1.31k|    case AOT_AAC_SCAL:
  ------------------
  |  Branch (2399:5): [True: 18, False: 10.3k]
  ------------------
 2400|  1.33k|    case AOT_ER_AAC_LC:
  ------------------
  |  Branch (2400:5): [True: 18, False: 10.3k]
  ------------------
 2401|  1.49k|    case AOT_ER_AAC_LD:
  ------------------
  |  Branch (2401:5): [True: 156, False: 10.2k]
  ------------------
 2402|  1.50k|    case AOT_ER_AAC_SCAL:
  ------------------
  |  Branch (2402:5): [True: 14, False: 10.3k]
  ------------------
 2403|  1.54k|    case AOT_ER_BSAC:
  ------------------
  |  Branch (2403:5): [True: 40, False: 10.3k]
  ------------------
 2404|  1.54k|      if ((ErrorStatus = GaSpecificConfig_Parse(&self->m_sc.m_gaSpecificConfig,
  ------------------
  |  Branch (2404:11): [True: 0, False: 1.54k]
  ------------------
 2405|  1.54k|                                                self, bs, ascStartAnchor)) !=
 2406|  1.54k|          TRANSPORTDEC_OK) {
 2407|      0|        return (ErrorStatus);
 2408|      0|      }
 2409|  1.54k|      frameLengthFlag = self->m_sc.m_gaSpecificConfig.m_frameLengthFlag;
 2410|  1.54k|      break;
 2411|      3|    case AOT_MPEGS:
  ------------------
  |  Branch (2411:5): [True: 3, False: 10.3k]
  ------------------
 2412|      3|      if (cb->cbSsc != NULL) {
  ------------------
  |  Branch (2412:11): [True: 3, False: 0]
  ------------------
 2413|      3|        if (cb->cbSsc(cb->cbSscData, bs, self->m_aot, self->m_samplingFrequency,
  ------------------
  |  Branch (2413:13): [True: 3, False: 0]
  ------------------
 2414|      3|                      self->m_samplesPerFrame, self->m_channelConfiguration, 1,
 2415|      3|                      -1, /* nTimeSlots: read from bitstream */
 2416|      3|                      0,  /* don't know the length */
 2417|      3|                      self->configMode, &self->SacConfigChanged)) {
 2418|      3|          return TRANSPORTDEC_UNSUPPORTED_FORMAT;
 2419|      3|        }
 2420|      3|      } else {
 2421|      0|        return TRANSPORTDEC_UNSUPPORTED_FORMAT;
 2422|      0|      }
 2423|      0|      break;
 2424|  1.47k|    case AOT_ER_AAC_ELD:
  ------------------
  |  Branch (2424:5): [True: 1.47k, False: 8.88k]
  ------------------
 2425|  1.47k|      if ((ErrorStatus = EldSpecificConfig_Parse(self, bs, cb)) !=
  ------------------
  |  Branch (2425:11): [True: 594, False: 876]
  ------------------
 2426|  1.47k|          TRANSPORTDEC_OK) {
 2427|    594|        return (ErrorStatus);
 2428|    594|      }
 2429|    876|      frameLengthFlag = self->m_sc.m_eldSpecificConfig.m_frameLengthFlag;
 2430|    876|      self->m_sbrPresentFlag = self->m_sc.m_eldSpecificConfig.m_sbrPresentFlag;
 2431|    876|      self->m_extensionSamplingFrequency =
 2432|    876|          (self->m_sc.m_eldSpecificConfig.m_sbrSamplingRate + 1) *
 2433|    876|          self->m_samplingFrequency;
 2434|    876|      break;
 2435|  7.30k|    case AOT_USAC:
  ------------------
  |  Branch (2435:5): [True: 7.30k, False: 3.04k]
  ------------------
 2436|  7.30k|      if ((ErrorStatus = UsacConfig_Parse(self, bs, cb)) != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (2436:11): [True: 3.38k, False: 3.92k]
  ------------------
 2437|  3.38k|        return (ErrorStatus);
 2438|  3.38k|      }
 2439|  3.92k|      break;
 2440|       |
 2441|  3.92k|    default:
  ------------------
  |  Branch (2441:5): [True: 30, False: 10.3k]
  ------------------
 2442|     30|      return TRANSPORTDEC_UNSUPPORTED_FORMAT;
 2443|  10.3k|  }
 2444|       |
 2445|       |  /* Frame length */
 2446|  6.34k|  switch (self->m_aot) {
 2447|  1.29k|    case AOT_AAC_LC:
  ------------------
  |  Branch (2447:5): [True: 1.29k, False: 5.05k]
  ------------------
 2448|  1.31k|    case AOT_AAC_SCAL:
  ------------------
  |  Branch (2448:5): [True: 18, False: 6.33k]
  ------------------
 2449|  1.33k|    case AOT_ER_AAC_LC:
  ------------------
  |  Branch (2449:5): [True: 18, False: 6.33k]
  ------------------
 2450|  1.34k|    case AOT_ER_AAC_SCAL:
  ------------------
  |  Branch (2450:5): [True: 14, False: 6.33k]
  ------------------
 2451|  1.38k|    case AOT_ER_BSAC:
  ------------------
  |  Branch (2451:5): [True: 40, False: 6.30k]
  ------------------
 2452|       |      /*case AOT_USAC:*/
 2453|  1.38k|      if (!frameLengthFlag)
  ------------------
  |  Branch (2453:11): [True: 851, False: 538]
  ------------------
 2454|    851|        self->m_samplesPerFrame = 1024;
 2455|    538|      else
 2456|    538|        self->m_samplesPerFrame = 960;
 2457|  1.38k|      break;
 2458|    156|    case AOT_ER_AAC_LD:
  ------------------
  |  Branch (2458:5): [True: 156, False: 6.19k]
  ------------------
 2459|    156|      if (!frameLengthFlag)
  ------------------
  |  Branch (2459:11): [True: 80, False: 76]
  ------------------
 2460|     80|        self->m_samplesPerFrame = 512;
 2461|     76|      else
 2462|     76|        self->m_samplesPerFrame = 480;
 2463|    156|      break;
 2464|  4.80k|    default:
  ------------------
  |  Branch (2464:5): [True: 4.80k, False: 1.54k]
  ------------------
 2465|  4.80k|      break;
 2466|  6.34k|  }
 2467|       |
 2468|  6.34k|  switch (self->m_aot) {
 2469|     18|    case AOT_ER_AAC_LC:
  ------------------
  |  Branch (2469:5): [True: 18, False: 6.33k]
  ------------------
 2470|    174|    case AOT_ER_AAC_LD:
  ------------------
  |  Branch (2470:5): [True: 156, False: 6.19k]
  ------------------
 2471|  1.05k|    case AOT_ER_AAC_ELD:
  ------------------
  |  Branch (2471:5): [True: 876, False: 5.47k]
  ------------------
 2472|  1.06k|    case AOT_ER_AAC_SCAL:
  ------------------
  |  Branch (2472:5): [True: 14, False: 6.33k]
  ------------------
 2473|  1.06k|    case AOT_ER_CELP:
  ------------------
  |  Branch (2473:5): [True: 0, False: 6.34k]
  ------------------
 2474|  1.06k|    case AOT_ER_HVXC:
  ------------------
  |  Branch (2474:5): [True: 0, False: 6.34k]
  ------------------
 2475|  1.10k|    case AOT_ER_BSAC:
  ------------------
  |  Branch (2475:5): [True: 40, False: 6.30k]
  ------------------
 2476|  1.10k|      self->m_epConfig = FDKreadBits(bs, 2);
 2477|       |
 2478|  1.10k|      if (self->m_epConfig > 1) {
  ------------------
  |  Branch (2478:11): [True: 11, False: 1.09k]
  ------------------
 2479|     11|        return TRANSPORTDEC_UNSUPPORTED_FORMAT;  // EPCONFIG;
 2480|     11|      }
 2481|  1.09k|      break;
 2482|  5.24k|    default:
  ------------------
  |  Branch (2482:5): [True: 5.24k, False: 1.10k]
  ------------------
 2483|  5.24k|      break;
 2484|  6.34k|  }
 2485|       |
 2486|  6.33k|  if (fExplicitBackwardCompatible &&
  ------------------
  |  Branch (2486:7): [True: 6.33k, False: 0]
  ------------------
 2487|  6.33k|      (self->m_aot == AOT_AAC_LC || self->m_aot == AOT_ER_AAC_LD ||
  ------------------
  |  Branch (2487:8): [True: 1.29k, False: 5.03k]
  |  Branch (2487:37): [True: 156, False: 4.88k]
  ------------------
 2488|  4.88k|       self->m_aot == AOT_ER_BSAC)) {
  ------------------
  |  Branch (2488:8): [True: 40, False: 4.84k]
  ------------------
 2489|  1.49k|    ErrorStatus = AudioSpecificConfig_ExtensionParse(self, bs, cb);
 2490|  1.49k|  }
 2491|       |
 2492|       |  /* Copy config() to asc->config[] buffer. */
 2493|  6.33k|  if ((ErrorStatus == TRANSPORTDEC_OK) && (self->m_aot == AOT_USAC)) {
  ------------------
  |  Branch (2493:7): [True: 6.31k, False: 21]
  |  Branch (2493:43): [True: 3.92k, False: 2.38k]
  ------------------
 2494|  3.92k|    INT configSize_bits = (INT)FDKgetValidBits(bs) - (INT)ascStartAnchor;
 2495|  3.92k|    if (StoreConfigAsBitstream(bs, configSize_bits, self->config,
  ------------------
  |  Branch (2495:9): [True: 3, False: 3.92k]
  ------------------
 2496|  3.92k|                               TP_USAC_MAX_CONFIG_LEN)) {
  ------------------
  |  |  121|  3.92k|  512 /* next power of two of maximum of escapedValue(hBs, 4, 4, 8) in \
  ------------------
 2497|      3|      return TRANSPORTDEC_PARSE_ERROR;
 2498|      3|    }
 2499|  3.92k|    self->configBits = fAbs(configSize_bits);
 2500|  3.92k|  }
 2501|       |
 2502|  6.33k|  return (ErrorStatus);
 2503|  6.33k|}
tpdec_asc.cpp:_ZL28CProgramConfig_ReadHeightExtP14CProgramConfigP13FDK_BITSTREAMPij:
  206|    500|                                        const UINT alignmentAnchor) {
  207|    500|  int err = 0;
  208|    500|  FDK_CRCINFO crcInfo; /* CRC state info */
  209|    500|  INT crcReg;
  210|    500|  FDKcrcInit(&crcInfo, 0x07, 0xFF, 8);
  211|    500|  crcReg = FDKcrcStartReg(&crcInfo, bs, 0);
  212|    500|  UINT startAnchor = FDKgetValidBits(bs);
  213|       |
  214|    500|  FDK_ASSERT(pPce != NULL);
  ------------------
  |  |  221|    500|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (214:3): [True: 500, False: 0]
  ------------------
  215|    500|  FDK_ASSERT(bs != NULL);
  ------------------
  |  |  221|    500|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 500, False: 0]
  ------------------
  216|    500|  FDK_ASSERT(bytesAvailable != NULL);
  ------------------
  |  |  221|    500|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (216:3): [True: 500, False: 0]
  ------------------
  217|       |
  218|    500|  if ((startAnchor >= 24) && (*bytesAvailable >= 3) &&
  ------------------
  |  Branch (218:7): [True: 472, False: 28]
  |  Branch (218:30): [True: 107, False: 365]
  ------------------
  219|    107|      (FDKreadBits(bs, 8) == PCE_HEIGHT_EXT_SYNC)) {
  ------------------
  |  |  195|    107|#define PCE_HEIGHT_EXT_SYNC (0xAC)
  ------------------
  |  Branch (219:7): [True: 99, False: 8]
  ------------------
  220|     99|    int i;
  221|       |
  222|    260|    for (i = 0; i < pPce->NumFrontChannelElements; i++) {
  ------------------
  |  Branch (222:17): [True: 161, False: 99]
  ------------------
  223|    161|      if ((pPce->FrontElementHeightInfo[i] = (UCHAR)FDKreadBits(bs, 2)) >=
  ------------------
  |  Branch (223:11): [True: 29, False: 132]
  ------------------
  224|    161|          PC_NUM_HEIGHT_LAYER) {
  ------------------
  |  |  152|    161|#define PC_NUM_HEIGHT_LAYER 3
  ------------------
  225|     29|        err = -2; /* height information is out of the valid range */
  226|     29|      }
  227|    161|    }
  228|    262|    for (i = 0; i < pPce->NumSideChannelElements; i++) {
  ------------------
  |  Branch (228:17): [True: 163, False: 99]
  ------------------
  229|    163|      if ((pPce->SideElementHeightInfo[i] = (UCHAR)FDKreadBits(bs, 2)) >=
  ------------------
  |  Branch (229:11): [True: 27, False: 136]
  ------------------
  230|    163|          PC_NUM_HEIGHT_LAYER) {
  ------------------
  |  |  152|    163|#define PC_NUM_HEIGHT_LAYER 3
  ------------------
  231|     27|        err = -2; /* height information is out of the valid range */
  232|     27|      }
  233|    163|    }
  234|    242|    for (i = 0; i < pPce->NumBackChannelElements; i++) {
  ------------------
  |  Branch (234:17): [True: 143, False: 99]
  ------------------
  235|    143|      if ((pPce->BackElementHeightInfo[i] = (UCHAR)FDKreadBits(bs, 2)) >=
  ------------------
  |  Branch (235:11): [True: 26, False: 117]
  ------------------
  236|    143|          PC_NUM_HEIGHT_LAYER) {
  ------------------
  |  |  152|    143|#define PC_NUM_HEIGHT_LAYER 3
  ------------------
  237|     26|        err = -2; /* height information is out of the valid range */
  238|     26|      }
  239|    143|    }
  240|     99|    FDKbyteAlign(bs, alignmentAnchor);
  241|       |
  242|     99|    FDKcrcEndReg(&crcInfo, bs, crcReg);
  243|     99|    if ((USHORT)FDKreadBits(bs, 8) != FDKcrcGetCRC(&crcInfo)) {
  ------------------
  |  Branch (243:9): [True: 39, False: 60]
  ------------------
  244|       |      /* CRC failed */
  245|     39|      err = -1;
  246|     39|    }
  247|     99|    if (err != 0) {
  ------------------
  |  Branch (247:9): [True: 40, False: 59]
  ------------------
  248|       |      /* Reset whole height information in case an error occured during parsing.
  249|       |         The return value ensures that pPce->isValid is set to 0 and implicit
  250|       |         channel mapping is used. */
  251|     40|      FDKmemclear(pPce->FrontElementHeightInfo,
  252|     40|                  sizeof(pPce->FrontElementHeightInfo));
  253|     40|      FDKmemclear(pPce->SideElementHeightInfo,
  254|     40|                  sizeof(pPce->SideElementHeightInfo));
  255|     40|      FDKmemclear(pPce->BackElementHeightInfo,
  256|     40|                  sizeof(pPce->BackElementHeightInfo));
  257|     40|    }
  258|    401|  } else {
  259|       |    /* No valid extension data found -> restore the initial bitbuffer state */
  260|    401|    FDKpushBack(bs, (INT)startAnchor - (INT)FDKgetValidBits(bs));
  261|    401|  }
  262|       |
  263|       |  /* Always report the bytes read. */
  264|    500|  *bytesAvailable -= ((INT)startAnchor - (INT)FDKgetValidBits(bs)) >> 3;
  265|       |
  266|    500|  return (err);
  267|    500|}
tpdec_asc.cpp:_ZL20CProgramConfig_CheckP14CProgramConfig:
  278|    500|static int CProgramConfig_Check(CProgramConfig *pPce) {
  279|    500|  INT i;
  280|    500|  INT err = 0;
  281|    500|  INT numBackChannels[3] = {0};
  282|    500|  INT numSideChannels[3] = {0};
  283|    500|  INT numFrontChannels[3] = {0};
  284|    500|  UCHAR *pCpeFront = pPce->FrontElementIsCpe;
  285|    500|  UCHAR *pCpeSide = pPce->SideElementIsCpe;
  286|    500|  UCHAR *pCpeBack = pPce->BackElementIsCpe;
  287|    500|  UCHAR *pHeight;
  288|       |
  289|    500|  pHeight = pPce->BackElementHeightInfo;
  290|  1.39k|  for (i = 0; i < pPce->NumBackChannelElements; i++) {
  ------------------
  |  Branch (290:15): [True: 895, False: 500]
  ------------------
  291|    895|    numBackChannels[*pHeight] += pPce->BackElementIsCpe[i] ? 2 : 1;
  ------------------
  |  Branch (291:34): [True: 145, False: 750]
  ------------------
  292|    895|    pHeight++;
  293|    895|  }
  294|    500|  pHeight = pPce->SideElementHeightInfo;
  295|  1.29k|  for (i = 0; i < pPce->NumSideChannelElements; i++) {
  ------------------
  |  Branch (295:15): [True: 798, False: 500]
  ------------------
  296|    798|    numSideChannels[*pHeight] += pPce->SideElementIsCpe[i] ? 2 : 1;
  ------------------
  |  Branch (296:34): [True: 122, False: 676]
  ------------------
  297|    798|    pHeight++;
  298|    798|  }
  299|    500|  pHeight = pPce->FrontElementHeightInfo;
  300|  1.46k|  for (i = 0; i < pPce->NumFrontChannelElements; i++) {
  ------------------
  |  Branch (300:15): [True: 960, False: 500]
  ------------------
  301|    960|    numFrontChannels[*pHeight] += pPce->FrontElementIsCpe[i] ? 2 : 1;
  ------------------
  |  Branch (301:35): [True: 195, False: 765]
  ------------------
  302|    960|    pHeight++;
  303|    960|  }
  304|       |
  305|       |  /* 0 = normal height channels, 1 = top height channels, 2 = bottom height
  306|       |   * channels */
  307|  1.86k|  for (i = 0; i < 3; i++) {
  ------------------
  |  Branch (307:15): [True: 1.41k, False: 454]
  ------------------
  308|       |    /* if number of channels is odd => first element must be a SCE (front center
  309|       |     * channel) */
  310|  1.41k|    if (numFrontChannels[i] & 1) {
  ------------------
  |  Branch (310:9): [True: 174, False: 1.23k]
  ------------------
  311|    174|      if (*pCpeFront++ == ID_CPE) {
  ------------------
  |  Branch (311:11): [True: 4, False: 170]
  ------------------
  312|      4|        err = 1;
  313|      4|        goto bail;
  314|      4|      }
  315|    170|      numFrontChannels[i]--;
  316|    170|    }
  317|  1.85k|    while (numFrontChannels[i] > 0) {
  ------------------
  |  Branch (317:12): [True: 450, False: 1.40k]
  ------------------
  318|       |      /* must be CPE or paired SCE */
  319|    450|      if (*pCpeFront++ == ID_SCE) {
  ------------------
  |  Branch (319:11): [True: 279, False: 171]
  ------------------
  320|    279|        if (*pCpeFront++ == ID_CPE) {
  ------------------
  |  Branch (320:13): [True: 7, False: 272]
  ------------------
  321|      7|          err = 1;
  322|      7|          goto bail;
  323|      7|        }
  324|    279|      }
  325|    443|      numFrontChannels[i] -= 2;
  326|  1.40k|    };
  327|       |
  328|       |    /* in case that a top center surround channel (Ts) is transmitted the number
  329|       |     * of channels can be odd */
  330|  1.40k|    if (i != 1) {
  ------------------
  |  Branch (330:9): [True: 945, False: 456]
  ------------------
  331|       |      /* number of channels must be even */
  332|    945|      if (numSideChannels[i] & 1) {
  ------------------
  |  Branch (332:11): [True: 28, False: 917]
  ------------------
  333|     28|        err = 1;
  334|     28|        goto bail;
  335|     28|      }
  336|  1.20k|      while (numSideChannels[i] > 0) {
  ------------------
  |  Branch (336:14): [True: 293, False: 915]
  ------------------
  337|       |        /* must be CPE or paired SCE */
  338|    293|        if (*pCpeSide++ == ID_SCE) {
  ------------------
  |  Branch (338:13): [True: 204, False: 89]
  ------------------
  339|    204|          if (*pCpeSide++ == ID_CPE) {
  ------------------
  |  Branch (339:15): [True: 2, False: 202]
  ------------------
  340|      2|            err = 1;
  341|      2|            goto bail;
  342|      2|          }
  343|    204|        }
  344|    291|        numSideChannels[i] -= 2;
  345|    915|      };
  346|    915|    }
  347|       |
  348|  1.67k|    while (numBackChannels[i] > 1) {
  ------------------
  |  Branch (348:12): [True: 304, False: 1.36k]
  ------------------
  349|       |      /* must be CPE or paired SCE */
  350|    304|      if (*pCpeBack++ == ID_SCE) {
  ------------------
  |  Branch (350:11): [True: 180, False: 124]
  ------------------
  351|    180|        if (*pCpeBack++ == ID_CPE) {
  ------------------
  |  Branch (351:13): [True: 4, False: 176]
  ------------------
  352|      4|          err = 1;
  353|      4|          goto bail;
  354|      4|        }
  355|    180|      }
  356|    300|      numBackChannels[i] -= 2;
  357|  1.36k|    };
  358|       |    /* if number of channels is odd => last element must be a SCE (back center
  359|       |     * channel) */
  360|  1.36k|    if (numBackChannels[i]) {
  ------------------
  |  Branch (360:9): [True: 122, False: 1.24k]
  ------------------
  361|    122|      if (*pCpeBack++ == ID_CPE) {
  ------------------
  |  Branch (361:11): [True: 1, False: 121]
  ------------------
  362|      1|        err = 1;
  363|      1|        goto bail;
  364|      1|      }
  365|    122|    }
  366|  1.36k|  }
  367|       |
  368|    500|bail:
  369|       |
  370|    500|  return err;
  371|    500|}
tpdec_asc.cpp:_ZL6getAOTP13FDK_BITSTREAM:
 1338|  12.1k|static AUDIO_OBJECT_TYPE getAOT(HANDLE_FDK_BITSTREAM bs) {
 1339|  12.1k|  int tmp = 0;
 1340|       |
 1341|  12.1k|  tmp = FDKreadBits(bs, 5);
 1342|  12.1k|  if (tmp == AOT_ESCAPE) {
  ------------------
  |  Branch (1342:7): [True: 9.24k, False: 2.86k]
  ------------------
 1343|  9.24k|    int tmp2 = FDKreadBits(bs, 6);
 1344|  9.24k|    tmp = 32 + tmp2;
 1345|  9.24k|  }
 1346|       |
 1347|  12.1k|  return (AUDIO_OBJECT_TYPE)tmp;
 1348|  12.1k|}
tpdec_asc.cpp:_ZL13getSampleRateP13FDK_BITSTREAMPhi:
 1350|  18.7k|static INT getSampleRate(HANDLE_FDK_BITSTREAM bs, UCHAR *index, int nBits) {
 1351|  18.7k|  INT sampleRate;
 1352|  18.7k|  int idx;
 1353|       |
 1354|  18.7k|  idx = FDKreadBits(bs, nBits);
 1355|  18.7k|  if (idx == (1 << nBits) - 1) {
  ------------------
  |  Branch (1355:7): [True: 1.11k, False: 17.6k]
  ------------------
 1356|  1.11k|    if (FDKgetValidBits(bs) < 24) {
  ------------------
  |  Branch (1356:9): [True: 7, False: 1.10k]
  ------------------
 1357|      7|      return 0;
 1358|      7|    }
 1359|  1.10k|    sampleRate = FDKreadBits(bs, 24);
 1360|  17.6k|  } else {
 1361|  17.6k|    sampleRate = SamplingRateTable[idx];
 1362|  17.6k|  }
 1363|       |
 1364|  18.7k|  *index = idx;
 1365|       |
 1366|  18.7k|  return sampleRate;
 1367|  18.7k|}
tpdec_asc.cpp:_ZL22GaSpecificConfig_ParseP18CSGaSpecificConfigP21CSAudioSpecificConfigP13FDK_BITSTREAMj:
 1372|  1.54k|                                                 UINT ascStartAnchor) {
 1373|  1.54k|  TRANSPORTDEC_ERROR ErrorStatus = TRANSPORTDEC_OK;
 1374|       |
 1375|  1.54k|  self->m_frameLengthFlag = FDKreadBits(bs, 1);
 1376|       |
 1377|  1.54k|  self->m_dependsOnCoreCoder = FDKreadBits(bs, 1);
 1378|       |
 1379|  1.54k|  if (self->m_dependsOnCoreCoder) self->m_coreCoderDelay = FDKreadBits(bs, 14);
  ------------------
  |  Branch (1379:7): [True: 183, False: 1.36k]
  ------------------
 1380|       |
 1381|  1.54k|  self->m_extensionFlag = FDKreadBits(bs, 1);
 1382|       |
 1383|  1.54k|  if (asc->m_channelConfiguration == 0) {
  ------------------
  |  Branch (1383:7): [True: 500, False: 1.04k]
  ------------------
 1384|    500|    CProgramConfig_Read(&asc->m_progrConfigElement, bs, ascStartAnchor);
 1385|    500|  }
 1386|       |
 1387|  1.54k|  if ((asc->m_aot == AOT_AAC_SCAL) || (asc->m_aot == AOT_ER_AAC_SCAL)) {
  ------------------
  |  Branch (1387:7): [True: 18, False: 1.52k]
  |  Branch (1387:39): [True: 14, False: 1.51k]
  ------------------
 1388|     32|    self->m_layer = FDKreadBits(bs, 3);
 1389|     32|  }
 1390|       |
 1391|  1.54k|  if (self->m_extensionFlag) {
  ------------------
  |  Branch (1391:7): [True: 386, False: 1.15k]
  ------------------
 1392|    386|    if (asc->m_aot == AOT_ER_BSAC) {
  ------------------
  |  Branch (1392:9): [True: 15, False: 371]
  ------------------
 1393|     15|      self->m_numOfSubFrame = FDKreadBits(bs, 5);
 1394|     15|      self->m_layerLength = FDKreadBits(bs, 11);
 1395|     15|    }
 1396|       |
 1397|    386|    if ((asc->m_aot == AOT_ER_AAC_LC) || (asc->m_aot == AOT_ER_AAC_LTP) ||
  ------------------
  |  Branch (1397:9): [True: 9, False: 377]
  |  Branch (1397:42): [True: 0, False: 377]
  ------------------
 1398|    377|        (asc->m_aot == AOT_ER_AAC_SCAL) || (asc->m_aot == AOT_ER_AAC_LD)) {
  ------------------
  |  Branch (1398:9): [True: 9, False: 368]
  |  Branch (1398:44): [True: 60, False: 308]
  ------------------
 1399|     78|      asc->m_vcb11Flag = FDKreadBits(bs, 1); /* aacSectionDataResilienceFlag */
 1400|     78|      asc->m_rvlcFlag =
 1401|     78|          FDKreadBits(bs, 1); /* aacScalefactorDataResilienceFlag */
 1402|     78|      asc->m_hcrFlag = FDKreadBits(bs, 1); /* aacSpectralDataResilienceFlag */
 1403|     78|    }
 1404|       |
 1405|    386|    self->m_extensionFlag3 = FDKreadBits(bs, 1);
 1406|    386|  }
 1407|  1.54k|  return (ErrorStatus);
 1408|  1.54k|}
tpdec_asc.cpp:_ZL23EldSpecificConfig_ParseP21CSAudioSpecificConfigP13FDK_BITSTREAMP13CSTpCallBacks:
 1470|  1.47k|                                                  CSTpCallBacks *cb) {
 1471|  1.47k|  TRANSPORTDEC_ERROR ErrorStatus = TRANSPORTDEC_OK;
 1472|  1.47k|  CSEldSpecificConfig *esc = &asc->m_sc.m_eldSpecificConfig;
 1473|  1.47k|  UINT eldExtType;
 1474|  1.47k|  int eldExtLen, len, cnt, ldSbrLen = 0, eldExtLenSum, numSbrHeader = 0,
 1475|  1.47k|                           sbrIndex, eldExtCnt = 0;
 1476|       |
 1477|  1.47k|  unsigned char downscale_fill_nibble;
 1478|       |
 1479|  1.47k|  FDKmemclear(esc, sizeof(CSEldSpecificConfig));
 1480|       |
 1481|  1.47k|  esc->m_frameLengthFlag = FDKreadBits(hBs, 1);
 1482|  1.47k|  if (esc->m_frameLengthFlag) {
  ------------------
  |  Branch (1482:7): [True: 740, False: 730]
  ------------------
 1483|    740|    asc->m_samplesPerFrame = 480;
 1484|    740|  } else {
 1485|    730|    asc->m_samplesPerFrame = 512;
 1486|    730|  }
 1487|       |
 1488|  1.47k|  asc->m_vcb11Flag = FDKreadBits(hBs, 1);
 1489|  1.47k|  asc->m_rvlcFlag = FDKreadBits(hBs, 1);
 1490|  1.47k|  asc->m_hcrFlag = FDKreadBits(hBs, 1);
 1491|       |
 1492|  1.47k|  esc->m_sbrPresentFlag = FDKreadBits(hBs, 1);
 1493|       |
 1494|  1.47k|  if (esc->m_sbrPresentFlag == 1) {
  ------------------
  |  Branch (1494:7): [True: 870, False: 600]
  ------------------
 1495|    870|    esc->m_sbrSamplingRate =
 1496|    870|        FDKreadBits(hBs, 1); /* 0: single rate, 1: dual rate */
 1497|    870|    esc->m_sbrCrcFlag = FDKreadBits(hBs, 1);
 1498|       |
 1499|    870|    asc->m_extensionSamplingFrequency = asc->m_samplingFrequency
 1500|    870|                                        << esc->m_sbrSamplingRate;
 1501|       |
 1502|    870|    if (cb->cbSbr != NULL) {
  ------------------
  |  Branch (1502:9): [True: 870, False: 0]
  ------------------
 1503|       |      /* ELD reduced delay mode: LD-SBR initialization has to know the downscale
 1504|       |         information. Postpone LD-SBR initialization and read ELD extension
 1505|       |         information first. */
 1506|    870|      switch (asc->m_channelConfiguration) {
 1507|    312|        case 1:
  ------------------
  |  Branch (1507:9): [True: 312, False: 558]
  ------------------
 1508|    447|        case 2:
  ------------------
  |  Branch (1508:9): [True: 135, False: 735]
  ------------------
 1509|    447|          numSbrHeader = 1;
 1510|    447|          break;
 1511|    150|        case 3:
  ------------------
  |  Branch (1511:9): [True: 150, False: 720]
  ------------------
 1512|    150|          numSbrHeader = 2;
 1513|    150|          break;
 1514|     31|        case 4:
  ------------------
  |  Branch (1514:9): [True: 31, False: 839]
  ------------------
 1515|     65|        case 5:
  ------------------
  |  Branch (1515:9): [True: 34, False: 836]
  ------------------
 1516|    116|        case 6:
  ------------------
  |  Branch (1516:9): [True: 51, False: 819]
  ------------------
 1517|    116|          numSbrHeader = 3;
 1518|    116|          break;
 1519|     64|        case 7:
  ------------------
  |  Branch (1519:9): [True: 64, False: 806]
  ------------------
 1520|     77|        case 11:
  ------------------
  |  Branch (1520:9): [True: 13, False: 857]
  ------------------
 1521|     88|        case 12:
  ------------------
  |  Branch (1521:9): [True: 11, False: 859]
  ------------------
 1522|    109|        case 14:
  ------------------
  |  Branch (1522:9): [True: 21, False: 849]
  ------------------
 1523|    109|          numSbrHeader = 4;
 1524|    109|          break;
 1525|     48|        default:
  ------------------
  |  Branch (1525:9): [True: 48, False: 822]
  ------------------
 1526|     48|          numSbrHeader = 0;
 1527|     48|          break;
 1528|    870|      }
 1529|  2.40k|      for (sbrIndex = 0; sbrIndex < numSbrHeader; sbrIndex++) {
  ------------------
  |  Branch (1529:26): [True: 1.53k, False: 870]
  ------------------
 1530|  1.53k|        ldSbrLen += skipSbrHeader(hBs, 0);
 1531|  1.53k|      }
 1532|    870|    } else {
 1533|      0|      return TRANSPORTDEC_UNSUPPORTED_FORMAT;
 1534|      0|    }
 1535|    870|  }
 1536|  1.47k|  esc->m_useLdQmfTimeAlign = 0;
 1537|       |
 1538|       |  /* new ELD syntax */
 1539|  1.47k|  eldExtLenSum = FDKgetValidBits(hBs);
 1540|  1.47k|  esc->m_downscaledSamplingFrequency = asc->m_samplingFrequency;
 1541|       |  /* parse ExtTypeConfigData */
 1542|  2.67k|  while (((eldExtType = FDKreadBits(hBs, 4)) != ELDEXT_TERM) &&
  ------------------
  |  Branch (1542:10): [True: 1.48k, False: 1.19k]
  ------------------
 1543|  1.48k|         ((INT)FDKgetValidBits(hBs) >= 0) && (eldExtCnt++ < 15)) {
  ------------------
  |  Branch (1543:10): [True: 1.47k, False: 16]
  |  Branch (1543:46): [True: 1.47k, False: 0]
  ------------------
 1544|  1.47k|    eldExtLen = len = FDKreadBits(hBs, 4);
 1545|  1.47k|    if (len == 0xf) {
  ------------------
  |  Branch (1545:9): [True: 158, False: 1.31k]
  ------------------
 1546|    158|      len = FDKreadBits(hBs, 8);
 1547|    158|      eldExtLen += len;
 1548|       |
 1549|    158|      if (len == 0xff) {
  ------------------
  |  Branch (1549:11): [True: 98, False: 60]
  ------------------
 1550|     98|        len = FDKreadBits(hBs, 16);
 1551|     98|        eldExtLen += len;
 1552|     98|      }
 1553|    158|    }
 1554|       |
 1555|  1.47k|    switch (eldExtType) {
 1556|    901|      case ELDEXT_LDSAC:
  ------------------
  |  Branch (1556:7): [True: 901, False: 572]
  ------------------
 1557|    901|        esc->m_useLdQmfTimeAlign = 1;
 1558|    901|        if (cb->cbSsc != NULL) {
  ------------------
  |  Branch (1558:13): [True: 901, False: 0]
  ------------------
 1559|    901|          ErrorStatus = (TRANSPORTDEC_ERROR)cb->cbSsc(
 1560|    901|              cb->cbSscData, hBs, asc->m_aot,
 1561|    901|              asc->m_samplingFrequency << esc->m_sbrSamplingRate,
 1562|    901|              asc->m_samplesPerFrame << esc->m_sbrSamplingRate,
 1563|    901|              asc->m_channelConfiguration, 1, /* stereoConfigIndex */
 1564|    901|              -1, /* nTimeSlots: read from bitstream */
 1565|    901|              eldExtLen, asc->configMode, &asc->SacConfigChanged);
 1566|    901|          if (ErrorStatus != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (1566:15): [True: 201, False: 700]
  ------------------
 1567|    201|            return TRANSPORTDEC_PARSE_ERROR;
 1568|    201|          }
 1569|    700|          if (esc->m_downscaledSamplingFrequency != asc->m_samplingFrequency) {
  ------------------
  |  Branch (1569:15): [True: 30, False: 670]
  ------------------
 1570|     30|            return TRANSPORTDEC_UNSUPPORTED_FORMAT; /* ELDv2 w/ ELD downscaled
 1571|       |                                                       mode not allowed */
 1572|     30|          }
 1573|    670|          break;
 1574|    700|        }
 1575|       |
 1576|      0|        FDK_FALLTHROUGH;
  ------------------
  |  |  386|      0|#define FDK_FALLTHROUGH [[clang::fallthrough]]
  ------------------
 1577|    192|      default:
  ------------------
  |  Branch (1577:7): [True: 192, False: 1.28k]
  ------------------
 1578|  1.68M|        for (cnt = 0; cnt < eldExtLen; cnt++) {
  ------------------
  |  Branch (1578:23): [True: 1.67M, False: 192]
  ------------------
 1579|  1.67M|          FDKreadBits(hBs, 8);
 1580|  1.67M|        }
 1581|    192|        break;
 1582|       |
 1583|    380|      case ELDEXT_DOWNSCALEINFO:
  ------------------
  |  Branch (1583:7): [True: 380, False: 1.09k]
  ------------------
 1584|    380|        UCHAR tmpDownscaleFreqIdx;
 1585|    380|        esc->m_downscaledSamplingFrequency =
 1586|    380|            getSampleRate(hBs, &tmpDownscaleFreqIdx, 4);
 1587|    380|        if (esc->m_downscaledSamplingFrequency == 0 ||
  ------------------
  |  Branch (1587:13): [True: 2, False: 378]
  ------------------
 1588|    378|            esc->m_downscaledSamplingFrequency > 96000) {
  ------------------
  |  Branch (1588:13): [True: 24, False: 354]
  ------------------
 1589|     26|          return TRANSPORTDEC_PARSE_ERROR;
 1590|     26|        }
 1591|    354|        downscale_fill_nibble = FDKreadBits(hBs, 4);
 1592|    354|        if (downscale_fill_nibble != 0x0) {
  ------------------
  |  Branch (1592:13): [True: 6, False: 348]
  ------------------
 1593|      6|          return TRANSPORTDEC_PARSE_ERROR;
 1594|      6|        }
 1595|    348|        if (esc->m_useLdQmfTimeAlign == 1) {
  ------------------
  |  Branch (1595:13): [True: 1, False: 347]
  ------------------
 1596|      1|          return TRANSPORTDEC_UNSUPPORTED_FORMAT; /* ELDv2 w/ ELD downscaled
 1597|       |                                                     mode not allowed */
 1598|      1|        }
 1599|    347|        break;
 1600|  1.47k|    }
 1601|  1.47k|  }
 1602|  1.20k|  if (eldExtType != ELDEXT_TERM) {
  ------------------
  |  Branch (1602:7): [True: 16, False: 1.19k]
  ------------------
 1603|     16|    return TRANSPORTDEC_PARSE_ERROR;
 1604|     16|  }
 1605|       |
 1606|  1.19k|  if ((INT)FDKgetValidBits(hBs) < 0) {
  ------------------
  |  Branch (1606:7): [True: 131, False: 1.05k]
  ------------------
 1607|    131|    return TRANSPORTDEC_PARSE_ERROR;
 1608|    131|  }
 1609|       |
 1610|  1.05k|  if (esc->m_sbrPresentFlag == 1 && numSbrHeader != 0) {
  ------------------
  |  Branch (1610:7): [True: 770, False: 289]
  |  Branch (1610:37): [True: 768, False: 2]
  ------------------
 1611|    768|    INT dsFactor = 1; /* Downscale factor must be 1 or even for SBR */
 1612|    768|    if (esc->m_downscaledSamplingFrequency != 0) {
  ------------------
  |  Branch (1612:9): [True: 768, False: 0]
  ------------------
 1613|    768|      if (asc->m_samplingFrequency % esc->m_downscaledSamplingFrequency != 0) {
  ------------------
  |  Branch (1613:11): [True: 11, False: 757]
  ------------------
 1614|     11|        return TRANSPORTDEC_UNSUPPORTED_FORMAT;
 1615|     11|      }
 1616|    757|      dsFactor = asc->m_samplingFrequency / esc->m_downscaledSamplingFrequency;
 1617|    757|      if (dsFactor != 1 && (dsFactor)&1) {
  ------------------
  |  Branch (1617:11): [True: 47, False: 710]
  |  Branch (1617:28): [True: 1, False: 46]
  ------------------
 1618|      1|        return TRANSPORTDEC_UNSUPPORTED_FORMAT; /* SBR needs an even downscale
 1619|       |                                                   factor */
 1620|      1|      }
 1621|    756|      if (dsFactor != 1 && dsFactor != 2 && dsFactor != 4) {
  ------------------
  |  Branch (1621:11): [True: 46, False: 710]
  |  Branch (1621:28): [True: 37, False: 9]
  |  Branch (1621:45): [True: 30, False: 7]
  ------------------
 1622|     30|        dsFactor = 1; /* don't apply dsf for not yet supported even dsfs */
 1623|     30|      }
 1624|    756|      if ((INT)asc->m_samplesPerFrame % dsFactor != 0) {
  ------------------
  |  Branch (1624:11): [True: 0, False: 756]
  ------------------
 1625|      0|        return TRANSPORTDEC_UNSUPPORTED_FORMAT; /* frameSize/dsf must be an
 1626|       |                                                   integer number */
 1627|      0|      }
 1628|    756|    }
 1629|    756|    eldExtLenSum = eldExtLenSum - FDKgetValidBits(hBs);
 1630|    756|    FDKpushBack(hBs, eldExtLenSum + ldSbrLen);
 1631|    756|    if (0 != ld_sbr_header(asc, dsFactor, hBs, cb)) {
  ------------------
  |  Branch (1631:9): [True: 171, False: 585]
  ------------------
 1632|    171|      return TRANSPORTDEC_PARSE_ERROR;
 1633|    171|    }
 1634|    585|    FDKpushFor(hBs, eldExtLenSum);
 1635|    585|  }
 1636|    876|  return (ErrorStatus);
 1637|  1.05k|}
tpdec_asc.cpp:_ZL13skipSbrHeaderP13FDK_BITSTREAMi:
 1410|  1.68k|static INT skipSbrHeader(HANDLE_FDK_BITSTREAM hBs, int isUsac) {
 1411|       |  /* Dummy parse SbrDfltHeader() */
 1412|  1.68k|  INT dflt_header_extra1, dflt_header_extra2, bitsToSkip = 0;
 1413|       |
 1414|  1.68k|  if (!isUsac) {
  ------------------
  |  Branch (1414:7): [True: 1.53k, False: 151]
  ------------------
 1415|  1.53k|    bitsToSkip = 6;
 1416|  1.53k|    FDKpushFor(hBs, 6); /* amp res 1, xover freq 3, reserved 2 */
 1417|  1.53k|  }
 1418|  1.68k|  bitsToSkip += 8;
 1419|  1.68k|  FDKpushFor(hBs, 8); /* start / stop freq */
 1420|  1.68k|  bitsToSkip += 2;
 1421|  1.68k|  dflt_header_extra1 = FDKreadBit(hBs);
 1422|  1.68k|  dflt_header_extra2 = FDKreadBit(hBs);
 1423|  1.68k|  bitsToSkip += 5 * dflt_header_extra1 + 6 * dflt_header_extra2;
 1424|  1.68k|  FDKpushFor(hBs, 5 * dflt_header_extra1 + 6 * dflt_header_extra2);
 1425|       |
 1426|  1.68k|  return bitsToSkip;
 1427|  1.68k|}
tpdec_asc.cpp:_ZL13ld_sbr_headerP21CSAudioSpecificConfigiP13FDK_BITSTREAMP13CSTpCallBacks:
 1430|    756|                         HANDLE_FDK_BITSTREAM hBs, CSTpCallBacks *cb) {
 1431|    756|  const int channelConfiguration = asc->m_channelConfiguration;
 1432|    756|  int i = 0, j = 0;
 1433|    756|  INT error = 0;
 1434|    756|  MP4_ELEMENT_ID element = ID_NONE;
 1435|       |
 1436|       |  /* check whether the channelConfiguration is defined in
 1437|       |   * channel_configuration_array */
 1438|    756|  if (channelConfiguration < 0 ||
  ------------------
  |  Branch (1438:7): [True: 0, False: 756]
  ------------------
 1439|    756|      channelConfiguration > (INT)(sizeof(channel_configuration_array) /
  ------------------
  |  Branch (1439:7): [True: 0, False: 756]
  ------------------
 1440|    756|                                       sizeof(MP4_ELEMENT_ID **) -
 1441|    756|                                   1)) {
 1442|      0|    return TRANSPORTDEC_PARSE_ERROR;
 1443|      0|  }
 1444|       |
 1445|       |  /* read elements of the passed channel_configuration until there is ID_NONE */
 1446|  2.12k|  while ((element = channel_configuration_array[channelConfiguration][j]) !=
  ------------------
  |  Branch (1446:10): [True: 1.53k, False: 585]
  ------------------
 1447|  2.12k|         ID_NONE) {
 1448|       |    /* Setup LFE element for upsampling too. This is essential especially for
 1449|       |     * channel configs where the LFE element is not at the last position for
 1450|       |     * example in channel config 13 or 14. It leads to memory leaks if the setup
 1451|       |     * of the LFE element would be done later in the core. */
 1452|  1.53k|    if (element == ID_SCE || element == ID_CPE || element == ID_LFE) {
  ------------------
  |  Branch (1452:9): [True: 664, False: 875]
  |  Branch (1452:30): [True: 741, False: 134]
  |  Branch (1452:51): [True: 134, False: 0]
  ------------------
 1453|  1.53k|      error |= cb->cbSbr(
 1454|  1.53k|          cb->cbSbrData, hBs, asc->m_samplingFrequency / dsFactor,
 1455|  1.53k|          asc->m_extensionSamplingFrequency / dsFactor,
 1456|  1.53k|          asc->m_samplesPerFrame / dsFactor, AOT_ER_AAC_ELD, element, i++, 0, 0,
 1457|  1.53k|          asc->configMode, &asc->SbrConfigChanged, dsFactor);
 1458|  1.53k|      if (error != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (1458:11): [True: 171, False: 1.36k]
  ------------------
 1459|    171|        goto bail;
 1460|    171|      }
 1461|  1.53k|    }
 1462|  1.36k|    j++;
 1463|  1.36k|  }
 1464|    756|bail:
 1465|    756|  return error;
 1466|    756|}
tpdec_asc.cpp:_ZL16UsacConfig_ParseP21CSAudioSpecificConfigP13FDK_BITSTREAMP13CSTpCallBacks:
 2128|  7.30k|                                           CSTpCallBacks *cb) {
 2129|  7.30k|  int usacSamplingFrequency, channelConfigurationIndex, coreSbrFrameLengthIndex;
 2130|  7.30k|  TRANSPORTDEC_ERROR err = TRANSPORTDEC_OK;
 2131|       |
 2132|       |  /* Start bit position of usacConfig */
 2133|  7.30k|  INT nbits = (INT)FDKgetValidBits(hBs);
 2134|       |
 2135|  7.30k|  usacSamplingFrequency = getSampleRate(hBs, &asc->m_samplingFrequencyIndex, 5);
 2136|  7.30k|  if (usacSamplingFrequency == 0 || usacSamplingFrequency > 96000) {
  ------------------
  |  Branch (2136:7): [True: 2, False: 7.30k]
  |  Branch (2136:37): [True: 20, False: 7.28k]
  ------------------
 2137|     22|    return TRANSPORTDEC_PARSE_ERROR;
 2138|     22|  }
 2139|  7.28k|  asc->m_samplingFrequency = (UINT)usacSamplingFrequency;
 2140|       |
 2141|  7.28k|  coreSbrFrameLengthIndex = FDKreadBits(hBs, 3);
 2142|  7.28k|  if (UsacConfig_SetCoreSbrFrameLengthIndex(asc, coreSbrFrameLengthIndex) !=
  ------------------
  |  Branch (2142:7): [True: 1, False: 7.28k]
  ------------------
 2143|  7.28k|      TRANSPORTDEC_OK) {
 2144|      1|    return TRANSPORTDEC_PARSE_ERROR;
 2145|      1|  }
 2146|       |
 2147|  7.28k|  channelConfigurationIndex = FDKreadBits(hBs, 5);
 2148|  7.28k|  if (channelConfigurationIndex > 2) {
  ------------------
  |  Branch (2148:7): [True: 9, False: 7.27k]
  ------------------
 2149|      9|    return TRANSPORTDEC_PARSE_ERROR; /* only channelConfigurationIndex = [1,2]
 2150|       |                                        are supported */
 2151|      9|  }
 2152|       |
 2153|  7.27k|  if (channelConfigurationIndex == 0) {
  ------------------
  |  Branch (2153:7): [True: 28, False: 7.24k]
  ------------------
 2154|     28|    return TRANSPORTDEC_PARSE_ERROR; /* only channelConfigurationIndex = [1,2]
 2155|       |                                        are supported */
 2156|     28|  }
 2157|  7.24k|  asc->m_channelConfiguration = channelConfigurationIndex;
 2158|       |
 2159|  7.24k|  err = UsacRsv60DecoderConfig_Parse(asc, hBs, cb);
 2160|  7.24k|  if (err != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (2160:7): [True: 2.83k, False: 4.41k]
  ------------------
 2161|  2.83k|    return err;
 2162|  2.83k|  }
 2163|       |
 2164|  4.41k|  if (FDKreadBits(hBs, 1)) { /* usacConfigExtensionPresent */
  ------------------
  |  Branch (2164:7): [True: 2.52k, False: 1.88k]
  ------------------
 2165|  2.52k|    err = configExtension(&asc->m_sc.m_usacConfig, hBs, cb);
 2166|  2.52k|    if (err != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (2166:9): [True: 459, False: 2.06k]
  ------------------
 2167|    459|      return err;
 2168|    459|    }
 2169|  2.52k|  } else if (cb->cbUniDrc != NULL) {
  ------------------
  |  Branch (2169:14): [True: 1.88k, False: 0]
  ------------------
 2170|       |    /* no loudnessInfoSet contained. Clear the loudnessInfoSet struct by feeding
 2171|       |     * an empty config extension */
 2172|  1.88k|    err = (TRANSPORTDEC_ERROR)cb->cbUniDrc(
 2173|  1.88k|        cb->cbUniDrcData, NULL, 0, 1 /* loudnessInfoSet */, 0, 0, asc->m_aot);
 2174|  1.88k|    if (err != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (2174:9): [True: 0, False: 1.88k]
  ------------------
 2175|      0|      return err;
 2176|      0|    }
 2177|  1.88k|  }
 2178|       |
 2179|       |  /* sanity check whether number of channels signaled in UsacDecoderConfig()
 2180|       |     matches the number of channels required by channelConfigurationIndex */
 2181|  3.95k|  if ((channelConfigurationIndex > 0) &&
  ------------------
  |  Branch (2181:7): [True: 3.95k, False: 0]
  ------------------
 2182|  3.95k|      (sc_chan_config_tab[channelConfigurationIndex].nCh !=
  ------------------
  |  Branch (2182:7): [True: 0, False: 3.95k]
  ------------------
 2183|  3.95k|       asc->m_sc.m_usacConfig.m_nUsacChannels)) {
 2184|      0|    return TRANSPORTDEC_PARSE_ERROR;
 2185|      0|  }
 2186|       |
 2187|       |  /* Copy UsacConfig() to asc->m_sc.m_usacConfig.UsacConfig[] buffer. */
 2188|  3.95k|  INT configSize_bits = (INT)FDKgetValidBits(hBs) - nbits;
 2189|  3.95k|  if (StoreConfigAsBitstream(hBs, configSize_bits,
  ------------------
  |  Branch (2189:7): [True: 27, False: 3.92k]
  ------------------
 2190|  3.95k|                             asc->m_sc.m_usacConfig.UsacConfig,
 2191|  3.95k|                             TP_USAC_MAX_CONFIG_LEN)) {
  ------------------
  |  |  121|  3.95k|  512 /* next power of two of maximum of escapedValue(hBs, 4, 4, 8) in \
  ------------------
 2192|     27|    return TRANSPORTDEC_PARSE_ERROR;
 2193|     27|  }
 2194|  3.92k|  asc->m_sc.m_usacConfig.UsacConfigBits = fAbs(configSize_bits);
 2195|       |
 2196|  3.92k|  return err;
 2197|  3.95k|}
tpdec_asc.cpp:_ZL28UsacRsv60DecoderConfig_ParseP21CSAudioSpecificConfigP13FDK_BITSTREAMPK13CSTpCallBacks:
 1855|  7.24k|    const CSTpCallBacks *cb) {
 1856|  7.24k|  TRANSPORTDEC_ERROR ErrorStatus = TRANSPORTDEC_OK;
 1857|  7.24k|  CSUsacConfig *usc = &asc->m_sc.m_usacConfig;
 1858|  7.24k|  int i, numberOfElements;
 1859|  7.24k|  int channelElementIdx =
 1860|  7.24k|      0; /* index for elements which contain audio channels (sce, cpe, lfe) */
 1861|  7.24k|  SC_CHANNEL_CONFIG sc_chan_config = {0, 0, 0, 0};
 1862|  7.24k|  int uniDrcElement =
 1863|  7.24k|      -1; /* index of uniDrc extension element. -1 if not contained. */
 1864|       |
 1865|  7.24k|  numberOfElements = (int)escapedValue(hBs, 4, 8, 16) + 1;
 1866|  7.24k|  usc->m_usacNumElements = numberOfElements;
 1867|  7.24k|  if (numberOfElements > TP_USAC_MAX_ELEMENTS) {
  ------------------
  |  |  118|  7.24k|#define TP_USAC_MAX_ELEMENTS ((24) + TP_USAC_MAX_EXT_ELEMENTS)
  |  |  ------------------
  |  |  |  |  116|  7.24k|#define TP_USAC_MAX_EXT_ELEMENTS ((24))
  |  |  ------------------
  ------------------
  |  Branch (1867:7): [True: 8, False: 7.24k]
  ------------------
 1868|      8|    return TRANSPORTDEC_UNSUPPORTED_FORMAT;
 1869|      8|  }
 1870|  7.24k|  usc->m_nUsacChannels = 0;
 1871|  7.24k|  usc->m_channelConfigurationIndex = asc->m_channelConfiguration;
 1872|       |
 1873|  7.24k|  if (asc->m_aot == AOT_USAC) {
  ------------------
  |  Branch (1873:7): [True: 7.24k, False: 0]
  ------------------
 1874|  7.24k|    sc_chan_config = sc_chan_config_tab[usc->m_channelConfigurationIndex];
 1875|       |
 1876|  7.24k|    if (sc_chan_config.nCh > (SCHAR)TP_USAC_MAX_SPEAKERS) {
  ------------------
  |  |  114|  7.24k|#define TP_USAC_MAX_SPEAKERS (24)
  ------------------
  |  Branch (1876:9): [True: 0, False: 7.24k]
  ------------------
 1877|      0|      return TRANSPORTDEC_PARSE_ERROR;
 1878|      0|    }
 1879|  7.24k|  }
 1880|       |
 1881|  59.2k|  for (i = 0; i < numberOfElements; i++) {
  ------------------
  |  Branch (1881:15): [True: 53.2k, False: 5.96k]
  ------------------
 1882|  53.2k|    MP4_ELEMENT_ID usacElementType = (MP4_ELEMENT_ID)(
 1883|  53.2k|        FDKreadBits(hBs, 2) | USAC_ID_BIT); /* set USAC_ID_BIT to map
  ------------------
  |  |  417|  53.2k|#define USAC_ID_BIT 16 /** USAC element IDs start at USAC_ID_BIT */
  ------------------
 1884|       |                                               usacElementType to
 1885|       |                                               MP4_ELEMENT_ID enum */
 1886|  53.2k|    usc->element[i].usacElementType = usacElementType;
 1887|       |
 1888|       |    /* sanity check: update element counter */
 1889|  53.2k|    if (asc->m_aot == AOT_USAC) {
  ------------------
  |  Branch (1889:9): [True: 53.2k, False: 0]
  ------------------
 1890|  53.2k|      switch (usacElementType) {
 1891|  4.53k|        case ID_USAC_SCE:
  ------------------
  |  Branch (1891:9): [True: 4.53k, False: 48.7k]
  ------------------
 1892|  4.53k|          sc_chan_config.nSCE--;
 1893|  4.53k|          break;
 1894|    207|        case ID_USAC_CPE:
  ------------------
  |  Branch (1894:9): [True: 207, False: 53.0k]
  ------------------
 1895|    207|          sc_chan_config.nCPE--;
 1896|    207|          break;
 1897|      7|        case ID_USAC_LFE:
  ------------------
  |  Branch (1897:9): [True: 7, False: 53.2k]
  ------------------
 1898|      7|          sc_chan_config.nLFE--;
 1899|      7|          break;
 1900|  48.5k|        default:
  ------------------
  |  Branch (1900:9): [True: 48.5k, False: 4.74k]
  ------------------
 1901|  48.5k|          break;
 1902|  53.2k|      }
 1903|  53.2k|      if (usc->m_channelConfigurationIndex) {
  ------------------
  |  Branch (1903:11): [True: 53.2k, False: 0]
  ------------------
 1904|       |        /* sanity check: no element counter may be smaller zero */
 1905|  53.2k|        if (sc_chan_config.nCPE < 0 || sc_chan_config.nSCE < 0 ||
  ------------------
  |  Branch (1905:13): [True: 12, False: 53.2k]
  |  Branch (1905:40): [True: 119, False: 53.1k]
  ------------------
 1906|  53.1k|            sc_chan_config.nLFE < 0) {
  ------------------
  |  Branch (1906:13): [True: 7, False: 53.1k]
  ------------------
 1907|    138|          return TRANSPORTDEC_PARSE_ERROR;
 1908|    138|        }
 1909|  53.2k|      }
 1910|  53.2k|    }
 1911|       |
 1912|  53.1k|    switch (usacElementType) {
 1913|  4.41k|      case ID_USAC_SCE:
  ------------------
  |  Branch (1913:7): [True: 4.41k, False: 48.7k]
  ------------------
 1914|       |        /* UsacCoreConfig() ISO/IEC FDIS 23003-3  Table 10 */
 1915|  4.41k|        if (FDKreadBit(hBs)) { /* tw_mdct */
  ------------------
  |  Branch (1915:13): [True: 1, False: 4.41k]
  ------------------
 1916|      1|          return TRANSPORTDEC_UNSUPPORTED_FORMAT;
 1917|      1|        }
 1918|  4.41k|        usc->element[i].m_noiseFilling = FDKreadBits(hBs, 1);
 1919|       |        /* end of UsacCoreConfig() */
 1920|  4.41k|        if (usc->m_sbrRatioIndex > 0) {
  ------------------
  |  Branch (1920:13): [True: 1.10k, False: 3.30k]
  ------------------
 1921|  1.10k|          if (cb->cbSbr == NULL) {
  ------------------
  |  Branch (1921:15): [True: 0, False: 1.10k]
  ------------------
 1922|      0|            return TRANSPORTDEC_UNKOWN_ERROR;
 1923|      0|          }
 1924|       |          /* SbrConfig() ISO/IEC FDIS 23003-3  Table 11 */
 1925|  1.10k|          usc->element[i].m_harmonicSBR = FDKreadBit(hBs);
 1926|  1.10k|          usc->element[i].m_interTes = FDKreadBit(hBs);
 1927|  1.10k|          usc->element[i].m_pvc = FDKreadBit(hBs);
 1928|  1.10k|          if (cb->cbSbr(cb->cbSbrData, hBs, asc->m_samplingFrequency,
  ------------------
  |  Branch (1928:15): [True: 31, False: 1.07k]
  ------------------
 1929|  1.10k|                        asc->m_extensionSamplingFrequency,
 1930|  1.10k|                        asc->m_samplesPerFrame, asc->m_aot, ID_SCE,
 1931|  1.10k|                        channelElementIdx, usc->element[i].m_harmonicSBR,
 1932|  1.10k|                        usc->element[i].m_stereoConfigIndex, asc->configMode,
 1933|  1.10k|                        &asc->SbrConfigChanged, 1)) {
 1934|     31|            return TRANSPORTDEC_PARSE_ERROR;
 1935|     31|          }
 1936|       |          /* end of SbrConfig() */
 1937|  1.10k|        }
 1938|  4.38k|        usc->m_nUsacChannels += 1;
 1939|  4.38k|        channelElementIdx++;
 1940|  4.38k|        break;
 1941|       |
 1942|    195|      case ID_USAC_CPE:
  ------------------
  |  Branch (1942:7): [True: 195, False: 52.9k]
  ------------------
 1943|       |        /* UsacCoreConfig() ISO/IEC FDIS 23003-3  Table 10 */
 1944|    195|        if (FDKreadBit(hBs)) { /* tw_mdct */
  ------------------
  |  Branch (1944:13): [True: 2, False: 193]
  ------------------
 1945|      2|          return TRANSPORTDEC_UNSUPPORTED_FORMAT;
 1946|      2|        }
 1947|    193|        usc->element[i].m_noiseFilling = FDKreadBits(hBs, 1);
 1948|       |        /* end of UsacCoreConfig() */
 1949|    193|        if (usc->m_sbrRatioIndex > 0) {
  ------------------
  |  Branch (1949:13): [True: 151, False: 42]
  ------------------
 1950|    151|          if (cb->cbSbr == NULL) return TRANSPORTDEC_UNKOWN_ERROR;
  ------------------
  |  Branch (1950:15): [True: 0, False: 151]
  ------------------
 1951|       |          /* SbrConfig() ISO/IEC FDIS 23003-3 */
 1952|    151|          usc->element[i].m_harmonicSBR = FDKreadBit(hBs);
 1953|    151|          usc->element[i].m_interTes = FDKreadBit(hBs);
 1954|    151|          usc->element[i].m_pvc = FDKreadBit(hBs);
 1955|    151|          {
 1956|    151|            INT bitsToSkip = skipSbrHeader(hBs, 1);
 1957|       |            /* read stereoConfigIndex */
 1958|    151|            usc->element[i].m_stereoConfigIndex = FDKreadBits(hBs, 2);
 1959|       |            /* rewind */
 1960|    151|            FDKpushBack(hBs, bitsToSkip + 2);
 1961|    151|          }
 1962|    151|          {
 1963|    151|            MP4_ELEMENT_ID el_type =
 1964|    151|                (usc->element[i].m_stereoConfigIndex == 1 ||
  ------------------
  |  Branch (1964:18): [True: 34, False: 117]
  ------------------
 1965|    117|                 usc->element[i].m_stereoConfigIndex == 2)
  ------------------
  |  Branch (1965:18): [True: 54, False: 63]
  ------------------
 1966|    151|                    ? ID_SCE
 1967|    151|                    : ID_CPE;
 1968|    151|            if (cb->cbSbr(cb->cbSbrData, hBs, asc->m_samplingFrequency,
  ------------------
  |  Branch (1968:17): [True: 10, False: 141]
  ------------------
 1969|    151|                          asc->m_extensionSamplingFrequency,
 1970|    151|                          asc->m_samplesPerFrame, asc->m_aot, el_type,
 1971|    151|                          channelElementIdx, usc->element[i].m_harmonicSBR,
 1972|    151|                          usc->element[i].m_stereoConfigIndex, asc->configMode,
 1973|    151|                          &asc->SbrConfigChanged, 1)) {
 1974|     10|              return TRANSPORTDEC_PARSE_ERROR;
 1975|     10|            }
 1976|    151|          }
 1977|       |          /* end of SbrConfig() */
 1978|       |
 1979|    141|          usc->element[i].m_stereoConfigIndex =
 1980|    141|              FDKreadBits(hBs, 2); /* Needed in RM5 syntax */
 1981|       |
 1982|    141|          if (usc->element[i].m_stereoConfigIndex > 0) {
  ------------------
  |  Branch (1982:15): [True: 111, False: 30]
  ------------------
 1983|    111|            if (cb->cbSsc != NULL) {
  ------------------
  |  Branch (1983:17): [True: 111, False: 0]
  ------------------
 1984|    111|              int samplesPerFrame = asc->m_samplesPerFrame;
 1985|       |
 1986|    111|              if (usc->m_sbrRatioIndex == 1) samplesPerFrame <<= 2;
  ------------------
  |  Branch (1986:19): [True: 38, False: 73]
  ------------------
 1987|    111|              if (usc->m_sbrRatioIndex == 2)
  ------------------
  |  Branch (1987:19): [True: 43, False: 68]
  ------------------
 1988|     43|                samplesPerFrame = (samplesPerFrame * 8) / 3;
 1989|    111|              if (usc->m_sbrRatioIndex == 3) samplesPerFrame <<= 1;
  ------------------
  |  Branch (1989:19): [True: 30, False: 81]
  ------------------
 1990|       |
 1991|       |              /* Mps212Config() ISO/IEC FDIS 23003-3 */
 1992|    111|              if (cb->cbSsc(cb->cbSscData, hBs, asc->m_aot,
  ------------------
  |  Branch (1992:19): [True: 28, False: 83]
  ------------------
 1993|    111|                            asc->m_extensionSamplingFrequency, samplesPerFrame,
 1994|    111|                            1, /* only downmix channels (residual channels are
 1995|       |                                  not counted) */
 1996|    111|                            usc->element[i].m_stereoConfigIndex,
 1997|    111|                            usc->m_coreSbrFrameLengthIndex,
 1998|    111|                            0, /* don't know the length */
 1999|    111|                            asc->configMode, &asc->SacConfigChanged)) {
 2000|     28|                return TRANSPORTDEC_PARSE_ERROR;
 2001|     28|              }
 2002|       |              /* end of Mps212Config() */
 2003|    111|            } else {
 2004|      0|              return TRANSPORTDEC_UNKOWN_ERROR;
 2005|      0|            }
 2006|    111|          }
 2007|    141|        } else {
 2008|     42|          usc->element[i].m_stereoConfigIndex = 0;
 2009|     42|        }
 2010|    155|        usc->m_nUsacChannels += 2;
 2011|       |
 2012|    155|        channelElementIdx++;
 2013|    155|        break;
 2014|       |
 2015|      0|      case ID_USAC_LFE:
  ------------------
  |  Branch (2015:7): [True: 0, False: 53.1k]
  ------------------
 2016|      0|        usc->element[i].m_noiseFilling = 0;
 2017|      0|        usc->m_nUsacChannels += 1;
 2018|      0|        if (usc->m_sbrRatioIndex > 0) {
  ------------------
  |  Branch (2018:13): [True: 0, False: 0]
  ------------------
 2019|       |          /* Use SBR for upsampling */
 2020|      0|          if (cb->cbSbr == NULL) return ErrorStatus = TRANSPORTDEC_UNKOWN_ERROR;
  ------------------
  |  Branch (2020:15): [True: 0, False: 0]
  ------------------
 2021|      0|          usc->element[i].m_harmonicSBR = (UCHAR)0;
 2022|      0|          usc->element[i].m_interTes = (UCHAR)0;
 2023|      0|          usc->element[i].m_pvc = (UCHAR)0;
 2024|      0|          if (cb->cbSbr(cb->cbSbrData, hBs, asc->m_samplingFrequency,
  ------------------
  |  Branch (2024:15): [True: 0, False: 0]
  ------------------
 2025|      0|                        asc->m_extensionSamplingFrequency,
 2026|      0|                        asc->m_samplesPerFrame, asc->m_aot, ID_LFE,
 2027|      0|                        channelElementIdx, usc->element[i].m_harmonicSBR,
 2028|      0|                        usc->element[i].m_stereoConfigIndex, asc->configMode,
 2029|      0|                        &asc->SbrConfigChanged, 1)) {
 2030|      0|            return ErrorStatus = TRANSPORTDEC_PARSE_ERROR;
 2031|      0|          }
 2032|      0|        }
 2033|      0|        channelElementIdx++;
 2034|      0|        break;
 2035|       |
 2036|  48.5k|      case ID_USAC_EXT:
  ------------------
  |  Branch (2036:7): [True: 48.5k, False: 4.61k]
  ------------------
 2037|  48.5k|        ErrorStatus = extElementConfig(&usc->element[i].extElement, hBs, cb, 0,
 2038|  48.5k|                                       asc->m_samplesPerFrame, 0, asc->m_aot);
 2039|  48.5k|        if (usc->element[i].extElement.usacExtElementType ==
  ------------------
  |  Branch (2039:13): [True: 31.4k, False: 17.0k]
  ------------------
 2040|  48.5k|            ID_EXT_ELE_UNI_DRC) {
 2041|  31.4k|          uniDrcElement = i;
 2042|  31.4k|        }
 2043|       |
 2044|  48.5k|        if (ErrorStatus) {
  ------------------
  |  Branch (2044:13): [True: 1.06k, False: 47.4k]
  ------------------
 2045|  1.06k|          return ErrorStatus;
 2046|  1.06k|        }
 2047|  47.4k|        break;
 2048|       |
 2049|  47.4k|      default:
  ------------------
  |  Branch (2049:7): [True: 0, False: 53.1k]
  ------------------
 2050|       |        /* non USAC-element encountered */
 2051|      0|        return TRANSPORTDEC_PARSE_ERROR;
 2052|  53.1k|    }
 2053|  53.1k|  }
 2054|       |
 2055|  5.96k|  if (asc->m_aot == AOT_USAC) {
  ------------------
  |  Branch (2055:7): [True: 5.96k, False: 0]
  ------------------
 2056|  5.96k|    if (usc->m_channelConfigurationIndex) {
  ------------------
  |  Branch (2056:9): [True: 5.96k, False: 0]
  ------------------
 2057|       |      /* sanity check: all element counter must be zero */
 2058|  5.96k|      if (sc_chan_config.nCPE | sc_chan_config.nSCE | sc_chan_config.nLFE) {
  ------------------
  |  Branch (2058:11): [True: 1.55k, False: 4.41k]
  ------------------
 2059|  1.55k|        return TRANSPORTDEC_PARSE_ERROR;
 2060|  1.55k|      }
 2061|  5.96k|    } else {
 2062|       |      /* sanity check: number of audio channels shall be equal to or smaller
 2063|       |       * than the accumulated sum of all channels */
 2064|      0|      if ((INT)(-2 * sc_chan_config.nCPE - sc_chan_config.nSCE -
  ------------------
  |  Branch (2064:11): [True: 0, False: 0]
  ------------------
 2065|      0|                sc_chan_config.nLFE) < (INT)usc->numAudioChannels) {
 2066|      0|        return TRANSPORTDEC_PARSE_ERROR;
 2067|      0|      }
 2068|      0|    }
 2069|  5.96k|  }
 2070|       |
 2071|  4.41k|  if (uniDrcElement == -1 && cb->cbUniDrc != NULL) {
  ------------------
  |  Branch (2071:7): [True: 2.11k, False: 2.30k]
  |  Branch (2071:30): [True: 2.11k, False: 0]
  ------------------
 2072|       |    /* no uniDrcConfig contained. Clear the uniDrcConfig struct by feeding an
 2073|       |     * empty extension element */
 2074|  2.11k|    int subStreamIndex = 0;
 2075|  2.11k|    ErrorStatus = (TRANSPORTDEC_ERROR)cb->cbUniDrc(
 2076|  2.11k|        cb->cbUniDrcData, NULL, 0, 0 /* uniDrcConfig */, subStreamIndex, 0,
 2077|  2.11k|        asc->m_aot);
 2078|  2.11k|    if (ErrorStatus != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (2078:9): [True: 0, False: 2.11k]
  ------------------
 2079|      0|      return ErrorStatus;
 2080|      0|    }
 2081|  2.11k|  }
 2082|       |
 2083|  4.41k|  return ErrorStatus;
 2084|  4.41k|}
tpdec_asc.cpp:_ZL16extElementConfigP22CSUsacExtElementConfigP13FDK_BITSTREAMPK13CSTpCallBackshji17AUDIO_OBJECT_TYPE:
 1694|  48.5k|                                           const AUDIO_OBJECT_TYPE aot) {
 1695|  48.5k|  TRANSPORTDEC_ERROR ErrorStatus = TRANSPORTDEC_OK;
 1696|       |
 1697|  48.5k|  UINT usacExtElementType = escapedValue(hBs, 4, 8, 16);
 1698|       |
 1699|       |  /* recurve extension elements which are invalid for USAC */
 1700|  48.5k|  if (aot == AOT_USAC) {
  ------------------
  |  Branch (1700:7): [True: 48.5k, False: 0]
  ------------------
 1701|  48.5k|    switch (usacExtElementType) {
 1702|  1.47k|      case ID_EXT_ELE_FILL:
  ------------------
  |  Branch (1702:7): [True: 1.47k, False: 47.0k]
  ------------------
 1703|  4.45k|      case ID_EXT_ELE_MPEGS:
  ------------------
  |  Branch (1703:7): [True: 2.97k, False: 45.5k]
  ------------------
 1704|  4.73k|      case ID_EXT_ELE_SAOC:
  ------------------
  |  Branch (1704:7): [True: 283, False: 48.2k]
  ------------------
 1705|  8.17k|      case ID_EXT_ELE_AUDIOPREROLL:
  ------------------
  |  Branch (1705:7): [True: 3.44k, False: 45.0k]
  ------------------
 1706|  39.6k|      case ID_EXT_ELE_UNI_DRC:
  ------------------
  |  Branch (1706:7): [True: 31.4k, False: 17.0k]
  ------------------
 1707|  39.6k|        break;
 1708|  8.91k|      default:
  ------------------
  |  Branch (1708:7): [True: 8.91k, False: 39.6k]
  ------------------
 1709|  8.91k|        usacExtElementType = ID_EXT_ELE_UNKNOWN;
 1710|  8.91k|        break;
 1711|  48.5k|    }
 1712|  48.5k|  }
 1713|       |
 1714|  48.5k|  int usacExtElementConfigLength = escapedValue(hBs, 4, 8, 16);
 1715|  48.5k|  extElement->usacExtElementConfigLength = (USHORT)usacExtElementConfigLength;
 1716|  48.5k|  INT bsAnchor;
 1717|       |
 1718|  48.5k|  if (FDKreadBit(hBs)) /* usacExtElementDefaultLengthPresent */
  ------------------
  |  Branch (1718:7): [True: 11.2k, False: 37.2k]
  ------------------
 1719|  11.2k|    extElement->usacExtElementDefaultLength = escapedValue(hBs, 8, 16, 0) + 1;
 1720|  37.2k|  else
 1721|  37.2k|    extElement->usacExtElementDefaultLength = 0;
 1722|       |
 1723|  48.5k|  extElement->usacExtElementPayloadFrag = FDKreadBit(hBs);
 1724|       |
 1725|  48.5k|  bsAnchor = (INT)FDKgetValidBits(hBs);
 1726|       |
 1727|  48.5k|  switch (usacExtElementType) {
 1728|  8.91k|    case ID_EXT_ELE_UNKNOWN:
  ------------------
  |  Branch (1728:5): [True: 8.91k, False: 39.6k]
  ------------------
 1729|  10.3k|    case ID_EXT_ELE_FILL:
  ------------------
  |  Branch (1729:5): [True: 1.47k, False: 47.0k]
  ------------------
 1730|  10.3k|      break;
 1731|  3.44k|    case ID_EXT_ELE_AUDIOPREROLL:
  ------------------
  |  Branch (1731:5): [True: 3.44k, False: 45.0k]
  ------------------
 1732|       |      /* No configuration element */
 1733|  3.44k|      extElement->usacExtElementHasAudioPreRoll = 1;
 1734|  3.44k|      break;
 1735|  31.4k|    case ID_EXT_ELE_UNI_DRC: {
  ------------------
  |  Branch (1735:5): [True: 31.4k, False: 17.0k]
  ------------------
 1736|  31.4k|      if (cb->cbUniDrc != NULL) {
  ------------------
  |  Branch (1736:11): [True: 31.4k, False: 0]
  ------------------
 1737|  31.4k|        ErrorStatus = (TRANSPORTDEC_ERROR)cb->cbUniDrc(
 1738|  31.4k|            cb->cbUniDrcData, hBs, usacExtElementConfigLength,
 1739|  31.4k|            0, /* uniDrcConfig */
 1740|  31.4k|            subStreamIndex, 0, aot);
 1741|  31.4k|        if (ErrorStatus != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (1741:13): [True: 0, False: 31.4k]
  ------------------
 1742|      0|          return ErrorStatus;
 1743|      0|        }
 1744|  31.4k|      }
 1745|  31.4k|    } break;
 1746|  31.4k|    default:
  ------------------
  |  Branch (1746:5): [True: 3.25k, False: 45.2k]
  ------------------
 1747|  3.25k|      usacExtElementType = ID_EXT_ELE_UNKNOWN;
 1748|  3.25k|      break;
 1749|  48.5k|  }
 1750|  48.5k|  extElement->usacExtElementType = (USAC_EXT_ELEMENT_TYPE)usacExtElementType;
 1751|       |
 1752|       |  /* Adjust bit stream position. This is required because of byte alignment and
 1753|       |   * unhandled extensions. */
 1754|  48.5k|  {
 1755|  48.5k|    INT left_bits = (usacExtElementConfigLength << 3) -
 1756|  48.5k|                    (bsAnchor - (INT)FDKgetValidBits(hBs));
 1757|  48.5k|    if (left_bits >= 0) {
  ------------------
  |  Branch (1757:9): [True: 47.4k, False: 1.06k]
  ------------------
 1758|  47.4k|      FDKpushFor(hBs, left_bits);
 1759|  47.4k|    } else {
 1760|       |      /* parsed too many bits */
 1761|  1.06k|      ErrorStatus = TRANSPORTDEC_PARSE_ERROR;
 1762|  1.06k|    }
 1763|  48.5k|  }
 1764|       |
 1765|  48.5k|  return ErrorStatus;
 1766|  48.5k|}
tpdec_asc.cpp:_ZL15configExtensionP12CSUsacConfigP13FDK_BITSTREAMPK13CSTpCallBacks:
 1775|  2.52k|                                          const CSTpCallBacks *cb) {
 1776|  2.52k|  TRANSPORTDEC_ERROR ErrorStatus = TRANSPORTDEC_OK;
 1777|       |
 1778|  2.52k|  int numConfigExtensions;
 1779|  2.52k|  UINT usacConfigExtType;
 1780|  2.52k|  int usacConfigExtLength;
 1781|  2.52k|  int loudnessInfoSetIndex =
 1782|  2.52k|      -1; /* index of loudnessInfoSet config extension. -1 if not contained. */
 1783|  2.52k|  int tmp_subStreamIndex = 0;
 1784|  2.52k|  AUDIO_OBJECT_TYPE tmp_aot = AOT_USAC;
 1785|       |
 1786|  2.52k|  numConfigExtensions = (int)escapedValue(hBs, 2, 4, 8) + 1;
 1787|  8.09k|  for (int confExtIdx = 0; confExtIdx < numConfigExtensions; confExtIdx++) {
  ------------------
  |  Branch (1787:28): [True: 6.02k, False: 2.06k]
  ------------------
 1788|  6.02k|    INT nbits;
 1789|  6.02k|    int loudnessInfoSetConfigExtensionPosition = FDKgetValidBits(hBs);
 1790|  6.02k|    usacConfigExtType = escapedValue(hBs, 4, 8, 16);
 1791|  6.02k|    usacConfigExtLength = (int)escapedValue(hBs, 4, 8, 16);
 1792|       |
 1793|       |    /* Start bit position of config extension */
 1794|  6.02k|    nbits = (INT)FDKgetValidBits(hBs);
 1795|       |
 1796|       |    /* Return an error in case the bitbuffer fill level is too low. */
 1797|  6.02k|    if (nbits < usacConfigExtLength * 8) {
  ------------------
  |  Branch (1797:9): [True: 74, False: 5.95k]
  ------------------
 1798|     74|      return TRANSPORTDEC_PARSE_ERROR;
 1799|     74|    }
 1800|       |
 1801|  5.95k|    switch (usacConfigExtType) {
 1802|  1.41k|      case ID_CONFIG_EXT_FILL:
  ------------------
  |  Branch (1802:7): [True: 1.41k, False: 4.53k]
  ------------------
 1803|  2.08k|        for (int i = 0; i < usacConfigExtLength; i++) {
  ------------------
  |  Branch (1803:25): [True: 676, False: 1.40k]
  ------------------
 1804|    676|          if (FDKreadBits(hBs, 8) != 0xa5) {
  ------------------
  |  Branch (1804:15): [True: 12, False: 664]
  ------------------
 1805|     12|            return TRANSPORTDEC_PARSE_ERROR;
 1806|     12|          }
 1807|    676|        }
 1808|  1.40k|        break;
 1809|  3.59k|      case ID_CONFIG_EXT_LOUDNESS_INFO: {
  ------------------
  |  Branch (1809:7): [True: 3.59k, False: 2.35k]
  ------------------
 1810|  3.59k|        if (cb->cbUniDrc != NULL) {
  ------------------
  |  Branch (1810:13): [True: 3.59k, False: 0]
  ------------------
 1811|  3.59k|          ErrorStatus = (TRANSPORTDEC_ERROR)cb->cbUniDrc(
 1812|  3.59k|              cb->cbUniDrcData, hBs, usacConfigExtLength,
 1813|  3.59k|              1, /* loudnessInfoSet */
 1814|  3.59k|              tmp_subStreamIndex, loudnessInfoSetConfigExtensionPosition,
 1815|  3.59k|              tmp_aot);
 1816|  3.59k|          if (ErrorStatus != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (1816:15): [True: 0, False: 3.59k]
  ------------------
 1817|      0|            return ErrorStatus;
 1818|      0|          }
 1819|  3.59k|          loudnessInfoSetIndex = confExtIdx;
 1820|  3.59k|        }
 1821|  3.59k|      } break;
 1822|  3.59k|      default:
  ------------------
  |  Branch (1822:7): [True: 938, False: 5.01k]
  ------------------
 1823|    938|        break;
 1824|  5.95k|    }
 1825|       |
 1826|       |    /* Skip remaining bits. If too many bits were parsed, assume error. */
 1827|  5.94k|    usacConfigExtLength =
 1828|  5.94k|        8 * usacConfigExtLength - (nbits - (INT)FDKgetValidBits(hBs));
 1829|  5.94k|    if (usacConfigExtLength < 0) {
  ------------------
  |  Branch (1829:9): [True: 373, False: 5.56k]
  ------------------
 1830|    373|      return TRANSPORTDEC_PARSE_ERROR;
 1831|    373|    }
 1832|  5.56k|    FDKpushFor(hBs, usacConfigExtLength);
 1833|  5.56k|  }
 1834|       |
 1835|  2.06k|  if (loudnessInfoSetIndex == -1 && cb->cbUniDrc != NULL) {
  ------------------
  |  Branch (1835:7): [True: 73, False: 1.99k]
  |  Branch (1835:37): [True: 73, False: 0]
  ------------------
 1836|       |    /* no loudnessInfoSet contained. Clear the loudnessInfoSet struct by feeding
 1837|       |     * an empty config extension */
 1838|     73|    ErrorStatus = (TRANSPORTDEC_ERROR)cb->cbUniDrc(
 1839|     73|        cb->cbUniDrcData, NULL, 0, 1 /* loudnessInfoSet */, tmp_subStreamIndex,
 1840|     73|        0, tmp_aot);
 1841|     73|    if (ErrorStatus != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (1841:9): [True: 0, False: 73]
  ------------------
 1842|      0|      return ErrorStatus;
 1843|      0|    }
 1844|     73|  }
 1845|       |
 1846|  2.06k|  return ErrorStatus;
 1847|  2.06k|}
tpdec_asc.cpp:_ZL34AudioSpecificConfig_ExtensionParseP21CSAudioSpecificConfigP13FDK_BITSTREAMP13CSTpCallBacks:
 2200|  1.49k|    CSAudioSpecificConfig *self, HANDLE_FDK_BITSTREAM bs, CSTpCallBacks *cb) {
 2201|  1.49k|  TP_ASC_EXTENSION_ID lastAscExt, ascExtId = ASCEXT_UNKOWN;
 2202|  1.49k|  INT bitsAvailable = (INT)FDKgetValidBits(bs);
 2203|       |
 2204|  8.75k|  while (bitsAvailable >= 11) {
  ------------------
  |  Branch (2204:10): [True: 7.41k, False: 1.34k]
  ------------------
 2205|  7.41k|    lastAscExt = ascExtId;
 2206|  7.41k|    ascExtId = (TP_ASC_EXTENSION_ID)FDKreadBits(bs, 11);
 2207|  7.41k|    bitsAvailable -= 11;
 2208|       |
 2209|  7.41k|    switch (ascExtId) {
 2210|  1.58k|      case ASCEXT_SBR: /* 0x2b7 */
  ------------------
  |  Branch (2210:7): [True: 1.58k, False: 5.82k]
  ------------------
 2211|  1.58k|        if ((self->m_extensionAudioObjectType != AOT_SBR) &&
  ------------------
  |  Branch (2211:13): [True: 1.44k, False: 142]
  ------------------
 2212|  1.44k|            (bitsAvailable >= 5)) {
  ------------------
  |  Branch (2212:13): [True: 1.43k, False: 5]
  ------------------
 2213|  1.43k|          self->m_extensionAudioObjectType = getAOT(bs);
 2214|       |
 2215|  1.43k|          if ((self->m_extensionAudioObjectType == AOT_SBR) ||
  ------------------
  |  Branch (2215:15): [True: 65, False: 1.37k]
  ------------------
 2216|  1.37k|              (self->m_extensionAudioObjectType ==
  ------------------
  |  Branch (2216:15): [True: 473, False: 900]
  ------------------
 2217|  1.37k|               AOT_ER_BSAC)) { /* Get SBR extension configuration */
 2218|    538|            self->m_sbrPresentFlag = FDKreadBits(bs, 1);
 2219|    538|            if (self->m_aot == AOT_USAC && self->m_sbrPresentFlag > 0 &&
  ------------------
  |  Branch (2219:17): [True: 0, False: 538]
  |  Branch (2219:44): [True: 0, False: 0]
  ------------------
 2220|      0|                self->m_sc.m_usacConfig.m_sbrRatioIndex == 0) {
  ------------------
  |  Branch (2220:17): [True: 0, False: 0]
  ------------------
 2221|      0|              return TRANSPORTDEC_PARSE_ERROR;
 2222|      0|            }
 2223|       |
 2224|    538|            if (self->m_sbrPresentFlag == 1) {
  ------------------
  |  Branch (2224:17): [True: 346, False: 192]
  ------------------
 2225|    346|              self->m_extensionSamplingFrequency = getSampleRate(
 2226|    346|                  bs, &self->m_extensionSamplingFrequencyIndex, 4);
 2227|       |
 2228|    346|              if (self->m_extensionSamplingFrequency == 0 ||
  ------------------
  |  Branch (2228:19): [True: 3, False: 343]
  ------------------
 2229|    343|                  self->m_extensionSamplingFrequency > 96000) {
  ------------------
  |  Branch (2229:19): [True: 18, False: 325]
  ------------------
 2230|     21|                return TRANSPORTDEC_PARSE_ERROR;
 2231|     21|              }
 2232|    346|            }
 2233|    517|            if (self->m_extensionAudioObjectType == AOT_ER_BSAC) {
  ------------------
  |  Branch (2233:17): [True: 461, False: 56]
  ------------------
 2234|    461|              self->m_extensionChannelConfiguration = FDKreadBits(bs, 4);
 2235|    461|            }
 2236|    517|          }
 2237|       |          /* Update counter because of variable length fields (AOT and sampling
 2238|       |           * rate) */
 2239|  1.41k|          bitsAvailable = (INT)FDKgetValidBits(bs);
 2240|  1.41k|        }
 2241|  1.56k|        break;
 2242|  1.56k|      case ASCEXT_PS: /* 0x548 */
  ------------------
  |  Branch (2242:7): [True: 846, False: 6.56k]
  ------------------
 2243|    846|        if ((lastAscExt == ASCEXT_SBR) &&
  ------------------
  |  Branch (2243:13): [True: 495, False: 351]
  ------------------
 2244|    495|            (self->m_extensionAudioObjectType == AOT_SBR) &&
  ------------------
  |  Branch (2244:13): [True: 113, False: 382]
  ------------------
 2245|    113|            (bitsAvailable > 0)) { /* Get PS extension configuration */
  ------------------
  |  Branch (2245:13): [True: 110, False: 3]
  ------------------
 2246|    110|          self->m_psPresentFlag = FDKreadBits(bs, 1);
 2247|    110|          bitsAvailable -= 1;
 2248|    110|        }
 2249|    846|        break;
 2250|    377|      case ASCEXT_MPS: /* 0x76a */
  ------------------
  |  Branch (2250:7): [True: 377, False: 7.03k]
  ------------------
 2251|    377|        if (self->m_extensionAudioObjectType == AOT_MPEGS) break;
  ------------------
  |  Branch (2251:13): [True: 66, False: 311]
  ------------------
 2252|    311|        FDK_FALLTHROUGH;
  ------------------
  |  |  386|    311|#define FDK_FALLTHROUGH [[clang::fallthrough]]
  ------------------
 2253|  2.35k|      case ASCEXT_LDMPS: /* 0x7cc */
  ------------------
  |  Branch (2253:7): [True: 2.04k, False: 5.36k]
  ------------------
 2254|  2.35k|        if ((ascExtId == ASCEXT_LDMPS) &&
  ------------------
  |  Branch (2254:13): [True: 2.04k, False: 311]
  ------------------
 2255|  2.04k|            (self->m_extensionAudioObjectType == AOT_LD_MPEGS))
  ------------------
  |  Branch (2255:13): [True: 194, False: 1.84k]
  ------------------
 2256|    194|          break;
 2257|  2.16k|        if (bitsAvailable >= 1) {
  ------------------
  |  Branch (2257:13): [True: 2.15k, False: 6]
  ------------------
 2258|  2.15k|          bitsAvailable -= 1;
 2259|  2.15k|          if (FDKreadBits(bs, 1)) { /* self->m_mpsPresentFlag */
  ------------------
  |  Branch (2259:15): [True: 954, False: 1.20k]
  ------------------
 2260|    954|            int sscLen = FDKreadBits(bs, 8);
 2261|    954|            bitsAvailable -= 8;
 2262|    954|            if (sscLen == 0xFF) {
  ------------------
  |  Branch (2262:17): [True: 43, False: 911]
  ------------------
 2263|     43|              sscLen += FDKreadBits(bs, 16);
 2264|     43|              bitsAvailable -= 16;
 2265|     43|            }
 2266|    954|            FDKpushFor(bs, sscLen); /* Skip SSC to be able to read the next
 2267|       |                                       extension if there is one. */
 2268|       |
 2269|    954|            bitsAvailable -= sscLen * 8;
 2270|    954|          }
 2271|  2.15k|        }
 2272|  2.16k|        break;
 2273|  2.43k|      case ASCEXT_SAOC:
  ------------------
  |  Branch (2273:7): [True: 2.43k, False: 4.97k]
  ------------------
 2274|  2.43k|        if ((ascExtId == ASCEXT_SAOC) &&
  ------------------
  |  Branch (2274:13): [True: 2.43k, False: 0]
  ------------------
 2275|  2.43k|            (self->m_extensionAudioObjectType == AOT_SAOC))
  ------------------
  |  Branch (2275:13): [True: 194, False: 2.23k]
  ------------------
 2276|    194|          break;
 2277|  2.23k|        if (FDKreadBits(bs, 1)) { /* saocPresent */
  ------------------
  |  Branch (2277:13): [True: 1.19k, False: 1.04k]
  ------------------
 2278|  1.19k|          int saocscLen = FDKreadBits(bs, 8);
 2279|  1.19k|          bitsAvailable -= 8;
 2280|  1.19k|          if (saocscLen == 0xFF) {
  ------------------
  |  Branch (2280:15): [True: 30, False: 1.16k]
  ------------------
 2281|     30|            saocscLen += FDKreadBits(bs, 16);
 2282|     30|            bitsAvailable -= 16;
 2283|     30|          }
 2284|  1.19k|          FDKpushFor(bs, saocscLen);
 2285|  1.19k|          bitsAvailable -= saocscLen * 8;
 2286|  1.19k|        }
 2287|  2.23k|        break;
 2288|    127|      default:
  ------------------
  |  Branch (2288:7): [True: 127, False: 7.28k]
  ------------------
 2289|       |        /* Just ignore anything. */
 2290|    127|        return TRANSPORTDEC_OK;
 2291|  7.41k|    }
 2292|  7.41k|  }
 2293|       |
 2294|  1.34k|  return TRANSPORTDEC_OK;
 2295|  1.49k|}
tpdec_asc.cpp:_ZL22StoreConfigAsBitstreamP13FDK_BITSTREAMiPht:
 1647|  7.88k|    UCHAR *configTargetBuffer, const USHORT configTargetBufferSize_bytes) {
 1648|  7.88k|  FDK_BITSTREAM usacConf;
 1649|  7.88k|  UINT const nBits = fAbs(configSize_bits);
 1650|  7.88k|  UINT j, tmp;
 1651|       |
 1652|  7.88k|  if (nBits > 8 * (UINT)configTargetBufferSize_bytes) {
  ------------------
  |  Branch (1652:7): [True: 30, False: 7.85k]
  ------------------
 1653|     30|    return 1;
 1654|     30|  }
 1655|  7.85k|  FDKmemclear(configTargetBuffer, configTargetBufferSize_bytes);
 1656|       |
 1657|  7.85k|  FDKinitBitStream(&usacConf, configTargetBuffer, configTargetBufferSize_bytes,
 1658|  7.85k|                   nBits, BS_WRITER);
 1659|  7.85k|  if (configSize_bits < 0) {
  ------------------
  |  Branch (1659:7): [True: 7.85k, False: 0]
  ------------------
 1660|  7.85k|    FDKpushBack(hBs, nBits);
 1661|  7.85k|  }
 1662|   117k|  for (j = nBits; j > 31; j -= 32) {
  ------------------
  |  Branch (1662:19): [True: 109k, False: 7.85k]
  ------------------
 1663|   109k|    tmp = FDKreadBits(hBs, 32);
 1664|   109k|    FDKwriteBits(&usacConf, tmp, 32);
 1665|   109k|  }
 1666|  7.85k|  if (j > 0) {
  ------------------
  |  Branch (1666:7): [True: 7.51k, False: 334]
  ------------------
 1667|  7.51k|    tmp = FDKreadBits(hBs, j);
 1668|  7.51k|    FDKwriteBits(&usacConf, tmp, j);
 1669|  7.51k|  }
 1670|  7.85k|  FDKsyncCache(&usacConf);
 1671|  7.85k|  if (configSize_bits > 0) {
  ------------------
  |  Branch (1671:7): [True: 0, False: 7.85k]
  ------------------
 1672|      0|    FDKpushBack(hBs, nBits);
 1673|      0|  }
 1674|       |
 1675|  7.85k|  return 0;
 1676|  7.88k|}
tpdec_asc.cpp:_ZL37UsacConfig_SetCoreSbrFrameLengthIndexP21CSAudioSpecificConfigi:
 2088|  7.28k|    CSAudioSpecificConfig *asc, int coreSbrFrameLengthIndex) {
 2089|  7.28k|  int sbrRatioIndex_val;
 2090|       |
 2091|  7.28k|  if (coreSbrFrameLengthIndex > 4) {
  ------------------
  |  Branch (2091:7): [True: 1, False: 7.28k]
  ------------------
 2092|      1|    return TRANSPORTDEC_PARSE_ERROR; /* reserved values */
 2093|      1|  }
 2094|  7.28k|  asc->m_sc.m_usacConfig.m_coreSbrFrameLengthIndex = coreSbrFrameLengthIndex;
 2095|  7.28k|  asc->m_samplesPerFrame = usacFrameLength[coreSbrFrameLengthIndex];
 2096|  7.28k|  sbrRatioIndex_val = sbrRatioIndex[coreSbrFrameLengthIndex];
 2097|  7.28k|  asc->m_sc.m_usacConfig.m_sbrRatioIndex = sbrRatioIndex_val;
 2098|       |
 2099|  7.28k|  if (sbrRatioIndex_val > 0) {
  ------------------
  |  Branch (2099:7): [True: 2.63k, False: 4.64k]
  ------------------
 2100|  2.63k|    asc->m_sbrPresentFlag = 1;
 2101|  2.63k|    asc->m_extensionSamplingFrequency = asc->m_samplingFrequency;
 2102|  2.63k|    asc->m_extensionSamplingFrequencyIndex = asc->m_samplingFrequencyIndex;
 2103|  2.63k|    switch (sbrRatioIndex_val) {
 2104|    973|      case 1: /* sbrRatio = 4:1 */
  ------------------
  |  Branch (2104:7): [True: 973, False: 1.66k]
  ------------------
 2105|    973|        asc->m_samplingFrequency >>= 2;
 2106|    973|        asc->m_samplesPerFrame >>= 2;
 2107|    973|        break;
 2108|  1.03k|      case 2: /* sbrRatio = 8:3 */
  ------------------
  |  Branch (2108:7): [True: 1.03k, False: 1.60k]
  ------------------
 2109|  1.03k|        asc->m_samplingFrequency = (asc->m_samplingFrequency * 3) / 8;
 2110|  1.03k|        asc->m_samplesPerFrame = (asc->m_samplesPerFrame * 3) / 8;
 2111|  1.03k|        break;
 2112|    635|      case 3: /* sbrRatio = 2:1 */
  ------------------
  |  Branch (2112:7): [True: 635, False: 2.00k]
  ------------------
 2113|    635|        asc->m_samplingFrequency >>= 1;
 2114|    635|        asc->m_samplesPerFrame >>= 1;
 2115|    635|        break;
 2116|      0|      default:
  ------------------
  |  Branch (2116:7): [True: 0, False: 2.63k]
  ------------------
 2117|      0|        return TRANSPORTDEC_PARSE_ERROR;
 2118|  2.63k|    }
 2119|  2.63k|    asc->m_samplingFrequencyIndex =
 2120|  2.63k|        getSamplingRateIndex(asc->m_samplingFrequency, 4);
 2121|  2.63k|  }
 2122|       |
 2123|  7.28k|  return TRANSPORTDEC_OK;
 2124|  7.28k|}

_Z17transportDec_Open14TRANSPORT_TYPEjj:
  192|  7.39k|                                      const UINT flags, const UINT nrOfLayers) {
  193|  7.39k|  HANDLE_TRANSPORTDEC hInput;
  194|       |
  195|  7.39k|  hInput = GetRam_TransportDecoder(0);
  196|  7.39k|  if (hInput == NULL) {
  ------------------
  |  Branch (196:7): [True: 0, False: 7.39k]
  ------------------
  197|      0|    return NULL;
  198|      0|  }
  199|       |
  200|       |  /* Init transportDec struct. */
  201|  7.39k|  hInput->transportFmt = transportFmt;
  202|       |
  203|  7.39k|  switch (transportFmt) {
  204|  7.39k|    case TT_MP4_ADIF:
  ------------------
  |  Branch (204:5): [True: 7.39k, False: 0]
  ------------------
  205|  7.39k|      break;
  206|       |
  207|      0|    case TT_MP4_ADTS:
  ------------------
  |  Branch (207:5): [True: 0, False: 7.39k]
  ------------------
  208|      0|      if (flags & TP_FLAG_MPEG4)
  ------------------
  |  |  322|      0|#define TP_FLAG_MPEG4 1
  ------------------
  |  Branch (208:11): [True: 0, False: 0]
  ------------------
  209|      0|        hInput->parser.adts.decoderCanDoMpeg4 = 1;
  210|      0|      else
  211|      0|        hInput->parser.adts.decoderCanDoMpeg4 = 0;
  212|      0|      adtsRead_CrcInit(&hInput->parser.adts);
  213|      0|      hInput->parser.adts.BufferFullnesStartFlag = 1;
  214|      0|      hInput->numberOfRawDataBlocks = 0;
  215|      0|      break;
  216|       |
  217|      0|    case TT_DRM:
  ------------------
  |  Branch (217:5): [True: 0, False: 7.39k]
  ------------------
  218|      0|      drmRead_CrcInit(&hInput->parser.drm);
  219|      0|      break;
  220|       |
  221|      0|    case TT_MP4_LATM_MCP0:
  ------------------
  |  Branch (221:5): [True: 0, False: 7.39k]
  ------------------
  222|      0|    case TT_MP4_LATM_MCP1:
  ------------------
  |  Branch (222:5): [True: 0, False: 7.39k]
  ------------------
  223|      0|      hInput->parser.latm.usacExplicitCfgChanged = 0;
  224|      0|      hInput->parser.latm.applyAsc = 1;
  225|      0|      break;
  226|      0|    case TT_MP4_LOAS:
  ------------------
  |  Branch (226:5): [True: 0, False: 7.39k]
  ------------------
  227|      0|      hInput->parser.latm.usacExplicitCfgChanged = 0;
  228|      0|      hInput->parser.latm.applyAsc = 1;
  229|      0|      break;
  230|      0|    case TT_MP4_RAW:
  ------------------
  |  Branch (230:5): [True: 0, False: 7.39k]
  ------------------
  231|      0|      break;
  232|       |
  233|      0|    default:
  ------------------
  |  Branch (233:5): [True: 0, False: 7.39k]
  ------------------
  234|      0|      FreeRam_TransportDecoder(&hInput);
  235|      0|      hInput = NULL;
  236|      0|      break;
  237|  7.39k|  }
  238|       |
  239|  7.39k|  if (hInput != NULL) {
  ------------------
  |  Branch (239:7): [True: 7.39k, False: 0]
  ------------------
  240|       |    /* Create bitstream */
  241|  7.39k|    {
  242|  7.39k|      hInput->bsBuffer = GetRam_TransportDecoderBuffer(0);
  243|  7.39k|      if (hInput->bsBuffer == NULL) {
  ------------------
  |  Branch (243:11): [True: 0, False: 7.39k]
  ------------------
  244|      0|        transportDec_Close(&hInput);
  245|      0|        return NULL;
  246|      0|      }
  247|  7.39k|      if (nrOfLayers > 1) {
  ------------------
  |  Branch (247:11): [True: 0, False: 7.39k]
  ------------------
  248|      0|        transportDec_Close(&hInput);
  249|      0|        return NULL;
  250|      0|      }
  251|  14.7k|      for (UINT i = 0; i < nrOfLayers; i++) {
  ------------------
  |  Branch (251:24): [True: 7.39k, False: 7.39k]
  ------------------
  252|  7.39k|        FDKinitBitStream(&hInput->bitStream[i], hInput->bsBuffer, (8192 * 4), 0,
  253|  7.39k|                         BS_READER);
  254|  7.39k|      }
  255|  7.39k|    }
  256|      0|    hInput->burstPeriod = 0;
  257|  7.39k|  }
  258|       |
  259|  7.39k|  return hInput;
  260|  7.39k|}
_Z28transportDec_OutOfBandConfigP12TRANSPORTDECPhjj:
  264|  7.39k|                                                UINT layer) {
  265|  7.39k|  int i;
  266|       |
  267|  7.39k|  TRANSPORTDEC_ERROR err = TRANSPORTDEC_OK;
  268|       |
  269|  7.39k|  FDK_BITSTREAM bs;
  270|  7.39k|  HANDLE_FDK_BITSTREAM hBs = &bs;
  271|       |
  272|  7.39k|  int fConfigFound = 0;
  273|       |
  274|  7.39k|  UCHAR configChanged = 0;
  275|  7.39k|  UCHAR configMode = AC_CM_DET_CFG_CHANGE;
  ------------------
  |  |  334|  7.39k|  0x000001 /*!< Config mode signalizes the callback to work in config change \
  ------------------
  276|       |
  277|  7.39k|  UCHAR tmpConf[1024] = {0};
  278|  7.39k|  if (length > 1024) {
  ------------------
  |  Branch (278:7): [True: 0, False: 7.39k]
  ------------------
  279|      0|    return TRANSPORTDEC_UNSUPPORTED_FORMAT;
  280|      0|  }
  281|  7.39k|  FDKmemcpy(tmpConf, conf, length);
  282|  7.39k|  FDKinitBitStream(hBs, tmpConf, 1024, length << 3, BS_READER);
  283|       |
  284|  13.3k|  for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (284:15): [True: 10.4k, False: 2.84k]
  ------------------
  285|  10.4k|    if (i > 0) {
  ------------------
  |  Branch (285:9): [True: 3.06k, False: 7.39k]
  ------------------
  286|  3.06k|      FDKpushBack(hBs, (INT)length * 8 - (INT)FDKgetValidBits(hBs));
  287|  3.06k|      configMode = AC_CM_ALLOC_MEM;
  ------------------
  |  |  337|  3.06k|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
  288|  3.06k|    }
  289|       |
  290|       |    /* config transport decoder */
  291|  10.4k|    switch (hTp->transportFmt) {
  292|      0|      case TT_MP4_LATM_MCP0:
  ------------------
  |  Branch (292:7): [True: 0, False: 10.4k]
  ------------------
  293|      0|      case TT_MP4_LATM_MCP1:
  ------------------
  |  Branch (293:7): [True: 0, False: 10.4k]
  ------------------
  294|      0|      case TT_MP4_LOAS: {
  ------------------
  |  Branch (294:7): [True: 0, False: 10.4k]
  ------------------
  295|      0|        if (layer != 0) {
  ------------------
  |  Branch (295:13): [True: 0, False: 0]
  ------------------
  296|      0|          return TRANSPORTDEC_INVALID_PARAMETER;
  297|      0|        }
  298|      0|        CLatmDemux *pLatmDemux = &hTp->parser.latm;
  299|      0|        err = CLatmDemux_ReadStreamMuxConfig(hBs, pLatmDemux, &hTp->callbacks,
  300|      0|                                             hTp->asc, &fConfigFound,
  301|      0|                                             configMode, configChanged);
  302|      0|        if (err != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (302:13): [True: 0, False: 0]
  ------------------
  303|      0|          return err;
  304|      0|        }
  305|      0|      } break;
  306|  10.4k|      default:
  ------------------
  |  Branch (306:7): [True: 10.4k, False: 0]
  ------------------
  307|  10.4k|        fConfigFound = 1;
  308|  10.4k|        err = AudioSpecificConfig_Parse(&hTp->asc[(1 * 1)], hBs, 1,
  309|  10.4k|                                        &hTp->callbacks, configMode,
  310|  10.4k|                                        configChanged, AOT_NULL_OBJECT);
  311|  10.4k|        if (err == TRANSPORTDEC_OK) {
  ------------------
  |  Branch (311:13): [True: 6.31k, False: 4.13k]
  ------------------
  312|  6.31k|          int errC;
  313|       |
  314|  6.31k|          hTp->asc[layer] = hTp->asc[(1 * 1)];
  315|  6.31k|          errC = hTp->callbacks.cbUpdateConfig(
  316|  6.31k|              hTp->callbacks.cbUpdateConfigData, &hTp->asc[layer],
  317|  6.31k|              hTp->asc[layer].configMode, &hTp->asc[layer].AacConfigChanged);
  318|  6.31k|          if (errC != 0) {
  ------------------
  |  Branch (318:15): [True: 404, False: 5.91k]
  ------------------
  319|    404|            err = TRANSPORTDEC_PARSE_ERROR;
  320|    404|          }
  321|  6.31k|        }
  322|  10.4k|        break;
  323|      0|      case TT_DRM:
  ------------------
  |  Branch (323:7): [True: 0, False: 10.4k]
  ------------------
  324|      0|        fConfigFound = 1;
  325|      0|        err = DrmRawSdcAudioConfig_Parse(&hTp->asc[layer], hBs, &hTp->callbacks,
  326|      0|                                         configMode, configChanged);
  327|      0|        if (err == TRANSPORTDEC_OK) {
  ------------------
  |  Branch (327:13): [True: 0, False: 0]
  ------------------
  328|      0|          int errC;
  329|       |
  330|      0|          errC = hTp->callbacks.cbUpdateConfig(
  331|      0|              hTp->callbacks.cbUpdateConfigData, &hTp->asc[layer],
  332|      0|              hTp->asc[layer].configMode, &hTp->asc[layer].AacConfigChanged);
  333|      0|          if (errC != 0) {
  ------------------
  |  Branch (333:15): [True: 0, False: 0]
  ------------------
  334|      0|            err = TRANSPORTDEC_PARSE_ERROR;
  335|      0|          }
  336|      0|        }
  337|      0|        break;
  338|  10.4k|    }
  339|       |
  340|  10.4k|    if (err == TRANSPORTDEC_OK) {
  ------------------
  |  Branch (340:9): [True: 5.91k, False: 4.54k]
  ------------------
  341|  5.91k|      if ((i == 0) && (hTp->asc[layer].AacConfigChanged ||
  ------------------
  |  Branch (341:11): [True: 3.06k, False: 2.84k]
  |  Branch (341:24): [True: 3.06k, False: 0]
  ------------------
  342|      0|                       hTp->asc[layer].SbrConfigChanged ||
  ------------------
  |  Branch (342:24): [True: 0, False: 0]
  ------------------
  343|  3.06k|                       hTp->asc[layer].SacConfigChanged)) {
  ------------------
  |  Branch (343:24): [True: 0, False: 0]
  ------------------
  344|  3.06k|        int errC;
  345|       |
  346|  3.06k|        configChanged = 1;
  347|  3.06k|        errC = hTp->callbacks.cbFreeMem(hTp->callbacks.cbFreeMemData,
  348|  3.06k|                                        &hTp->asc[layer]);
  349|  3.06k|        if (errC != 0) {
  ------------------
  |  Branch (349:13): [True: 0, False: 3.06k]
  ------------------
  350|      0|          err = TRANSPORTDEC_PARSE_ERROR;
  351|      0|        }
  352|  3.06k|      }
  353|  5.91k|    }
  354|       |
  355|       |    /* if an error is detected terminate config parsing to avoid that an invalid
  356|       |     * config is accepted in the second pass */
  357|  10.4k|    if (err != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (357:9): [True: 4.54k, False: 5.91k]
  ------------------
  358|  4.54k|      break;
  359|  4.54k|    }
  360|  10.4k|  }
  361|       |
  362|  7.39k|  if (err == TRANSPORTDEC_OK && fConfigFound) {
  ------------------
  |  Branch (362:7): [True: 2.84k, False: 4.54k]
  |  Branch (362:33): [True: 2.84k, False: 0]
  ------------------
  363|  2.84k|    hTp->flags |= TPDEC_CONFIG_FOUND;
  ------------------
  |  |  178|  2.84k|#define TPDEC_CONFIG_FOUND 32
  ------------------
  364|  2.84k|  }
  365|       |
  366|  7.39k|  return err;
  367|  7.39k|}
_Z32transportDec_RegisterAscCallbackP12TRANSPORTDECPFiPvPK21CSAudioSpecificConfighPhES1_:
  571|  7.39k|                                     void *user_data) {
  572|  7.39k|  if (hTpDec == NULL) {
  ------------------
  |  Branch (572:7): [True: 0, False: 7.39k]
  ------------------
  573|      0|    return -1;
  574|      0|  }
  575|  7.39k|  hTpDec->callbacks.cbUpdateConfig = cbUpdateConfig;
  576|  7.39k|  hTpDec->callbacks.cbUpdateConfigData = user_data;
  577|  7.39k|  return 0;
  578|  7.39k|}
_Z36transportDec_RegisterFreeMemCallbackP12TRANSPORTDECPFiPvPK21CSAudioSpecificConfigES1_:
  582|  7.39k|                                         void *user_data) {
  583|  7.39k|  if (hTpDec == NULL) {
  ------------------
  |  Branch (583:7): [True: 0, False: 7.39k]
  ------------------
  584|      0|    return -1;
  585|      0|  }
  586|  7.39k|  hTpDec->callbacks.cbFreeMem = cbFreeMem;
  587|  7.39k|  hTpDec->callbacks.cbFreeMemData = user_data;
  588|  7.39k|  return 0;
  589|  7.39k|}
_Z42transportDec_RegisterCtrlCFGChangeCallbackP12TRANSPORTDECPFiPvPK14CCtrlCFGChangeES1_:
  593|  7.39k|    void *user_data) {
  594|  7.39k|  if (hTpDec == NULL) {
  ------------------
  |  Branch (594:7): [True: 0, False: 7.39k]
  ------------------
  595|      0|    return -1;
  596|      0|  }
  597|  7.39k|  hTpDec->callbacks.cbCtrlCFGChange = cbCtrlCFGChange;
  598|  7.39k|  hTpDec->callbacks.cbCtrlCFGChangeData = user_data;
  599|  7.39k|  return 0;
  600|  7.39k|}
_Z32transportDec_RegisterSscCallbackP12TRANSPORTDECPFiPvP13FDK_BITSTREAM17AUDIO_OBJECT_TYPEiiiiiihPhES1_:
  603|  7.39k|                                     const cbSsc_t cbSsc, void *user_data) {
  604|  7.39k|  if (hTpDec == NULL) {
  ------------------
  |  Branch (604:7): [True: 0, False: 7.39k]
  ------------------
  605|      0|    return -1;
  606|      0|  }
  607|  7.39k|  hTpDec->callbacks.cbSsc = cbSsc;
  608|  7.39k|  hTpDec->callbacks.cbSscData = user_data;
  609|  7.39k|  return 0;
  610|  7.39k|}
_Z32transportDec_RegisterSbrCallbackP12TRANSPORTDECPFiPvP13FDK_BITSTREAMiii17AUDIO_OBJECT_TYPE14MP4_ELEMENT_IDihhhPhiES1_:
  613|  7.39k|                                     const cbSbr_t cbSbr, void *user_data) {
  614|  7.39k|  if (hTpDec == NULL) {
  ------------------
  |  Branch (614:7): [True: 0, False: 7.39k]
  ------------------
  615|      0|    return -1;
  616|      0|  }
  617|  7.39k|  hTpDec->callbacks.cbSbr = cbSbr;
  618|  7.39k|  hTpDec->callbacks.cbSbrData = user_data;
  619|  7.39k|  return 0;
  620|  7.39k|}
_Z41transportDec_RegisterUniDrcConfigCallbackP12TRANSPORTDECPFiPvP13FDK_BITSTREAMiiii17AUDIO_OBJECT_TYPEES1_Pj:
  635|  7.39k|                                              UINT *pLoudnessInfoSetPosition) {
  636|  7.39k|  if (hTpDec == NULL) {
  ------------------
  |  Branch (636:7): [True: 0, False: 7.39k]
  ------------------
  637|      0|    return -1;
  638|      0|  }
  639|       |
  640|  7.39k|  hTpDec->callbacks.cbUniDrc = cbUniDrc;
  641|  7.39k|  hTpDec->callbacks.cbUniDrcData = user_data;
  642|       |
  643|  7.39k|  hTpDec->pLoudnessInfoSetPosition = pLoudnessInfoSetPosition;
  644|  7.39k|  return 0;
  645|  7.39k|}
_Z18transportDec_ClosePP12TRANSPORTDEC:
 1754|  7.39k|void transportDec_Close(HANDLE_TRANSPORTDEC *phTp) {
 1755|  7.39k|  if (phTp != NULL) {
  ------------------
  |  Branch (1755:7): [True: 7.39k, False: 0]
  ------------------
 1756|  7.39k|    if (*phTp != NULL) {
  ------------------
  |  Branch (1756:9): [True: 7.39k, False: 0]
  ------------------
 1757|  7.39k|      FreeRam_TransportDecoderBuffer(&(*phTp)->bsBuffer);
 1758|  7.39k|      FreeRam_TransportDecoder(phTp);
 1759|  7.39k|    }
 1760|  7.39k|  }
 1761|  7.39k|}

_Z17pcmLimiter_Createjjijj:
  114|  7.39k|                               UINT maxSampleRate) {
  115|  7.39k|  TDLimiterPtr limiter = NULL;
  116|  7.39k|  unsigned int attack, release;
  117|  7.39k|  FIXP_DBL attackConst, releaseConst, exponent;
  118|  7.39k|  INT e_ans;
  119|       |
  120|       |  /* calc attack and release time in samples */
  121|  7.39k|  attack = (unsigned int)(maxAttackMs * maxSampleRate / 1000);
  122|  7.39k|  release = (unsigned int)(releaseMs * maxSampleRate / 1000);
  123|       |
  124|       |  /* alloc limiter struct */
  125|  7.39k|  limiter = (TDLimiterPtr)FDKcalloc(1, sizeof(struct TDLimiter));
  126|  7.39k|  if (!limiter) return NULL;
  ------------------
  |  Branch (126:7): [True: 0, False: 7.39k]
  ------------------
  127|       |
  128|       |  /* alloc max and delay buffers */
  129|  7.39k|  limiter->maxBuf = (FIXP_DBL*)FDKcalloc(attack + 1, sizeof(FIXP_DBL));
  130|  7.39k|  limiter->delayBuf =
  131|  7.39k|      (FIXP_DBL*)FDKcalloc(attack * maxChannels, sizeof(FIXP_DBL));
  132|       |
  133|  7.39k|  if (!limiter->maxBuf || !limiter->delayBuf) {
  ------------------
  |  Branch (133:7): [True: 0, False: 7.39k]
  |  Branch (133:27): [True: 0, False: 7.39k]
  ------------------
  134|      0|    pcmLimiter_Destroy(limiter);
  135|      0|    return NULL;
  136|      0|  }
  137|       |
  138|       |  /* attackConst = pow(0.1, 1.0 / (attack + 1)) */
  139|  7.39k|  exponent = invFixp(attack + 1);
  140|  7.39k|  attackConst = fPow(FL2FXCONST_DBL(0.1f), 0, exponent, 0, &e_ans);
  ------------------
  |  |  192|  7.39k|  (FIXP_DBL)(                                                                \
  |  |  193|  7.39k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 7.39k, Folded]
  |  |  ------------------
  |  |  194|  7.39k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  7.39k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  7.39k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 7.39k]
  |  |  ------------------
  |  |  195|  7.39k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  7.39k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  7.39k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  7.39k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  7.39k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  7.39k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  7.39k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  141|  7.39k|  attackConst = scaleValue(attackConst, e_ans);
  142|       |
  143|       |  /* releaseConst  = (float)pow(0.1, 1.0 / (release + 1)) */
  144|  7.39k|  exponent = invFixp(release + 1);
  145|  7.39k|  releaseConst = fPow(FL2FXCONST_DBL(0.1f), 0, exponent, 0, &e_ans);
  ------------------
  |  |  192|  7.39k|  (FIXP_DBL)(                                                                \
  |  |  193|  7.39k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 7.39k, Folded]
  |  |  ------------------
  |  |  194|  7.39k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  7.39k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  7.39k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 7.39k]
  |  |  ------------------
  |  |  195|  7.39k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  7.39k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  7.39k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  7.39k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  7.39k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  7.39k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  7.39k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  146|  7.39k|  releaseConst = scaleValue(releaseConst, e_ans);
  147|       |
  148|       |  /* init parameters */
  149|  7.39k|  limiter->attackMs = maxAttackMs;
  150|  7.39k|  limiter->maxAttackMs = maxAttackMs;
  151|  7.39k|  limiter->releaseMs = releaseMs;
  152|  7.39k|  limiter->attack = attack;
  153|  7.39k|  limiter->attackConst = attackConst;
  154|  7.39k|  limiter->releaseConst = releaseConst;
  155|  7.39k|  limiter->threshold = threshold;
  156|  7.39k|  limiter->channels = maxChannels;
  157|  7.39k|  limiter->maxChannels = maxChannels;
  158|  7.39k|  limiter->sampleRate = maxSampleRate;
  159|  7.39k|  limiter->maxSampleRate = maxSampleRate;
  160|       |
  161|  7.39k|  pcmLimiter_Reset(limiter);
  162|       |
  163|  7.39k|  return limiter;
  164|  7.39k|}
_Z23pcmLimiter_SetThresholdP9TDLimiteri:
  361|  1.94k|                                        FIXP_DBL threshold) {
  362|  1.94k|  if (limiter == NULL) return TDLIMIT_INVALID_HANDLE;
  ------------------
  |  Branch (362:7): [True: 0, False: 1.94k]
  ------------------
  363|       |
  364|  1.94k|  limiter->threshold = threshold;
  365|       |
  366|  1.94k|  return TDLIMIT_OK;
  367|  1.94k|}
pcmLimiter_Reset:
  370|  7.39k|TDLIMITER_ERROR pcmLimiter_Reset(TDLimiterPtr limiter) {
  371|  7.39k|  if (limiter != NULL) {
  ------------------
  |  Branch (371:7): [True: 7.39k, False: 0]
  ------------------
  372|  7.39k|    limiter->maxBufIdx = 0;
  373|  7.39k|    limiter->delayBufIdx = 0;
  374|  7.39k|    limiter->max = (FIXP_DBL)0;
  375|  7.39k|    limiter->cor = FL2FXCONST_DBL(1.0f / (1 << 1));
  ------------------
  |  |  192|  7.39k|  (FIXP_DBL)(                                                                \
  |  |  193|  7.39k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 7.39k, Folded]
  |  |  ------------------
  |  |  194|  7.39k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  7.39k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  7.39k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 7.39k]
  |  |  ------------------
  |  |  195|  7.39k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  7.39k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  7.39k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  7.39k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  7.39k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  7.39k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  7.39k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  376|  7.39k|    limiter->smoothState0 = FL2FXCONST_DBL(1.0f / (1 << 1));
  ------------------
  |  |  192|  7.39k|  (FIXP_DBL)(                                                                \
  |  |  193|  7.39k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 7.39k, Folded]
  |  |  ------------------
  |  |  194|  7.39k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  7.39k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  7.39k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 7.39k]
  |  |  ------------------
  |  |  195|  7.39k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  7.39k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  7.39k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  7.39k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  7.39k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  7.39k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  7.39k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  377|  7.39k|    limiter->minGain = FL2FXCONST_DBL(1.0f / (1 << 1));
  ------------------
  |  |  192|  7.39k|  (FIXP_DBL)(                                                                \
  |  |  193|  7.39k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 7.39k, Folded]
  |  |  ------------------
  |  |  194|  7.39k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  7.39k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  7.39k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 7.39k]
  |  |  ------------------
  |  |  195|  7.39k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  7.39k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  7.39k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  7.39k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  7.39k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  7.39k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  7.39k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  378|  7.39k|    limiter->scaling = 0;
  379|       |
  380|  7.39k|    FDKmemset(limiter->maxBuf, 0, (limiter->attack + 1) * sizeof(FIXP_DBL));
  381|  7.39k|    FDKmemset(limiter->delayBuf, 0,
  382|  7.39k|              limiter->attack * limiter->channels * sizeof(FIXP_DBL));
  383|  7.39k|  } else {
  384|      0|    return TDLIMIT_INVALID_HANDLE;
  385|      0|  }
  386|       |
  387|  7.39k|  return TDLIMIT_OK;
  388|  7.39k|}
pcmLimiter_Destroy:
  391|  7.39k|TDLIMITER_ERROR pcmLimiter_Destroy(TDLimiterPtr limiter) {
  392|  7.39k|  if (limiter != NULL) {
  ------------------
  |  Branch (392:7): [True: 7.39k, False: 0]
  ------------------
  393|  7.39k|    FDKfree(limiter->maxBuf);
  394|  7.39k|    FDKfree(limiter->delayBuf);
  395|       |
  396|  7.39k|    FDKfree(limiter);
  397|  7.39k|  } else {
  398|      0|    return TDLIMIT_INVALID_HANDLE;
  399|      0|  }
  400|  7.39k|  return TDLIMIT_OK;
  401|  7.39k|}
pcmLimiter_SetAttack:
  476|  1.94k|                                     unsigned int attackMs) {
  477|  1.94k|  unsigned int attack;
  478|  1.94k|  FIXP_DBL attackConst, exponent;
  479|  1.94k|  INT e_ans;
  480|       |
  481|  1.94k|  if (limiter == NULL) return TDLIMIT_INVALID_HANDLE;
  ------------------
  |  Branch (481:7): [True: 0, False: 1.94k]
  ------------------
  482|       |
  483|  1.94k|  if (attackMs > limiter->maxAttackMs) return TDLIMIT_INVALID_PARAMETER;
  ------------------
  |  Branch (483:7): [True: 0, False: 1.94k]
  ------------------
  484|       |
  485|       |  /* calculate attack time in samples */
  486|  1.94k|  attack = (unsigned int)(attackMs * limiter->sampleRate / 1000);
  487|       |
  488|       |  /* attackConst = pow(0.1, 1.0 / (attack + 1)) */
  489|  1.94k|  exponent = invFixp(attack + 1);
  490|  1.94k|  attackConst = fPow(FL2FXCONST_DBL(0.1f), 0, exponent, 0, &e_ans);
  ------------------
  |  |  192|  1.94k|  (FIXP_DBL)(                                                                \
  |  |  193|  1.94k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 1.94k, Folded]
  |  |  ------------------
  |  |  194|  1.94k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  1.94k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.94k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 1.94k]
  |  |  ------------------
  |  |  195|  1.94k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  1.94k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  1.94k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  1.94k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  1.94k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.94k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  1.94k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  491|  1.94k|  attackConst = scaleValue(attackConst, e_ans);
  492|       |
  493|  1.94k|  limiter->attack = attack;
  494|  1.94k|  limiter->attackConst = attackConst;
  495|  1.94k|  limiter->attackMs = attackMs;
  496|       |
  497|  1.94k|  return TDLIMIT_OK;
  498|  1.94k|}

pcmDmx_Open:
 1622|  7.39k|PCMDMX_ERROR pcmDmx_Open(HANDLE_PCM_DOWNMIX *pSelf) {
 1623|  7.39k|  HANDLE_PCM_DOWNMIX self;
 1624|       |
 1625|  7.39k|  if (pSelf == NULL) {
  ------------------
  |  Branch (1625:7): [True: 0, False: 7.39k]
  ------------------
 1626|      0|    return (PCMDMX_INVALID_HANDLE);
 1627|      0|  }
 1628|       |
 1629|  7.39k|  *pSelf = NULL;
 1630|       |
 1631|  7.39k|  self = (HANDLE_PCM_DOWNMIX)GetPcmDmxInstance(0);
 1632|  7.39k|  if (self == NULL) {
  ------------------
  |  Branch (1632:7): [True: 0, False: 7.39k]
  ------------------
 1633|      0|    return (PCMDMX_OUT_OF_MEMORY);
 1634|      0|  }
 1635|       |
 1636|       |  /* Reset the full instance */
 1637|  7.39k|  pcmDmx_Reset(self, PCMDMX_RESET_FULL);
  ------------------
  |  |  325|  7.39k|#define PCMDMX_RESET_FULL (PCMDMX_RESET_PARAMS | PCMDMX_RESET_BS_DATA)
  |  |  ------------------
  |  |  |  |  323|  7.39k|#define PCMDMX_RESET_PARAMS (1)
  |  |  ------------------
  |  |               #define PCMDMX_RESET_FULL (PCMDMX_RESET_PARAMS | PCMDMX_RESET_BS_DATA)
  |  |  ------------------
  |  |  |  |  324|  7.39k|#define PCMDMX_RESET_BS_DATA (2)
  |  |  ------------------
  ------------------
 1638|       |
 1639|  7.39k|  *pSelf = self;
 1640|       |
 1641|  7.39k|  return (PCMDMX_OK);
 1642|  7.39k|}
pcmDmx_Reset:
 1649|  13.1k|PCMDMX_ERROR pcmDmx_Reset(HANDLE_PCM_DOWNMIX self, UINT flags) {
 1650|  13.1k|  if (self == NULL) {
  ------------------
  |  Branch (1650:7): [True: 0, False: 13.1k]
  ------------------
 1651|      0|    return (PCMDMX_INVALID_HANDLE);
 1652|      0|  }
 1653|       |
 1654|  13.1k|  if (flags & PCMDMX_RESET_PARAMS) {
  ------------------
  |  |  323|  13.1k|#define PCMDMX_RESET_PARAMS (1)
  ------------------
  |  Branch (1654:7): [True: 7.39k, False: 5.79k]
  ------------------
 1655|  7.39k|    PCM_DMX_USER_PARAMS *pParams = &self->userParams;
 1656|       |
 1657|  7.39k|    pParams->dualChannelMode = STEREO_MODE;
 1658|  7.39k|    pParams->pseudoSurrMode = NEVER_DO_PS_DMX;
 1659|  7.39k|    pParams->numOutChannelsMax = (6);
 1660|  7.39k|    pParams->numOutChannelsMin = (0);
 1661|  7.39k|    pParams->frameDelay = 0;
 1662|  7.39k|    pParams->expiryFrame = (0);
 1663|       |
 1664|  7.39k|    self->applyProcessing = 0;
 1665|  7.39k|  }
 1666|       |
 1667|  13.1k|  if (flags & PCMDMX_RESET_BS_DATA) {
  ------------------
  |  |  324|  13.1k|#define PCMDMX_RESET_BS_DATA (2)
  ------------------
  |  Branch (1667:7): [True: 13.1k, False: 0]
  ------------------
 1668|  13.1k|    int slot;
 1669|       |    /* Init all slots with a default set */
 1670|  39.5k|    for (slot = 0; slot <= (1); slot += 1) {
  ------------------
  |  Branch (1670:20): [True: 26.3k, False: 13.1k]
  ------------------
 1671|  26.3k|      FDKmemcpy(&self->bsMetaData[slot], &dfltMetaData,
 1672|  26.3k|                sizeof(DMX_BS_META_DATA));
 1673|  26.3k|    }
 1674|  13.1k|  }
 1675|       |
 1676|  13.1k|  return (PCMDMX_OK);
 1677|  13.1k|}
pcmDmx_SetParam:
 1686|  15.8k|                             const INT value) {
 1687|  15.8k|  switch (param) {
 1688|      0|    case DMX_PROFILE_SETTING:
  ------------------
  |  Branch (1688:5): [True: 0, False: 15.8k]
  ------------------
 1689|      0|      switch ((DMX_PROFILE_TYPE)value) {
 1690|      0|        case DMX_PRFL_STANDARD:
  ------------------
  |  Branch (1690:9): [True: 0, False: 0]
  ------------------
 1691|      0|        case DMX_PRFL_MATRIX_MIX:
  ------------------
  |  Branch (1691:9): [True: 0, False: 0]
  ------------------
 1692|      0|        case DMX_PRFL_FORCE_MATRIX_MIX:
  ------------------
  |  Branch (1692:9): [True: 0, False: 0]
  ------------------
 1693|      0|        case DMX_PRFL_ARIB_JAPAN:
  ------------------
  |  Branch (1693:9): [True: 0, False: 0]
  ------------------
 1694|      0|          break;
 1695|      0|        default:
  ------------------
  |  Branch (1695:9): [True: 0, False: 0]
  ------------------
 1696|      0|          return (PCMDMX_UNABLE_TO_SET_PARAM);
 1697|      0|      }
 1698|      0|      if (self == NULL) return (PCMDMX_INVALID_HANDLE);
  ------------------
  |  Branch (1698:11): [True: 0, False: 0]
  ------------------
 1699|      0|      self->userParams.dmxProfile = (DMX_PROFILE_TYPE)value;
 1700|      0|      break;
 1701|       |
 1702|  5.91k|    case DMX_BS_DATA_EXPIRY_FRAME:
  ------------------
  |  Branch (1702:5): [True: 5.91k, False: 9.96k]
  ------------------
 1703|  5.91k|      if (self == NULL) return (PCMDMX_INVALID_HANDLE);
  ------------------
  |  Branch (1703:11): [True: 0, False: 5.91k]
  ------------------
 1704|  5.91k|      self->userParams.expiryFrame = (value > 0) ? (UINT)value : 0;
  ------------------
  |  Branch (1704:38): [True: 0, False: 5.91k]
  ------------------
 1705|  5.91k|      break;
 1706|       |
 1707|  9.96k|    case DMX_BS_DATA_DELAY:
  ------------------
  |  Branch (1707:5): [True: 9.96k, False: 5.91k]
  ------------------
 1708|  9.96k|      if ((value > (1)) || (value < 0)) {
  ------------------
  |  Branch (1708:11): [True: 0, False: 9.96k]
  |  Branch (1708:28): [True: 0, False: 9.96k]
  ------------------
 1709|      0|        return (PCMDMX_UNABLE_TO_SET_PARAM);
 1710|      0|      }
 1711|  9.96k|      if (self == NULL) {
  ------------------
  |  Branch (1711:11): [True: 0, False: 9.96k]
  ------------------
 1712|      0|        return (PCMDMX_INVALID_HANDLE);
 1713|      0|      }
 1714|  9.96k|      self->userParams.frameDelay = (UCHAR)value;
 1715|  9.96k|      break;
 1716|       |
 1717|      0|    case MIN_NUMBER_OF_OUTPUT_CHANNELS:
  ------------------
  |  Branch (1717:5): [True: 0, False: 15.8k]
  ------------------
 1718|      0|      switch (value) { /* supported output channels */
 1719|      0|        case -1:
  ------------------
  |  Branch (1719:9): [True: 0, False: 0]
  ------------------
 1720|      0|        case 0:
  ------------------
  |  Branch (1720:9): [True: 0, False: 0]
  ------------------
 1721|      0|        case ONE_CHANNEL:
  ------------------
  |  |  173|      0|#define ONE_CHANNEL (1)
  ------------------
  |  Branch (1721:9): [True: 0, False: 0]
  ------------------
 1722|      0|        case TWO_CHANNEL:
  ------------------
  |  |  174|      0|#define TWO_CHANNEL (2)
  ------------------
  |  Branch (1722:9): [True: 0, False: 0]
  ------------------
 1723|      0|        case SIX_CHANNEL:
  ------------------
  |  |  175|      0|#define SIX_CHANNEL (6)
  ------------------
  |  Branch (1723:9): [True: 0, False: 0]
  ------------------
 1724|      0|        case EIGHT_CHANNEL:
  ------------------
  |  |  176|      0|#define EIGHT_CHANNEL (8)
  ------------------
  |  Branch (1724:9): [True: 0, False: 0]
  ------------------
 1725|      0|          break;
 1726|      0|        default:
  ------------------
  |  Branch (1726:9): [True: 0, False: 0]
  ------------------
 1727|      0|          return (PCMDMX_UNABLE_TO_SET_PARAM);
 1728|      0|      }
 1729|      0|      if (self == NULL) return (PCMDMX_INVALID_HANDLE);
  ------------------
  |  Branch (1729:11): [True: 0, False: 0]
  ------------------
 1730|       |      /* Store the new value */
 1731|      0|      self->userParams.numOutChannelsMin = (value > 0) ? (SHORT)value : -1;
  ------------------
  |  Branch (1731:44): [True: 0, False: 0]
  ------------------
 1732|      0|      if ((value > 0) && (self->userParams.numOutChannelsMax > 0) &&
  ------------------
  |  Branch (1732:11): [True: 0, False: 0]
  |  Branch (1732:26): [True: 0, False: 0]
  ------------------
 1733|      0|          (value > self->userParams
  ------------------
  |  Branch (1733:11): [True: 0, False: 0]
  ------------------
 1734|      0|                       .numOutChannelsMax)) { /* MIN > MAX would be an invalid
 1735|       |                                                 state. Thus set MAX = MIN in
 1736|       |                                                 this case. */
 1737|      0|        self->userParams.numOutChannelsMax = self->userParams.numOutChannelsMin;
 1738|      0|      }
 1739|      0|      break;
 1740|       |
 1741|      0|    case MAX_NUMBER_OF_OUTPUT_CHANNELS:
  ------------------
  |  Branch (1741:5): [True: 0, False: 15.8k]
  ------------------
 1742|      0|      switch (value) { /* supported output channels */
 1743|      0|        case -1:
  ------------------
  |  Branch (1743:9): [True: 0, False: 0]
  ------------------
 1744|      0|        case 0:
  ------------------
  |  Branch (1744:9): [True: 0, False: 0]
  ------------------
 1745|      0|        case ONE_CHANNEL:
  ------------------
  |  |  173|      0|#define ONE_CHANNEL (1)
  ------------------
  |  Branch (1745:9): [True: 0, False: 0]
  ------------------
 1746|      0|        case TWO_CHANNEL:
  ------------------
  |  |  174|      0|#define TWO_CHANNEL (2)
  ------------------
  |  Branch (1746:9): [True: 0, False: 0]
  ------------------
 1747|      0|        case SIX_CHANNEL:
  ------------------
  |  |  175|      0|#define SIX_CHANNEL (6)
  ------------------
  |  Branch (1747:9): [True: 0, False: 0]
  ------------------
 1748|      0|        case EIGHT_CHANNEL:
  ------------------
  |  |  176|      0|#define EIGHT_CHANNEL (8)
  ------------------
  |  Branch (1748:9): [True: 0, False: 0]
  ------------------
 1749|      0|          break;
 1750|      0|        default:
  ------------------
  |  Branch (1750:9): [True: 0, False: 0]
  ------------------
 1751|      0|          return (PCMDMX_UNABLE_TO_SET_PARAM);
 1752|      0|      }
 1753|      0|      if (self == NULL) return (PCMDMX_INVALID_HANDLE);
  ------------------
  |  Branch (1753:11): [True: 0, False: 0]
  ------------------
 1754|       |      /* Store the new value */
 1755|      0|      self->userParams.numOutChannelsMax = (value > 0) ? (SHORT)value : -1;
  ------------------
  |  Branch (1755:44): [True: 0, False: 0]
  ------------------
 1756|      0|      if ((value > 0) &&
  ------------------
  |  Branch (1756:11): [True: 0, False: 0]
  ------------------
 1757|      0|          (value < self->userParams
  ------------------
  |  Branch (1757:11): [True: 0, False: 0]
  ------------------
 1758|      0|                       .numOutChannelsMin)) { /* MAX < MIN would be an invalid
 1759|       |                                                 state. Thus set MIN = MAX in
 1760|       |                                                 this case. */
 1761|      0|        self->userParams.numOutChannelsMin = self->userParams.numOutChannelsMax;
 1762|      0|      }
 1763|      0|      break;
 1764|       |
 1765|      0|    case DMX_DUAL_CHANNEL_MODE:
  ------------------
  |  Branch (1765:5): [True: 0, False: 15.8k]
  ------------------
 1766|      0|      switch ((DUAL_CHANNEL_MODE)value) {
 1767|      0|        case STEREO_MODE:
  ------------------
  |  Branch (1767:9): [True: 0, False: 0]
  ------------------
 1768|      0|        case CH1_MODE:
  ------------------
  |  Branch (1768:9): [True: 0, False: 0]
  ------------------
 1769|      0|        case CH2_MODE:
  ------------------
  |  Branch (1769:9): [True: 0, False: 0]
  ------------------
 1770|      0|        case MIXED_MODE:
  ------------------
  |  Branch (1770:9): [True: 0, False: 0]
  ------------------
 1771|      0|          break;
 1772|      0|        default:
  ------------------
  |  Branch (1772:9): [True: 0, False: 0]
  ------------------
 1773|      0|          return (PCMDMX_UNABLE_TO_SET_PARAM);
 1774|      0|      }
 1775|      0|      if (self == NULL) return (PCMDMX_INVALID_HANDLE);
  ------------------
  |  Branch (1775:11): [True: 0, False: 0]
  ------------------
 1776|      0|      self->userParams.dualChannelMode = (DUAL_CHANNEL_MODE)value;
 1777|      0|      self->applyProcessing = ((DUAL_CHANNEL_MODE)value != STEREO_MODE)
  ------------------
  |  Branch (1777:31): [True: 0, False: 0]
  ------------------
 1778|      0|                                  ? 1
 1779|      0|                                  : 0; /* Force processing if necessary. */
 1780|      0|      break;
 1781|       |
 1782|      0|    case DMX_PSEUDO_SURROUND_MODE:
  ------------------
  |  Branch (1782:5): [True: 0, False: 15.8k]
  ------------------
 1783|      0|      switch ((PSEUDO_SURROUND_MODE)value) {
 1784|      0|        case NEVER_DO_PS_DMX:
  ------------------
  |  Branch (1784:9): [True: 0, False: 0]
  ------------------
 1785|      0|        case AUTO_PS_DMX:
  ------------------
  |  Branch (1785:9): [True: 0, False: 0]
  ------------------
 1786|      0|        case FORCE_PS_DMX:
  ------------------
  |  Branch (1786:9): [True: 0, False: 0]
  ------------------
 1787|      0|          break;
 1788|      0|        default:
  ------------------
  |  Branch (1788:9): [True: 0, False: 0]
  ------------------
 1789|      0|          return (PCMDMX_UNABLE_TO_SET_PARAM);
 1790|      0|      }
 1791|      0|      if (self == NULL) return (PCMDMX_INVALID_HANDLE);
  ------------------
  |  Branch (1791:11): [True: 0, False: 0]
  ------------------
 1792|      0|      self->userParams.pseudoSurrMode = (PSEUDO_SURROUND_MODE)value;
 1793|      0|      break;
 1794|       |
 1795|      0|    default:
  ------------------
  |  Branch (1795:5): [True: 0, False: 15.8k]
  ------------------
 1796|      0|      return (PCMDMX_UNKNOWN_PARAM);
 1797|  15.8k|  }
 1798|       |
 1799|  15.8k|  return (PCMDMX_OK);
 1800|  15.8k|}
pcmDmx_GetParam:
 1809|  3.92k|                             INT *const pValue) {
 1810|  3.92k|  PCM_DMX_USER_PARAMS *pUsrParams;
 1811|       |
 1812|  3.92k|  if ((self == NULL) || (pValue == NULL)) {
  ------------------
  |  Branch (1812:7): [True: 0, False: 3.92k]
  |  Branch (1812:25): [True: 0, False: 3.92k]
  ------------------
 1813|      0|    return (PCMDMX_INVALID_HANDLE);
 1814|      0|  }
 1815|  3.92k|  pUsrParams = &self->userParams;
 1816|       |
 1817|  3.92k|  switch (param) {
 1818|      0|    case DMX_PROFILE_SETTING:
  ------------------
  |  Branch (1818:5): [True: 0, False: 3.92k]
  ------------------
 1819|      0|      *pValue = (INT)pUsrParams->dmxProfile;
 1820|      0|      break;
 1821|      0|    case DMX_BS_DATA_EXPIRY_FRAME:
  ------------------
  |  Branch (1821:5): [True: 0, False: 3.92k]
  ------------------
 1822|      0|      *pValue = (INT)pUsrParams->expiryFrame;
 1823|      0|      break;
 1824|      0|    case DMX_BS_DATA_DELAY:
  ------------------
  |  Branch (1824:5): [True: 0, False: 3.92k]
  ------------------
 1825|      0|      *pValue = (INT)pUsrParams->frameDelay;
 1826|      0|      break;
 1827|  3.92k|    case MIN_NUMBER_OF_OUTPUT_CHANNELS:
  ------------------
  |  Branch (1827:5): [True: 3.92k, False: 0]
  ------------------
 1828|  3.92k|      *pValue = (INT)pUsrParams->numOutChannelsMin;
 1829|  3.92k|      break;
 1830|      0|    case MAX_NUMBER_OF_OUTPUT_CHANNELS:
  ------------------
  |  Branch (1830:5): [True: 0, False: 3.92k]
  ------------------
 1831|      0|      *pValue = (INT)pUsrParams->numOutChannelsMax;
 1832|      0|      break;
 1833|      0|    case DMX_DUAL_CHANNEL_MODE:
  ------------------
  |  Branch (1833:5): [True: 0, False: 3.92k]
  ------------------
 1834|      0|      *pValue = (INT)pUsrParams->dualChannelMode;
 1835|      0|      break;
 1836|      0|    case DMX_PSEUDO_SURROUND_MODE:
  ------------------
  |  Branch (1836:5): [True: 0, False: 3.92k]
  ------------------
 1837|      0|      *pValue = (INT)pUsrParams->pseudoSurrMode;
 1838|      0|      break;
 1839|      0|    default:
  ------------------
  |  Branch (1839:5): [True: 0, False: 3.92k]
  ------------------
 1840|      0|      return (PCMDMX_UNKNOWN_PARAM);
 1841|  3.92k|  }
 1842|       |
 1843|  3.92k|  return (PCMDMX_OK);
 1844|  3.92k|}
pcmDmx_SetMatrixMixdownFromPce:
 2022|    316|                                            int pseudoSurroundEnable) {
 2023|    316|  if (self == NULL) {
  ------------------
  |  Branch (2023:7): [True: 0, False: 316]
  ------------------
 2024|      0|    return (PCMDMX_INVALID_HANDLE);
 2025|      0|  }
 2026|       |
 2027|    316|  {
 2028|    316|    DMX_BS_META_DATA *pBsMetaData = &self->bsMetaData[0];
 2029|       |
 2030|    316|    if (matrixMixdownPresent) {
  ------------------
  |  Branch (2030:9): [True: 23, False: 293]
  ------------------
 2031|     23|      pBsMetaData->pseudoSurround = (pseudoSurroundEnable) ? 1 : 0;
  ------------------
  |  Branch (2031:37): [True: 11, False: 12]
  ------------------
 2032|     23|      pBsMetaData->matrixMixdownIdx = matrixMixdownIdx & 0x03;
 2033|     23|      pBsMetaData->typeFlags |= TYPE_PCE_DATA;
  ------------------
  |  |  327|     23|#define TYPE_PCE_DATA (0x01)
  ------------------
 2034|       |      /* Reset expiry counter */
 2035|     23|      pBsMetaData->expiryCount = 0;
 2036|     23|    }
 2037|    316|  }
 2038|       |
 2039|    316|  return (PCMDMX_OK);
 2040|    316|}
pcmDmx_Close:
 2635|  7.39k|PCMDMX_ERROR pcmDmx_Close(HANDLE_PCM_DOWNMIX *pSelf) {
 2636|  7.39k|  if (pSelf == NULL) {
  ------------------
  |  Branch (2636:7): [True: 0, False: 7.39k]
  ------------------
 2637|      0|    return (PCMDMX_INVALID_HANDLE);
 2638|      0|  }
 2639|       |
 2640|  7.39k|  FreePcmDmxInstance(pSelf);
 2641|  7.39k|  *pSelf = NULL;
 2642|       |
 2643|  7.39k|  return (PCMDMX_OK);
 2644|  7.39k|}

_Z27SpatialDecParseMps212ConfigP13FDK_BITSTREAMP25T_SPATIAL_SPECIFIC_CONFIGi17AUDIO_OBJECT_TYPEii:
  325|    111|    INT coreSbrFrameLengthIndex) {
  326|    111|  int i;
  327|       |
  328|    111|  FDKmemclear(pSpatialSpecificConfig, sizeof(SPATIAL_SPECIFIC_CONFIG));
  329|       |
  330|    111|  pSpatialSpecificConfig->stereoConfigIndex = stereoConfigIndex;
  331|    111|  pSpatialSpecificConfig->coreSbrFrameLengthIndex = coreSbrFrameLengthIndex;
  332|    111|  pSpatialSpecificConfig->freqRes =
  333|    111|      (SPATIALDEC_FREQ_RES)freqResTable[FDKreadBits(bitstream, 3)];
  334|    111|  if (pSpatialSpecificConfig->freqRes == 0) {
  ------------------
  |  Branch (334:7): [True: 1, False: 110]
  ------------------
  335|      1|    return MPS_PARSE_ERROR; /* reserved value */
  336|      1|  }
  337|       |
  338|    110|  switch (coreCodec) {
  339|      0|    case AOT_DRM_USAC:
  ------------------
  |  Branch (339:5): [True: 0, False: 110]
  ------------------
  340|      0|      pSpatialSpecificConfig->bsFixedGainDMX =
  341|      0|          (SPATIALDEC_FIXED_GAINS)FDKreadBits(bitstream, 3);
  342|       |      /* tempShapeConfig = (bsTempShapeConfigDrm == 1) ? 3 : 0 */
  343|      0|      pSpatialSpecificConfig->tempShapeConfig =
  344|      0|          (SPATIALDEC_TS_CONF)(FDKreadBits(bitstream, 1) * 3);
  345|      0|      pSpatialSpecificConfig->decorrConfig = (SPATIALDEC_DECORR_CONF)0;
  346|      0|      pSpatialSpecificConfig->bsDecorrType = 0;
  347|      0|      break;
  348|    110|    case AOT_USAC:
  ------------------
  |  Branch (348:5): [True: 110, False: 0]
  ------------------
  349|    110|      pSpatialSpecificConfig->bsFixedGainDMX =
  350|    110|          (SPATIALDEC_FIXED_GAINS)FDKreadBits(bitstream, 3);
  351|    110|      pSpatialSpecificConfig->tempShapeConfig =
  352|    110|          (SPATIALDEC_TS_CONF)FDKreadBits(bitstream, 2);
  353|    110|      pSpatialSpecificConfig->decorrConfig =
  354|    110|          (SPATIALDEC_DECORR_CONF)FDKreadBits(bitstream, 2);
  355|    110|      if (pSpatialSpecificConfig->decorrConfig > 2) {
  ------------------
  |  Branch (355:11): [True: 1, False: 109]
  ------------------
  356|      1|        return MPS_PARSE_ERROR; /* reserved value */
  357|      1|      }
  358|    109|      pSpatialSpecificConfig->bsDecorrType = 0;
  359|    109|      break;
  360|      0|    default:
  ------------------
  |  Branch (360:5): [True: 0, False: 110]
  ------------------
  361|      0|      return MPS_UNSUPPORTED_FORMAT;
  362|    110|  }
  363|    109|  pSpatialSpecificConfig->nTimeSlots = (coreSbrFrameLengthIndex == 4) ? 64 : 32;
  ------------------
  |  Branch (363:40): [True: 38, False: 71]
  ------------------
  364|    109|  pSpatialSpecificConfig->bsHighRateMode = (UCHAR)FDKreadBits(bitstream, 1);
  365|       |
  366|    109|  {
  367|    109|    pSpatialSpecificConfig->bsPhaseCoding = (UCHAR)FDKreadBits(bitstream, 1);
  368|    109|    pSpatialSpecificConfig->bsOttBandsPhasePresent =
  369|    109|        (UCHAR)FDKreadBits(bitstream, 1);
  370|    109|    if (pSpatialSpecificConfig->bsOttBandsPhasePresent) {
  ------------------
  |  Branch (370:9): [True: 12, False: 97]
  ------------------
  371|     12|      if (MAX_PARAMETER_BANDS < (pSpatialSpecificConfig->bsOttBandsPhase =
  ------------------
  |  |  118|     12|#define MAX_PARAMETER_BANDS (28)
  ------------------
  |  Branch (371:11): [True: 1, False: 11]
  ------------------
  372|     12|                                     FDKreadBits(bitstream, 5))) {
  373|      1|        return MPS_PARSE_ERROR;
  374|      1|      }
  375|     97|    } else {
  376|     97|      pSpatialSpecificConfig->bsOttBandsPhase = 0;
  377|     97|    }
  378|    109|  }
  379|       |
  380|    108|  if (stereoConfigIndex > 1) { /* do residual coding */
  ------------------
  |  Branch (380:7): [True: 76, False: 32]
  ------------------
  381|     76|    pSpatialSpecificConfig->bResidualCoding = 1;
  382|     76|    pSpatialSpecificConfig->ResidualConfig->bResidualPresent = 1;
  383|     76|    if (pSpatialSpecificConfig->freqRes <
  ------------------
  |  Branch (383:9): [True: 2, False: 74]
  ------------------
  384|     76|        (pSpatialSpecificConfig->ResidualConfig->nResidualBands =
  385|     76|             FDKreadBits(bitstream, 5))) {
  386|      2|      return MPS_PARSE_ERROR;
  387|      2|    }
  388|     74|    pSpatialSpecificConfig->bsOttBandsPhase =
  389|     74|        fMax(pSpatialSpecificConfig->bsOttBandsPhase,
  390|     74|             pSpatialSpecificConfig->ResidualConfig->nResidualBands);
  391|     74|    pSpatialSpecificConfig->bsPseudoLr = (UCHAR)FDKreadBits(bitstream, 1);
  392|       |
  393|     74|    if (pSpatialSpecificConfig->bsPhaseCoding) {
  ------------------
  |  Branch (393:9): [True: 9, False: 65]
  ------------------
  394|      9|      pSpatialSpecificConfig->bsPhaseCoding = 3;
  395|      9|    }
  396|     74|  } else {
  397|     32|    pSpatialSpecificConfig->bResidualCoding = 0;
  398|     32|    pSpatialSpecificConfig->ResidualConfig->bResidualPresent = 0;
  399|     32|  }
  400|       |
  401|    106|  if (pSpatialSpecificConfig->tempShapeConfig == 2) {
  ------------------
  |  Branch (401:7): [True: 6, False: 100]
  ------------------
  402|      6|    switch (coreCodec) {
  403|      6|      case AOT_USAC:
  ------------------
  |  Branch (403:7): [True: 6, False: 0]
  ------------------
  404|      6|        pSpatialSpecificConfig->envQuantMode = FDKreadBits(bitstream, 1);
  405|      6|        break;
  406|      0|      default: /* added to avoid compiler warning */
  ------------------
  |  Branch (406:7): [True: 0, False: 6]
  ------------------
  407|      0|        break; /* added to avoid compiler warning */
  408|      6|    }
  409|      6|  }
  410|       |
  411|       |  /* Static parameters */
  412|       |
  413|    106|  pSpatialSpecificConfig->samplingFreq =
  414|    106|      samplingRate; /* wrong for stereoConfigIndex == 3 but value is unused */
  415|    106|  pSpatialSpecificConfig->treeConfig = SPATIALDEC_MODE_RSVD7;
  416|    106|  pSpatialSpecificConfig->nOttBoxes =
  417|    106|      treePropertyTable[pSpatialSpecificConfig->treeConfig].numOttBoxes;
  418|    106|  pSpatialSpecificConfig->nInputChannels =
  419|    106|      treePropertyTable[pSpatialSpecificConfig->treeConfig].numInputChannels;
  420|    106|  pSpatialSpecificConfig->nOutputChannels =
  421|    106|      treePropertyTable[pSpatialSpecificConfig->treeConfig].numOutputChannels;
  422|       |
  423|    106|  pSpatialSpecificConfig->bArbitraryDownmix = 0;
  424|       |
  425|    212|  for (i = 0; i < pSpatialSpecificConfig->nOttBoxes; i++) {
  ------------------
  |  Branch (425:15): [True: 106, False: 106]
  ------------------
  426|    106|    pSpatialSpecificConfig->OttConfig[i].nOttBands = 0;
  427|    106|  }
  428|       |
  429|    106|  if (coreCodec == AOT_DRM_USAC) {
  ------------------
  |  Branch (429:7): [True: 0, False: 106]
  ------------------
  430|       |    /* MPS payload is MPEG conform -> no need for pseudo DRM AOT */
  431|      0|    coreCodec = AOT_USAC;
  432|      0|  }
  433|    106|  pSpatialSpecificConfig->coreCodec = coreCodec;
  434|       |
  435|       |  /* Derive additional helper variables */
  436|    106|  SpatialDecDecodeHelperInfo(pSpatialSpecificConfig, UPMIXTYPE_NORMAL);
  437|       |
  438|    106|  return MPS_OK;
  439|    106|}
_Z29SpatialDecParseSpecificConfigP13FDK_BITSTREAMP25T_SPATIAL_SPECIFIC_CONFIGi17AUDIO_OBJECT_TYPE:
  444|    901|    AUDIO_OBJECT_TYPE coreCodec) {
  445|    901|  SACDEC_ERROR err = MPS_OK;
  446|    901|  int i;
  447|    901|  int bsSamplingFreqIndex;
  448|    901|  int bsFreqRes, b3DaudioMode = 0;
  449|    901|  int numHeaderBits;
  450|    901|  int cfgStartPos, bitsAvailable;
  451|       |
  452|    901|  FDKmemclear(pSpatialSpecificConfig, sizeof(SPATIAL_SPECIFIC_CONFIG));
  453|       |
  454|    901|  cfgStartPos = FDKgetValidBits(bitstream);
  455|       |  /* It might be that we do not know the SSC length beforehand. */
  456|    901|  if (sacHeaderLen == 0) {
  ------------------
  |  Branch (456:7): [True: 194, False: 707]
  ------------------
  457|    194|    bitsAvailable = cfgStartPos;
  458|    707|  } else {
  459|    707|    bitsAvailable = 8 * sacHeaderLen;
  460|    707|    if (bitsAvailable > cfgStartPos) {
  ------------------
  |  Branch (460:9): [True: 48, False: 659]
  ------------------
  461|     48|      err = MPS_PARSE_ERROR;
  462|     48|      goto bail;
  463|     48|    }
  464|    707|  }
  465|       |
  466|    853|  bsSamplingFreqIndex = FDKreadBits(bitstream, 4);
  467|       |
  468|    853|  if (bsSamplingFreqIndex == 15) {
  ------------------
  |  Branch (468:7): [True: 145, False: 708]
  ------------------
  469|    145|    pSpatialSpecificConfig->samplingFreq = FDKreadBits(bitstream, 24);
  470|    708|  } else {
  471|    708|    pSpatialSpecificConfig->samplingFreq =
  472|    708|        samplingFreqTable[bsSamplingFreqIndex];
  473|    708|    if (pSpatialSpecificConfig->samplingFreq == 0) {
  ------------------
  |  Branch (473:9): [True: 1, False: 707]
  ------------------
  474|      1|      err = MPS_PARSE_ERROR;
  475|      1|      goto bail;
  476|      1|    }
  477|    708|  }
  478|       |
  479|    852|  pSpatialSpecificConfig->nTimeSlots = FDKreadBits(bitstream, 5) + 1;
  480|    852|  if ((pSpatialSpecificConfig->nTimeSlots < 1) ||
  ------------------
  |  Branch (480:7): [True: 0, False: 852]
  ------------------
  481|    852|      (pSpatialSpecificConfig->nTimeSlots > MAX_TIME_SLOTS)) {
  ------------------
  |  |  109|    852|#define MAX_TIME_SLOTS 64
  ------------------
  |  Branch (481:7): [True: 0, False: 852]
  ------------------
  482|      0|    err = MPS_PARSE_ERROR;
  483|      0|    goto bail;
  484|      0|  }
  485|       |
  486|    852|  bsFreqRes = FDKreadBits(bitstream, 3);
  487|       |
  488|    852|  pSpatialSpecificConfig->freqRes =
  489|    852|      (SPATIALDEC_FREQ_RES)freqResTable_LD[bsFreqRes];
  490|       |
  491|    852|  {
  492|    852|    UINT treeConfig = FDKreadBits(bitstream, 4);
  493|       |
  494|    852|    switch (treeConfig) {
  495|    585|      case SPATIALDEC_MODE_RSVD7:
  ------------------
  |  Branch (495:7): [True: 585, False: 267]
  ------------------
  496|    585|        pSpatialSpecificConfig->treeConfig = (SPATIALDEC_TREE_CONFIG)treeConfig;
  497|    585|        break;
  498|    267|      default:
  ------------------
  |  Branch (498:7): [True: 267, False: 585]
  ------------------
  499|    267|        err = MPS_UNSUPPORTED_CONFIG;
  500|    267|        goto bail;
  501|    852|    }
  502|    852|  }
  503|       |
  504|    585|  {
  505|    585|    pSpatialSpecificConfig->nOttBoxes =
  506|    585|        treePropertyTable[pSpatialSpecificConfig->treeConfig].numOttBoxes;
  507|    585|    pSpatialSpecificConfig->nTttBoxes =
  508|    585|        treePropertyTable[pSpatialSpecificConfig->treeConfig].numTttBoxes;
  509|    585|    pSpatialSpecificConfig->nInputChannels =
  510|    585|        treePropertyTable[pSpatialSpecificConfig->treeConfig].numInputChannels;
  511|    585|    pSpatialSpecificConfig->nOutputChannels =
  512|    585|        treePropertyTable[pSpatialSpecificConfig->treeConfig].numOutputChannels;
  513|    585|  }
  514|       |
  515|    585|  pSpatialSpecificConfig->quantMode =
  516|    585|      (SPATIALDEC_QUANT_MODE)FDKreadBits(bitstream, 2);
  517|       |
  518|    585|  pSpatialSpecificConfig->bArbitraryDownmix = FDKreadBits(bitstream, 1);
  519|       |
  520|    585|  pSpatialSpecificConfig->bsFixedGainDMX =
  521|    585|      (SPATIALDEC_FIXED_GAINS)FDKreadBits(bitstream, 3);
  522|       |
  523|    585|  pSpatialSpecificConfig->tempShapeConfig =
  524|    585|      (SPATIALDEC_TS_CONF)FDKreadBits(bitstream, 2);
  525|    585|  if (pSpatialSpecificConfig->tempShapeConfig > 2) {
  ------------------
  |  Branch (525:7): [True: 1, False: 584]
  ------------------
  526|      1|    return MPS_PARSE_ERROR; /* reserved value */
  527|      1|  }
  528|       |
  529|    584|  pSpatialSpecificConfig->decorrConfig =
  530|    584|      (SPATIALDEC_DECORR_CONF)FDKreadBits(bitstream, 2);
  531|    584|  if (pSpatialSpecificConfig->decorrConfig > 2) {
  ------------------
  |  Branch (531:7): [True: 1, False: 583]
  ------------------
  532|      1|    return MPS_PARSE_ERROR; /* reserved value */
  533|      1|  }
  534|       |
  535|  1.16k|  for (i = 0; i < pSpatialSpecificConfig->nOttBoxes; i++) {
  ------------------
  |  Branch (535:15): [True: 583, False: 583]
  ------------------
  536|    583|    pSpatialSpecificConfig->OttConfig[i].nOttBands = 0;
  537|    583|  }
  538|       |
  539|    583|  for (i = 0; i < pSpatialSpecificConfig->nTttBoxes; i++) {
  ------------------
  |  Branch (539:15): [True: 0, False: 583]
  ------------------
  540|      0|    int bTttDualMode = FDKreadBits(bitstream, 1);
  541|      0|    FDKreadBits(bitstream, 3); /* not supported */
  542|       |
  543|      0|    if (bTttDualMode) {
  ------------------
  |  Branch (543:9): [True: 0, False: 0]
  ------------------
  544|      0|      FDKreadBits(bitstream, 8); /* not supported */
  545|      0|    }
  546|      0|  }
  547|       |
  548|    583|  if (pSpatialSpecificConfig->tempShapeConfig == 2) {
  ------------------
  |  Branch (548:7): [True: 195, False: 388]
  ------------------
  549|    195|    pSpatialSpecificConfig->envQuantMode = FDKreadBits(bitstream, 1);
  550|    195|  }
  551|       |
  552|    583|  if (b3DaudioMode) {
  ------------------
  |  Branch (552:7): [True: 0, False: 583]
  ------------------
  553|      0|    if (FDKreadBits(bitstream, 2) == 0) { /* b3DaudioHRTFset ? */
  ------------------
  |  Branch (553:9): [True: 0, False: 0]
  ------------------
  554|      0|      int hc;
  555|      0|      int HRTFnumBand;
  556|      0|      int HRTFfreqRes = FDKreadBits(bitstream, 3);
  557|      0|      int HRTFnumChan = FDKreadBits(bitstream, 4);
  558|      0|      int HRTFasymmetric = FDKreadBits(bitstream, 1);
  559|       |
  560|      0|      HRTFnumBand = freqResTable_LD[HRTFfreqRes];
  561|       |
  562|      0|      for (hc = 0; hc < HRTFnumChan; hc++) {
  ------------------
  |  Branch (562:20): [True: 0, False: 0]
  ------------------
  563|      0|        FDKpushFor(bitstream, HRTFnumBand * 6); /* HRTFlevelLeft[hc][hb] */
  564|      0|        if (HRTFasymmetric) {
  ------------------
  |  Branch (564:13): [True: 0, False: 0]
  ------------------
  565|      0|          FDKpushFor(bitstream, HRTFnumBand * 6); /* HRTFlevelRight[hc][hb] */
  566|      0|        }
  567|      0|        if (FDKreadBits(bitstream, 1)) {          /* HRTFphase[hc] ? */
  ------------------
  |  Branch (567:13): [True: 0, False: 0]
  ------------------
  568|      0|          FDKpushFor(bitstream, HRTFnumBand * 6); /* HRTFphaseLR[hc][hb] */
  569|      0|        }
  570|      0|        if (FDKreadBits(bitstream, 1)) {          /* HRTFicc[hc] ? */
  ------------------
  |  Branch (570:13): [True: 0, False: 0]
  ------------------
  571|      0|          FDKpushFor(bitstream, HRTFnumBand * 6); /* HRTFiccLR[hc][hb] */
  572|      0|        }
  573|      0|      }
  574|      0|    }
  575|      0|  }
  576|       |
  577|    583|  FDKbyteAlign(bitstream,
  578|    583|               cfgStartPos); /* ISO/IEC FDIS 23003-1: 5.2. ... byte alignment
  579|       |                                with respect to the beginning of the syntactic
  580|       |                                element in which ByteAlign() occurs. */
  581|       |
  582|    583|  numHeaderBits = cfgStartPos - (INT)FDKgetValidBits(bitstream);
  583|    583|  bitsAvailable -= numHeaderBits;
  584|    583|  if (bitsAvailable < 0) {
  ------------------
  |  Branch (584:7): [True: 12, False: 571]
  ------------------
  585|     12|    err = MPS_PARSE_ERROR;
  586|     12|    goto bail;
  587|     12|  }
  588|       |
  589|    571|  pSpatialSpecificConfig->sacExtCnt = 0;
  590|    571|  pSpatialSpecificConfig->bResidualCoding = 0;
  591|       |
  592|    571|  err = SpatialDecParseExtensionConfig(
  593|    571|      bitstream, pSpatialSpecificConfig, pSpatialSpecificConfig->nOttBoxes,
  594|    571|      pSpatialSpecificConfig->nTttBoxes,
  595|    571|      pSpatialSpecificConfig->nOutputChannels, bitsAvailable);
  596|       |
  597|    571|  FDKbyteAlign(
  598|    571|      bitstream,
  599|    571|      cfgStartPos); /* Same alignment anchor as above because
  600|       |                       SpatialExtensionConfig() always reads full bytes */
  601|       |
  602|    571|  pSpatialSpecificConfig->coreCodec = coreCodec;
  603|       |
  604|    571|  SpatialDecDecodeHelperInfo(pSpatialSpecificConfig, UPMIXTYPE_NORMAL);
  605|       |
  606|    899|bail:
  607|    899|  if (sacHeaderLen > 0) {
  ------------------
  |  Branch (607:7): [True: 707, False: 192]
  ------------------
  608|       |    /* If the config is of known length then assure that the
  609|       |       bitbuffer is exactly at its end when leaving the function. */
  610|    707|    FDKpushBiDirectional(
  611|    707|        bitstream,
  612|    707|        (sacHeaderLen * 8) - (cfgStartPos - (INT)FDKgetValidBits(bitstream)));
  613|    707|  }
  614|       |
  615|    899|  return err;
  616|    571|}
_Z23SpatialDecCreateBsFrameP23SPATIAL_BS_FRAME_structP11BS_LL_STATE:
 2110|  7.39k|                                     BS_LL_STATE *llState) {
 2111|  7.39k|  SPATIAL_BS_FRAME *pBs = bsFrame;
 2112|       |
 2113|  7.39k|  const int maxNumOtt = MAX_NUM_OTT;
  ------------------
  |  |  115|  7.39k|#define MAX_NUM_OTT (5)
  ------------------
 2114|  7.39k|  const int maxNumInputChannels = MAX_INPUT_CHANNELS;
  ------------------
  |  |  110|  7.39k|#define MAX_INPUT_CHANNELS 1
  ------------------
 2115|       |
 2116|  7.39k|  FDK_ALLOCATE_MEMORY_1D_P(
  ------------------
  |  |  160|  7.39k|  if (((a) = (ptype)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (160:7): [True: 0, False: 7.39k]
  |  |  ------------------
  |  |  161|      0|    goto bail;                                                          \
  |  |  162|      0|  }
  ------------------
 2117|  7.39k|      pBs->cmpOttIPDidx, maxNumOtt * MAX_PARAMETER_SETS * MAX_PARAMETER_BANDS,
 2118|  7.39k|      SCHAR, SCHAR(*)[MAX_PARAMETER_SETS][MAX_PARAMETER_BANDS])
 2119|       |
 2120|       |  /* Arbitrary Downmix */
 2121|  7.39k|  FDK_ALLOCATE_MEMORY_1D_P(
  ------------------
  |  |  160|  7.39k|  if (((a) = (ptype)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (160:7): [True: 0, False: 7.39k]
  |  |  ------------------
  |  |  161|      0|    goto bail;                                                          \
  |  |  162|      0|  }
  ------------------
 2122|  7.39k|      pBs->cmpArbdmxGainIdx,
 2123|  7.39k|      maxNumInputChannels * MAX_PARAMETER_SETS * MAX_PARAMETER_BANDS, SCHAR,
 2124|  7.39k|      SCHAR(*)[MAX_PARAMETER_SETS][MAX_PARAMETER_BANDS])
 2125|       |
 2126|       |  /* Lossless control */
 2127|  7.39k|  FDK_ALLOCATE_MEMORY_1D(pBs->CLDLosslessData, MAX_NUM_PARAMETERS, LOSSLESSDATA)
  ------------------
  |  |  149|  14.7k|  if (((a) = (type*)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (149:7): [True: 0, False: 7.39k]
  |  |  |  Branch (149:40): [True: 7.39k, Folded]
  |  |  ------------------
  |  |  150|      0|    goto bail;                                                          \
  |  |  151|      0|  }
  ------------------
 2128|  7.39k|  FDK_ALLOCATE_MEMORY_1D(pBs->ICCLosslessData, MAX_NUM_PARAMETERS, LOSSLESSDATA)
  ------------------
  |  |  149|  14.7k|  if (((a) = (type*)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (149:7): [True: 0, False: 7.39k]
  |  |  |  Branch (149:40): [True: 7.39k, Folded]
  |  |  ------------------
  |  |  150|      0|    goto bail;                                                          \
  |  |  151|      0|  }
  ------------------
 2129|       |
 2130|  7.39k|  FDK_ALLOCATE_MEMORY_1D(pBs->IPDLosslessData, MAX_NUM_PARAMETERS, LOSSLESSDATA)
  ------------------
  |  |  149|  14.7k|  if (((a) = (type*)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (149:7): [True: 0, False: 7.39k]
  |  |  |  Branch (149:40): [True: 7.39k, Folded]
  |  |  ------------------
  |  |  150|      0|    goto bail;                                                          \
  |  |  151|      0|  }
  ------------------
 2131|       |
 2132|  7.39k|  pBs->newBsData = 0;
 2133|  7.39k|  pBs->numParameterSets = 1;
 2134|       |
 2135|       |  /* Link lossless states */
 2136|  51.7k|  for (int x = 0; x < MAX_NUM_PARAMETERS; x++) {
  ------------------
  |  |  154|  51.7k|#define MAX_NUM_PARAMETERS (MAX(MAX_NUM_PARAMS, MAX_NUM_OTT))
  |  |  ------------------
  |  |  |  |  123|  51.7k|#define MAX(a, b) ((a) > (b) ? (a) : (b))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (123:20): [True: 51.7k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (2136:19): [True: 44.3k, False: 7.39k]
  ------------------
 2137|  44.3k|    pBs->CLDLosslessData[x].state = &llState->CLDLosslessState[x];
 2138|  44.3k|    pBs->ICCLosslessData[x].state = &llState->ICCLosslessState[x];
 2139|       |
 2140|  44.3k|    pBs->IPDLosslessData[x].state = &llState->IPDLosslessState[x];
 2141|  44.3k|  }
 2142|       |
 2143|  7.39k|  return MPS_OK;
 2144|       |
 2145|      0|bail:
 2146|      0|  return MPS_OUTOFMEMORY;
 2147|  7.39k|}
_Z22SpatialDecCloseBsFrameP23SPATIAL_BS_FRAME_struct:
 2160|  7.39k|void SpatialDecCloseBsFrame(SPATIAL_BS_FRAME *pBs) {
 2161|  7.39k|  if (pBs != NULL) {
  ------------------
  |  Branch (2161:7): [True: 7.39k, False: 0]
  ------------------
 2162|       |    /* These arrays contain the compact indices, only one value per pbstride,
 2163|       |     * only paramsets actually containing data. */
 2164|       |
 2165|  7.39k|    FDK_FREE_MEMORY_1D(pBs->cmpOttIPDidx);
  ------------------
  |  |  171|  7.39k|  do {                           \
  |  |  172|  7.39k|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|  7.39k|    (a) = NULL;                  \
  |  |  174|  7.39k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 7.39k]
  |  |  ------------------
  ------------------
 2166|       |
 2167|       |    /* Arbitrary Downmix */
 2168|  7.39k|    FDK_FREE_MEMORY_1D(pBs->cmpArbdmxGainIdx);
  ------------------
  |  |  171|  7.39k|  do {                           \
  |  |  172|  7.39k|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|  7.39k|    (a) = NULL;                  \
  |  |  174|  7.39k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 7.39k]
  |  |  ------------------
  ------------------
 2169|       |
 2170|       |    /* Lossless control */
 2171|  7.39k|    FDK_FREE_MEMORY_1D(pBs->IPDLosslessData);
  ------------------
  |  |  171|  7.39k|  do {                           \
  |  |  172|  7.39k|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|  7.39k|    (a) = NULL;                  \
  |  |  174|  7.39k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 7.39k]
  |  |  ------------------
  ------------------
 2172|  7.39k|    FDK_FREE_MEMORY_1D(pBs->CLDLosslessData);
  ------------------
  |  |  171|  7.39k|  do {                           \
  |  |  172|  7.39k|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|  7.39k|    (a) = NULL;                  \
  |  |  174|  7.39k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 7.39k]
  |  |  ------------------
  ------------------
 2173|       |    FDK_FREE_MEMORY_1D(pBs->ICCLosslessData);
  ------------------
  |  |  171|  7.39k|  do {                           \
  |  |  172|  7.39k|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|  7.39k|    (a) = NULL;                  \
  |  |  174|  7.39k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 7.39k]
  |  |  ------------------
  ------------------
 2174|  7.39k|  }
 2175|  7.39k|}
sac_bitdec.cpp:_ZL26SpatialDecDecodeHelperInfoP25T_SPATIAL_SPECIFIC_CONFIG9UPMIXTYPE:
  119|    677|    SPATIAL_SPECIFIC_CONFIG *pSpatialSpecificConfig, UPMIXTYPE upmixType) {
  120|    677|  int i;
  121|    677|  UINT syntaxFlags;
  122|       |
  123|       |  /* Determine bit stream syntax */
  124|    677|  syntaxFlags = 0;
  125|    677|  switch (pSpatialSpecificConfig->coreCodec) {
  126|    571|    case AOT_ER_AAC_ELD:
  ------------------
  |  Branch (126:5): [True: 571, False: 106]
  ------------------
  127|    571|    case AOT_ER_AAC_LD:
  ------------------
  |  Branch (127:5): [True: 0, False: 677]
  ------------------
  128|    571|      syntaxFlags |= SACDEC_SYNTAX_LD;
  ------------------
  |  |  536|    571|#define SACDEC_SYNTAX_LD 32
  ------------------
  129|    571|      break;
  130|    106|    case AOT_USAC:
  ------------------
  |  Branch (130:5): [True: 106, False: 571]
  ------------------
  131|    106|      syntaxFlags |= SACDEC_SYNTAX_USAC;
  ------------------
  |  |  532|    106|#define SACDEC_SYNTAX_USAC 2
  ------------------
  132|    106|      break;
  133|      0|    case AOT_NONE:
  ------------------
  |  Branch (133:5): [True: 0, False: 677]
  ------------------
  134|      0|    default:
  ------------------
  |  Branch (134:5): [True: 0, False: 677]
  ------------------
  135|      0|      return MPS_UNSUPPORTED_FORMAT;
  136|    677|  }
  137|       |
  138|    677|  pSpatialSpecificConfig->syntaxFlags = syntaxFlags;
  139|       |
  140|    677|  switch (pSpatialSpecificConfig->treeConfig) {
  141|    677|    case TREE_212: {
  ------------------
  |  Branch (141:5): [True: 677, False: 0]
  ------------------
  142|    677|      pSpatialSpecificConfig->ottCLDdefault[0] = 0;
  143|    677|    } break;
  144|      0|    default:
  ------------------
  |  Branch (144:5): [True: 0, False: 677]
  ------------------
  145|      0|      return MPS_INVALID_TREECONFIG;
  146|    677|  }
  147|       |
  148|    677|  if (syntaxFlags & SACDEC_SYNTAX_USAC) {
  ------------------
  |  |  532|    677|#define SACDEC_SYNTAX_USAC 2
  ------------------
  |  Branch (148:7): [True: 106, False: 571]
  ------------------
  149|    106|    if (pSpatialSpecificConfig->bsOttBandsPhasePresent) {
  ------------------
  |  Branch (149:9): [True: 10, False: 96]
  ------------------
  150|     10|      pSpatialSpecificConfig->numOttBandsIPD =
  151|     10|          pSpatialSpecificConfig->bsOttBandsPhase;
  152|     96|    } else {
  153|     96|      int numParameterBands;
  154|       |
  155|     96|      numParameterBands = pSpatialSpecificConfig->freqRes;
  156|     96|      switch (numParameterBands) {
  157|      7|        case 4:
  ------------------
  |  Branch (157:9): [True: 7, False: 89]
  ------------------
  158|     10|        case 5:
  ------------------
  |  Branch (158:9): [True: 3, False: 93]
  ------------------
  159|     10|          pSpatialSpecificConfig->numOttBandsIPD = 2;
  160|     10|          break;
  161|      3|        case 7:
  ------------------
  |  Branch (161:9): [True: 3, False: 93]
  ------------------
  162|      3|          pSpatialSpecificConfig->numOttBandsIPD = 3;
  163|      3|          break;
  164|     65|        case 10:
  ------------------
  |  Branch (164:9): [True: 65, False: 31]
  ------------------
  165|     65|          pSpatialSpecificConfig->numOttBandsIPD = 5;
  166|     65|          break;
  167|      5|        case 14:
  ------------------
  |  Branch (167:9): [True: 5, False: 91]
  ------------------
  168|      5|          pSpatialSpecificConfig->numOttBandsIPD = 7;
  169|      5|          break;
  170|      6|        case 20:
  ------------------
  |  Branch (170:9): [True: 6, False: 90]
  ------------------
  171|     13|        case 28:
  ------------------
  |  Branch (171:9): [True: 7, False: 89]
  ------------------
  172|     13|          pSpatialSpecificConfig->numOttBandsIPD = 10;
  173|     13|          break;
  174|      0|        default:
  ------------------
  |  Branch (174:9): [True: 0, False: 96]
  ------------------
  175|      0|          return MPS_INVALID_PARAMETERBANDS;
  176|     96|      }
  177|     96|    }
  178|    571|  } else {
  179|    571|    pSpatialSpecificConfig->numOttBandsIPD = 0;
  180|    571|  }
  181|  1.35k|  for (i = 0; i < pSpatialSpecificConfig->nOttBoxes; i++) {
  ------------------
  |  Branch (181:15): [True: 677, False: 677]
  ------------------
  182|    677|    {
  183|    677|      pSpatialSpecificConfig->bitstreamOttBands[i] =
  184|    677|          pSpatialSpecificConfig->freqRes;
  185|    677|    }
  186|    677|    {
  187|    677|      pSpatialSpecificConfig->numOttBands[i] =
  188|    677|          pSpatialSpecificConfig->bitstreamOttBands[i];
  189|    677|      if (syntaxFlags & SACDEC_SYNTAX_USAC &&
  ------------------
  |  |  532|  1.35k|#define SACDEC_SYNTAX_USAC 2
  ------------------
  |  Branch (189:11): [True: 106, False: 571]
  ------------------
  190|    106|          !pSpatialSpecificConfig->bsOttBandsPhasePresent) {
  ------------------
  |  Branch (190:11): [True: 96, False: 10]
  ------------------
  191|     96|        if (pSpatialSpecificConfig->bResidualCoding &&
  ------------------
  |  Branch (191:13): [True: 65, False: 31]
  ------------------
  192|     65|            pSpatialSpecificConfig->ResidualConfig[i].bResidualPresent &&
  ------------------
  |  Branch (192:13): [True: 65, False: 0]
  ------------------
  193|     65|            (pSpatialSpecificConfig->numOttBandsIPD <
  ------------------
  |  Branch (193:13): [True: 8, False: 57]
  ------------------
  194|     65|             pSpatialSpecificConfig->ResidualConfig[i].nResidualBands)) {
  195|      8|          pSpatialSpecificConfig->numOttBandsIPD =
  196|      8|              pSpatialSpecificConfig->ResidualConfig[i].nResidualBands;
  197|      8|        }
  198|     96|      }
  199|    677|    }
  200|    677|  } /* i */
  201|       |
  202|    677|  return MPS_OK;
  203|    677|}
sac_bitdec.cpp:_ZL30SpatialDecParseExtensionConfigP13FDK_BITSTREAMP25T_SPATIAL_SPECIFIC_CONFIGiiii:
  219|    571|    int numOttBoxes, int numTttBoxes, int numOutChan, int bitsAvailable) {
  220|    571|  SACDEC_ERROR err = MPS_OK;
  221|    571|  INT ba = bitsAvailable;
  222|       |
  223|    571|  config->sacExtCnt = 0;
  224|    571|  config->bResidualCoding = 0;
  225|       |
  226|    571|  ba = fMin((int)FDKgetValidBits(bitstream), ba);
  227|       |
  228|  1.10k|  while ((ba >= 8) && (config->sacExtCnt < MAX_NUM_EXT_TYPES)) {
  ------------------
  |  |  117|    646|#define MAX_NUM_EXT_TYPES (8)
  ------------------
  |  Branch (228:10): [True: 646, False: 462]
  |  Branch (228:23): [True: 588, False: 58]
  ------------------
  229|    588|    int bitsRead, nFillBits;
  230|    588|    INT tmp;
  231|    588|    UINT sacExtLen;
  232|       |
  233|    588|    config->sacExtType[config->sacExtCnt] = FDKreadBits(bitstream, 4);
  234|    588|    ba -= 4;
  235|       |
  236|    588|    sacExtLen = FDKreadBits(bitstream, 4);
  237|    588|    ba -= 4;
  238|       |
  239|    588|    if (sacExtLen == 15) {
  ------------------
  |  Branch (239:9): [True: 76, False: 512]
  ------------------
  240|     76|      sacExtLen += FDKreadBits(bitstream, 8);
  241|     76|      ba -= 8;
  242|     76|      if (sacExtLen == 15 + 255) {
  ------------------
  |  Branch (242:11): [True: 13, False: 63]
  ------------------
  243|     13|        sacExtLen += FDKreadBits(bitstream, 16);
  244|     13|        ba -= 16;
  245|     13|      }
  246|     76|    }
  247|       |
  248|    588|    tmp = (INT)FDKgetValidBits(
  249|    588|        bitstream); /* Extension config payload start anchor. */
  250|    588|    if ((tmp <= 0) || (tmp < (INT)sacExtLen * 8) || (ba < (INT)sacExtLen * 8)) {
  ------------------
  |  Branch (250:9): [True: 24, False: 564]
  |  Branch (250:23): [True: 18, False: 546]
  |  Branch (250:53): [True: 9, False: 537]
  ------------------
  251|     51|      err = MPS_PARSE_ERROR;
  252|     51|      goto bail;
  253|     51|    }
  254|       |
  255|    537|    switch (config->sacExtType[config->sacExtCnt]) {
  256|    537|      default:; /* unknown extension data => do nothing */
  ------------------
  |  Branch (256:7): [True: 537, False: 0]
  ------------------
  257|    537|    }
  258|       |
  259|       |    /* skip remaining extension data */
  260|    537|    bitsRead = tmp - FDKgetValidBits(bitstream);
  261|    537|    nFillBits = 8 * sacExtLen - bitsRead;
  262|       |
  263|    537|    if (nFillBits < 0) {
  ------------------
  |  Branch (263:9): [True: 0, False: 537]
  ------------------
  264|      0|      err = MPS_PARSE_ERROR;
  265|      0|      goto bail;
  266|    537|    } else {
  267|       |      /* Skip fill bits or an unkown extension. */
  268|    537|      FDKpushFor(bitstream, nFillBits);
  269|    537|    }
  270|       |
  271|    537|    ba -= 8 * sacExtLen;
  272|    537|    config->sacExtCnt++;
  273|    537|  }
  274|       |
  275|    571|bail:
  276|    571|  return err;
  277|    571|}

FDK_SpatialDecCompareSpatialSpecificConfigHeader:
  158|    218|    SPATIAL_SPECIFIC_CONFIG *pSsc1, SPATIAL_SPECIFIC_CONFIG *pSsc2) {
  159|    218|  int result = MPS_OK;
  160|       |
  161|       |  /* we assume: every bit must be equal */
  162|    218|  if (FDKmemcmp(pSsc1, pSsc2, sizeof(SPATIAL_SPECIFIC_CONFIG)) != 0) {
  ------------------
  |  Branch (162:7): [True: 218, False: 0]
  ------------------
  163|    218|    result = MPS_UNEQUAL_SSC;
  164|    218|  }
  165|    218|  return result;
  166|    218|}
FDK_SpatialDecOpen:
  240|     92|                               int stereoConfigIndex) {
  241|     92|  int i;
  242|     92|  int lfSize, hfSize;
  243|     92|  spatialDec *self = NULL;
  244|     92|  SACDEC_CREATION_PARAMS setup;
  245|       |
  246|     92|  switch (config->decoderLevel) {
  247|     92|    case DECODER_LEVEL_0: /* 212 maxNumOutputChannels== 2 */
  ------------------
  |  Branch (247:5): [True: 92, False: 0]
  ------------------
  248|     92|      setup.maxNumInputChannels = 1;
  249|     92|      setup.maxNumOutputChannels = 2;
  250|     92|      setup.maxNumQmfBands = 64;
  251|     92|      setup.maxNumXChannels = 2;
  252|     92|      setup.maxNumVChannels = 2;
  253|     92|      setup.maxNumDecorChannels = 1;
  254|     92|      setup.bProcResidual = 1;
  255|     92|      setup.maxNumResidualChannels = 0;
  256|     92|      setup.maxNumOttBoxes = 1;
  257|     92|      setup.maxNumParams = setup.maxNumInputChannels + setup.maxNumOttBoxes;
  258|     92|      break;
  259|      0|    default:
  ------------------
  |  Branch (259:5): [True: 0, False: 92]
  ------------------
  260|      0|      return NULL;
  261|     92|  }
  262|       |
  263|     92|  setup.maxNumResChannels = 1;
  264|       |
  265|     92|  {
  266|     92|    switch (config->maxNumOutputChannels) {
  267|      0|      case OUTPUT_CHANNELS_2_0:
  ------------------
  |  Branch (267:7): [True: 0, False: 92]
  ------------------
  268|      0|        setup.maxNumOutputChannels = fMin(setup.maxNumOutputChannels, 2);
  269|      0|        break;
  270|     92|      case OUTPUT_CHANNELS_DEFAULT:
  ------------------
  |  Branch (270:7): [True: 92, False: 0]
  ------------------
  271|     92|      default:
  ------------------
  |  Branch (271:7): [True: 0, False: 92]
  ------------------
  272|     92|        break;
  273|     92|    }
  274|     92|  }
  275|       |
  276|     92|  setup.maxNumHybridBands = SacGetHybridSubbands(setup.maxNumQmfBands);
  277|       |
  278|     92|  switch (config->decoderMode) {
  279|     92|    case EXT_HQ_ONLY:
  ------------------
  |  Branch (279:5): [True: 92, False: 0]
  ------------------
  280|     92|      setup.maxNumCmplxQmfBands = setup.maxNumQmfBands;
  281|     92|      setup.maxNumCmplxHybBands = setup.maxNumHybridBands;
  282|     92|      break;
  283|      0|    default:
  ------------------
  |  Branch (283:5): [True: 0, False: 92]
  ------------------
  284|      0|      setup.maxNumCmplxQmfBands = fixMax(PC_NUM_BANDS, setup.maxNumQmfBands);
  ------------------
  |  |  307|      0|#define fixMax(a, b) fMax(a, b)
  ------------------
  285|      0|      setup.maxNumCmplxHybBands =
  286|      0|          fixMax(PC_NUM_HYB_BANDS, setup.maxNumHybridBands);
  ------------------
  |  |  307|      0|#define fixMax(a, b) fMax(a, b)
  ------------------
  287|      0|      break;
  288|     92|  } /* switch config->decoderMode */
  289|       |
  290|     92|  FDK_ALLOCATE_MEMORY_1D_INT(self, 1, spatialDec, SECT_DATA_L2)
  ------------------
  |  |  165|     92|  if (((a) = (type*)fdkCallocMatrix1D_int((dim1), sizeof(type), (s))) == \
  |  |  ------------------
  |  |  |  Branch (165:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  166|     92|      NULL) {                                                            \
  |  |  167|      0|    goto bail;                                                           \
  |  |  168|      0|  }
  ------------------
  291|       |
  292|     92|  self->createParams = setup;
  293|       |
  294|     92|  FDK_ALLOCATE_MEMORY_1D(self->param2hyb, MAX_PARAMETER_BANDS + 1, int)
  ------------------
  |  |  149|     92|  if (((a) = (type*)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (149:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  150|      0|    goto bail;                                                          \
  |  |  151|      0|  }
  ------------------
  295|       |
  296|     92|  FDK_ALLOCATE_MEMORY_1D(self->numOttBands, setup.maxNumOttBoxes, int)
  ------------------
  |  |  149|     92|  if (((a) = (type*)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (149:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  150|      0|    goto bail;                                                          \
  |  |  151|      0|  }
  ------------------
  297|       |
  298|       |  /* allocate arrays */
  299|       |
  300|     92|  FDK_ALLOCATE_MEMORY_1D(self->smgTime, MAX_PARAMETER_SETS, int)
  ------------------
  |  |  149|     92|  if (((a) = (type*)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (149:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  150|      0|    goto bail;                                                          \
  |  |  151|      0|  }
  ------------------
  301|     92|  FDK_ALLOCATE_MEMORY_2D(self->smgData, MAX_PARAMETER_SETS, MAX_PARAMETER_BANDS,
  ------------------
  |  |  183|     92|  if (((a) = (type**)fdkCallocMatrix2D((dim1), (dim2), sizeof(type))) == \
  |  |  ------------------
  |  |  |  Branch (183:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  184|     92|      NULL) {                                                            \
  |  |  185|      0|    goto bail;                                                           \
  |  |  186|      0|  }
  ------------------
  302|     92|                         UCHAR)
  303|       |
  304|     92|  FDK_ALLOCATE_MEMORY_3D(self->ottCLD__FDK, setup.maxNumOttBoxes,
  ------------------
  |  |  213|     92|  if (((a) = (type***)fdkCallocMatrix3D((dim1), (dim2), (dim3),   \
  |  |  ------------------
  |  |  |  Branch (213:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  214|     92|                                        sizeof(type))) == NULL) { \
  |  |  215|      0|    goto bail;                                                    \
  |  |  216|      0|  }
  ------------------
  305|     92|                         MAX_PARAMETER_SETS, MAX_PARAMETER_BANDS, SCHAR)
  306|     92|  FDK_ALLOCATE_MEMORY_3D(self->ottICC__FDK, setup.maxNumOttBoxes,
  ------------------
  |  |  213|     92|  if (((a) = (type***)fdkCallocMatrix3D((dim1), (dim2), (dim3),   \
  |  |  ------------------
  |  |  |  Branch (213:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  214|     92|                                        sizeof(type))) == NULL) { \
  |  |  215|      0|    goto bail;                                                    \
  |  |  216|      0|  }
  ------------------
  307|     92|                         MAX_PARAMETER_SETS, MAX_PARAMETER_BANDS, SCHAR)
  308|     92|  FDK_ALLOCATE_MEMORY_3D(self->ottIPD__FDK, setup.maxNumOttBoxes,
  ------------------
  |  |  213|     92|  if (((a) = (type***)fdkCallocMatrix3D((dim1), (dim2), (dim3),   \
  |  |  ------------------
  |  |  |  Branch (213:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  214|     92|                                        sizeof(type))) == NULL) { \
  |  |  215|      0|    goto bail;                                                    \
  |  |  216|      0|  }
  ------------------
  309|     92|                         MAX_PARAMETER_SETS, MAX_PARAMETER_BANDS, SCHAR)
  310|       |
  311|       |  /* Last parameters from prev frame */
  312|     92|  FDK_ALLOCATE_MEMORY_2D(self->ottCLDidxPrev, setup.maxNumOttBoxes,
  ------------------
  |  |  183|     92|  if (((a) = (type**)fdkCallocMatrix2D((dim1), (dim2), sizeof(type))) == \
  |  |  ------------------
  |  |  |  Branch (183:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  184|     92|      NULL) {                                                            \
  |  |  185|      0|    goto bail;                                                           \
  |  |  186|      0|  }
  ------------------
  313|     92|                         MAX_PARAMETER_BANDS, SCHAR)
  314|     92|  FDK_ALLOCATE_MEMORY_2D(self->ottICCidxPrev, setup.maxNumOttBoxes,
  ------------------
  |  |  183|     92|  if (((a) = (type**)fdkCallocMatrix2D((dim1), (dim2), sizeof(type))) == \
  |  |  ------------------
  |  |  |  Branch (183:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  184|     92|      NULL) {                                                            \
  |  |  185|      0|    goto bail;                                                           \
  |  |  186|      0|  }
  ------------------
  315|     92|                         MAX_PARAMETER_BANDS, SCHAR)
  316|     92|  FDK_ALLOCATE_MEMORY_3D(self->ottICCdiffidx, setup.maxNumOttBoxes,
  ------------------
  |  |  213|     92|  if (((a) = (type***)fdkCallocMatrix3D((dim1), (dim2), (dim3),   \
  |  |  ------------------
  |  |  |  Branch (213:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  214|     92|                                        sizeof(type))) == NULL) { \
  |  |  215|      0|    goto bail;                                                    \
  |  |  216|      0|  }
  ------------------
  317|     92|                         MAX_PARAMETER_SETS, MAX_PARAMETER_BANDS, SCHAR)
  318|     92|  FDK_ALLOCATE_MEMORY_2D(self->ottIPDidxPrev, setup.maxNumOttBoxes,
  ------------------
  |  |  183|     92|  if (((a) = (type**)fdkCallocMatrix2D((dim1), (dim2), sizeof(type))) == \
  |  |  ------------------
  |  |  |  Branch (183:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  184|     92|      NULL) {                                                            \
  |  |  185|      0|    goto bail;                                                           \
  |  |  186|      0|  }
  ------------------
  319|     92|                         MAX_PARAMETER_BANDS, SCHAR)
  320|     92|  FDK_ALLOCATE_MEMORY_2D(self->arbdmxGainIdxPrev, setup.maxNumInputChannels,
  ------------------
  |  |  183|     92|  if (((a) = (type**)fdkCallocMatrix2D((dim1), (dim2), sizeof(type))) == \
  |  |  ------------------
  |  |  |  Branch (183:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  184|     92|      NULL) {                                                            \
  |  |  185|      0|    goto bail;                                                           \
  |  |  186|      0|  }
  ------------------
  321|     92|                         MAX_PARAMETER_BANDS, SCHAR)
  322|     92|  FDK_ALLOCATE_MEMORY_2D(self->cmpOttCLDidxPrev, setup.maxNumOttBoxes,
  ------------------
  |  |  183|     92|  if (((a) = (type**)fdkCallocMatrix2D((dim1), (dim2), sizeof(type))) == \
  |  |  ------------------
  |  |  |  Branch (183:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  184|     92|      NULL) {                                                            \
  |  |  185|      0|    goto bail;                                                           \
  |  |  186|      0|  }
  ------------------
  323|     92|                         MAX_PARAMETER_BANDS, SCHAR)
  324|     92|  FDK_ALLOCATE_MEMORY_2D(self->cmpOttICCidxPrev, setup.maxNumOttBoxes,
  ------------------
  |  |  183|     92|  if (((a) = (type**)fdkCallocMatrix2D((dim1), (dim2), sizeof(type))) == \
  |  |  ------------------
  |  |  |  Branch (183:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  184|     92|      NULL) {                                                            \
  |  |  185|      0|    goto bail;                                                           \
  |  |  186|      0|  }
  ------------------
  325|     92|                         MAX_PARAMETER_BANDS, SCHAR)
  326|     92|  FDK_ALLOCATE_MEMORY_3D(self->outIdxData, setup.maxNumOttBoxes,
  ------------------
  |  |  213|     92|  if (((a) = (type***)fdkCallocMatrix3D((dim1), (dim2), (dim3),   \
  |  |  ------------------
  |  |  |  Branch (213:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  214|     92|                                        sizeof(type))) == NULL) { \
  |  |  215|      0|    goto bail;                                                    \
  |  |  216|      0|  }
  ------------------
  327|     92|                         MAX_PARAMETER_SETS, MAX_PARAMETER_BANDS, SCHAR)
  328|       |
  329|     92|  FDK_ALLOCATE_MEMORY_3D(self->arbdmxGain__FDK, setup.maxNumInputChannels,
  ------------------
  |  |  213|     92|  if (((a) = (type***)fdkCallocMatrix3D((dim1), (dim2), (dim3),   \
  |  |  ------------------
  |  |  |  Branch (213:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  214|     92|                                        sizeof(type))) == NULL) { \
  |  |  215|      0|    goto bail;                                                    \
  |  |  216|      0|  }
  ------------------
  330|     92|                         MAX_PARAMETER_SETS, MAX_PARAMETER_BANDS, SCHAR)
  331|     92|  FDK_ALLOCATE_MEMORY_1D(self->arbdmxAlpha__FDK, setup.maxNumInputChannels,
  ------------------
  |  |  149|     92|  if (((a) = (type*)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (149:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  150|      0|    goto bail;                                                          \
  |  |  151|      0|  }
  ------------------
  332|     92|                         FIXP_DBL)
  333|     92|  FDK_ALLOCATE_MEMORY_1D(self->arbdmxAlphaPrev__FDK, setup.maxNumInputChannels,
  ------------------
  |  |  149|     92|  if (((a) = (type*)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (149:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  150|      0|    goto bail;                                                          \
  |  |  151|      0|  }
  ------------------
  334|     92|                         FIXP_DBL)
  335|     92|  FDK_ALLOCATE_MEMORY_2D(self->cmpArbdmxGainIdxPrev, setup.maxNumInputChannels,
  ------------------
  |  |  183|     92|  if (((a) = (type**)fdkCallocMatrix2D((dim1), (dim2), sizeof(type))) == \
  |  |  ------------------
  |  |  |  Branch (183:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  184|     92|      NULL) {                                                            \
  |  |  185|      0|    goto bail;                                                           \
  |  |  186|      0|  }
  ------------------
  336|     92|                         MAX_PARAMETER_BANDS, SCHAR)
  337|       |
  338|     92|  FDK_ALLOCATE_MEMORY_2D(self->cmpOttIPDidxPrev, setup.maxNumOttBoxes,
  ------------------
  |  |  183|     92|  if (((a) = (type**)fdkCallocMatrix2D((dim1), (dim2), sizeof(type))) == \
  |  |  ------------------
  |  |  |  Branch (183:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  184|     92|      NULL) {                                                            \
  |  |  185|      0|    goto bail;                                                           \
  |  |  186|      0|  }
  ------------------
  339|     92|                         MAX_PARAMETER_BANDS, SCHAR)
  340|       |
  341|     92|  FDK_ALLOCATE_MEMORY_3D_INT(self->M2Real__FDK, setup.maxNumOutputChannels,
  ------------------
  |  |  219|     92|  if (((a) = (type***)fdkCallocMatrix3D_int((dim1), (dim2), (dim3),        \
  |  |  ------------------
  |  |  |  Branch (219:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  220|     92|                                            sizeof(type), (s))) == NULL) { \
  |  |  221|      0|    goto bail;                                                             \
  |  |  222|      0|  }
  ------------------
  342|     92|                             setup.maxNumVChannels, MAX_PARAMETER_BANDS,
  343|     92|                             FIXP_DBL, SECT_DATA_L2)
  344|     92|  FDK_ALLOCATE_MEMORY_3D(self->M2Imag__FDK, setup.maxNumOutputChannels,
  ------------------
  |  |  213|     92|  if (((a) = (type***)fdkCallocMatrix3D((dim1), (dim2), (dim3),   \
  |  |  ------------------
  |  |  |  Branch (213:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  214|     92|                                        sizeof(type))) == NULL) { \
  |  |  215|      0|    goto bail;                                                    \
  |  |  216|      0|  }
  ------------------
  345|     92|                         setup.maxNumVChannels, MAX_PARAMETER_BANDS, FIXP_DBL)
  346|       |
  347|     92|  FDK_ALLOCATE_MEMORY_3D_INT(self->M2RealPrev__FDK, setup.maxNumOutputChannels,
  ------------------
  |  |  219|     92|  if (((a) = (type***)fdkCallocMatrix3D_int((dim1), (dim2), (dim3),        \
  |  |  ------------------
  |  |  |  Branch (219:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  220|     92|                                            sizeof(type), (s))) == NULL) { \
  |  |  221|      0|    goto bail;                                                             \
  |  |  222|      0|  }
  ------------------
  348|     92|                             setup.maxNumVChannels, MAX_PARAMETER_BANDS,
  349|     92|                             FIXP_DBL, SECT_DATA_L2)
  350|     92|  FDK_ALLOCATE_MEMORY_3D(self->M2ImagPrev__FDK, setup.maxNumOutputChannels,
  ------------------
  |  |  213|     92|  if (((a) = (type***)fdkCallocMatrix3D((dim1), (dim2), (dim3),   \
  |  |  ------------------
  |  |  |  Branch (213:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  214|     92|                                        sizeof(type))) == NULL) { \
  |  |  215|      0|    goto bail;                                                    \
  |  |  216|      0|  }
  ------------------
  351|     92|                         setup.maxNumVChannels, MAX_PARAMETER_BANDS, FIXP_DBL)
  352|       |
  353|     92|  FDK_ALLOCATE_MEMORY_2D_INT_ALIGNED(
  ------------------
  |  |  195|     92|  if (((a) = (type**)fdkCallocMatrix2D_int_aligned(                \
  |  |  ------------------
  |  |  |  Branch (195:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  196|     92|           (dim1), (dim2), sizeof(type), (s))) == NULL) {          \
  |  |  197|      0|    goto bail;                                                     \
  |  |  198|      0|  }
  ------------------
  354|     92|      self->qmfInputReal__FDK, setup.maxNumInputChannels, setup.maxNumQmfBands,
  355|     92|      FIXP_DBL, SECT_DATA_L2)
  356|     92|  FDK_ALLOCATE_MEMORY_2D_INT_ALIGNED(
  ------------------
  |  |  195|     92|  if (((a) = (type**)fdkCallocMatrix2D_int_aligned(                \
  |  |  ------------------
  |  |  |  Branch (195:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  196|     92|           (dim1), (dim2), sizeof(type), (s))) == NULL) {          \
  |  |  197|      0|    goto bail;                                                     \
  |  |  198|      0|  }
  ------------------
  357|     92|      self->qmfInputImag__FDK, setup.maxNumInputChannels,
  358|     92|      setup.maxNumCmplxQmfBands, FIXP_DBL, SECT_DATA_L2)
  359|       |
  360|     92|  FDK_ALLOCATE_MEMORY_2D_INT(self->hybInputReal__FDK, setup.maxNumInputChannels,
  ------------------
  |  |  189|     92|  if (((a) = (type**)fdkCallocMatrix2D_int((dim1), (dim2), sizeof(type), \
  |  |  ------------------
  |  |  |  Branch (189:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  190|     92|                                           (s))) == NULL) {              \
  |  |  191|      0|    goto bail;                                                           \
  |  |  192|      0|  }
  ------------------
  361|     92|                             setup.maxNumHybridBands, FIXP_DBL, SECT_DATA_L2)
  362|     92|  FDK_ALLOCATE_MEMORY_2D_INT(self->hybInputImag__FDK, setup.maxNumInputChannels,
  ------------------
  |  |  189|     92|  if (((a) = (type**)fdkCallocMatrix2D_int((dim1), (dim2), sizeof(type), \
  |  |  ------------------
  |  |  |  Branch (189:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  190|     92|                                           (s))) == NULL) {              \
  |  |  191|      0|    goto bail;                                                           \
  |  |  192|      0|  }
  ------------------
  363|     92|                             setup.maxNumCmplxHybBands, FIXP_DBL, SECT_DATA_L2)
  364|       |
  365|     92|  if (setup.bProcResidual) {
  ------------------
  |  Branch (365:7): [True: 92, False: 0]
  ------------------
  366|     92|    FDK_ALLOCATE_MEMORY_1D(self->qmfResidualReal__FDK, setup.maxNumResChannels,
  ------------------
  |  |  149|     92|  if (((a) = (type*)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (149:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  150|      0|    goto bail;                                                          \
  |  |  151|      0|  }
  ------------------
  367|     92|                           FIXP_DBL **)
  368|     92|    FDK_ALLOCATE_MEMORY_1D(self->qmfResidualImag__FDK, setup.maxNumResChannels,
  ------------------
  |  |  149|     92|  if (((a) = (type*)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (149:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  150|      0|    goto bail;                                                          \
  |  |  151|      0|  }
  ------------------
  369|     92|                           FIXP_DBL **)
  370|       |
  371|     92|    FDK_ALLOCATE_MEMORY_1D(self->hybResidualReal__FDK, setup.maxNumResChannels,
  ------------------
  |  |  149|     92|  if (((a) = (type*)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (149:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  150|      0|    goto bail;                                                          \
  |  |  151|      0|  }
  ------------------
  372|     92|                           FIXP_DBL *)
  373|     92|    FDK_ALLOCATE_MEMORY_1D(self->hybResidualImag__FDK, setup.maxNumResChannels,
  ------------------
  |  |  149|     92|  if (((a) = (type*)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (149:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  150|      0|    goto bail;                                                          \
  |  |  151|      0|  }
  ------------------
  374|     92|                           FIXP_DBL *)
  375|       |
  376|    184|    for (i = 0; i < setup.maxNumResChannels; i++) {
  ------------------
  |  Branch (376:17): [True: 92, False: 92]
  ------------------
  377|     92|      int resQmfBands = (config->decoderMode == EXT_LP_ONLY)
  ------------------
  |  Branch (377:25): [True: 0, False: 92]
  ------------------
  378|     92|                            ? PC_NUM_BANDS
  ------------------
  |  |  139|      0|#define PC_NUM_BANDS (8)
  ------------------
  379|     92|                            : setup.maxNumQmfBands;
  380|     92|      int resHybBands = (config->decoderMode == EXT_LP_ONLY)
  ------------------
  |  Branch (380:25): [True: 0, False: 92]
  ------------------
  381|     92|                            ? PC_NUM_HYB_BANDS
  ------------------
  |  |  140|      0|#define PC_NUM_HYB_BANDS (PC_NUM_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |  139|      0|#define PC_NUM_BANDS (8)
  |  |  ------------------
  ------------------
  382|     92|                            : setup.maxNumHybridBands;
  383|       |      /* Alignment is needed for USAC residuals because QMF analysis directly
  384|       |       * writes to this buffer. */
  385|     92|      FDK_ALLOCATE_MEMORY_2D_INT_ALIGNED(self->qmfResidualReal__FDK[i], (1),
  ------------------
  |  |  195|     92|  if (((a) = (type**)fdkCallocMatrix2D_int_aligned(                \
  |  |  ------------------
  |  |  |  Branch (195:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  196|     92|           (dim1), (dim2), sizeof(type), (s))) == NULL) {          \
  |  |  197|      0|    goto bail;                                                     \
  |  |  198|      0|  }
  ------------------
  386|     92|                                         resQmfBands, FIXP_DBL, SECT_DATA_L1)
  387|     92|      FDK_ALLOCATE_MEMORY_2D_INT_ALIGNED(self->qmfResidualImag__FDK[i], (1),
  ------------------
  |  |  195|     92|  if (((a) = (type**)fdkCallocMatrix2D_int_aligned(                \
  |  |  ------------------
  |  |  |  Branch (195:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  196|     92|           (dim1), (dim2), sizeof(type), (s))) == NULL) {          \
  |  |  197|      0|    goto bail;                                                     \
  |  |  198|      0|  }
  ------------------
  388|     92|                                         resQmfBands, FIXP_DBL, SECT_DATA_L1)
  389|       |
  390|     92|      FDK_ALLOCATE_MEMORY_1D(self->hybResidualReal__FDK[i],
  ------------------
  |  |  149|     92|  if (((a) = (type*)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (149:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  150|      0|    goto bail;                                                          \
  |  |  151|      0|  }
  ------------------
  391|     92|                             setup.maxNumHybridBands, FIXP_DBL)
  392|     92|      FDK_ALLOCATE_MEMORY_1D(self->hybResidualImag__FDK[i], resHybBands,
  ------------------
  |  |  149|     92|  if (((a) = (type*)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (149:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  150|      0|    goto bail;                                                          \
  |  |  151|      0|  }
  ------------------
  393|     92|                             FIXP_DBL)
  394|     92|    }
  395|     92|  } /* if (setup.bProcResidual) */
  396|       |
  397|     92|  FDK_ALLOCATE_MEMORY_2D_INT(self->wReal__FDK, setup.maxNumVChannels,
  ------------------
  |  |  189|     92|  if (((a) = (type**)fdkCallocMatrix2D_int((dim1), (dim2), sizeof(type), \
  |  |  ------------------
  |  |  |  Branch (189:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  190|     92|                                           (s))) == NULL) {              \
  |  |  191|      0|    goto bail;                                                           \
  |  |  192|      0|  }
  ------------------
  398|     92|                             setup.maxNumHybridBands, FIXP_DBL, SECT_DATA_L2)
  399|     92|  FDK_ALLOCATE_MEMORY_2D_INT(self->wImag__FDK, setup.maxNumVChannels,
  ------------------
  |  |  189|     92|  if (((a) = (type**)fdkCallocMatrix2D_int((dim1), (dim2), sizeof(type), \
  |  |  ------------------
  |  |  |  Branch (189:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  190|     92|                                           (s))) == NULL) {              \
  |  |  191|      0|    goto bail;                                                           \
  |  |  192|      0|  }
  ------------------
  400|     92|                             setup.maxNumCmplxHybBands, FIXP_DBL, SECT_DATA_L2)
  401|       |
  402|     92|  FDK_ALLOCATE_MEMORY_2D_INT(self->hybOutputRealDry__FDK,
  ------------------
  |  |  189|     92|  if (((a) = (type**)fdkCallocMatrix2D_int((dim1), (dim2), sizeof(type), \
  |  |  ------------------
  |  |  |  Branch (189:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  190|     92|                                           (s))) == NULL) {              \
  |  |  191|      0|    goto bail;                                                           \
  |  |  192|      0|  }
  ------------------
  403|     92|                             setup.maxNumOutputChannels,
  404|     92|                             setup.maxNumHybridBands, FIXP_DBL, SECT_DATA_L2)
  405|     92|  FDK_ALLOCATE_MEMORY_2D_INT(self->hybOutputImagDry__FDK,
  ------------------
  |  |  189|     92|  if (((a) = (type**)fdkCallocMatrix2D_int((dim1), (dim2), sizeof(type), \
  |  |  ------------------
  |  |  |  Branch (189:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  190|     92|                                           (s))) == NULL) {              \
  |  |  191|      0|    goto bail;                                                           \
  |  |  192|      0|  }
  ------------------
  406|     92|                             setup.maxNumOutputChannels,
  407|     92|                             setup.maxNumCmplxHybBands, FIXP_DBL, SECT_DATA_L2)
  408|       |
  409|     92|  FDK_ALLOCATE_MEMORY_2D_INT(self->hybOutputRealWet__FDK,
  ------------------
  |  |  189|     92|  if (((a) = (type**)fdkCallocMatrix2D_int((dim1), (dim2), sizeof(type), \
  |  |  ------------------
  |  |  |  Branch (189:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  190|     92|                                           (s))) == NULL) {              \
  |  |  191|      0|    goto bail;                                                           \
  |  |  192|      0|  }
  ------------------
  410|     92|                             setup.maxNumOutputChannels,
  411|     92|                             setup.maxNumHybridBands, FIXP_DBL, SECT_DATA_L2)
  412|     92|  FDK_ALLOCATE_MEMORY_2D_INT(self->hybOutputImagWet__FDK,
  ------------------
  |  |  189|     92|  if (((a) = (type**)fdkCallocMatrix2D_int((dim1), (dim2), sizeof(type), \
  |  |  ------------------
  |  |  |  Branch (189:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  190|     92|                                           (s))) == NULL) {              \
  |  |  191|      0|    goto bail;                                                           \
  |  |  192|      0|  }
  ------------------
  413|     92|                             setup.maxNumOutputChannels,
  414|     92|                             setup.maxNumCmplxHybBands, FIXP_DBL, SECT_DATA_L2)
  415|       |
  416|     92|  FDK_ALLOCATE_MEMORY_1D(self->hybridSynthesis, setup.maxNumOutputChannels,
  ------------------
  |  |  149|     92|  if (((a) = (type*)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (149:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  150|      0|    goto bail;                                                          \
  |  |  151|      0|  }
  ------------------
  417|     92|                         FDK_SYN_HYB_FILTER)
  418|       |
  419|     92|  FDK_ALLOCATE_MEMORY_1D(
  ------------------
  |  |  149|    184|  if (((a) = (type*)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (149:7): [True: 0, False: 92]
  |  |  |  Branch (149:40): [True: 92, False: 0]
  |  |  ------------------
  |  |  150|      0|    goto bail;                                                          \
  |  |  151|      0|  }
  ------------------
  420|     92|      self->hybridAnalysis,
  421|     92|      setup.bProcResidual ? setup.maxNumInputChannels + setup.maxNumResChannels
  422|     92|                          : setup.maxNumInputChannels,
  423|     92|      FDK_ANA_HYB_FILTER)
  424|       |
  425|     92|  lfSize = 2 * BUFFER_LEN_LF * MAX_QMF_BANDS_TO_HYBRID;
  ------------------
  |  |  163|     92|#define BUFFER_LEN_LF (PROTO_LEN)
  |  |  ------------------
  |  |  |  |  162|     92|#define PROTO_LEN (13)
  |  |  ------------------
  ------------------
                lfSize = 2 * BUFFER_LEN_LF * MAX_QMF_BANDS_TO_HYBRID;
  ------------------
  |  |  161|     92|  (3) /* 3 bands are filtered again in "40 bands" case */
  ------------------
  426|     92|  {
  427|     92|    hfSize =
  428|     92|        BUFFER_LEN_HF * ((setup.maxNumQmfBands - MAX_QMF_BANDS_TO_HYBRID) +
  ------------------
  |  |  164|     92|#define BUFFER_LEN_HF ((PROTO_LEN - 1) / 2)
  |  |  ------------------
  |  |  |  |  162|     92|#define PROTO_LEN (13)
  |  |  ------------------
  ------------------
                      BUFFER_LEN_HF * ((setup.maxNumQmfBands - MAX_QMF_BANDS_TO_HYBRID) +
  ------------------
  |  |  161|     92|  (3) /* 3 bands are filtered again in "40 bands" case */
  ------------------
  429|     92|                         (setup.maxNumCmplxQmfBands - MAX_QMF_BANDS_TO_HYBRID));
  ------------------
  |  |  161|     92|  (3) /* 3 bands are filtered again in "40 bands" case */
  ------------------
  430|     92|  }
  431|       |
  432|     92|  FDK_ALLOCATE_MEMORY_2D_INT(self->pHybridAnaStatesLFdmx,
  ------------------
  |  |  189|     92|  if (((a) = (type**)fdkCallocMatrix2D_int((dim1), (dim2), sizeof(type), \
  |  |  ------------------
  |  |  |  Branch (189:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  190|     92|                                           (s))) == NULL) {              \
  |  |  191|      0|    goto bail;                                                           \
  |  |  192|      0|  }
  ------------------
  433|     92|                             setup.maxNumInputChannels, lfSize, FIXP_DBL,
  434|     92|                             SECT_DATA_L2) {
  435|     92|    FDK_ALLOCATE_MEMORY_2D(self->pHybridAnaStatesHFdmx,
  ------------------
  |  |  183|     92|  if (((a) = (type**)fdkCallocMatrix2D((dim1), (dim2), sizeof(type))) == \
  |  |  ------------------
  |  |  |  Branch (183:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  184|     92|      NULL) {                                                            \
  |  |  185|      0|    goto bail;                                                           \
  |  |  186|      0|  }
  ------------------
  436|     92|                           setup.maxNumInputChannels, hfSize, FIXP_DBL)
  437|     92|  }
  438|       |
  439|    184|  for (i = 0; i < setup.maxNumInputChannels; i++) {
  ------------------
  |  Branch (439:15): [True: 92, False: 92]
  ------------------
  440|     92|    FIXP_DBL *pHybridAnaStatesHFdmx;
  441|       |
  442|     92|    pHybridAnaStatesHFdmx = self->pHybridAnaStatesHFdmx[i];
  443|       |
  444|     92|    FDKhybridAnalysisOpen(&self->hybridAnalysis[i],
  445|     92|                          self->pHybridAnaStatesLFdmx[i],
  446|     92|                          lfSize * sizeof(FIXP_DBL), pHybridAnaStatesHFdmx,
  447|     92|                          hfSize * sizeof(FIXP_DBL));
  448|     92|  }
  449|     92|  if (setup.bProcResidual) {
  ------------------
  |  Branch (449:7): [True: 92, False: 0]
  ------------------
  450|     92|    lfSize = 2 * BUFFER_LEN_LF * MAX_QMF_BANDS_TO_HYBRID;
  ------------------
  |  |  163|     92|#define BUFFER_LEN_LF (PROTO_LEN)
  |  |  ------------------
  |  |  |  |  162|     92|#define PROTO_LEN (13)
  |  |  ------------------
  ------------------
                  lfSize = 2 * BUFFER_LEN_LF * MAX_QMF_BANDS_TO_HYBRID;
  ------------------
  |  |  161|     92|  (3) /* 3 bands are filtered again in "40 bands" case */
  ------------------
  451|     92|    hfSize = BUFFER_LEN_HF *
  ------------------
  |  |  164|     92|#define BUFFER_LEN_HF ((PROTO_LEN - 1) / 2)
  |  |  ------------------
  |  |  |  |  162|     92|#define PROTO_LEN (13)
  |  |  ------------------
  ------------------
  452|     92|             ((((config->decoderMode == EXT_LP_ONLY) ? PC_NUM_BANDS
  ------------------
  |  |  139|      0|#define PC_NUM_BANDS (8)
  ------------------
  |  Branch (452:17): [True: 0, False: 92]
  ------------------
  453|     92|                                                     : setup.maxNumQmfBands) -
  454|     92|               MAX_QMF_BANDS_TO_HYBRID) +
  ------------------
  |  |  161|     92|  (3) /* 3 bands are filtered again in "40 bands" case */
  ------------------
  455|     92|              (setup.maxNumCmplxQmfBands - MAX_QMF_BANDS_TO_HYBRID));
  ------------------
  |  |  161|     92|  (3) /* 3 bands are filtered again in "40 bands" case */
  ------------------
  456|       |
  457|     92|    FDK_ALLOCATE_MEMORY_2D_INT(self->pHybridAnaStatesLFres,
  ------------------
  |  |  189|     92|  if (((a) = (type**)fdkCallocMatrix2D_int((dim1), (dim2), sizeof(type), \
  |  |  ------------------
  |  |  |  Branch (189:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  190|     92|                                           (s))) == NULL) {              \
  |  |  191|      0|    goto bail;                                                           \
  |  |  192|      0|  }
  ------------------
  458|     92|                               setup.maxNumResChannels, lfSize, FIXP_DBL,
  459|     92|                               SECT_DATA_L2)
  460|     92|    FDK_ALLOCATE_MEMORY_2D(self->pHybridAnaStatesHFres, setup.maxNumResChannels,
  ------------------
  |  |  183|     92|  if (((a) = (type**)fdkCallocMatrix2D((dim1), (dim2), sizeof(type))) == \
  |  |  ------------------
  |  |  |  Branch (183:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  184|     92|      NULL) {                                                            \
  |  |  185|      0|    goto bail;                                                           \
  |  |  186|      0|  }
  ------------------
  461|     92|                           hfSize, FIXP_DBL)
  462|       |
  463|     92|    for (i = setup.maxNumInputChannels;
  464|    184|         i < (setup.maxNumInputChannels + setup.maxNumResChannels); i++) {
  ------------------
  |  Branch (464:10): [True: 92, False: 92]
  ------------------
  465|     92|      FDKhybridAnalysisOpen(
  466|     92|          &self->hybridAnalysis[i],
  467|     92|          self->pHybridAnaStatesLFres[i - setup.maxNumInputChannels],
  468|     92|          lfSize * sizeof(FIXP_DBL),
  469|     92|          self->pHybridAnaStatesHFres[i - setup.maxNumInputChannels],
  470|     92|          hfSize * sizeof(FIXP_DBL));
  471|     92|    }
  472|     92|  }
  473|       |
  474|     92|  FDK_ALLOCATE_MEMORY_1D(self->smoothState, 1, SMOOTHING_STATE)
  ------------------
  |  |  149|     92|  if (((a) = (type*)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (149:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  150|      0|    goto bail;                                                          \
  |  |  151|      0|  }
  ------------------
  475|     92|  FDK_ALLOCATE_MEMORY_1D(self->reshapeBBEnvState, 1, RESHAPE_BBENV_STATE)
  ------------------
  |  |  149|     92|  if (((a) = (type*)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (149:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  150|      0|    goto bail;                                                          \
  |  |  151|      0|  }
  ------------------
  476|       |
  477|     92|  FDK_ALLOCATE_MEMORY_1D(self->apDecor, setup.maxNumDecorChannels, DECORR_DEC)
  ------------------
  |  |  149|     92|  if (((a) = (type*)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (149:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  150|      0|    goto bail;                                                          \
  |  |  151|      0|  }
  ------------------
  478|     92|  FDK_ALLOCATE_MEMORY_2D_INT(self->pDecorBufferCplx, setup.maxNumDecorChannels,
  ------------------
  |  |  189|     92|  if (((a) = (type**)fdkCallocMatrix2D_int((dim1), (dim2), sizeof(type), \
  |  |  ------------------
  |  |  |  Branch (189:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  190|     92|                                           (s))) == NULL) {              \
  |  |  191|      0|    goto bail;                                                           \
  |  |  192|      0|  }
  ------------------
  479|     92|                             (2 * ((825) + (373))), FIXP_DBL, SECT_DATA_L2)
  480|       |
  481|    184|  for (i = 0; i < setup.maxNumDecorChannels; i++) {
  ------------------
  |  Branch (481:15): [True: 92, False: 92]
  ------------------
  482|     92|    if (FDKdecorrelateOpen(&self->apDecor[i], self->pDecorBufferCplx[i],
  ------------------
  |  Branch (482:9): [True: 0, False: 92]
  ------------------
  483|     92|                           (2 * ((825) + (373))))) {
  484|      0|      goto bail;
  485|      0|    }
  486|     92|  }
  487|       |
  488|     92|  if (subbandTPCreate(&self->hStpDec) != MPS_OK) {
  ------------------
  |  Branch (488:7): [True: 0, False: 92]
  ------------------
  489|      0|    goto bail;
  490|      0|  }
  491|       |
  492|       |  /* save general decoder configuration */
  493|     92|  self->decoderLevel = config->decoderLevel;
  494|     92|  self->decoderMode = config->decoderMode;
  495|     92|  self->binauralMode = config->binauralMode;
  496|       |
  497|       |  /* preinitialize configuration */
  498|     92|  self->partiallyComplex = (config->decoderMode != EXT_HQ_ONLY) ? 1 : 0;
  ------------------
  |  Branch (498:28): [True: 0, False: 92]
  ------------------
  499|       |
  500|       |  /* Set to default state */
  501|     92|  SpatialDecConcealment_Init(&self->concealInfo, MPEGS_CONCEAL_RESET_ALL);
  ------------------
  |  |  168|     92|#define MPEGS_CONCEAL_RESET_ALL (0xFF)
  ------------------
  502|       |
  503|       |  /* Everything is fine so return the handle */
  504|     92|  return self;
  505|       |
  506|      0|bail:
  507|       |  /* Collector for all errors.
  508|       |     Deallocate all memory and return a invalid handle. */
  509|      0|  FDK_SpatialDecClose(self);
  510|       |
  511|       |  return NULL;
  512|     92|}
SpatialDecInitParserContext:
  593|    436|void SpatialDecInitParserContext(spatialDec *self) {
  594|    436|  int i, j;
  595|       |
  596|    872|  for (i = 0; i < self->createParams.maxNumOttBoxes; i += 1) {
  ------------------
  |  Branch (596:15): [True: 436, False: 436]
  ------------------
  597|  12.6k|    for (j = 0; j < MAX_PARAMETER_BANDS; j++) {
  ------------------
  |  |  118|  12.6k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  |  Branch (597:17): [True: 12.2k, False: 436]
  ------------------
  598|  12.2k|      self->ottCLDidxPrev[i][j] = 0;
  599|  12.2k|      self->ottICCidxPrev[i][j] = 0;
  600|  12.2k|      self->cmpOttCLDidxPrev[i][j] = 0;
  601|  12.2k|      self->cmpOttICCidxPrev[i][j] = 0;
  602|  12.2k|    }
  603|    436|  }
  604|    872|  for (i = 0; i < self->createParams.maxNumInputChannels; i++) {
  ------------------
  |  Branch (604:15): [True: 436, False: 436]
  ------------------
  605|  12.6k|    for (j = 0; j < MAX_PARAMETER_BANDS; j++) {
  ------------------
  |  |  118|  12.6k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  |  Branch (605:17): [True: 12.2k, False: 436]
  ------------------
  606|  12.2k|      self->arbdmxGainIdxPrev[i][j] = 0;
  607|  12.2k|      self->cmpArbdmxGainIdxPrev[i][j] = 0;
  608|  12.2k|    }
  609|    436|  }
  610|    436|}
FDK_SpatialDecClose:
  916|  10.4k|void FDK_SpatialDecClose(spatialDec *self) {
  917|  10.4k|  if (self) {
  ------------------
  |  Branch (917:7): [True: 92, False: 10.3k]
  ------------------
  918|     92|    int k;
  919|       |
  920|     92|    if (self->apDecor != NULL) {
  ------------------
  |  Branch (920:9): [True: 92, False: 0]
  ------------------
  921|    184|      for (k = 0; k < self->createParams.maxNumDecorChannels; k++) {
  ------------------
  |  Branch (921:19): [True: 92, False: 92]
  ------------------
  922|     92|        FDKdecorrelateClose(&(self->apDecor[k]));
  923|     92|      }
  924|     92|      FDK_FREE_MEMORY_1D(self->apDecor);
  ------------------
  |  |  171|     92|  do {                           \
  |  |  172|     92|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|     92|    (a) = NULL;                  \
  |  |  174|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
  925|     92|    }
  926|     92|    if (self->pDecorBufferCplx != NULL) {
  ------------------
  |  Branch (926:9): [True: 92, False: 0]
  ------------------
  927|     92|      FDK_FREE_MEMORY_2D(self->pDecorBufferCplx);
  ------------------
  |  |  201|     92|  do {                            \
  |  |  202|     92|    fdkFreeMatrix2D((void**)(a)); \
  |  |  203|     92|    (a) = NULL;                   \
  |  |  204|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (204:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
  928|     92|    }
  929|       |
  930|     92|    subbandTPDestroy(&self->hStpDec);
  931|       |
  932|     92|    FDK_FREE_MEMORY_1D(self->reshapeBBEnvState);
  ------------------
  |  |  171|     92|  do {                           \
  |  |  172|     92|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|     92|    (a) = NULL;                  \
  |  |  174|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
  933|     92|    FDK_FREE_MEMORY_1D(self->smoothState);
  ------------------
  |  |  171|     92|  do {                           \
  |  |  172|     92|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|     92|    (a) = NULL;                  \
  |  |  174|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
  934|       |
  935|     92|    FDK_FREE_MEMORY_2D(self->pHybridAnaStatesLFdmx);
  ------------------
  |  |  201|     92|  do {                            \
  |  |  202|     92|    fdkFreeMatrix2D((void**)(a)); \
  |  |  203|     92|    (a) = NULL;                   \
  |  |  204|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (204:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
  936|     92|    FDK_FREE_MEMORY_2D(self->pHybridAnaStatesHFdmx);
  ------------------
  |  |  201|     92|  do {                            \
  |  |  202|     92|    fdkFreeMatrix2D((void**)(a)); \
  |  |  203|     92|    (a) = NULL;                   \
  |  |  204|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (204:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
  937|     92|    FDK_FREE_MEMORY_2D(self->pHybridAnaStatesLFres);
  ------------------
  |  |  201|     92|  do {                            \
  |  |  202|     92|    fdkFreeMatrix2D((void**)(a)); \
  |  |  203|     92|    (a) = NULL;                   \
  |  |  204|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (204:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
  938|     92|    FDK_FREE_MEMORY_2D(self->pHybridAnaStatesHFres);
  ------------------
  |  |  201|     92|  do {                            \
  |  |  202|     92|    fdkFreeMatrix2D((void**)(a)); \
  |  |  203|     92|    (a) = NULL;                   \
  |  |  204|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (204:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
  939|     92|    FDK_FREE_MEMORY_1D(self->hybridAnalysis);
  ------------------
  |  |  171|     92|  do {                           \
  |  |  172|     92|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|     92|    (a) = NULL;                  \
  |  |  174|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
  940|       |
  941|     92|    FDK_FREE_MEMORY_1D(self->hybridSynthesis);
  ------------------
  |  |  171|     92|  do {                           \
  |  |  172|     92|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|     92|    (a) = NULL;                  \
  |  |  174|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
  942|       |
  943|       |    /* The time buffer is passed to the decoder from outside to avoid copying
  944|       |     * (zero copy). */
  945|       |    /* FDK_FREE_MEMORY_2D(self->timeOut__FDK); */
  946|       |
  947|     92|    FDK_FREE_MEMORY_2D(self->hybOutputImagWet__FDK);
  ------------------
  |  |  201|     92|  do {                            \
  |  |  202|     92|    fdkFreeMatrix2D((void**)(a)); \
  |  |  203|     92|    (a) = NULL;                   \
  |  |  204|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (204:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
  948|     92|    FDK_FREE_MEMORY_2D(self->hybOutputRealWet__FDK);
  ------------------
  |  |  201|     92|  do {                            \
  |  |  202|     92|    fdkFreeMatrix2D((void**)(a)); \
  |  |  203|     92|    (a) = NULL;                   \
  |  |  204|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (204:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
  949|       |
  950|     92|    FDK_FREE_MEMORY_2D(self->hybOutputImagDry__FDK);
  ------------------
  |  |  201|     92|  do {                            \
  |  |  202|     92|    fdkFreeMatrix2D((void**)(a)); \
  |  |  203|     92|    (a) = NULL;                   \
  |  |  204|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (204:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
  951|     92|    FDK_FREE_MEMORY_2D(self->hybOutputRealDry__FDK);
  ------------------
  |  |  201|     92|  do {                            \
  |  |  202|     92|    fdkFreeMatrix2D((void**)(a)); \
  |  |  203|     92|    (a) = NULL;                   \
  |  |  204|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (204:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
  952|       |
  953|     92|    FDK_FREE_MEMORY_2D(self->wImag__FDK);
  ------------------
  |  |  201|     92|  do {                            \
  |  |  202|     92|    fdkFreeMatrix2D((void**)(a)); \
  |  |  203|     92|    (a) = NULL;                   \
  |  |  204|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (204:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
  954|     92|    FDK_FREE_MEMORY_2D(self->wReal__FDK);
  ------------------
  |  |  201|     92|  do {                            \
  |  |  202|     92|    fdkFreeMatrix2D((void**)(a)); \
  |  |  203|     92|    (a) = NULL;                   \
  |  |  204|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (204:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
  955|       |
  956|     92|    if (self->createParams.bProcResidual) {
  ------------------
  |  Branch (956:9): [True: 92, False: 0]
  ------------------
  957|     92|      int i;
  958|       |
  959|    184|      for (i = 0; i < self->createParams.maxNumResChannels; i++) {
  ------------------
  |  Branch (959:19): [True: 92, False: 92]
  ------------------
  960|     92|        if (self->hybResidualImag__FDK != NULL)
  ------------------
  |  Branch (960:13): [True: 92, False: 0]
  ------------------
  961|     92|          FDK_FREE_MEMORY_1D(self->hybResidualImag__FDK[i]);
  ------------------
  |  |  171|     92|  do {                           \
  |  |  172|     92|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|     92|    (a) = NULL;                  \
  |  |  174|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
  962|     92|        if (self->hybResidualReal__FDK != NULL)
  ------------------
  |  Branch (962:13): [True: 92, False: 0]
  ------------------
  963|     92|          FDK_FREE_MEMORY_1D(self->hybResidualReal__FDK[i]);
  ------------------
  |  |  171|     92|  do {                           \
  |  |  172|     92|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|     92|    (a) = NULL;                  \
  |  |  174|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
  964|     92|        if (self->qmfResidualImag__FDK != NULL)
  ------------------
  |  Branch (964:13): [True: 92, False: 0]
  ------------------
  965|     92|          FDK_FREE_MEMORY_2D_ALIGNED(self->qmfResidualImag__FDK[i]);
  ------------------
  |  |  207|     92|  do {                                    \
  |  |  208|     92|    fdkFreeMatrix2D_aligned((void**)(a)); \
  |  |  209|     92|    (a) = NULL;                           \
  |  |  210|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (210:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
  966|     92|        if (self->qmfResidualReal__FDK != NULL)
  ------------------
  |  Branch (966:13): [True: 92, False: 0]
  ------------------
  967|     92|          FDK_FREE_MEMORY_2D_ALIGNED(self->qmfResidualReal__FDK[i]);
  ------------------
  |  |  207|     92|  do {                                    \
  |  |  208|     92|    fdkFreeMatrix2D_aligned((void**)(a)); \
  |  |  209|     92|    (a) = NULL;                           \
  |  |  210|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (210:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
  968|     92|      }
  969|       |
  970|     92|      FDK_FREE_MEMORY_1D(self->hybResidualImag__FDK);
  ------------------
  |  |  171|     92|  do {                           \
  |  |  172|     92|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|     92|    (a) = NULL;                  \
  |  |  174|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
  971|     92|      FDK_FREE_MEMORY_1D(self->hybResidualReal__FDK);
  ------------------
  |  |  171|     92|  do {                           \
  |  |  172|     92|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|     92|    (a) = NULL;                  \
  |  |  174|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
  972|       |
  973|     92|      FDK_FREE_MEMORY_1D(self->qmfResidualImag__FDK);
  ------------------
  |  |  171|     92|  do {                           \
  |  |  172|     92|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|     92|    (a) = NULL;                  \
  |  |  174|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
  974|     92|      FDK_FREE_MEMORY_1D(self->qmfResidualReal__FDK);
  ------------------
  |  |  171|     92|  do {                           \
  |  |  172|     92|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|     92|    (a) = NULL;                  \
  |  |  174|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
  975|       |
  976|     92|    } /* self->createParams.bProcResidual */
  977|       |
  978|     92|    FDK_FREE_MEMORY_2D(self->hybInputImag__FDK);
  ------------------
  |  |  201|     92|  do {                            \
  |  |  202|     92|    fdkFreeMatrix2D((void**)(a)); \
  |  |  203|     92|    (a) = NULL;                   \
  |  |  204|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (204:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
  979|     92|    FDK_FREE_MEMORY_2D(self->hybInputReal__FDK);
  ------------------
  |  |  201|     92|  do {                            \
  |  |  202|     92|    fdkFreeMatrix2D((void**)(a)); \
  |  |  203|     92|    (a) = NULL;                   \
  |  |  204|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (204:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
  980|       |
  981|     92|    FDK_FREE_MEMORY_2D_ALIGNED(self->qmfInputImag__FDK);
  ------------------
  |  |  207|     92|  do {                                    \
  |  |  208|     92|    fdkFreeMatrix2D_aligned((void**)(a)); \
  |  |  209|     92|    (a) = NULL;                           \
  |  |  210|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (210:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
  982|     92|    FDK_FREE_MEMORY_2D_ALIGNED(self->qmfInputReal__FDK);
  ------------------
  |  |  207|     92|  do {                                    \
  |  |  208|     92|    fdkFreeMatrix2D_aligned((void**)(a)); \
  |  |  209|     92|    (a) = NULL;                           \
  |  |  210|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (210:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
  983|       |
  984|     92|    FDK_FREE_MEMORY_3D(self->M2ImagPrev__FDK);
  ------------------
  |  |  225|     92|  do {                             \
  |  |  226|     92|    fdkFreeMatrix3D((void***)(a)); \
  |  |  227|     92|    (a) = NULL;                    \
  |  |  228|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (228:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
  985|       |
  986|     92|    FDK_FREE_MEMORY_3D(self->M2RealPrev__FDK);
  ------------------
  |  |  225|     92|  do {                             \
  |  |  226|     92|    fdkFreeMatrix3D((void***)(a)); \
  |  |  227|     92|    (a) = NULL;                    \
  |  |  228|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (228:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
  987|       |
  988|     92|    FDK_FREE_MEMORY_3D(self->M2Imag__FDK);
  ------------------
  |  |  225|     92|  do {                             \
  |  |  226|     92|    fdkFreeMatrix3D((void***)(a)); \
  |  |  227|     92|    (a) = NULL;                    \
  |  |  228|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (228:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
  989|       |
  990|     92|    FDK_FREE_MEMORY_3D(self->M2Real__FDK);
  ------------------
  |  |  225|     92|  do {                             \
  |  |  226|     92|    fdkFreeMatrix3D((void***)(a)); \
  |  |  227|     92|    (a) = NULL;                    \
  |  |  228|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (228:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
  991|       |
  992|     92|    FDK_FREE_MEMORY_1D(self->arbdmxAlphaPrev__FDK);
  ------------------
  |  |  171|     92|  do {                           \
  |  |  172|     92|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|     92|    (a) = NULL;                  \
  |  |  174|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
  993|     92|    FDK_FREE_MEMORY_1D(self->arbdmxAlpha__FDK);
  ------------------
  |  |  171|     92|  do {                           \
  |  |  172|     92|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|     92|    (a) = NULL;                  \
  |  |  174|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
  994|       |
  995|     92|    FDK_FREE_MEMORY_3D(self->arbdmxGain__FDK);
  ------------------
  |  |  225|     92|  do {                             \
  |  |  226|     92|    fdkFreeMatrix3D((void***)(a)); \
  |  |  227|     92|    (a) = NULL;                    \
  |  |  228|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (228:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
  996|       |
  997|     92|    FDK_FREE_MEMORY_3D(self->ottIPD__FDK);
  ------------------
  |  |  225|     92|  do {                             \
  |  |  226|     92|    fdkFreeMatrix3D((void***)(a)); \
  |  |  227|     92|    (a) = NULL;                    \
  |  |  228|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (228:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
  998|     92|    FDK_FREE_MEMORY_3D(self->ottICC__FDK);
  ------------------
  |  |  225|     92|  do {                             \
  |  |  226|     92|    fdkFreeMatrix3D((void***)(a)); \
  |  |  227|     92|    (a) = NULL;                    \
  |  |  228|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (228:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
  999|     92|    FDK_FREE_MEMORY_3D(self->ottCLD__FDK);
  ------------------
  |  |  225|     92|  do {                             \
  |  |  226|     92|    fdkFreeMatrix3D((void***)(a)); \
  |  |  227|     92|    (a) = NULL;                    \
  |  |  228|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (228:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
 1000|       |
 1001|       |    /* Last parameters from prev frame */
 1002|     92|    FDK_FREE_MEMORY_2D(self->ottCLDidxPrev);
  ------------------
  |  |  201|     92|  do {                            \
  |  |  202|     92|    fdkFreeMatrix2D((void**)(a)); \
  |  |  203|     92|    (a) = NULL;                   \
  |  |  204|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (204:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
 1003|     92|    FDK_FREE_MEMORY_2D(self->ottICCidxPrev);
  ------------------
  |  |  201|     92|  do {                            \
  |  |  202|     92|    fdkFreeMatrix2D((void**)(a)); \
  |  |  203|     92|    (a) = NULL;                   \
  |  |  204|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (204:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
 1004|     92|    FDK_FREE_MEMORY_3D(self->ottICCdiffidx);
  ------------------
  |  |  225|     92|  do {                             \
  |  |  226|     92|    fdkFreeMatrix3D((void***)(a)); \
  |  |  227|     92|    (a) = NULL;                    \
  |  |  228|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (228:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
 1005|     92|    FDK_FREE_MEMORY_2D(self->ottIPDidxPrev);
  ------------------
  |  |  201|     92|  do {                            \
  |  |  202|     92|    fdkFreeMatrix2D((void**)(a)); \
  |  |  203|     92|    (a) = NULL;                   \
  |  |  204|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (204:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
 1006|     92|    FDK_FREE_MEMORY_2D(self->arbdmxGainIdxPrev);
  ------------------
  |  |  201|     92|  do {                            \
  |  |  202|     92|    fdkFreeMatrix2D((void**)(a)); \
  |  |  203|     92|    (a) = NULL;                   \
  |  |  204|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (204:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
 1007|       |
 1008|     92|    FDK_FREE_MEMORY_2D(self->cmpOttCLDidxPrev);
  ------------------
  |  |  201|     92|  do {                            \
  |  |  202|     92|    fdkFreeMatrix2D((void**)(a)); \
  |  |  203|     92|    (a) = NULL;                   \
  |  |  204|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (204:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
 1009|     92|    FDK_FREE_MEMORY_2D(self->cmpOttICCidxPrev);
  ------------------
  |  |  201|     92|  do {                            \
  |  |  202|     92|    fdkFreeMatrix2D((void**)(a)); \
  |  |  203|     92|    (a) = NULL;                   \
  |  |  204|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (204:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
 1010|     92|    FDK_FREE_MEMORY_3D(self->outIdxData);
  ------------------
  |  |  225|     92|  do {                             \
  |  |  226|     92|    fdkFreeMatrix3D((void***)(a)); \
  |  |  227|     92|    (a) = NULL;                    \
  |  |  228|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (228:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
 1011|     92|    FDK_FREE_MEMORY_2D(self->cmpOttIPDidxPrev);
  ------------------
  |  |  201|     92|  do {                            \
  |  |  202|     92|    fdkFreeMatrix2D((void**)(a)); \
  |  |  203|     92|    (a) = NULL;                   \
  |  |  204|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (204:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
 1012|     92|    FDK_FREE_MEMORY_2D(self->cmpArbdmxGainIdxPrev);
  ------------------
  |  |  201|     92|  do {                            \
  |  |  202|     92|    fdkFreeMatrix2D((void**)(a)); \
  |  |  203|     92|    (a) = NULL;                   \
  |  |  204|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (204:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
 1013|       |
 1014|     92|    FDK_FREE_MEMORY_2D(self->smgData);
  ------------------
  |  |  201|     92|  do {                            \
  |  |  202|     92|    fdkFreeMatrix2D((void**)(a)); \
  |  |  203|     92|    (a) = NULL;                   \
  |  |  204|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (204:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
 1015|     92|    FDK_FREE_MEMORY_1D(self->smgTime);
  ------------------
  |  |  171|     92|  do {                           \
  |  |  172|     92|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|     92|    (a) = NULL;                  \
  |  |  174|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
 1016|       |
 1017|     92|    FDK_FREE_MEMORY_1D(self->numOttBands);
  ------------------
  |  |  171|     92|  do {                           \
  |  |  172|     92|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|     92|    (a) = NULL;                  \
  |  |  174|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
 1018|       |
 1019|     92|    FDK_FREE_MEMORY_1D(self->param2hyb);
  ------------------
  |  |  171|     92|  do {                           \
  |  |  172|     92|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|     92|    (a) = NULL;                  \
  |  |  174|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
 1020|       |
 1021|     92|    FDK_FREE_MEMORY_1D(self);
  ------------------
  |  |  171|     92|  do {                           \
  |  |  172|     92|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|     92|    (a) = NULL;                  \
  |  |  174|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
 1022|     92|  }
 1023|       |
 1024|  10.4k|  return;
 1025|  10.4k|}

_Z26SpatialDecConcealment_InitP25SpatialDecConcealmentInfoj:
  106|     92|                                const UINT resetFlags) {
  107|     92|  FDK_ASSERT(info != NULL);
  ------------------
  |  |  221|     92|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (107:3): [True: 92, False: 0]
  ------------------
  108|       |
  109|     92|  if (resetFlags & MPEGS_CONCEAL_RESET_STATE) {
  ------------------
  |  |  166|     92|#define MPEGS_CONCEAL_RESET_STATE (0x01)
  ------------------
  |  Branch (109:7): [True: 92, False: 0]
  ------------------
  110|     92|    info->concealState = SpatialDecConcealState_Init;
  111|       |    /* Frame counters will be initialized implicitely in function
  112|       |     * SpatialDecConcealment_UpdateState(). */
  113|     92|  }
  114|       |
  115|     92|  if (resetFlags & MPEGS_CONCEAL_RESET_PARAMETER) {
  ------------------
  |  |  167|     92|#define MPEGS_CONCEAL_RESET_PARAMETER (0x02)
  ------------------
  |  Branch (115:7): [True: 92, False: 0]
  ------------------
  116|       |    /* Set default params */
  117|     92|    info->concealParams.method = MPEGS_CONCEAL_DEFAULT_METHOD;
  ------------------
  |  |  129|     92|#define MPEGS_CONCEAL_DEFAULT_METHOD SAC_DEC_CONCEAL_BY_FADING_PARAMETERS
  ------------------
  118|     92|    info->concealParams.numKeepFrames = MPEGS_CONCEAL_DEFAULT_NUM_KEEP_FRAMES;
  ------------------
  |  |  130|     92|#define MPEGS_CONCEAL_DEFAULT_NUM_KEEP_FRAMES (10)
  ------------------
  119|     92|    info->concealParams.numFadeOutFrames =
  120|     92|        MPEGS_CONCEAL_DEFAULT_FADE_OUT_SLOPE_LENGTH;
  ------------------
  |  |  131|     92|#define MPEGS_CONCEAL_DEFAULT_FADE_OUT_SLOPE_LENGTH (5)
  ------------------
  121|     92|    info->concealParams.numFadeInFrames =
  122|     92|        MPEGS_CONCEAL_DEFAULT_FADE_IN_SLOPE_LENGTH;
  ------------------
  |  |  132|     92|#define MPEGS_CONCEAL_DEFAULT_FADE_IN_SLOPE_LENGTH (5)
  ------------------
  123|     92|    info->concealParams.numReleaseFrames =
  124|     92|        MPEGS_CONCEAL_DEFAULT_NUM_RELEASE_FRAMES;
  ------------------
  |  |  133|     92|#define MPEGS_CONCEAL_DEFAULT_NUM_RELEASE_FRAMES (3)
  ------------------
  125|     92|  }
  126|       |
  127|     92|  return;
  128|     92|}

mpegSurroundDecoder_Open:
  390|  7.60k|    HANDLE_FDK_QMF_DOMAIN pQmfDomain) {
  391|  7.60k|  SACDEC_ERROR error;
  392|       |
  393|  7.60k|  error = mpegSurroundDecoder_Create(pMpegSurroundDecoder, stereoConfigIndex,
  394|  7.60k|                                     pQmfDomain);
  395|       |
  396|  7.60k|  return error;
  397|  7.60k|}
mpegSurroundDecoder_Config:
  704|  1.01k|    INT configBytes, const UCHAR configMode, UCHAR *configChanged) {
  705|  1.01k|  SACDEC_ERROR err = MPS_OK;
  706|  1.01k|  INT nInputChannels;
  707|  1.01k|  SPATIAL_SPECIFIC_CONFIG spatialSpecificConfig;
  708|  1.01k|  SPATIAL_SPECIFIC_CONFIG *pSsc =
  709|  1.01k|      &pMpegSurroundDecoder->spatialSpecificConfigBackup;
  710|       |
  711|  1.01k|  switch (coreCodec) {
  712|      0|    case AOT_DRM_USAC:
  ------------------
  |  Branch (712:5): [True: 0, False: 1.01k]
  ------------------
  713|    111|    case AOT_USAC:
  ------------------
  |  Branch (713:5): [True: 111, False: 904]
  ------------------
  714|    111|      if (configMode == AC_CM_DET_CFG_CHANGE) {
  ------------------
  |  |  334|    111|  0x000001 /*!< Config mode signalizes the callback to work in config change \
  ------------------
  |  Branch (714:11): [True: 79, False: 32]
  ------------------
  715|       |        /* In config detection mode write spatial specific config parameters
  716|       |         * into temporarily allocated structure */
  717|     79|        err = SpatialDecParseMps212Config(
  718|     79|            hBs, &spatialSpecificConfig, samplingRate, coreCodec,
  719|     79|            stereoConfigIndex, coreSbrFrameLengthIndex);
  720|     79|        nInputChannels = spatialSpecificConfig.nInputChannels;
  721|     79|        pSsc = &spatialSpecificConfig;
  722|     79|      } else {
  723|     32|        err = SpatialDecParseMps212Config(
  724|     32|            hBs, &pMpegSurroundDecoder->spatialSpecificConfigBackup,
  725|     32|            samplingRate, coreCodec, stereoConfigIndex,
  726|     32|            coreSbrFrameLengthIndex);
  727|     32|        nInputChannels =
  728|     32|            pMpegSurroundDecoder->spatialSpecificConfigBackup.nInputChannels;
  729|     32|      }
  730|    111|      if ((err == MPS_OK) && (numChannels != nInputChannels)) {
  ------------------
  |  Branch (730:11): [True: 106, False: 5]
  |  Branch (730:30): [True: 0, False: 106]
  ------------------
  731|      0|        err = MPS_PARSE_ERROR;
  732|      0|      }
  733|    111|      break;
  734|    901|    case AOT_ER_AAC_ELD:
  ------------------
  |  Branch (734:5): [True: 901, False: 114]
  ------------------
  735|    901|    case AOT_ER_AAC_LD:
  ------------------
  |  Branch (735:5): [True: 0, False: 1.01k]
  ------------------
  736|    901|      if (configMode == AC_CM_DET_CFG_CHANGE) {
  ------------------
  |  |  334|    901|  0x000001 /*!< Config mode signalizes the callback to work in config change \
  ------------------
  |  Branch (736:11): [True: 619, False: 282]
  ------------------
  737|       |        /* In config detection mode write spatial specific config parameters
  738|       |         * into temporarily allocated structure */
  739|    619|        err = SpatialDecParseSpecificConfig(hBs, &spatialSpecificConfig,
  740|    619|                                            configBytes, coreCodec);
  741|    619|        nInputChannels = spatialSpecificConfig.nInputChannels;
  742|    619|        pSsc = &spatialSpecificConfig;
  743|    619|      } else {
  744|    282|        err = SpatialDecParseSpecificConfig(
  745|    282|            hBs, &pMpegSurroundDecoder->spatialSpecificConfigBackup,
  746|    282|            configBytes, coreCodec);
  747|    282|        nInputChannels =
  748|    282|            pMpegSurroundDecoder->spatialSpecificConfigBackup.nInputChannels;
  749|    282|      }
  750|       |      /* check number of channels for channel_configuration > 0  */
  751|    901|      if ((err == MPS_OK) && (numChannels > 0) &&
  ------------------
  |  Branch (751:11): [True: 520, False: 381]
  |  Branch (751:30): [True: 520, False: 0]
  ------------------
  752|    520|          (numChannels != nInputChannels)) {
  ------------------
  |  Branch (752:11): [True: 11, False: 509]
  ------------------
  753|     11|        err = MPS_PARSE_ERROR;
  754|     11|      }
  755|    901|      break;
  756|      3|    default:
  ------------------
  |  Branch (756:5): [True: 3, False: 1.01k]
  ------------------
  757|      3|      err = MPS_UNSUPPORTED_FORMAT;
  758|      3|      break;
  759|  1.01k|  }
  760|       |
  761|  1.01k|  if (err != MPS_OK) {
  ------------------
  |  Branch (761:7): [True: 400, False: 615]
  ------------------
  762|    400|    goto bail;
  763|    400|  }
  764|       |
  765|    615|  err = sscCheckOutOfBand(pSsc, coreCodec, samplingRate, frameSize);
  766|       |
  767|    615|  if (err != MPS_OK) {
  ------------------
  |  Branch (767:7): [True: 99, False: 516]
  ------------------
  768|     99|    goto bail;
  769|     99|  }
  770|       |
  771|    516|  if (configMode & AC_CM_DET_CFG_CHANGE) {
  ------------------
  |  |  334|    516|  0x000001 /*!< Config mode signalizes the callback to work in config change \
  ------------------
  |  Branch (771:7): [True: 298, False: 218]
  ------------------
  772|    298|    return err;
  773|    298|  }
  774|       |
  775|    218|  if (configMode & AC_CM_ALLOC_MEM) {
  ------------------
  |  |  337|    218|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
  |  Branch (775:7): [True: 218, False: 0]
  ------------------
  776|    218|    if (*configChanged) {
  ------------------
  |  Branch (776:9): [True: 218, False: 0]
  ------------------
  777|    218|      err = mpegSurroundDecoder_Open(&pMpegSurroundDecoder, stereoConfigIndex,
  778|    218|                                     NULL);
  779|    218|      if (err) {
  ------------------
  |  Branch (779:11): [True: 0, False: 218]
  ------------------
  780|      0|        return err;
  781|      0|      }
  782|    218|    }
  783|    218|  }
  784|       |
  785|    218|  {
  786|    218|    SPATIAL_SPECIFIC_CONFIG *sscParse =
  787|    218|        &pMpegSurroundDecoder
  788|    218|             ->spatialSpecificConfig[pMpegSurroundDecoder->bsFrameParse];
  789|       |
  790|    218|    if (FDK_SpatialDecCompareSpatialSpecificConfigHeader(
  ------------------
  |  Branch (790:9): [True: 218, False: 0]
  ------------------
  791|    218|            &pMpegSurroundDecoder->spatialSpecificConfigBackup, sscParse)) {
  792|    218|      pMpegSurroundDecoder->initFlags[pMpegSurroundDecoder->bsFrameParse] |=
  793|    218|          MPEGS_INIT_CHANGE_HEADER;
  794|       |      /* Error resilience code */
  795|    218|      if (pMpegSurroundDecoder->pSpatialDec == NULL) {
  ------------------
  |  Branch (795:11): [True: 0, False: 218]
  ------------------
  796|      0|        err = MPS_NOTOK;
  797|      0|        goto bail;
  798|      0|      }
  799|    218|      SpatialDecInitParserContext(pMpegSurroundDecoder->pSpatialDec);
  800|    218|      pMpegSurroundDecoder->pSpatialDec->pConfigCurrent =
  801|    218|          &pMpegSurroundDecoder
  802|    218|               ->spatialSpecificConfig[pMpegSurroundDecoder->bsFrameDecode];
  803|    218|    }
  804|    218|  }
  805|       |
  806|    218|  if (err == MPS_OK) {
  ------------------
  |  Branch (806:7): [True: 218, False: 0]
  ------------------
  807|       |    /* We got a valid out-of-band configuration so label it accordingly. */
  808|    218|    pMpegSurroundDecoder->mpegSurroundSscIsGlobalCfg = 1;
  809|    218|  }
  810|       |
  811|    717|bail:
  812|    717|  return err;
  813|    218|}
mpegSurroundDecoder_ConfigureQmfDomain:
 1053|     57|    AUDIO_OBJECT_TYPE coreCodec) {
 1054|     57|  SACDEC_ERROR err = MPS_OK;
 1055|     57|  FDK_QMF_DOMAIN_GC *pGC = NULL;
 1056|       |
 1057|     57|  if (pMpegSurroundDecoder == NULL) {
  ------------------
  |  Branch (1057:7): [True: 0, False: 57]
  ------------------
 1058|      0|    return MPS_INVALID_HANDLE;
 1059|      0|  }
 1060|       |
 1061|     57|  FDK_ASSERT(pMpegSurroundDecoder->pSpatialDec);
  ------------------
  |  |  221|     57|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1061:3): [True: 57, False: 0]
  ------------------
 1062|       |
 1063|     57|  pGC = &pMpegSurroundDecoder->pQmfDomain->globalConf;
 1064|     57|  if (pMpegSurroundDecoder->mpegSurroundSscIsGlobalCfg) {
  ------------------
  |  Branch (1064:7): [True: 57, False: 0]
  ------------------
 1065|     57|    SPATIAL_SPECIFIC_CONFIG *pSSC =
 1066|     57|        &pMpegSurroundDecoder->spatialSpecificConfigBackup;
 1067|     57|    if (sac_dec_interface == SAC_INTERFACE_TIME) {
  ------------------
  |  Branch (1067:9): [True: 51, False: 6]
  ------------------
 1068|       |      /* For SAC_INTERFACE_QMF these parameters are set by SBR. */
 1069|     51|      pGC->nBandsAnalysis_requested = mpegSurroundDecoder_GetNrOfQmfBands(
 1070|     51|          pSSC, coreSamplingRate); /* coreSamplingRate == outputSamplingRate for
 1071|       |                                      SAC_INTERFACE_TIME */
 1072|     51|      pGC->nBandsSynthesis_requested = pGC->nBandsAnalysis_requested;
 1073|     51|      pGC->nInputChannels_requested =
 1074|     51|          fMax((UINT)pSSC->nInputChannels, (UINT)pGC->nInputChannels_requested);
 1075|     51|    }
 1076|     57|    pGC->nOutputChannels_requested =
 1077|     57|        fMax((UINT)pSSC->nOutputChannels, (UINT)pGC->nOutputChannels_requested);
 1078|     57|  } else {
 1079|      0|    if (sac_dec_interface == SAC_INTERFACE_TIME) {
  ------------------
  |  Branch (1079:9): [True: 0, False: 0]
  ------------------
 1080|       |      /* For SAC_INTERFACE_QMF these parameters are set by SBR. */
 1081|      0|      pGC->nBandsAnalysis_requested = mpegSurroundDecoder_GetNrOfQmfBands(
 1082|      0|          NULL, coreSamplingRate); /* coreSamplingRate == outputSamplingRate for
 1083|       |                                      SAC_INTERFACE_TIME */
 1084|      0|      pGC->nBandsSynthesis_requested = pGC->nBandsAnalysis_requested;
 1085|      0|      pGC->nInputChannels_requested =
 1086|      0|          pMpegSurroundDecoder->pSpatialDec->createParams.maxNumInputChannels;
 1087|      0|    }
 1088|      0|    pGC->nOutputChannels_requested =
 1089|      0|        pMpegSurroundDecoder->pSpatialDec->createParams.maxNumOutputChannels;
 1090|      0|  }
 1091|     57|  pGC->nQmfProcBands_requested = 64;
 1092|     57|  pGC->nQmfProcChannels_requested =
 1093|     57|      fMin((INT)pGC->nInputChannels_requested,
 1094|     57|           pMpegSurroundDecoder->pSpatialDec->createParams.maxNumInputChannels);
 1095|       |
 1096|     57|  if (coreCodec == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (1096:7): [True: 57, False: 0]
  ------------------
 1097|     57|    pGC->flags_requested |= QMF_FLAG_MPSLDFB;
  ------------------
  |  |  137|     57|#define QMF_FLAG_MPSLDFB 16
  ------------------
 1098|     57|    pGC->flags_requested &= ~QMF_FLAG_CLDFB;
  ------------------
  |  |  133|     57|#define QMF_FLAG_CLDFB 4
  ------------------
 1099|     57|  }
 1100|       |
 1101|     57|  return err;
 1102|     57|}
mpegSurroundDecoder_FreeMem:
 1775|  3.06k|    CMpegSurroundDecoder *pMpegSurroundDecoder) {
 1776|  3.06k|  SACDEC_ERROR err = MPS_OK;
 1777|       |
 1778|  3.06k|  if (pMpegSurroundDecoder != NULL) {
  ------------------
  |  Branch (1778:7): [True: 3.06k, False: 0]
  ------------------
 1779|  3.06k|    FDK_SpatialDecClose(pMpegSurroundDecoder->pSpatialDec);
 1780|  3.06k|    pMpegSurroundDecoder->pSpatialDec = NULL;
 1781|  3.06k|  }
 1782|       |
 1783|  3.06k|  return err;
 1784|  3.06k|}
mpegSurroundDecoder_Close:
 1789|  7.39k|void mpegSurroundDecoder_Close(CMpegSurroundDecoder *pMpegSurroundDecoder) {
 1790|  7.39k|  if (pMpegSurroundDecoder != NULL) {
  ------------------
  |  Branch (1790:7): [True: 7.39k, False: 0]
  ------------------
 1791|  7.39k|    FDK_SpatialDecClose(pMpegSurroundDecoder->pSpatialDec);
 1792|  7.39k|    pMpegSurroundDecoder->pSpatialDec = NULL;
 1793|       |
 1794|  14.7k|    for (int i = 0; i < 1; i++) {
  ------------------
  |  Branch (1794:21): [True: 7.39k, False: 7.39k]
  ------------------
 1795|  7.39k|      SpatialDecCloseBsFrame(&pMpegSurroundDecoder->bsFrames[i]);
 1796|  7.39k|    }
 1797|       |
 1798|       |    FDK_FREE_MEMORY_1D(pMpegSurroundDecoder);
  ------------------
  |  |  171|  7.39k|  do {                           \
  |  |  172|  7.39k|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|  7.39k|    (a) = NULL;                  \
  |  |  174|  7.39k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 7.39k]
  |  |  ------------------
  ------------------
 1799|  7.39k|  }
 1800|  7.39k|}
sac_dec_lib.cpp:_ZL13sscParseCheckPK25T_SPATIAL_SPECIFIC_CONFIG:
  848|    615|static SACDEC_ERROR sscParseCheck(const SPATIAL_SPECIFIC_CONFIG *pSsc) {
  849|    615|  if (pSsc->samplingFreq > 96000) return MPS_PARSE_ERROR;
  ------------------
  |  Branch (849:7): [True: 8, False: 607]
  ------------------
  850|    607|  if (pSsc->samplingFreq < 8000) return MPS_PARSE_ERROR;
  ------------------
  |  Branch (850:7): [True: 7, False: 600]
  ------------------
  851|       |
  852|    600|  if ((pSsc->treeConfig < 0) || (pSsc->treeConfig > 7)) {
  ------------------
  |  Branch (852:7): [True: 0, False: 600]
  |  Branch (852:33): [True: 0, False: 600]
  ------------------
  853|      0|    return MPS_PARSE_ERROR;
  854|      0|  }
  855|       |
  856|    600|  if ((pSsc->quantMode < 0) || (pSsc->quantMode > 2)) {
  ------------------
  |  Branch (856:7): [True: 0, False: 600]
  |  Branch (856:32): [True: 1, False: 599]
  ------------------
  857|      1|    return MPS_PARSE_ERROR;
  858|      1|  }
  859|       |
  860|       |  /* now we are sure there were no parsing errors */
  861|       |
  862|    599|  return MPS_OK;
  863|    600|}
sac_dec_lib.cpp:_ZL26mpegSurroundDecoder_CreatePP19MpegSurroundDecoderiP14FDK_QMF_DOMAIN:
  614|  7.60k|    HANDLE_FDK_QMF_DOMAIN pQmfDomain) {
  615|  7.60k|  SACDEC_ERROR err = MPS_OK;
  616|  7.60k|  CMpegSurroundDecoder *sacDec = NULL;
  617|  7.60k|  spatialDec *self = NULL;
  618|       |
  619|       |  /* decoderLevel  decoderMode  maxNumOutputChannels  binauralMode */
  620|  7.60k|  static const SPATIAL_DEC_CONFIG decConfig = {
  621|  7.60k|      (CFG_LEVEL)(0), EXT_HQ_ONLY, OUTPUT_CHANNELS_DEFAULT, BINAURAL_NONE};
  622|       |
  623|  7.60k|  if (*pMpegSurroundDecoder == NULL) {
  ------------------
  |  Branch (623:7): [True: 7.39k, False: 218]
  ------------------
  624|  7.39k|    FDK_ALLOCATE_MEMORY_1D(*pMpegSurroundDecoder, 1, CMpegSurroundDecoder)
  ------------------
  |  |  149|  7.39k|  if (((a) = (type*)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (149:7): [True: 0, False: 7.39k]
  |  |  ------------------
  |  |  150|      0|    goto bail;                                                          \
  |  |  151|      0|  }
  ------------------
  625|       |
  626|  14.7k|    for (int i = 0; i < 1; i++) {
  ------------------
  |  Branch (626:21): [True: 7.39k, False: 7.39k]
  ------------------
  627|  7.39k|      err = SpatialDecCreateBsFrame(&(*pMpegSurroundDecoder)->bsFrames[i],
  628|  7.39k|                                    &(*pMpegSurroundDecoder)->llState);
  629|  7.39k|      if (err != MPS_OK) {
  ------------------
  |  Branch (629:11): [True: 0, False: 7.39k]
  ------------------
  630|      0|        sacDec = *pMpegSurroundDecoder;
  631|      0|        goto bail;
  632|      0|      }
  633|  7.39k|    }
  634|  7.39k|    (*pMpegSurroundDecoder)->pQmfDomain = pQmfDomain;
  635|       |
  636|  7.39k|    (*pMpegSurroundDecoder)->bsFrameDelay = 1;
  637|  7.39k|    (*pMpegSurroundDecoder)->bsFrameParse = 0;
  638|  7.39k|    (*pMpegSurroundDecoder)->bsFrameDecode = 0;
  639|       |
  640|  7.39k|    return err;
  641|  7.39k|  } else {
  642|    218|    sacDec = *pMpegSurroundDecoder;
  643|    218|  }
  644|       |
  645|    218|  if (sacDec->pSpatialDec == NULL) {
  ------------------
  |  Branch (645:7): [True: 92, False: 126]
  ------------------
  646|     92|    if ((self = FDK_SpatialDecOpen(&decConfig, stereoConfigIndex)) == NULL) {
  ------------------
  |  Branch (646:9): [True: 0, False: 92]
  ------------------
  647|      0|      err = MPS_OUTOFMEMORY;
  648|      0|      goto bail;
  649|      0|    }
  650|    126|  } else {
  651|    126|    self = sacDec->pSpatialDec;
  652|    126|  }
  653|       |
  654|    218|  self->pQmfDomain = sacDec->pQmfDomain;
  655|       |
  656|    218|  sacDec->pSpatialDec = self;
  657|       |
  658|       |  /* default parameter set */
  659|    218|  sacDec->mpegSurroundUserParams.outputMode = SACDEC_OUT_MODE_NORMAL;
  660|    218|  sacDec->mpegSurroundUserParams.blindEnable = 0;
  661|    218|  sacDec->mpegSurroundUserParams.bypassMode = 0;
  662|    218|  sacDec->mpegSurroundUserParams.concealMethod = 1;
  663|    218|  sacDec->mpegSurroundUserParams.concealNumKeepFrames = 10;
  664|    218|  sacDec->mpegSurroundUserParams.concealFadeOutSlopeLength = 5;
  665|    218|  sacDec->mpegSurroundUserParams.concealFadeInSlopeLength = 5;
  666|    218|  sacDec->mpegSurroundUserParams.concealNumReleaseFrames = 3;
  667|    218|  sacDec->mpegSurroundSscIsGlobalCfg = 0;
  668|    218|  sacDec->mpegSurroundUseTimeInterface = 1;
  669|    218|  sacDec->mpegSurroundDecoderLevel = decConfig.decoderLevel;
  670|       |
  671|    218|  sacDec->upmixType = UPMIX_TYPE_NORMAL;
  672|       |
  673|       |  /* signalize spatial decoder re-initalization */
  674|    218|  updateMpegSurroundDecoderStatus(sacDec, MPEGS_INIT_ENFORCE_REINIT,
  675|    218|                                  MPEGS_SYNC_LOST, MPEGS_STOP);
  676|       |
  677|       |  /* return decoder instance */
  678|    218|  *pMpegSurroundDecoder = sacDec;
  679|    218|  sacDec->decConfig = decConfig;
  680|       |
  681|    218|  SpatialDecInitParserContext(sacDec->pSpatialDec);
  682|       |
  683|    218|  return err;
  684|       |
  685|      0|bail:
  686|      0|  if (sacDec != NULL) {
  ------------------
  |  Branch (686:7): [True: 0, False: 0]
  ------------------
  687|      0|    mpegSurroundDecoder_Close(sacDec);
  688|      0|  }
  689|      0|  *pMpegSurroundDecoder = NULL;
  690|      0|  if (err == MPS_OK) {
  ------------------
  |  Branch (690:7): [True: 0, False: 0]
  ------------------
  691|      0|    return MPS_OUTOFMEMORY;
  692|      0|  } else {
  693|      0|    return err;
  694|      0|  }
  695|      0|}
sac_dec_lib.cpp:_ZL35mpegSurroundDecoder_GetNrOfQmfBandsPK25T_SPATIAL_SPECIFIC_CONFIGj:
  251|    518|    const SPATIAL_SPECIFIC_CONFIG *pSsc, UINT sampleRate) {
  252|    518|  UINT samplingFrequency = sampleRate;
  253|    518|  int qmfBands = 64;
  254|       |
  255|    518|  if (pSsc != NULL) {
  ------------------
  |  Branch (255:7): [True: 518, False: 0]
  ------------------
  256|    518|    switch (pSsc->coreCodec) {
  257|      0|      case AOT_USAC:
  ------------------
  |  Branch (257:7): [True: 0, False: 518]
  ------------------
  258|      0|        if ((pSsc->stereoConfigIndex == 3)) {
  ------------------
  |  Branch (258:13): [True: 0, False: 0]
  ------------------
  259|      0|          static const UCHAR mapIdx2QmfBands[3] = {24, 32, 16};
  260|      0|          FDK_ASSERT((pSsc->coreSbrFrameLengthIndex >= 2) &&
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (260:11): [True: 0, False: 0]
  |  Branch (260:11): [True: 0, False: 0]
  |  Branch (260:11): [True: 0, False: 0]
  ------------------
  261|      0|                     (pSsc->coreSbrFrameLengthIndex <= 4));
  262|      0|          qmfBands = mapIdx2QmfBands[pSsc->coreSbrFrameLengthIndex - 2];
  263|      0|        }
  264|      0|        return qmfBands;
  265|    518|      default:
  ------------------
  |  Branch (265:7): [True: 518, False: 0]
  ------------------
  266|    518|        samplingFrequency = pSsc->samplingFreq;
  267|    518|        break;
  268|    518|    }
  269|    518|  }
  270|       |
  271|       |  /* number of QMF bands depend on sampling frequency, see FDIS 23003-1:2006
  272|       |   * Chapter 6.3.3 */
  273|    518|  if (samplingFrequency < 27713) {
  ------------------
  |  Branch (273:7): [True: 322, False: 196]
  ------------------
  274|    322|    qmfBands = 32;
  275|    322|  }
  276|    518|  if (samplingFrequency > 55426) {
  ------------------
  |  Branch (276:7): [True: 0, False: 518]
  ------------------
  277|      0|    qmfBands = 128;
  278|      0|  }
  279|       |
  280|    518|  return qmfBands;
  281|    518|}
sac_dec_lib.cpp:_ZL17sscCheckOutOfBandPK25T_SPATIAL_SPECIFIC_CONFIGiii:
 1115|    615|                  const INT sampleRate, const INT frameSize) {
 1116|    615|  FDK_ASSERT(pSsc != NULL);
  ------------------
  |  |  221|    615|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (1116:3): [True: 615, False: 0]
  ------------------
 1117|    615|  int qmfBands = 0;
 1118|       |
 1119|       |  /* check ssc for parse errors */
 1120|    615|  if (sscParseCheck(pSsc) != MPS_OK) {
  ------------------
  |  Branch (1120:7): [True: 16, False: 599]
  ------------------
 1121|     16|    return MPS_PARSE_ERROR;
 1122|     16|  }
 1123|       |
 1124|    599|  switch (coreCodec) {
 1125|     99|    case AOT_USAC:
  ------------------
  |  Branch (1125:5): [True: 99, False: 500]
  ------------------
 1126|     99|    case AOT_DRM_USAC:
  ------------------
  |  Branch (1126:5): [True: 0, False: 599]
  ------------------
 1127|       |      /* ISO/IEC 23003-1:2007(E), Chapter 6.3.3, Support for lower and higher
 1128|       |       * sampling frequencies */
 1129|     99|      if (pSsc->samplingFreq >= 55426) {
  ------------------
  |  Branch (1129:11): [True: 16, False: 83]
  ------------------
 1130|     16|        return MPS_PARSE_ERROR;
 1131|     16|      }
 1132|     83|      break;
 1133|     83|    case AOT_ER_AAC_LD:
  ------------------
  |  Branch (1133:5): [True: 0, False: 599]
  ------------------
 1134|    500|    case AOT_ER_AAC_ELD:
  ------------------
  |  Branch (1134:5): [True: 500, False: 99]
  ------------------
 1135|       |      /* core fs and mps fs must match */
 1136|    500|      if (pSsc->samplingFreq != sampleRate) {
  ------------------
  |  Branch (1136:11): [True: 27, False: 473]
  ------------------
 1137|     27|        return MPS_PARSE_ERROR;
 1138|     27|      }
 1139|       |
 1140|       |      /* ISO/IEC 14496-3:2009 FDAM 3: Chapter 1.5.2.3, Levels for the Low Delay
 1141|       |       * AAC v2 profile */
 1142|    473|      if (pSsc->samplingFreq > 48000) {
  ------------------
  |  Branch (1142:11): [True: 6, False: 467]
  ------------------
 1143|      6|        return MPS_PARSE_ERROR;
 1144|      6|      }
 1145|       |
 1146|    467|      qmfBands = mpegSurroundDecoder_GetNrOfQmfBands(pSsc, pSsc->samplingFreq);
 1147|    467|      switch (frameSize) {
 1148|     84|        case 480:
  ------------------
  |  Branch (1148:9): [True: 84, False: 383]
  ------------------
 1149|     84|          if (!((qmfBands == 32) && (pSsc->nTimeSlots == 15))) {
  ------------------
  |  Branch (1149:17): [True: 82, False: 2]
  |  Branch (1149:37): [True: 79, False: 3]
  ------------------
 1150|      5|            return MPS_PARSE_ERROR;
 1151|      5|          }
 1152|     79|          break;
 1153|     79|        case 960:
  ------------------
  |  Branch (1153:9): [True: 40, False: 427]
  ------------------
 1154|     40|          if (!((qmfBands == 64) && (pSsc->nTimeSlots == 15))) {
  ------------------
  |  Branch (1154:17): [True: 39, False: 1]
  |  Branch (1154:37): [True: 34, False: 5]
  ------------------
 1155|      6|            return MPS_PARSE_ERROR;
 1156|      6|          }
 1157|     34|          break;
 1158|    304|        case 512:
  ------------------
  |  Branch (1158:9): [True: 304, False: 163]
  ------------------
 1159|    304|          if (!(((qmfBands == 32) && (pSsc->nTimeSlots == 16)) ||
  ------------------
  |  Branch (1159:18): [True: 200, False: 104]
  |  Branch (1159:38): [True: 193, False: 7]
  ------------------
 1160|    111|                ((qmfBands == 64) && (pSsc->nTimeSlots == 8)))) {
  ------------------
  |  Branch (1160:18): [True: 104, False: 7]
  |  Branch (1160:38): [True: 91, False: 13]
  ------------------
 1161|     20|            return MPS_PARSE_ERROR;
 1162|     20|          }
 1163|    284|          break;
 1164|    284|        case 1024:
  ------------------
  |  Branch (1164:9): [True: 39, False: 428]
  ------------------
 1165|     39|          if (!((qmfBands == 64) && (pSsc->nTimeSlots == 16))) {
  ------------------
  |  Branch (1165:17): [True: 38, False: 1]
  |  Branch (1165:37): [True: 36, False: 2]
  ------------------
 1166|      3|            return MPS_PARSE_ERROR;
 1167|      3|          }
 1168|     36|          break;
 1169|     36|        default:
  ------------------
  |  Branch (1169:9): [True: 0, False: 467]
  ------------------
 1170|      0|          return MPS_PARSE_ERROR;
 1171|    467|      }
 1172|    433|      break;
 1173|    433|    default:
  ------------------
  |  Branch (1173:5): [True: 0, False: 599]
  ------------------
 1174|      0|      return MPS_PARSE_ERROR;
 1175|      0|      break;
 1176|    599|  }
 1177|       |
 1178|    516|  return MPS_OK;
 1179|    599|}
sac_dec_lib.cpp:_ZL31updateMpegSurroundDecoderStatusP19MpegSurroundDecoderi15MPEGS_SYNCSTATE18MPEGS_ANCSTARTSTOP:
  356|    218|    MPEGS_SYNCSTATE fOnSync, MPEGS_ANCSTARTSTOP ancStartStopPrev) {
  357|    218|  pMpegSurroundDecoder->initFlags[pMpegSurroundDecoder->bsFrameDecode] |=
  358|    218|      initFlags;
  359|    218|  if ((pMpegSurroundDecoder->mpegSurroundSscIsGlobalCfg != 0) &&
  ------------------
  |  Branch (359:7): [True: 0, False: 218]
  ------------------
  360|      0|      (pMpegSurroundDecoder->fOnSync[pMpegSurroundDecoder->bsFrameDecode] >=
  ------------------
  |  Branch (360:7): [True: 0, False: 0]
  ------------------
  361|      0|       MPEGS_SYNC_FOUND) &&
  362|      0|      (fOnSync < MPEGS_SYNC_FOUND)) {
  ------------------
  |  Branch (362:7): [True: 0, False: 0]
  ------------------
  363|      0|    pMpegSurroundDecoder->fOnSync[pMpegSurroundDecoder->bsFrameDecode] =
  364|      0|        MPEGS_SYNC_FOUND;
  365|    218|  } else {
  366|    218|    pMpegSurroundDecoder->fOnSync[pMpegSurroundDecoder->bsFrameDecode] =
  367|    218|        fOnSync;
  368|    218|  }
  369|    218|  pMpegSurroundDecoder->ancStartStopPrev = ancStartStopPrev;
  370|    218|}

sac_dec.cpp:_ZL20SacGetHybridSubbandsi:
  212|     92|static inline int SacGetHybridSubbands(int qmfSubbands) {
  213|     92|  return qmfSubbands - MAX_QMF_BANDS_TO_HYBRID + 10;
  ------------------
  |  |  161|     92|  (3) /* 3 bands are filtered again in "40 bands" case */
  ------------------
  214|     92|}

_Z15subbandTPCreatePP7STP_DEC:
  267|     92|SACDEC_ERROR subbandTPCreate(HANDLE_STP_DEC *hStpDec) {
  268|     92|  HANDLE_STP_DEC self = NULL;
  269|     92|  FDK_ALLOCATE_MEMORY_1D(self, 1, struct STP_DEC)
  ------------------
  |  |  149|     92|  if (((a) = (type*)fdkCallocMatrix1D((dim1), sizeof(type))) == NULL) { \
  |  |  ------------------
  |  |  |  Branch (149:7): [True: 0, False: 92]
  |  |  ------------------
  |  |  150|      0|    goto bail;                                                          \
  |  |  151|      0|  }
  ------------------
  270|     92|  if (hStpDec != NULL) {
  ------------------
  |  Branch (270:7): [True: 92, False: 0]
  ------------------
  271|     92|    *hStpDec = self;
  272|     92|  }
  273|       |
  274|     92|  return MPS_OK;
  275|      0|bail:
  276|      0|  return MPS_OUTOFMEMORY;
  277|     92|}
_Z16subbandTPDestroyPP7STP_DEC:
  302|     92|void subbandTPDestroy(HANDLE_STP_DEC *hStpDec) {
  303|     92|  if (hStpDec != NULL) {
  ------------------
  |  Branch (303:7): [True: 92, False: 0]
  ------------------
  304|       |    FDK_FREE_MEMORY_1D(*hStpDec);
  ------------------
  |  |  171|     92|  do {                           \
  |  |  172|     92|    fdkFreeMatrix1D((void*)(a)); \
  |  |  173|     92|    (a) = NULL;                  \
  |  |  174|     92|  } while (0)
  |  |  ------------------
  |  |  |  Branch (174:12): [Folded, False: 92]
  |  |  ------------------
  ------------------
  305|     92|  }
  306|     92|}

_Z21createSbrEnvelopeCalcP22SBR_CALCULATE_ENVELOPEP15SBR_HEADER_DATAij:
 1745|  1.64k|    const UINT flags) {
 1746|  1.64k|  SBR_ERROR err = SBRDEC_OK;
 1747|  1.64k|  int i;
 1748|       |
 1749|       |  /* Clear previous missing harmonics flags */
 1750|  4.94k|  for (i = 0; i < ADD_HARMONICS_FLAGS_SIZE; i++) {
  ------------------
  |  |  159|  4.94k|#define ADD_HARMONICS_FLAGS_SIZE 2 /* ceil(MAX_FREQ_COEFFS/32) */
  ------------------
  |  Branch (1750:15): [True: 3.29k, False: 1.64k]
  ------------------
 1751|  3.29k|    hs->harmFlagsPrev[i] = 0;
 1752|  3.29k|    hs->harmFlagsPrevActive[i] = 0;
 1753|  3.29k|  }
 1754|  1.64k|  hs->harmIndex = 0;
 1755|       |
 1756|  1.64k|  FDKmemclear(hs->prevSbrNoiseFloorLevel, sizeof(hs->prevSbrNoiseFloorLevel));
 1757|  1.64k|  hs->prevNNfb = 0;
 1758|  1.64k|  FDKmemclear(hs->prevFreqBandTableNoise, sizeof(hs->prevFreqBandTableNoise));
 1759|  1.64k|  hs->sinusoidal_positionPrev = 0;
 1760|       |
 1761|       |  /*
 1762|       |    Setup pointers for time smoothing.
 1763|       |    The buffer itself will be initialized later triggered by the startUp-flag.
 1764|       |  */
 1765|  1.64k|  hs->prevTranEnv = -1;
 1766|       |
 1767|       |  /* initialization */
 1768|  1.64k|  resetSbrEnvelopeCalc(hs);
 1769|       |
 1770|  1.64k|  if (chan == 0) { /* do this only once */
  ------------------
  |  Branch (1770:7): [True: 1.26k, False: 378]
  ------------------
 1771|  1.26k|    err = resetFreqBandTables(hHeaderData, flags);
 1772|  1.26k|  }
 1773|       |
 1774|  1.64k|  return err;
 1775|  1.64k|}
_Z21deleteSbrEnvelopeCalcP22SBR_CALCULATE_ENVELOPE:
 1785|  1.69k|int deleteSbrEnvelopeCalc(HANDLE_SBR_CALCULATE_ENVELOPE hs) { return 0; }
_Z20resetSbrEnvelopeCalcP22SBR_CALCULATE_ENVELOPE:
 1797|  1.64k|{
 1798|  1.64k|  hCalEnv->phaseIndex = 0;
 1799|       |
 1800|       |  /* Noise exponent needs to be reset because the output exponent for the next
 1801|       |   * frame depends on it */
 1802|  1.64k|  hCalEnv->filtBufferNoise_e = 0;
 1803|       |
 1804|  1.64k|  hCalEnv->startUp = 1;
 1805|  1.64k|}

_Z25sbrdec_mapToStdSampleRatejj:
  219|  1.99k|{
  220|  1.99k|  UINT fsMapped = fs, tableSize = 0;
  221|  1.99k|  const SR_MAPPING *mappingTable;
  222|  1.99k|  int i;
  223|       |
  224|  1.99k|  if (!isUsac) {
  ------------------
  |  Branch (224:7): [True: 1.44k, False: 545]
  ------------------
  225|  1.44k|    mappingTable = stdSampleRatesMapping;
  226|  1.44k|    tableSize = sizeof(stdSampleRatesMapping) / sizeof(SR_MAPPING);
  227|  1.44k|  } else {
  228|    545|    mappingTable = stdSampleRatesMappingUsac;
  229|    545|    tableSize = sizeof(stdSampleRatesMappingUsac) / sizeof(SR_MAPPING);
  230|    545|  }
  231|       |
  232|  14.2k|  for (i = tableSize - 1; i >= 0; i--) {
  ------------------
  |  Branch (232:27): [True: 14.2k, False: 0]
  ------------------
  233|  14.2k|    if (fs >= mappingTable[i].fsRangeLo) {
  ------------------
  |  Branch (233:9): [True: 1.99k, False: 12.2k]
  ------------------
  234|  1.99k|      fsMapped = mappingTable[i].fsMapped;
  235|  1.99k|      break;
  236|  1.99k|    }
  237|  14.2k|  }
  238|       |
  239|  1.99k|  return (fsMapped);
  240|  1.99k|}
_Z14initHeaderDataP15SBR_HEADER_DATAiiiiji:
  246|  2.53k|               const int setDefaultHdr) {
  247|  2.53k|  HANDLE_FREQ_BAND_DATA hFreq = &hHeaderData->freqBandData;
  248|  2.53k|  SBR_ERROR sbrError = SBRDEC_OK;
  249|  2.53k|  int numAnalysisBands;
  250|  2.53k|  int sampleRateProc;
  251|       |
  252|  2.53k|  if (!(flags & (SBRDEC_SYNTAX_USAC | SBRDEC_SYNTAX_RSVD50))) {
  ------------------
  |  |  206|  2.53k|#define SBRDEC_SYNTAX_USAC 4
  ------------------
                if (!(flags & (SBRDEC_SYNTAX_USAC | SBRDEC_SYNTAX_RSVD50))) {
  ------------------
  |  |  207|  2.53k|#define SBRDEC_SYNTAX_RSVD50 8
  ------------------
  |  Branch (252:7): [True: 1.44k, False: 1.09k]
  ------------------
  253|  1.44k|    sampleRateProc =
  254|  1.44k|        sbrdec_mapToStdSampleRate(sampleRateOut * downscaleFactor, 0);
  255|  1.44k|  } else {
  256|  1.09k|    sampleRateProc = sampleRateOut * downscaleFactor;
  257|  1.09k|  }
  258|       |
  259|  2.53k|  if (sampleRateIn == sampleRateOut) {
  ------------------
  |  Branch (259:7): [True: 1.05k, False: 1.48k]
  ------------------
  260|  1.05k|    hHeaderData->sbrProcSmplRate = sampleRateProc << 1;
  261|  1.05k|    numAnalysisBands = 32;
  262|  1.48k|  } else {
  263|  1.48k|    hHeaderData->sbrProcSmplRate = sampleRateProc;
  264|  1.48k|    if ((sampleRateOut >> 1) == sampleRateIn) {
  ------------------
  |  Branch (264:9): [True: 610, False: 876]
  ------------------
  265|       |      /* 1:2 */
  266|    610|      numAnalysisBands = 32;
  267|    876|    } else if ((sampleRateOut >> 2) == sampleRateIn) {
  ------------------
  |  Branch (267:16): [True: 280, False: 596]
  ------------------
  268|       |      /* 1:4 */
  269|    280|      numAnalysisBands = 16;
  270|    596|    } else if ((sampleRateOut * 3) >> 3 == (sampleRateIn * 8) >> 3) {
  ------------------
  |  Branch (270:16): [True: 596, False: 0]
  ------------------
  271|       |      /* 3:8, 3/4 core frame length */
  272|    596|      numAnalysisBands = 24;
  273|    596|    } else {
  274|      0|      sbrError = SBRDEC_UNSUPPORTED_CONFIG;
  275|      0|      goto bail;
  276|      0|    }
  277|  1.48k|  }
  278|  2.53k|  numAnalysisBands /= downscaleFactor;
  279|       |
  280|  2.53k|  if (setDefaultHdr) {
  ------------------
  |  Branch (280:7): [True: 2.53k, False: 0]
  ------------------
  281|       |    /* Fill in default values first */
  282|  2.53k|    hHeaderData->syncState = SBR_NOT_INITIALIZED;
  283|  2.53k|    hHeaderData->status = 0;
  284|  2.53k|    hHeaderData->frameErrorFlag = 0;
  285|       |
  286|  2.53k|    hHeaderData->bs_info.ampResolution = 1;
  287|  2.53k|    hHeaderData->bs_info.xover_band = 0;
  288|  2.53k|    hHeaderData->bs_info.sbr_preprocessing = 0;
  289|  2.53k|    hHeaderData->bs_info.pvc_mode = 0;
  290|       |
  291|  2.53k|    hHeaderData->bs_data.startFreq = 5;
  292|  2.53k|    hHeaderData->bs_data.stopFreq = 0;
  293|  2.53k|    hHeaderData->bs_data.freqScale =
  294|  2.53k|        0; /* previously 2; for ELD reduced delay bitstreams
  295|       |           /samplerates initializing of the sbr decoder instance fails if
  296|       |           freqScale is set to 2 because no master table can be generated; in
  297|       |           ELD reduced delay bitstreams this value is always 0; gets overwritten
  298|       |           when header is read */
  299|  2.53k|    hHeaderData->bs_data.alterScale = 1;
  300|  2.53k|    hHeaderData->bs_data.noise_bands = 2;
  301|  2.53k|    hHeaderData->bs_data.limiterBands = 2;
  302|  2.53k|    hHeaderData->bs_data.limiterGains = 2;
  303|  2.53k|    hHeaderData->bs_data.interpolFreq = 1;
  304|  2.53k|    hHeaderData->bs_data.smoothingLength = 1;
  305|       |
  306|       |    /* Patch some entries */
  307|  2.53k|    if (sampleRateOut * downscaleFactor >= 96000) {
  ------------------
  |  Branch (307:9): [True: 170, False: 2.36k]
  ------------------
  308|    170|      hHeaderData->bs_data.startFreq =
  309|    170|          4; /*   having read these frequency values from bit stream before. */
  310|    170|      hHeaderData->bs_data.stopFreq = 3;
  311|  2.36k|    } else if (sampleRateOut * downscaleFactor >
  ------------------
  |  Branch (311:16): [True: 1.04k, False: 1.32k]
  ------------------
  312|  2.36k|               24000) { /* Trigger an error if SBR is going to be processed
  313|       |                           without     */
  314|  1.04k|      hHeaderData->bs_data.startFreq =
  315|  1.04k|          7; /*   having read these frequency values from bit stream before. */
  316|  1.04k|      hHeaderData->bs_data.stopFreq = 3;
  317|  1.04k|    }
  318|  2.53k|  }
  319|       |
  320|  2.53k|  if ((sampleRateOut >> 2) == sampleRateIn) {
  ------------------
  |  Branch (320:7): [True: 280, False: 2.25k]
  ------------------
  321|    280|    hHeaderData->timeStep = 4;
  322|  2.25k|  } else {
  323|  2.25k|    hHeaderData->timeStep = (flags & SBRDEC_ELD_GRID) ? 1 : 2;
  ------------------
  |  |  204|  2.25k|#define SBRDEC_ELD_GRID 1
  ------------------
  |  Branch (323:29): [True: 1.44k, False: 810]
  ------------------
  324|  2.25k|  }
  325|       |
  326|       |  /* Setup pointers to frequency band tables */
  327|  2.53k|  hFreq->freqBandTable[0] = hFreq->freqBandTableLo;
  328|  2.53k|  hFreq->freqBandTable[1] = hFreq->freqBandTableHi;
  329|       |
  330|       |  /* One SBR timeslot corresponds to the amount of samples equal to the amount
  331|       |   * of analysis bands, divided by the timestep. */
  332|  2.53k|  hHeaderData->numberTimeSlots =
  333|  2.53k|      (samplesPerFrame / numAnalysisBands) >> (hHeaderData->timeStep - 1);
  334|  2.53k|  if (hHeaderData->numberTimeSlots > (16)) {
  ------------------
  |  Branch (334:7): [True: 0, False: 2.53k]
  ------------------
  335|      0|    sbrError = SBRDEC_UNSUPPORTED_CONFIG;
  336|      0|  }
  337|       |
  338|  2.53k|  hHeaderData->numberOfAnalysisBands = numAnalysisBands;
  339|  2.53k|  if ((sampleRateOut >> 2) == sampleRateIn) {
  ------------------
  |  Branch (339:7): [True: 280, False: 2.25k]
  ------------------
  340|    280|    hHeaderData->numberTimeSlots <<= 1;
  341|    280|  }
  342|       |
  343|  2.53k|bail:
  344|  2.53k|  return sbrError;
  345|  2.53k|}
_Z20initSbrPrevFrameDataP19SBR_PREV_FRAME_DATAi:
  354|  1.62k|{
  355|  1.62k|  int i;
  356|       |
  357|       |  /* Set previous energy and noise levels to 0 for the case
  358|       |     that decoding starts in the middle of a bitstream */
  359|  92.8k|  for (i = 0; i < MAX_FREQ_COEFFS; i++)
  ------------------
  |  |  140|  92.8k|#define MAX_FREQ_COEFFS MAX_FREQ_COEFFS_QUAD_RATE
  |  |  ------------------
  |  |  |  |  139|  92.8k|#define MAX_FREQ_COEFFS_QUAD_RATE 56
  |  |  ------------------
  ------------------
  |  Branch (359:15): [True: 91.2k, False: 1.62k]
  ------------------
  360|  91.2k|    h_prev_data->sfb_nrg_prev[i] = (FIXP_DBL)0;
  361|  9.77k|  for (i = 0; i < MAX_NOISE_COEFFS; i++)
  ------------------
  |  |  128|  9.77k|#define MAX_NOISE_COEFFS 5
  ------------------
  |  Branch (361:15): [True: 8.14k, False: 1.62k]
  ------------------
  362|  8.14k|    h_prev_data->prevNoiseLevel[i] = (FIXP_DBL)0;
  363|  9.77k|  for (i = 0; i < MAX_INVF_BANDS; i++) h_prev_data->sbr_invf_mode[i] = INVF_OFF;
  ------------------
  |  |  159|  9.77k|#define MAX_INVF_BANDS MAX_NOISE_COEFFS
  |  |  ------------------
  |  |  |  |  128|  9.77k|#define MAX_NOISE_COEFFS 5
  |  |  ------------------
  ------------------
  |  Branch (363:15): [True: 8.14k, False: 1.62k]
  ------------------
  364|       |
  365|  1.62k|  h_prev_data->stopPos = timeSlots;
  366|  1.62k|  h_prev_data->coupling = COUPLING_OFF;
  367|  1.62k|  h_prev_data->ampRes = 0;
  368|       |
  369|  1.62k|  FDKmemclear(&h_prev_data->prevFrameInfo, sizeof(h_prev_data->prevFrameInfo));
  370|  1.62k|}
_Z16sbrGetHeaderDataP15SBR_HEADER_DATAP13FDK_BITSTREAMjih:
  380|  2.59k|                 const UCHAR configMode) {
  381|  2.59k|  SBR_HEADER_DATA_BS *pBsData;
  382|  2.59k|  SBR_HEADER_DATA_BS lastHeader;
  383|  2.59k|  SBR_HEADER_DATA_BS_INFO lastInfo;
  384|  2.59k|  int headerExtra1 = 0, headerExtra2 = 0;
  385|       |
  386|       |  /* Read and discard new header in config change detection mode */
  387|  2.59k|  if (configMode & AC_CM_DET_CFG_CHANGE) {
  ------------------
  |  |  334|  2.59k|  0x000001 /*!< Config mode signalizes the callback to work in config change \
  ------------------
  |  Branch (387:7): [True: 1.41k, False: 1.18k]
  ------------------
  388|  1.41k|    if (!(flags & (SBRDEC_SYNTAX_RSVD50 | SBRDEC_SYNTAX_USAC))) {
  ------------------
  |  |  207|  1.41k|#define SBRDEC_SYNTAX_RSVD50 8
  ------------------
                  if (!(flags & (SBRDEC_SYNTAX_RSVD50 | SBRDEC_SYNTAX_USAC))) {
  ------------------
  |  |  206|  1.41k|#define SBRDEC_SYNTAX_USAC 4
  ------------------
  |  Branch (388:9): [True: 714, False: 700]
  ------------------
  389|       |      /* ampResolution */
  390|    714|      FDKreadBits(hBs, 1);
  391|    714|    }
  392|       |    /* startFreq, stopFreq */
  393|  1.41k|    FDKpushFor(hBs, 8);
  394|  1.41k|    if (!(flags & (SBRDEC_SYNTAX_RSVD50 | SBRDEC_SYNTAX_USAC))) {
  ------------------
  |  |  207|  1.41k|#define SBRDEC_SYNTAX_RSVD50 8
  ------------------
                  if (!(flags & (SBRDEC_SYNTAX_RSVD50 | SBRDEC_SYNTAX_USAC))) {
  ------------------
  |  |  206|  1.41k|#define SBRDEC_SYNTAX_USAC 4
  ------------------
  |  Branch (394:9): [True: 714, False: 700]
  ------------------
  395|       |      /* xover_band */
  396|    714|      FDKreadBits(hBs, 3);
  397|       |      /* reserved bits */
  398|    714|      FDKreadBits(hBs, 2);
  399|    714|    }
  400|  1.41k|    headerExtra1 = FDKreadBit(hBs);
  401|  1.41k|    headerExtra2 = FDKreadBit(hBs);
  402|  1.41k|    FDKpushFor(hBs, 5 * headerExtra1 + 6 * headerExtra2);
  403|       |
  404|  1.41k|    return HEADER_OK;
  405|  1.41k|  }
  406|       |
  407|       |  /* Copy SBR bit stream header to temporary header */
  408|  1.18k|  lastHeader = hHeaderData->bs_data;
  409|  1.18k|  lastInfo = hHeaderData->bs_info;
  410|       |
  411|       |  /* Read new header from bitstream */
  412|  1.18k|  if ((flags & (SBRDEC_SYNTAX_RSVD50 | SBRDEC_SYNTAX_USAC)) && !fIsSbrData) {
  ------------------
  |  |  207|  1.18k|#define SBRDEC_SYNTAX_RSVD50 8
  ------------------
                if ((flags & (SBRDEC_SYNTAX_RSVD50 | SBRDEC_SYNTAX_USAC)) && !fIsSbrData) {
  ------------------
  |  |  206|  1.18k|#define SBRDEC_SYNTAX_USAC 4
  ------------------
  |  Branch (412:7): [True: 518, False: 665]
  |  Branch (412:64): [True: 518, False: 0]
  ------------------
  413|    518|    pBsData = &hHeaderData->bs_dflt;
  414|    665|  } else {
  415|    665|    pBsData = &hHeaderData->bs_data;
  416|    665|  }
  417|       |
  418|  1.18k|  if (!(flags & (SBRDEC_SYNTAX_RSVD50 | SBRDEC_SYNTAX_USAC))) {
  ------------------
  |  |  207|  1.18k|#define SBRDEC_SYNTAX_RSVD50 8
  ------------------
                if (!(flags & (SBRDEC_SYNTAX_RSVD50 | SBRDEC_SYNTAX_USAC))) {
  ------------------
  |  |  206|  1.18k|#define SBRDEC_SYNTAX_USAC 4
  ------------------
  |  Branch (418:7): [True: 665, False: 518]
  ------------------
  419|    665|    hHeaderData->bs_info.ampResolution = FDKreadBits(hBs, 1);
  420|    665|  }
  421|       |
  422|  1.18k|  pBsData->startFreq = FDKreadBits(hBs, 4);
  423|  1.18k|  pBsData->stopFreq = FDKreadBits(hBs, 4);
  424|       |
  425|  1.18k|  if (!(flags & (SBRDEC_SYNTAX_RSVD50 | SBRDEC_SYNTAX_USAC))) {
  ------------------
  |  |  207|  1.18k|#define SBRDEC_SYNTAX_RSVD50 8
  ------------------
                if (!(flags & (SBRDEC_SYNTAX_RSVD50 | SBRDEC_SYNTAX_USAC))) {
  ------------------
  |  |  206|  1.18k|#define SBRDEC_SYNTAX_USAC 4
  ------------------
  |  Branch (425:7): [True: 665, False: 518]
  ------------------
  426|    665|    hHeaderData->bs_info.xover_band = FDKreadBits(hBs, 3);
  427|    665|    FDKreadBits(hBs, 2);
  428|    665|  }
  429|       |
  430|  1.18k|  headerExtra1 = FDKreadBits(hBs, 1);
  431|  1.18k|  headerExtra2 = FDKreadBits(hBs, 1);
  432|       |
  433|       |  /* Handle extra header information */
  434|  1.18k|  if (headerExtra1) {
  ------------------
  |  Branch (434:7): [True: 206, False: 977]
  ------------------
  435|    206|    pBsData->freqScale = FDKreadBits(hBs, 2);
  436|    206|    pBsData->alterScale = FDKreadBits(hBs, 1);
  437|    206|    pBsData->noise_bands = FDKreadBits(hBs, 2);
  438|    977|  } else {
  439|    977|    pBsData->freqScale = 2;
  440|    977|    pBsData->alterScale = 1;
  441|    977|    pBsData->noise_bands = 2;
  442|    977|  }
  443|       |
  444|  1.18k|  if (headerExtra2) {
  ------------------
  |  Branch (444:7): [True: 85, False: 1.09k]
  ------------------
  445|     85|    pBsData->limiterBands = FDKreadBits(hBs, 2);
  446|     85|    pBsData->limiterGains = FDKreadBits(hBs, 2);
  447|     85|    pBsData->interpolFreq = FDKreadBits(hBs, 1);
  448|     85|    pBsData->smoothingLength = FDKreadBits(hBs, 1);
  449|  1.09k|  } else {
  450|  1.09k|    pBsData->limiterBands = 2;
  451|  1.09k|    pBsData->limiterGains = 2;
  452|  1.09k|    pBsData->interpolFreq = 1;
  453|  1.09k|    pBsData->smoothingLength = 1;
  454|  1.09k|  }
  455|       |
  456|       |  /* Look for new settings. IEC 14496-3, 4.6.18.3.1 */
  457|  1.18k|  if (hHeaderData->syncState < SBR_HEADER ||
  ------------------
  |  Branch (457:7): [True: 1.18k, False: 0]
  ------------------
  458|      0|      lastHeader.startFreq != pBsData->startFreq ||
  ------------------
  |  Branch (458:7): [True: 0, False: 0]
  ------------------
  459|      0|      lastHeader.stopFreq != pBsData->stopFreq ||
  ------------------
  |  Branch (459:7): [True: 0, False: 0]
  ------------------
  460|      0|      lastHeader.freqScale != pBsData->freqScale ||
  ------------------
  |  Branch (460:7): [True: 0, False: 0]
  ------------------
  461|      0|      lastHeader.alterScale != pBsData->alterScale ||
  ------------------
  |  Branch (461:7): [True: 0, False: 0]
  ------------------
  462|      0|      lastHeader.noise_bands != pBsData->noise_bands ||
  ------------------
  |  Branch (462:7): [True: 0, False: 0]
  ------------------
  463|  1.18k|      lastInfo.xover_band != hHeaderData->bs_info.xover_band) {
  ------------------
  |  Branch (463:7): [True: 0, False: 0]
  ------------------
  464|  1.18k|    return HEADER_RESET; /* New settings */
  465|  1.18k|  }
  466|       |
  467|      0|  return HEADER_OK;
  468|  1.18k|}

_Z19QmfTransposerCreatePP13hbeTransposeriii:
  925|     36|                    int bDisableCrossProducts, int bSbr41) {
  926|     36|  HANDLE_HBE_TRANSPOSER hQmfTran = NULL;
  927|       |
  928|     36|  int i;
  929|       |
  930|     36|  if (hQmfTransposer != NULL) {
  ------------------
  |  Branch (930:7): [True: 36, False: 0]
  ------------------
  931|       |    /* Memory allocation */
  932|       |    /*--------------------------------------------------------------------------------------------*/
  933|     36|    hQmfTran =
  934|     36|        (HANDLE_HBE_TRANSPOSER)FDKcalloc(1, sizeof(struct hbeTransposer));
  935|     36|    if (hQmfTran == NULL) {
  ------------------
  |  Branch (935:9): [True: 0, False: 36]
  ------------------
  936|      0|      return SBRDEC_MEM_ALLOC_FAILED;
  937|      0|    }
  938|       |
  939|    144|    for (i = 0; i < MAX_STRETCH_HBE - 1; i++) {
  ------------------
  |  |  118|    144|#define MAX_STRETCH_HBE (4)
  ------------------
  |  Branch (939:17): [True: 108, False: 36]
  ------------------
  940|    108|      hQmfTran->bXProducts[i] = (bDisableCrossProducts ? 0 : xProducts[i]);
  ------------------
  |  Branch (940:34): [True: 0, False: 108]
  ------------------
  941|    108|    }
  942|       |
  943|     36|    hQmfTran->timeDomainWinLen = frameSize;
  944|     36|    if (frameSize == 768) {
  ------------------
  |  Branch (944:9): [True: 14, False: 22]
  ------------------
  945|     14|      hQmfTran->noCols =
  946|     14|          (8 * frameSize / 3) / QMF_SYNTH_CHANNELS; /* 32 for 24:64 */
  ------------------
  |  |  109|     14|#define QMF_SYNTH_CHANNELS (64)
  ------------------
  947|     22|    } else {
  948|     22|      hQmfTran->noCols =
  949|     22|          (bSbr41 + 1) * 2 * frameSize /
  950|     22|          QMF_SYNTH_CHANNELS; /* 32 for 32:64 and 64 for 16:64 -> identical to
  ------------------
  |  |  109|     22|#define QMF_SYNTH_CHANNELS (64)
  ------------------
  951|       |                                 sbrdec->no_cols */
  952|     22|    }
  953|       |
  954|     36|    hQmfTran->noChannels = frameSize / hQmfTran->noCols;
  955|       |
  956|     36|    hQmfTran->qmfInBufSize = QMF_WIN_LEN;
  ------------------
  |  |  118|     36|  (12 + 6 - 4 - 1) /* 6 subband slots extra delay to align with HQ - 4 slots \
  ------------------
  957|     36|    hQmfTran->qmfOutBufSize = 2 * (hQmfTran->noCols / 2 + QMF_WIN_LEN - 1);
  ------------------
  |  |  118|     36|  (12 + 6 - 4 - 1) /* 6 subband slots extra delay to align with HQ - 4 slots \
  ------------------
  958|       |
  959|     36|    hQmfTran->inBuf_F =
  960|     36|        (LONG*)FDKcalloc(QMF_SYNTH_CHANNELS + 20 + 1, sizeof(LONG));
  ------------------
  |  |  109|     36|#define QMF_SYNTH_CHANNELS (64)
  ------------------
  961|       |    /* buffered time signal needs to be delayed by synthesis_size; max
  962|       |     * synthesis_size = 20; */
  963|     36|    if (hQmfTran->inBuf_F == NULL) {
  ------------------
  |  Branch (963:9): [True: 0, False: 36]
  ------------------
  964|      0|      QmfTransposerClose(hQmfTran);
  965|      0|      return SBRDEC_MEM_ALLOC_FAILED;
  966|      0|    }
  967|       |
  968|     36|    hQmfTran->qmfInBufReal_F =
  969|     36|        (FIXP_DBL**)FDKcalloc(hQmfTran->qmfInBufSize, sizeof(FIXP_DBL*));
  970|     36|    hQmfTran->qmfInBufImag_F =
  971|     36|        (FIXP_DBL**)FDKcalloc(hQmfTran->qmfInBufSize, sizeof(FIXP_DBL*));
  972|       |
  973|     36|    if (hQmfTran->qmfInBufReal_F == NULL) {
  ------------------
  |  Branch (973:9): [True: 0, False: 36]
  ------------------
  974|      0|      QmfTransposerClose(hQmfTran);
  975|      0|      return SBRDEC_MEM_ALLOC_FAILED;
  976|      0|    }
  977|     36|    if (hQmfTran->qmfInBufImag_F == NULL) {
  ------------------
  |  Branch (977:9): [True: 0, False: 36]
  ------------------
  978|      0|      QmfTransposerClose(hQmfTran);
  979|      0|      return SBRDEC_MEM_ALLOC_FAILED;
  980|      0|    }
  981|       |
  982|    504|    for (i = 0; i < hQmfTran->qmfInBufSize; i++) {
  ------------------
  |  Branch (982:17): [True: 468, False: 36]
  ------------------
  983|    468|      hQmfTran->qmfInBufReal_F[i] = (FIXP_DBL*)FDKaalloc(
  984|    468|          QMF_SYNTH_CHANNELS * sizeof(FIXP_DBL), ALIGNMENT_DEFAULT);
  ------------------
  |  |  109|    468|#define QMF_SYNTH_CHANNELS (64)
  ------------------
                        QMF_SYNTH_CHANNELS * sizeof(FIXP_DBL), ALIGNMENT_DEFAULT);
  ------------------
  |  |  256|    468|#define ALIGNMENT_DEFAULT 8
  ------------------
  985|    468|      hQmfTran->qmfInBufImag_F[i] = (FIXP_DBL*)FDKaalloc(
  986|    468|          QMF_SYNTH_CHANNELS * sizeof(FIXP_DBL), ALIGNMENT_DEFAULT);
  ------------------
  |  |  109|    468|#define QMF_SYNTH_CHANNELS (64)
  ------------------
                        QMF_SYNTH_CHANNELS * sizeof(FIXP_DBL), ALIGNMENT_DEFAULT);
  ------------------
  |  |  256|    468|#define ALIGNMENT_DEFAULT 8
  ------------------
  987|    468|      if (hQmfTran->qmfInBufReal_F[i] == NULL) {
  ------------------
  |  Branch (987:11): [True: 0, False: 468]
  ------------------
  988|      0|        QmfTransposerClose(hQmfTran);
  989|      0|        return SBRDEC_MEM_ALLOC_FAILED;
  990|      0|      }
  991|    468|      if (hQmfTran->qmfInBufImag_F[i] == NULL) {
  ------------------
  |  Branch (991:11): [True: 0, False: 468]
  ------------------
  992|      0|        QmfTransposerClose(hQmfTran);
  993|      0|        return SBRDEC_MEM_ALLOC_FAILED;
  994|      0|      }
  995|    468|    }
  996|       |
  997|     36|    hQmfTran->qmfHBEBufReal_F =
  998|     36|        (FIXP_DBL**)FDKcalloc(HBE_MAX_OUT_SLOTS, sizeof(FIXP_DBL*));
  ------------------
  |  |  115|     36|#define HBE_MAX_OUT_SLOTS (11)
  ------------------
  999|     36|    hQmfTran->qmfHBEBufImag_F =
 1000|     36|        (FIXP_DBL**)FDKcalloc(HBE_MAX_OUT_SLOTS, sizeof(FIXP_DBL*));
  ------------------
  |  |  115|     36|#define HBE_MAX_OUT_SLOTS (11)
  ------------------
 1001|       |
 1002|     36|    if (hQmfTran->qmfHBEBufReal_F == NULL) {
  ------------------
  |  Branch (1002:9): [True: 0, False: 36]
  ------------------
 1003|      0|      QmfTransposerClose(hQmfTran);
 1004|      0|      return SBRDEC_MEM_ALLOC_FAILED;
 1005|      0|    }
 1006|     36|    if (hQmfTran->qmfHBEBufImag_F == NULL) {
  ------------------
  |  Branch (1006:9): [True: 0, False: 36]
  ------------------
 1007|      0|      QmfTransposerClose(hQmfTran);
 1008|      0|      return SBRDEC_MEM_ALLOC_FAILED;
 1009|      0|    }
 1010|       |
 1011|    432|    for (i = 0; i < HBE_MAX_OUT_SLOTS; i++) {
  ------------------
  |  |  115|    432|#define HBE_MAX_OUT_SLOTS (11)
  ------------------
  |  Branch (1011:17): [True: 396, False: 36]
  ------------------
 1012|    396|      hQmfTran->qmfHBEBufReal_F[i] =
 1013|    396|          (FIXP_DBL*)FDKcalloc(QMF_SYNTH_CHANNELS, sizeof(FIXP_DBL));
  ------------------
  |  |  109|    396|#define QMF_SYNTH_CHANNELS (64)
  ------------------
 1014|    396|      hQmfTran->qmfHBEBufImag_F[i] =
 1015|    396|          (FIXP_DBL*)FDKcalloc(QMF_SYNTH_CHANNELS, sizeof(FIXP_DBL));
  ------------------
  |  |  109|    396|#define QMF_SYNTH_CHANNELS (64)
  ------------------
 1016|    396|      if (hQmfTran->qmfHBEBufReal_F[i] == NULL) {
  ------------------
  |  Branch (1016:11): [True: 0, False: 396]
  ------------------
 1017|      0|        QmfTransposerClose(hQmfTran);
 1018|      0|        return SBRDEC_MEM_ALLOC_FAILED;
 1019|      0|      }
 1020|    396|      if (hQmfTran->qmfHBEBufImag_F[i] == NULL) {
  ------------------
  |  Branch (1020:11): [True: 0, False: 396]
  ------------------
 1021|      0|        QmfTransposerClose(hQmfTran);
 1022|      0|        return SBRDEC_MEM_ALLOC_FAILED;
 1023|      0|      }
 1024|    396|    }
 1025|       |
 1026|     36|    hQmfTran->qmfBufferCodecTempSlot_F =
 1027|     36|        (FIXP_DBL*)FDKcalloc(QMF_SYNTH_CHANNELS / 2, sizeof(FIXP_DBL));
  ------------------
  |  |  109|     36|#define QMF_SYNTH_CHANNELS (64)
  ------------------
 1028|     36|    if (hQmfTran->qmfBufferCodecTempSlot_F == NULL) {
  ------------------
  |  Branch (1028:9): [True: 0, False: 36]
  ------------------
 1029|      0|      QmfTransposerClose(hQmfTran);
 1030|      0|      return SBRDEC_MEM_ALLOC_FAILED;
 1031|      0|    }
 1032|       |
 1033|     36|    hQmfTran->bSbr41 = bSbr41;
 1034|       |
 1035|     36|    hQmfTran->highband_exp[0] = 0;
 1036|     36|    hQmfTran->highband_exp[1] = 0;
 1037|     36|    hQmfTran->target_exp[0] = 0;
 1038|     36|    hQmfTran->target_exp[1] = 0;
 1039|       |
 1040|     36|    *hQmfTransposer = hQmfTran;
 1041|     36|  }
 1042|       |
 1043|     36|  return SBRDEC_OK;
 1044|     36|}
_Z18QmfTransposerCloseP13hbeTransposer:
 1176|     36|void QmfTransposerClose(HANDLE_HBE_TRANSPOSER hQmfTransposer) {
 1177|     36|  int i;
 1178|       |
 1179|     36|  if (hQmfTransposer != NULL) {
  ------------------
  |  Branch (1179:7): [True: 36, False: 0]
  ------------------
 1180|     36|    if (hQmfTransposer->inBuf_F) FDKfree(hQmfTransposer->inBuf_F);
  ------------------
  |  Branch (1180:9): [True: 36, False: 0]
  ------------------
 1181|       |
 1182|     36|    if (hQmfTransposer->qmfInBufReal_F) {
  ------------------
  |  Branch (1182:9): [True: 36, False: 0]
  ------------------
 1183|    504|      for (i = 0; i < hQmfTransposer->qmfInBufSize; i++) {
  ------------------
  |  Branch (1183:19): [True: 468, False: 36]
  ------------------
 1184|    468|        FDKafree(hQmfTransposer->qmfInBufReal_F[i]);
 1185|    468|      }
 1186|     36|      FDKfree(hQmfTransposer->qmfInBufReal_F);
 1187|     36|    }
 1188|       |
 1189|     36|    if (hQmfTransposer->qmfInBufImag_F) {
  ------------------
  |  Branch (1189:9): [True: 36, False: 0]
  ------------------
 1190|    504|      for (i = 0; i < hQmfTransposer->qmfInBufSize; i++) {
  ------------------
  |  Branch (1190:19): [True: 468, False: 36]
  ------------------
 1191|    468|        FDKafree(hQmfTransposer->qmfInBufImag_F[i]);
 1192|    468|      }
 1193|     36|      FDKfree(hQmfTransposer->qmfInBufImag_F);
 1194|     36|    }
 1195|       |
 1196|     36|    if (hQmfTransposer->qmfHBEBufReal_F) {
  ------------------
  |  Branch (1196:9): [True: 36, False: 0]
  ------------------
 1197|    432|      for (i = 0; i < HBE_MAX_OUT_SLOTS; i++) {
  ------------------
  |  |  115|    432|#define HBE_MAX_OUT_SLOTS (11)
  ------------------
  |  Branch (1197:19): [True: 396, False: 36]
  ------------------
 1198|    396|        FDKfree(hQmfTransposer->qmfHBEBufReal_F[i]);
 1199|    396|      }
 1200|     36|      FDKfree(hQmfTransposer->qmfHBEBufReal_F);
 1201|     36|    }
 1202|       |
 1203|     36|    if (hQmfTransposer->qmfHBEBufImag_F) {
  ------------------
  |  Branch (1203:9): [True: 36, False: 0]
  ------------------
 1204|    432|      for (i = 0; i < HBE_MAX_OUT_SLOTS; i++) {
  ------------------
  |  |  115|    432|#define HBE_MAX_OUT_SLOTS (11)
  ------------------
  |  Branch (1204:19): [True: 396, False: 36]
  ------------------
 1205|    396|        FDKfree(hQmfTransposer->qmfHBEBufImag_F[i]);
 1206|    396|      }
 1207|     36|      FDKfree(hQmfTransposer->qmfHBEBufImag_F);
 1208|     36|    }
 1209|       |
 1210|     36|    FDKfree(hQmfTransposer->qmfBufferCodecTempSlot_F);
 1211|       |
 1212|     36|    FDKfree(hQmfTransposer);
 1213|     36|  }
 1214|     36|}

_Z19createLppTransposerP13SBR_LPP_TRANSP19TRANSPOSER_SETTINGSiPhiiiiS3_ijii:
 1259|  1.62k|    const int overlap) {
 1260|       |  /* FB inverse filtering settings */
 1261|  1.62k|  hs->pSettings = pSettings;
 1262|       |
 1263|  1.62k|  pSettings->nCols = nCols;
 1264|  1.62k|  pSettings->overlap = overlap;
 1265|       |
 1266|  1.62k|  switch (timeSlots) {
 1267|    680|    case 15:
  ------------------
  |  Branch (1267:5): [True: 680, False: 949]
  ------------------
 1268|  1.62k|    case 16:
  ------------------
  |  Branch (1268:5): [True: 949, False: 680]
  ------------------
 1269|  1.62k|      break;
 1270|       |
 1271|      0|    default:
  ------------------
  |  Branch (1271:5): [True: 0, False: 1.62k]
  ------------------
 1272|      0|      return SBRDEC_UNSUPPORTED_CONFIG; /* Unimplemented */
 1273|  1.62k|  }
 1274|       |
 1275|  1.62k|  if (chan == 0) {
  ------------------
  |  Branch (1275:7): [True: 1.25k, False: 378]
  ------------------
 1276|       |    /* Init common data only once */
 1277|  1.25k|    hs->pSettings->nCols = nCols;
 1278|       |
 1279|  1.25k|    return resetLppTransposer(hs, highBandStartSb, v_k_master, numMaster,
 1280|  1.25k|                              noiseBandTable, noNoiseBands, usb, fs);
 1281|  1.25k|  }
 1282|    378|  return SBRDEC_OK;
 1283|  1.62k|}
_Z18resetLppTransposerP13SBR_LPP_TRANShPhhS1_hhj:
 1324|  1.25k|) {
 1325|  1.25k|  TRANSPOSER_SETTINGS *pSettings = hLppTrans->pSettings;
 1326|  1.25k|  PATCH_PARAM *patchParam = pSettings->patchParam;
 1327|       |
 1328|  1.25k|  int i, patch;
 1329|  1.25k|  int targetStopBand;
 1330|  1.25k|  int sourceStartBand;
 1331|  1.25k|  int patchDistance;
 1332|  1.25k|  int numBandsInPatch;
 1333|       |
 1334|  1.25k|  int lsb = v_k_master[0]; /* Start subband expressed in "non-critical" sampling
 1335|       |                              terms*/
 1336|  1.25k|  int xoverOffset = highBandStartSb -
 1337|  1.25k|                    lsb; /* Calculate distance in QMF bands between k0 and kx */
 1338|  1.25k|  int startFreqHz;
 1339|       |
 1340|  1.25k|  int desiredBorder;
 1341|       |
 1342|  1.25k|  usb = fixMin(usb, v_k_master[numMaster]); /* Avoid endless loops (compare with
  ------------------
  |  |  306|  1.25k|#define fixMin(a, b) fMin(a, b)
  ------------------
 1343|       |                                               float code). */
 1344|       |
 1345|       |  /*
 1346|       |   * Plausibility check
 1347|       |   */
 1348|       |
 1349|  1.25k|  if (pSettings->nCols == 64) {
  ------------------
  |  Branch (1349:7): [True: 123, False: 1.12k]
  ------------------
 1350|    123|    if (lsb < 4) {
  ------------------
  |  Branch (1350:9): [True: 0, False: 123]
  ------------------
 1351|       |      /* 4:1 SBR Requirement k0 >= 4 missed! */
 1352|      0|      return SBRDEC_UNSUPPORTED_CONFIG;
 1353|      0|    }
 1354|  1.12k|  } else if (lsb - SHIFT_START_SB < 4) {
  ------------------
  |  |  162|  1.12k|#define SHIFT_START_SB 1 /*!< lowest subband of source range */
  ------------------
  |  Branch (1354:14): [True: 0, False: 1.12k]
  ------------------
 1355|      0|    return SBRDEC_UNSUPPORTED_CONFIG;
 1356|      0|  }
 1357|       |
 1358|       |  /*
 1359|       |   * Initialize the patching parameter
 1360|       |   */
 1361|       |  /* ISO/IEC 14496-3 (Figure 4.48): goalSb = round( 2.048e6 / fs ) */
 1362|  1.25k|  desiredBorder = (((2048000 * 2) / fs) + 1) >> 1;
 1363|       |
 1364|  1.25k|  desiredBorder = findClosestEntry(desiredBorder, v_k_master, numMaster,
 1365|  1.25k|                                   1); /* Adapt region to master-table */
 1366|       |
 1367|       |  /* First patch */
 1368|  1.25k|  sourceStartBand = SHIFT_START_SB + xoverOffset;
  ------------------
  |  |  162|  1.25k|#define SHIFT_START_SB 1 /*!< lowest subband of source range */
  ------------------
 1369|  1.25k|  targetStopBand = lsb + xoverOffset; /* upperBand */
 1370|       |
 1371|       |  /* Even (odd) numbered channel must be patched to even (odd) numbered channel
 1372|       |   */
 1373|  1.25k|  patch = 0;
 1374|  3.43k|  while (targetStopBand < usb) {
  ------------------
  |  Branch (1374:10): [True: 2.19k, False: 1.24k]
  ------------------
 1375|       |    /* Too many patches?
 1376|       |       Allow MAX_NUM_PATCHES+1 patches here.
 1377|       |       we need to check later again, since patch might be the highest patch
 1378|       |       AND contain less than 3 bands => actual number of patches will be reduced
 1379|       |       by 1.
 1380|       |    */
 1381|  2.19k|    if (patch > MAX_NUM_PATCHES) {
  ------------------
  |  |  161|  2.19k|#define MAX_NUM_PATCHES 6
  ------------------
  |  Branch (1381:9): [True: 8, False: 2.18k]
  ------------------
 1382|      8|      return SBRDEC_UNSUPPORTED_CONFIG;
 1383|      8|    }
 1384|       |
 1385|  2.18k|    patchParam[patch].guardStartBand = targetStopBand;
 1386|  2.18k|    patchParam[patch].targetStartBand = targetStopBand;
 1387|       |
 1388|  2.18k|    numBandsInPatch =
 1389|  2.18k|        desiredBorder - targetStopBand; /* Get the desired range of the patch */
 1390|       |
 1391|  2.18k|    if (numBandsInPatch >= lsb - sourceStartBand) {
  ------------------
  |  Branch (1391:9): [True: 950, False: 1.23k]
  ------------------
 1392|       |      /* Desired number bands are not available -> patch whole source range */
 1393|    950|      patchDistance =
 1394|    950|          targetStopBand - sourceStartBand; /* Get the targetOffset */
 1395|    950|      patchDistance =
 1396|    950|          patchDistance & ~1; /* Rounding off odd numbers and make all even */
 1397|    950|      numBandsInPatch =
 1398|    950|          lsb - (targetStopBand -
 1399|    950|                 patchDistance); /* Update number of bands to be patched */
 1400|    950|      numBandsInPatch = findClosestEntry(targetStopBand + numBandsInPatch,
 1401|    950|                                         v_k_master, numMaster, 0) -
 1402|    950|                        targetStopBand; /* Adapt region to master-table */
 1403|    950|    }
 1404|       |
 1405|  2.18k|    if (pSettings->nCols == 64) {
  ------------------
  |  Branch (1405:9): [True: 370, False: 1.81k]
  ------------------
 1406|    370|      if (numBandsInPatch == 0 && sourceStartBand == SHIFT_START_SB) {
  ------------------
  |  |  162|      0|#define SHIFT_START_SB 1 /*!< lowest subband of source range */
  ------------------
  |  Branch (1406:11): [True: 0, False: 370]
  |  Branch (1406:35): [True: 0, False: 0]
  ------------------
 1407|      0|        return SBRDEC_UNSUPPORTED_CONFIG;
 1408|      0|      }
 1409|    370|    }
 1410|       |
 1411|       |    /* Desired number bands are available -> get the minimal even patching
 1412|       |     * distance */
 1413|  2.18k|    patchDistance =
 1414|  2.18k|        numBandsInPatch + targetStopBand - lsb; /* Get minimal distance */
 1415|  2.18k|    patchDistance = (patchDistance + 1) &
 1416|  2.18k|                    ~1; /* Rounding up odd numbers and make all even */
 1417|       |
 1418|  2.18k|    if (numBandsInPatch > 0) {
  ------------------
  |  Branch (1418:9): [True: 2.17k, False: 12]
  ------------------
 1419|  2.17k|      patchParam[patch].sourceStartBand = targetStopBand - patchDistance;
 1420|  2.17k|      patchParam[patch].targetBandOffs = patchDistance;
 1421|  2.17k|      patchParam[patch].numBandsInPatch = numBandsInPatch;
 1422|  2.17k|      patchParam[patch].sourceStopBand =
 1423|  2.17k|          patchParam[patch].sourceStartBand + numBandsInPatch;
 1424|       |
 1425|  2.17k|      targetStopBand += patchParam[patch].numBandsInPatch;
 1426|  2.17k|      patch++;
 1427|  2.17k|    }
 1428|       |
 1429|       |    /* All patches but first */
 1430|  2.18k|    sourceStartBand = SHIFT_START_SB;
  ------------------
  |  |  162|  2.18k|#define SHIFT_START_SB 1 /*!< lowest subband of source range */
  ------------------
 1431|       |
 1432|       |    /* Check if we are close to desiredBorder */
 1433|  2.18k|    if (desiredBorder - targetStopBand < 3) /* MPEG doc */
  ------------------
  |  Branch (1433:9): [True: 1.56k, False: 622]
  ------------------
 1434|  1.56k|    {
 1435|  1.56k|      desiredBorder = usb;
 1436|  1.56k|    }
 1437|  2.18k|  }
 1438|       |
 1439|  1.24k|  patch--;
 1440|       |
 1441|       |  /* If highest patch contains less than three subband: skip it */
 1442|  1.24k|  if ((patch > 0) && (patchParam[patch].numBandsInPatch < 3)) {
  ------------------
  |  Branch (1442:7): [True: 584, False: 659]
  |  Branch (1442:22): [True: 300, False: 284]
  ------------------
 1443|    300|    patch--;
 1444|    300|    targetStopBand =
 1445|    300|        patchParam[patch].targetStartBand + patchParam[patch].numBandsInPatch;
 1446|    300|  }
 1447|       |
 1448|       |  /* now check if we don't have one too many */
 1449|  1.24k|  if (patch >= MAX_NUM_PATCHES) {
  ------------------
  |  |  161|  1.24k|#define MAX_NUM_PATCHES 6
  ------------------
  |  Branch (1449:7): [True: 2, False: 1.24k]
  ------------------
 1450|      2|    return SBRDEC_UNSUPPORTED_CONFIG;
 1451|      2|  }
 1452|       |
 1453|  1.24k|  pSettings->noOfPatches = patch + 1;
 1454|       |
 1455|       |  /* Check lowest and highest source subband */
 1456|  1.24k|  pSettings->lbStartPatching = targetStopBand;
 1457|  1.24k|  pSettings->lbStopPatching = 0;
 1458|  3.04k|  for (patch = 0; patch < pSettings->noOfPatches; patch++) {
  ------------------
  |  Branch (1458:19): [True: 1.80k, False: 1.24k]
  ------------------
 1459|  1.80k|    pSettings->lbStartPatching =
 1460|  1.80k|        fixMin(pSettings->lbStartPatching, patchParam[patch].sourceStartBand);
  ------------------
  |  |  306|  1.80k|#define fixMin(a, b) fMin(a, b)
  ------------------
 1461|  1.80k|    pSettings->lbStopPatching =
 1462|  1.80k|        fixMax(pSettings->lbStopPatching, patchParam[patch].sourceStopBand);
  ------------------
  |  |  307|  1.80k|#define fixMax(a, b) fMax(a, b)
  ------------------
 1463|  1.80k|  }
 1464|       |
 1465|  3.78k|  for (i = 0; i < noNoiseBands; i++) {
  ------------------
  |  Branch (1465:15): [True: 2.54k, False: 1.24k]
  ------------------
 1466|  2.54k|    pSettings->bwBorders[i] = noiseBandTable[i + 1];
 1467|  2.54k|  }
 1468|  11.1k|  for (; i < MAX_NUM_NOISE_VALUES; i++) {
  ------------------
  |  |  129|  11.1k|#define MAX_NUM_NOISE_VALUES (MAX_NOISE_ENVELOPES * MAX_NOISE_COEFFS)
  |  |  ------------------
  |  |  |  |  127|  11.1k|#define MAX_NOISE_ENVELOPES 2
  |  |  ------------------
  |  |               #define MAX_NUM_NOISE_VALUES (MAX_NOISE_ENVELOPES * MAX_NOISE_COEFFS)
  |  |  ------------------
  |  |  |  |  128|  11.1k|#define MAX_NOISE_COEFFS 5
  |  |  ------------------
  ------------------
  |  Branch (1468:10): [True: 9.86k, False: 1.24k]
  ------------------
 1469|  9.86k|    pSettings->bwBorders[i] = 255;
 1470|  9.86k|  }
 1471|       |
 1472|       |  /*
 1473|       |   * Choose whitening factors
 1474|       |   */
 1475|       |
 1476|  1.24k|  startFreqHz =
 1477|  1.24k|      ((lsb + xoverOffset) * fs) >> 7; /* Shift does a division by 2*(64) */
 1478|       |
 1479|  3.16k|  for (i = 1; i < NUM_WHFACTOR_TABLE_ENTRIES; i++) {
  ------------------
  |  |  139|  3.16k|#define NUM_WHFACTOR_TABLE_ENTRIES 9
  ------------------
  |  Branch (1479:15): [True: 3.12k, False: 45]
  ------------------
 1480|  3.12k|    if (startFreqHz < FDK_sbrDecoder_sbr_whFactorsIndex[i]) break;
  ------------------
  |  Branch (1480:9): [True: 1.19k, False: 1.92k]
  ------------------
 1481|  3.12k|  }
 1482|  1.24k|  i--;
 1483|       |
 1484|  1.24k|  pSettings->whFactors.off = FDK_sbrDecoder_sbr_whFactorsTable[i][0];
 1485|  1.24k|  pSettings->whFactors.transitionLevel =
 1486|  1.24k|      FDK_sbrDecoder_sbr_whFactorsTable[i][1];
 1487|  1.24k|  pSettings->whFactors.lowLevel = FDK_sbrDecoder_sbr_whFactorsTable[i][2];
 1488|  1.24k|  pSettings->whFactors.midLevel = FDK_sbrDecoder_sbr_whFactorsTable[i][3];
 1489|  1.24k|  pSettings->whFactors.highLevel = FDK_sbrDecoder_sbr_whFactorsTable[i][4];
 1490|       |
 1491|  1.24k|  return SBRDEC_OK;
 1492|  1.24k|}
lpp_tran.cpp:_ZL16findClosestEntryhPhhh:
 1286|  2.20k|                            UCHAR direction) {
 1287|  2.20k|  int index;
 1288|       |
 1289|  2.20k|  if (goalSb <= v_k_master[0]) return v_k_master[0];
  ------------------
  |  Branch (1289:7): [True: 12, False: 2.18k]
  ------------------
 1290|       |
 1291|  2.18k|  if (goalSb >= v_k_master[numMaster]) return v_k_master[numMaster];
  ------------------
  |  Branch (1291:7): [True: 1.20k, False: 981]
  ------------------
 1292|       |
 1293|    981|  if (direction) {
  ------------------
  |  Branch (1293:7): [True: 59, False: 922]
  ------------------
 1294|     59|    index = 0;
 1295|    328|    while (v_k_master[index] < goalSb) {
  ------------------
  |  Branch (1295:12): [True: 269, False: 59]
  ------------------
 1296|    269|      index++;
 1297|    269|    }
 1298|    922|  } else {
 1299|    922|    index = numMaster;
 1300|  5.60k|    while (v_k_master[index] > goalSb) {
  ------------------
  |  Branch (1300:12): [True: 4.68k, False: 922]
  ------------------
 1301|  4.68k|      index--;
 1302|  4.68k|    }
 1303|    922|  }
 1304|       |
 1305|    981|  return v_k_master[index];
 1306|  2.18k|}

_Z12createSbrDecP11SBR_CHANNELP15SBR_HEADER_DATAP19TRANSPOSER_SETTINGSijjiii:
  896|  1.64k|{
  897|  1.64k|  SBR_ERROR err = SBRDEC_OK;
  898|  1.64k|  int timeSlots =
  899|  1.64k|      hHeaderData->numberTimeSlots; /* Number of SBR slots per frame */
  900|  1.64k|  int noCols =
  901|  1.64k|      timeSlots * hHeaderData->timeStep; /* Number of QMF slots per frame */
  902|  1.64k|  HANDLE_SBR_DEC hs = &(hSbrChannel->SbrDec);
  903|       |
  904|       |#if (SBRDEC_MAX_HB_FADE_FRAMES > 0)
  905|       |  hs->highBandFadeCnt = SBRDEC_MAX_HB_FADE_FRAMES;
  906|       |
  907|       |#endif
  908|  1.64k|  hs->scale_hbe = 15;
  909|  1.64k|  hs->scale_lb = 15;
  910|  1.64k|  hs->scale_ov = 15;
  911|       |
  912|  1.64k|  hs->prev_frame_lSbr = 0;
  913|  1.64k|  hs->prev_frame_hbeSbr = 0;
  914|       |
  915|  1.64k|  hs->codecFrameSize = codecFrameSize;
  916|       |
  917|       |  /*
  918|       |    create envelope calculator
  919|       |  */
  920|  1.64k|  err = createSbrEnvelopeCalc(&hs->SbrCalculateEnvelope, hHeaderData, chan,
  921|  1.64k|                              flags);
  922|  1.64k|  if (err != SBRDEC_OK) {
  ------------------
  |  Branch (922:7): [True: 18, False: 1.62k]
  ------------------
  923|     18|    return err;
  924|     18|  }
  925|       |
  926|  1.62k|  initSbrPrevFrameData(&hSbrChannel->prevFrameData, timeSlots);
  927|       |
  928|       |  /*
  929|       |    create transposer
  930|       |  */
  931|  1.62k|  err = createLppTransposer(
  932|  1.62k|      &hs->LppTrans, pSettings, hHeaderData->freqBandData.lowSubband,
  933|  1.62k|      hHeaderData->freqBandData.v_k_master, hHeaderData->freqBandData.numMaster,
  934|  1.62k|      hHeaderData->freqBandData.highSubband, timeSlots, noCols,
  935|  1.62k|      hHeaderData->freqBandData.freqBandTableNoise,
  936|  1.62k|      hHeaderData->freqBandData.nNfb, hHeaderData->sbrProcSmplRate, chan,
  937|  1.62k|      overlap);
  938|  1.62k|  if (err != SBRDEC_OK) {
  ------------------
  |  Branch (938:7): [True: 10, False: 1.61k]
  ------------------
  939|     10|    return err;
  940|     10|  }
  941|       |
  942|  1.61k|  if (flags & SBRDEC_USAC_HARMONICSBR) {
  ------------------
  |  |  218|  1.61k|  256 /* Flag indicating that USAC HBE tool is active. */
  ------------------
  |  Branch (942:7): [True: 36, False: 1.58k]
  ------------------
  943|     36|    int noChannels, bSbr41 = flags & SBRDEC_QUAD_RATE ? 1 : 0;
  ------------------
  |  |  215|     36|  128 /* Flag indicating that USAC SBR 4:1 is active. \
  ------------------
  |  Branch (943:30): [True: 16, False: 20]
  ------------------
  944|       |
  945|     36|    noChannels =
  946|     36|        QMF_SYNTH_CHANNELS /
  ------------------
  |  |  109|     36|#define QMF_SYNTH_CHANNELS (64)
  ------------------
  947|     36|        ((bSbr41 + 1) * 2); /* 32 for (32:64 and 24:64) and 16 for 16:64 */
  948|       |
  949|       |    /* shared memory between hbeLightTimeDelayBuffer and hQmfHBESlotsReal if
  950|       |     * SBRDEC_HBE_ENABLE */
  951|     36|    hSbrChannel->SbrDec.tmp_memory = (FIXP_DBL **)fdkCallocMatrix2D_aligned(
  952|     36|        noCols, noChannels, sizeof(FIXP_DBL));
  953|     36|    if (hSbrChannel->SbrDec.tmp_memory == NULL) {
  ------------------
  |  Branch (953:9): [True: 0, False: 36]
  ------------------
  954|      0|      return SBRDEC_MEM_ALLOC_FAILED;
  955|      0|    }
  956|       |
  957|     36|    hSbrChannel->SbrDec.hQmfHBESlotsReal = hSbrChannel->SbrDec.tmp_memory;
  958|     36|    hSbrChannel->SbrDec.hQmfHBESlotsImag =
  959|     36|        (FIXP_DBL **)fdkCallocMatrix2D_aligned(noCols, noChannels,
  960|     36|                                               sizeof(FIXP_DBL));
  961|     36|    if (hSbrChannel->SbrDec.hQmfHBESlotsImag == NULL) {
  ------------------
  |  Branch (961:9): [True: 0, False: 36]
  ------------------
  962|      0|      return SBRDEC_MEM_ALLOC_FAILED;
  963|      0|    }
  964|       |
  965|       |    /* buffers containing unmodified qmf data; required when switching from
  966|       |     * legacy SBR to HBE                       */
  967|       |    /* buffer can be used as LPCFilterstates buffer because legacy SBR needs
  968|       |     * exactly these values for LPC filtering */
  969|     36|    hSbrChannel->SbrDec.codecQMFBufferReal =
  970|     36|        (FIXP_DBL **)fdkCallocMatrix2D_aligned(noCols, noChannels,
  971|     36|                                               sizeof(FIXP_DBL));
  972|     36|    if (hSbrChannel->SbrDec.codecQMFBufferReal == NULL) {
  ------------------
  |  Branch (972:9): [True: 0, False: 36]
  ------------------
  973|      0|      return SBRDEC_MEM_ALLOC_FAILED;
  974|      0|    }
  975|       |
  976|     36|    hSbrChannel->SbrDec.codecQMFBufferImag =
  977|     36|        (FIXP_DBL **)fdkCallocMatrix2D_aligned(noCols, noChannels,
  978|     36|                                               sizeof(FIXP_DBL));
  979|     36|    if (hSbrChannel->SbrDec.codecQMFBufferImag == NULL) {
  ------------------
  |  Branch (979:9): [True: 0, False: 36]
  ------------------
  980|      0|      return SBRDEC_MEM_ALLOC_FAILED;
  981|      0|    }
  982|       |
  983|     36|    err = QmfTransposerCreate(&hs->hHBE, codecFrameSize, 0, bSbr41);
  984|     36|    if (err != SBRDEC_OK) {
  ------------------
  |  Branch (984:9): [True: 0, False: 36]
  ------------------
  985|      0|      return err;
  986|      0|    }
  987|     36|  }
  988|       |
  989|  1.61k|  return err;
  990|  1.61k|}
_Z12deleteSbrDecP11SBR_CHANNEL:
  996|  1.69k|int deleteSbrDec(SBR_CHANNEL *hSbrChannel) {
  997|  1.69k|  HANDLE_SBR_DEC hs = &hSbrChannel->SbrDec;
  998|       |
  999|  1.69k|  deleteSbrEnvelopeCalc(&hs->SbrCalculateEnvelope);
 1000|       |
 1001|  1.69k|  if (hs->tmp_memory != NULL) {
  ------------------
  |  Branch (1001:7): [True: 36, False: 1.65k]
  ------------------
 1002|     36|    FDK_FREE_MEMORY_2D_ALIGNED(hs->tmp_memory);
  ------------------
  |  |  207|     36|  do {                                    \
  |  |  208|     36|    fdkFreeMatrix2D_aligned((void**)(a)); \
  |  |  209|     36|    (a) = NULL;                           \
  |  |  210|     36|  } while (0)
  |  |  ------------------
  |  |  |  Branch (210:12): [Folded, False: 36]
  |  |  ------------------
  ------------------
 1003|     36|  }
 1004|       |
 1005|       |  /* modify here */
 1006|  1.69k|  FDK_FREE_MEMORY_2D_ALIGNED(hs->hQmfHBESlotsImag);
  ------------------
  |  |  207|  1.69k|  do {                                    \
  |  |  208|  1.69k|    fdkFreeMatrix2D_aligned((void**)(a)); \
  |  |  209|  1.69k|    (a) = NULL;                           \
  |  |  210|  1.69k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (210:12): [Folded, False: 1.69k]
  |  |  ------------------
  ------------------
 1007|       |
 1008|  1.69k|  if (hs->hHBE != NULL) QmfTransposerClose(hs->hHBE);
  ------------------
  |  Branch (1008:7): [True: 36, False: 1.65k]
  ------------------
 1009|       |
 1010|  1.69k|  if (hs->codecQMFBufferReal != NULL) {
  ------------------
  |  Branch (1010:7): [True: 36, False: 1.65k]
  ------------------
 1011|     36|    FDK_FREE_MEMORY_2D_ALIGNED(hs->codecQMFBufferReal);
  ------------------
  |  |  207|     36|  do {                                    \
  |  |  208|     36|    fdkFreeMatrix2D_aligned((void**)(a)); \
  |  |  209|     36|    (a) = NULL;                           \
  |  |  210|     36|  } while (0)
  |  |  ------------------
  |  |  |  Branch (210:12): [Folded, False: 36]
  |  |  ------------------
  ------------------
 1012|     36|  }
 1013|       |
 1014|  1.69k|  if (hs->codecQMFBufferImag != NULL) {
  ------------------
  |  Branch (1014:7): [True: 36, False: 1.65k]
  ------------------
 1015|     36|    FDK_FREE_MEMORY_2D_ALIGNED(hs->codecQMFBufferImag);
  ------------------
  |  |  207|     36|  do {                                    \
  |  |  208|     36|    fdkFreeMatrix2D_aligned((void**)(a)); \
  |  |  209|     36|    (a) = NULL;                           \
  |  |  210|     36|  } while (0)
  |  |  ------------------
  |  |  |  Branch (210:12): [Folded, False: 36]
  |  |  ------------------
  ------------------
 1016|     36|  }
 1017|       |
 1018|  1.69k|  return 0;
 1019|  1.69k|}

_Z25sbrDecoder_drcInitChannelP18SBRDEC_DRC_CHANNEL:
  124|  1.69k|void sbrDecoder_drcInitChannel(HANDLE_SBR_DRC_CHANNEL hDrcData) {
  125|  1.69k|  int band;
  126|       |
  127|  1.69k|  if (hDrcData == NULL) {
  ------------------
  |  Branch (127:7): [True: 0, False: 1.69k]
  ------------------
  128|      0|    return;
  129|      0|  }
  130|       |
  131|   110k|  for (band = 0; band < (64); band++) {
  ------------------
  |  Branch (131:18): [True: 108k, False: 1.69k]
  ------------------
  132|   108k|    hDrcData->prevFact_mag[band] = FL2FXCONST_DBL(0.5f);
  ------------------
  |  |  192|   108k|  (FIXP_DBL)(                                                                \
  |  |  193|   108k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 108k, Folded]
  |  |  ------------------
  |  |  194|   108k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   108k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   108k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 108k]
  |  |  ------------------
  |  |  195|   108k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   108k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   108k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   108k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   108k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   108k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   108k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  133|   108k|  }
  134|       |
  135|  28.7k|  for (band = 0; band < SBRDEC_MAX_DRC_BANDS; band++) {
  ------------------
  |  |  109|  28.7k|#define SBRDEC_MAX_DRC_BANDS (16)
  ------------------
  |  Branch (135:18): [True: 27.0k, False: 1.69k]
  ------------------
  136|  27.0k|    hDrcData->currFact_mag[band] = FL2FXCONST_DBL(0.5f);
  ------------------
  |  |  192|  27.0k|  (FIXP_DBL)(                                                                \
  |  |  193|  27.0k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 27.0k, Folded]
  |  |  ------------------
  |  |  194|  27.0k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  27.0k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  27.0k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 27.0k]
  |  |  ------------------
  |  |  195|  27.0k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  27.0k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  27.0k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  27.0k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  27.0k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  27.0k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  27.0k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  137|  27.0k|    hDrcData->nextFact_mag[band] = FL2FXCONST_DBL(0.5f);
  ------------------
  |  |  192|  27.0k|  (FIXP_DBL)(                                                                \
  |  |  193|  27.0k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 27.0k, Folded]
  |  |  ------------------
  |  |  194|  27.0k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  27.0k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  27.0k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 27.0k]
  |  |  ------------------
  |  |  195|  27.0k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  27.0k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  27.0k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  27.0k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  27.0k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  27.0k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  27.0k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  138|  27.0k|  }
  139|       |
  140|  1.69k|  hDrcData->prevFact_exp = 1;
  141|  1.69k|  hDrcData->currFact_exp = 1;
  142|  1.69k|  hDrcData->nextFact_exp = 1;
  143|       |
  144|  1.69k|  hDrcData->numBandsCurr = 1;
  145|  1.69k|  hDrcData->numBandsNext = 1;
  146|       |
  147|  1.69k|  hDrcData->winSequenceCurr = 0;
  148|  1.69k|  hDrcData->winSequenceNext = 0;
  149|       |
  150|  1.69k|  hDrcData->drcInterpolationSchemeCurr = 0;
  151|  1.69k|  hDrcData->drcInterpolationSchemeNext = 0;
  152|       |
  153|  1.69k|  hDrcData->enable = 0;
  154|  1.69k|}

_Z21sbrdecUpdateFreqScalePhS_jP15SBR_HEADER_DATAj:
  305|  1.93k|    UINT flags) {
  306|  1.93k|  FIXP_SGL bpo_div16; /* bands_per_octave divided by 16 */
  307|  1.93k|  INT dk = 0;
  308|       |
  309|       |  /* Internal variables */
  310|  1.93k|  UCHAR k0, k2, i;
  311|  1.93k|  UCHAR num_bands0 = 0;
  312|  1.93k|  UCHAR num_bands1 = 0;
  313|  1.93k|  UCHAR diff_tot[MAX_OCTAVE + MAX_SECOND_REGION];
  314|  1.93k|  UCHAR *diff0 = diff_tot;
  315|  1.93k|  UCHAR *diff1 = diff_tot + MAX_OCTAVE;
  ------------------
  |  |  116|  1.93k|#define MAX_OCTAVE 29
  ------------------
  316|  1.93k|  INT k2_achived;
  317|  1.93k|  INT k2_diff;
  318|  1.93k|  INT incr = 0;
  319|       |
  320|       |  /*
  321|       |    Determine start band
  322|       |  */
  323|  1.93k|  if (flags & SBRDEC_QUAD_RATE) {
  ------------------
  |  |  215|  1.93k|  128 /* Flag indicating that USAC SBR 4:1 is active. \
  ------------------
  |  Branch (323:7): [True: 140, False: 1.79k]
  ------------------
  324|    140|    fs >>= 1;
  325|    140|  }
  326|       |
  327|  1.93k|  k0 = getStartBand(fs, hHeaderData->bs_data.startFreq, flags);
  328|  1.93k|  if (k0 == 255) {
  ------------------
  |  Branch (328:7): [True: 1, False: 1.93k]
  ------------------
  329|      1|    return SBRDEC_UNSUPPORTED_CONFIG;
  330|      1|  }
  331|       |
  332|       |  /*
  333|       |    Determine stop band
  334|       |  */
  335|  1.93k|  k2 = getStopBand(fs, hHeaderData->bs_data.stopFreq, flags, k0);
  336|  1.93k|  if (k2 == 255) {
  ------------------
  |  Branch (336:7): [True: 27, False: 1.90k]
  ------------------
  337|     27|    return SBRDEC_UNSUPPORTED_CONFIG;
  338|     27|  }
  339|       |
  340|  1.90k|  if (hHeaderData->bs_data.freqScale > 0) { /* Bark */
  ------------------
  |  Branch (340:7): [True: 573, False: 1.33k]
  ------------------
  341|    573|    INT k1;
  342|       |
  343|    573|    if (hHeaderData->bs_data.freqScale == 1) {
  ------------------
  |  Branch (343:9): [True: 39, False: 534]
  ------------------
  344|     39|      bpo_div16 = FL2FXCONST_SGL(12.0f / 16.0f);
  ------------------
  |  |  180|     39|  (FIXP_SGL)(                                                                \
  |  |  181|     39|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 39, Folded]
  |  |  ------------------
  |  |  182|     39|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|     39|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|     39|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 39]
  |  |  ------------------
  |  |  183|     39|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|     39|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|     39|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|     39|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|     39|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|     39|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|     39|          : ((((double)(val) * (FRACT_FIX_SCALE)-0.5) <=                     \
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (186:14): [Folded, False: 0]
  |  |  ------------------
  |  |  187|      0|              (double)(MINVAL_SGL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  188|      0|                 ? (SHORT)(MINVAL_SGL_CONST)                                 \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  189|      0|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  345|    534|    } else if (hHeaderData->bs_data.freqScale == 2) {
  ------------------
  |  Branch (345:16): [True: 490, False: 44]
  ------------------
  346|    490|      bpo_div16 = FL2FXCONST_SGL(10.0f / 16.0f);
  ------------------
  |  |  180|    490|  (FIXP_SGL)(                                                                \
  |  |  181|    490|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 490, Folded]
  |  |  ------------------
  |  |  182|    490|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|    490|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|    490|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 490]
  |  |  ------------------
  |  |  183|    490|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|    490|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|    490|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|    490|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|    490|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|    490|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|    490|          : ((((double)(val) * (FRACT_FIX_SCALE)-0.5) <=                     \
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (186:14): [Folded, False: 0]
  |  |  ------------------
  |  |  187|      0|              (double)(MINVAL_SGL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  188|      0|                 ? (SHORT)(MINVAL_SGL_CONST)                                 \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  189|      0|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  347|    490|    } else {
  348|     44|      bpo_div16 = FL2FXCONST_SGL(8.0f / 16.0f);
  ------------------
  |  |  180|     44|  (FIXP_SGL)(                                                                \
  |  |  181|     44|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 44, Folded]
  |  |  ------------------
  |  |  182|     44|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|     44|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|     44|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 44]
  |  |  ------------------
  |  |  183|     44|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|     44|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|     44|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|     44|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|     44|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|     44|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|     44|          : ((((double)(val) * (FRACT_FIX_SCALE)-0.5) <=                     \
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (186:14): [Folded, False: 0]
  |  |  ------------------
  |  |  187|      0|              (double)(MINVAL_SGL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  188|      0|                 ? (SHORT)(MINVAL_SGL_CONST)                                 \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  189|      0|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  349|     44|    }
  350|       |
  351|       |    /* Ref: ISO/IEC 23003-3, Figure 12 - Flowchart calculation of fMaster for
  352|       |     * 4:1 system when bs_freq_scale > 0 */
  353|    573|    if (flags & SBRDEC_QUAD_RATE) {
  ------------------
  |  |  215|    573|  128 /* Flag indicating that USAC SBR 4:1 is active. \
  ------------------
  |  Branch (353:9): [True: 0, False: 573]
  ------------------
  354|      0|      if ((SHORT)k0 < (SHORT)(bpo_div16 >> ((FRACT_BITS - 1) - 4))) {
  ------------------
  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  ------------------
  |  Branch (354:11): [True: 0, False: 0]
  ------------------
  355|      0|        bpo_div16 = (FIXP_SGL)(k0 & (UCHAR)0xfe)
  356|      0|                    << ((FRACT_BITS - 1) - 4); /* bpo_div16 = floor(k0/2)*2 */
  ------------------
  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  ------------------
  357|      0|      }
  358|      0|    }
  359|       |
  360|    573|    if (1000 * k2 > 2245 * k0) { /* Two or more regions */
  ------------------
  |  Branch (360:9): [True: 341, False: 232]
  ------------------
  361|    341|      k1 = 2 * k0;
  362|       |
  363|    341|      num_bands0 = numberOfBands(bpo_div16, k0, k1, 0);
  364|    341|      num_bands1 =
  365|    341|          numberOfBands(bpo_div16, k1, k2, hHeaderData->bs_data.alterScale);
  366|    341|      if (num_bands0 < 1) {
  ------------------
  |  Branch (366:11): [True: 0, False: 341]
  ------------------
  367|      0|        return SBRDEC_UNSUPPORTED_CONFIG;
  368|      0|      }
  369|    341|      if (num_bands1 < 1) {
  ------------------
  |  Branch (369:11): [True: 0, False: 341]
  ------------------
  370|      0|        return SBRDEC_UNSUPPORTED_CONFIG;
  371|      0|      }
  372|       |
  373|    341|      CalcBands(diff0, k0, k1, num_bands0);
  374|    341|      shellsort(diff0, num_bands0);
  375|    341|      if (diff0[0] == 0) {
  ------------------
  |  Branch (375:11): [True: 46, False: 295]
  ------------------
  376|     46|        return SBRDEC_UNSUPPORTED_CONFIG;
  377|     46|      }
  378|       |
  379|    295|      cumSum(k0, diff0, num_bands0, v_k_master);
  380|       |
  381|    295|      CalcBands(diff1, k1, k2, num_bands1);
  382|    295|      shellsort(diff1, num_bands1);
  383|    295|      if (diff0[num_bands0 - 1] > diff1[0]) {
  ------------------
  |  Branch (383:11): [True: 90, False: 205]
  ------------------
  384|     90|        SBR_ERROR err;
  385|       |
  386|     90|        err = modifyBands(diff0[num_bands0 - 1], diff1, num_bands1);
  387|     90|        if (err) return SBRDEC_UNSUPPORTED_CONFIG;
  ------------------
  |  Branch (387:13): [True: 0, False: 90]
  ------------------
  388|     90|      }
  389|       |
  390|       |      /* Add 2nd region */
  391|    295|      cumSum(k1, diff1, num_bands1, &v_k_master[num_bands0]);
  392|    295|      *numMaster = num_bands0 + num_bands1; /* Output nr of bands */
  393|       |
  394|    295|    } else { /* Only one region */
  395|    232|      k1 = k2;
  396|       |
  397|    232|      num_bands0 = numberOfBands(bpo_div16, k0, k1, 0);
  398|    232|      if (num_bands0 < 1) {
  ------------------
  |  Branch (398:11): [True: 1, False: 231]
  ------------------
  399|      1|        return SBRDEC_UNSUPPORTED_CONFIG;
  400|      1|      }
  401|    231|      CalcBands(diff0, k0, k1, num_bands0);
  402|    231|      shellsort(diff0, num_bands0);
  403|    231|      if (diff0[0] == 0) {
  ------------------
  |  Branch (403:11): [True: 16, False: 215]
  ------------------
  404|     16|        return SBRDEC_UNSUPPORTED_CONFIG;
  405|     16|      }
  406|       |
  407|    215|      cumSum(k0, diff0, num_bands0, v_k_master);
  408|    215|      *numMaster = num_bands0; /* Output nr of bands */
  409|    215|    }
  410|  1.33k|  } else { /* Linear mode */
  411|  1.33k|    if (hHeaderData->bs_data.alterScale == 0) {
  ------------------
  |  Branch (411:9): [True: 47, False: 1.28k]
  ------------------
  412|     47|      dk = 1;
  413|       |      /* FLOOR to get to few number of bands (next lower even number) */
  414|     47|      num_bands0 = (k2 - k0) & 254;
  415|  1.28k|    } else {
  416|  1.28k|      dk = 2;
  417|  1.28k|      num_bands0 = (((k2 - k0) >> 1) + 1) & 254; /* ROUND to the closest fit */
  418|  1.28k|    }
  419|       |
  420|  1.33k|    if (num_bands0 < 1) {
  ------------------
  |  Branch (420:9): [True: 2, False: 1.33k]
  ------------------
  421|      2|      return SBRDEC_UNSUPPORTED_CONFIG;
  422|       |      /* We must return already here because 'i' can become negative below. */
  423|      2|    }
  424|       |
  425|  1.33k|    k2_achived = k0 + num_bands0 * dk;
  426|  1.33k|    k2_diff = k2 - k2_achived;
  427|       |
  428|  14.6k|    for (i = 0; i < num_bands0; i++) diff_tot[i] = dk;
  ------------------
  |  Branch (428:17): [True: 13.3k, False: 1.33k]
  ------------------
  429|       |
  430|       |    /* If linear scale wasn't achieved */
  431|       |    /* and we got too wide SBR area */
  432|  1.33k|    if (k2_diff < 0) {
  ------------------
  |  Branch (432:9): [True: 890, False: 441]
  ------------------
  433|    890|      incr = 1;
  434|    890|      i = 0;
  435|    890|    }
  436|       |
  437|       |    /* If linear scale wasn't achieved */
  438|       |    /* and we got too small SBR area */
  439|  1.33k|    if (k2_diff > 0) {
  ------------------
  |  Branch (439:9): [True: 214, False: 1.11k]
  ------------------
  440|    214|      incr = -1;
  441|    214|      i = num_bands0 - 1;
  442|    214|    }
  443|       |
  444|       |    /* Adjust diff vector to get sepc. SBR range */
  445|  2.66k|    while (k2_diff != 0) {
  ------------------
  |  Branch (445:12): [True: 1.33k, False: 1.33k]
  ------------------
  446|  1.33k|      diff_tot[i] = diff_tot[i] - incr;
  447|  1.33k|      i = i + incr;
  448|  1.33k|      k2_diff = k2_diff + incr;
  449|  1.33k|    }
  450|       |
  451|  1.33k|    cumSum(k0, diff_tot, num_bands0, v_k_master); /* cumsum */
  452|  1.33k|    *numMaster = num_bands0;                      /* Output nr of bands */
  453|  1.33k|  }
  454|       |
  455|  1.84k|  if (*numMaster < 1) {
  ------------------
  |  Branch (455:7): [True: 0, False: 1.84k]
  ------------------
  456|      0|    return SBRDEC_UNSUPPORTED_CONFIG;
  457|      0|  }
  458|       |
  459|       |  /* Ref: ISO/IEC 23003-3 Cor.3, "In 7.5.5.2, add to the requirements:"*/
  460|  1.84k|  if (flags & SBRDEC_QUAD_RATE) {
  ------------------
  |  |  215|  1.84k|  128 /* Flag indicating that USAC SBR 4:1 is active. \
  ------------------
  |  Branch (460:7): [True: 140, False: 1.70k]
  ------------------
  461|    140|    int k;
  462|  1.84k|    for (k = 1; k < *numMaster; k++) {
  ------------------
  |  Branch (462:17): [True: 1.70k, False: 140]
  ------------------
  463|  1.70k|      if (!(v_k_master[k] - v_k_master[k - 1] <= k0 - 2)) {
  ------------------
  |  Branch (463:11): [True: 0, False: 1.70k]
  ------------------
  464|      0|        return SBRDEC_UNSUPPORTED_CONFIG;
  465|      0|      }
  466|  1.70k|    }
  467|    140|  }
  468|       |
  469|       |  /*
  470|       |    Print out the calculated table
  471|       |  */
  472|       |
  473|  1.84k|  return SBRDEC_OK;
  474|  1.84k|}
_Z21sbrdecDownSampleLoResPhhS_h:
  688|  1.77k|                           UCHAR *freqBandTableRef, UCHAR num_Ref) {
  689|  1.77k|  int step;
  690|  1.77k|  int i, j;
  691|  1.77k|  int org_length, result_length;
  692|  1.77k|  int v_index[MAX_FREQ_COEFFS >> 1];
  693|       |
  694|       |  /* init */
  695|  1.77k|  org_length = num_Ref;
  696|  1.77k|  result_length = num_result;
  697|       |
  698|  1.77k|  v_index[0] = 0; /* Always use left border */
  699|  1.77k|  i = 0;
  700|  5.40k|  while (org_length > 0) {
  ------------------
  |  Branch (700:10): [True: 3.63k, False: 1.77k]
  ------------------
  701|       |    /* Create downsample vector */
  702|  3.63k|    i++;
  703|  3.63k|    step = org_length / result_length;
  704|  3.63k|    org_length = org_length - step;
  705|  3.63k|    result_length--;
  706|  3.63k|    v_index[i] = v_index[i - 1] + step;
  707|  3.63k|  }
  708|       |
  709|  7.17k|  for (j = 0; j <= i; j++) {
  ------------------
  |  Branch (709:15): [True: 5.40k, False: 1.77k]
  ------------------
  710|       |    /* Use downsample vector to index LoResolution vector */
  711|  5.40k|    v_result[j] = freqBandTableRef[v_index[j]];
  712|  5.40k|  }
  713|  1.77k|}
_Z9shellsortPhh:
  718|  2.80k|void shellsort(UCHAR *in, UCHAR n) {
  719|  2.80k|  int i, j, v, w;
  720|  2.80k|  int inc = 1;
  721|       |
  722|  2.80k|  do
  723|  7.39k|    inc = 3 * inc + 1;
  724|  7.39k|  while (inc <= n);
  ------------------
  |  Branch (724:10): [True: 4.58k, False: 2.80k]
  ------------------
  725|       |
  726|  7.39k|  do {
  727|  7.39k|    inc = inc / 3;
  728|  56.7k|    for (i = inc; i < n; i++) {
  ------------------
  |  Branch (728:19): [True: 49.3k, False: 7.39k]
  ------------------
  729|  49.3k|      v = in[i];
  730|  49.3k|      j = i;
  731|  53.2k|      while ((w = in[j - inc]) > v) {
  ------------------
  |  Branch (731:14): [True: 4.33k, False: 48.8k]
  ------------------
  732|  4.33k|        in[j] = w;
  733|  4.33k|        j -= inc;
  734|  4.33k|        if (j < inc) break;
  ------------------
  |  Branch (734:13): [True: 492, False: 3.84k]
  ------------------
  735|  4.33k|      }
  736|  49.3k|      in[j] = v;
  737|  49.3k|    }
  738|  7.39k|  } while (inc > 1);
  ------------------
  |  Branch (738:12): [True: 4.58k, False: 2.80k]
  ------------------
  739|  2.80k|}
_Z19resetFreqBandTablesP15SBR_HEADER_DATAj:
  746|  1.93k|resetFreqBandTables(HANDLE_SBR_HEADER_DATA hHeaderData, const UINT flags) {
  747|  1.93k|  SBR_ERROR err = SBRDEC_OK;
  748|  1.93k|  int k2, kx, lsb, usb;
  749|  1.93k|  int intTemp;
  750|  1.93k|  UCHAR nBandsLo, nBandsHi;
  751|  1.93k|  HANDLE_FREQ_BAND_DATA hFreq = &hHeaderData->freqBandData;
  752|       |
  753|       |  /* Calculate master frequency function */
  754|  1.93k|  err = sbrdecUpdateFreqScale(hFreq->v_k_master, &hFreq->numMaster,
  755|  1.93k|                              hHeaderData->sbrProcSmplRate, hHeaderData, flags);
  756|       |
  757|  1.93k|  if (err || (hHeaderData->bs_info.xover_band > hFreq->numMaster)) {
  ------------------
  |  Branch (757:7): [True: 93, False: 1.84k]
  |  Branch (757:14): [True: 13, False: 1.82k]
  ------------------
  758|    106|    return SBRDEC_UNSUPPORTED_CONFIG;
  759|    106|  }
  760|       |
  761|       |  /* Derive Hiresolution from master frequency function */
  762|  1.82k|  sbrdecUpdateHiRes(hFreq->freqBandTable[1], &nBandsHi, hFreq->v_k_master,
  763|  1.82k|                    hFreq->numMaster, hHeaderData->bs_info.xover_band);
  764|       |  /* Derive Loresolution from Hiresolution */
  765|  1.82k|  sbrdecUpdateLoRes(hFreq->freqBandTable[0], &nBandsLo, hFreq->freqBandTable[1],
  766|  1.82k|                    nBandsHi);
  767|       |
  768|       |  /* Check index to freqBandTable[0] */
  769|  1.82k|  if (!(nBandsLo > 0) ||
  ------------------
  |  Branch (769:7): [True: 4, False: 1.82k]
  ------------------
  770|  1.82k|      (nBandsLo > (((hHeaderData->numberOfAnalysisBands == 16)
  ------------------
  |  Branch (770:7): [True: 1, False: 1.82k]
  |  Branch (770:21): [True: 149, False: 1.67k]
  ------------------
  771|  1.82k|                        ? MAX_FREQ_COEFFS_QUAD_RATE
  ------------------
  |  |  139|    149|#define MAX_FREQ_COEFFS_QUAD_RATE 56
  ------------------
  772|  1.82k|                        : MAX_FREQ_COEFFS_DUAL_RATE) >>
  ------------------
  |  |  138|  1.67k|#define MAX_FREQ_COEFFS_DUAL_RATE 48
  ------------------
  773|  1.82k|                   1))) {
  774|      5|    return SBRDEC_UNSUPPORTED_CONFIG;
  775|      5|  }
  776|       |
  777|  1.82k|  hFreq->nSfb[0] = nBandsLo;
  778|  1.82k|  hFreq->nSfb[1] = nBandsHi;
  779|       |
  780|  1.82k|  lsb = hFreq->freqBandTable[0][0];
  781|  1.82k|  usb = hFreq->freqBandTable[0][nBandsLo];
  782|       |
  783|       |  /* Check for start frequency border k_x:
  784|       |     - ISO/IEC 14496-3 4.6.18.3.6 Requirements
  785|       |     - ISO/IEC 23003-3 7.5.5.2    Modifications and additions to the MPEG-4 SBR
  786|       |     tool
  787|       |  */
  788|       |  /* Note that lsb > as hHeaderData->numberOfAnalysisBands is a valid SBR config
  789|       |   * for 24 band QMF analysis. */
  790|  1.82k|  if ((lsb > ((flags & SBRDEC_QUAD_RATE) ? 16 : (32))) || (lsb >= usb)) {
  ------------------
  |  |  215|  1.82k|  128 /* Flag indicating that USAC SBR 4:1 is active. \
  ------------------
  |  Branch (790:7): [True: 32, False: 1.79k]
  |  Branch (790:15): [True: 140, False: 1.68k]
  |  Branch (790:59): [True: 0, False: 1.79k]
  ------------------
  791|     32|    return SBRDEC_UNSUPPORTED_CONFIG;
  792|     32|  }
  793|       |
  794|       |  /* Calculate number of noise bands */
  795|       |
  796|  1.79k|  k2 = hFreq->freqBandTable[1][nBandsHi];
  797|  1.79k|  kx = hFreq->freqBandTable[1][0];
  798|       |
  799|  1.79k|  if (hHeaderData->bs_data.noise_bands == 0) {
  ------------------
  |  Branch (799:7): [True: 82, False: 1.70k]
  ------------------
  800|     82|    hFreq->nNfb = 1;
  801|     82|  } else /* Calculate no of noise bands 1,2 or 3 bands/octave */
  802|  1.70k|  {
  803|       |    /* Fetch number of octaves divided by 32 */
  804|  1.70k|    intTemp = (LONG)FDK_getNumOctavesDiv8(kx, k2) >> 2;
  805|       |
  806|       |    /* Integer-Multiplication with number of bands: */
  807|  1.70k|    intTemp = intTemp * hHeaderData->bs_data.noise_bands;
  808|       |
  809|       |    /* Add scaled 0.5 for rounding: */
  810|  1.70k|    intTemp = intTemp + (LONG)FL2FXCONST_SGL(0.5f / 32.0f);
  ------------------
  |  |  180|  1.70k|  (FIXP_SGL)(                                                                \
  |  |  181|  1.70k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 1.70k, Folded]
  |  |  ------------------
  |  |  182|  1.70k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  1.70k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  1.70k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 1.70k]
  |  |  ------------------
  |  |  183|  1.70k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  1.70k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  1.70k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  1.70k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  1.70k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  1.70k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  1.70k|          : ((((double)(val) * (FRACT_FIX_SCALE)-0.5) <=                     \
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (186:14): [Folded, False: 0]
  |  |  ------------------
  |  |  187|      0|              (double)(MINVAL_SGL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  188|      0|                 ? (SHORT)(MINVAL_SGL_CONST)                                 \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  189|      0|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  811|       |
  812|       |    /* Convert to right-aligned integer: */
  813|  1.70k|    intTemp = intTemp >> (FRACT_BITS - 1 /*sign*/ - 5 /* rescale */);
  ------------------
  |  |  112|  1.70k|#define FRACT_BITS 16  /* single precision */
  ------------------
  814|       |
  815|  1.70k|    if (intTemp == 0) intTemp = 1;
  ------------------
  |  Branch (815:9): [True: 45, False: 1.66k]
  ------------------
  816|       |
  817|  1.70k|    if (intTemp > MAX_NOISE_COEFFS) {
  ------------------
  |  |  128|  1.70k|#define MAX_NOISE_COEFFS 5
  ------------------
  |  Branch (817:9): [True: 20, False: 1.68k]
  ------------------
  818|     20|      return SBRDEC_UNSUPPORTED_CONFIG;
  819|     20|    }
  820|       |
  821|  1.68k|    hFreq->nNfb = intTemp;
  822|  1.68k|  }
  823|       |
  824|  1.77k|  hFreq->nInvfBands = hFreq->nNfb;
  825|       |
  826|       |  /* Get noise bands */
  827|  1.77k|  sbrdecDownSampleLoRes(hFreq->freqBandTableNoise, hFreq->nNfb,
  828|  1.77k|                        hFreq->freqBandTable[0], nBandsLo);
  829|       |
  830|       |  /* save old highband; required for overlap in usac
  831|       |     when headerchange occurs at XVAR and VARX frame; */
  832|  1.77k|  hFreq->ov_highSubband = hFreq->highSubband;
  833|       |
  834|  1.77k|  hFreq->lowSubband = lsb;
  835|  1.77k|  hFreq->highSubband = usb;
  836|       |
  837|  1.77k|  return SBRDEC_OK;
  838|  1.79k|}
sbrdec_freq_sca.cpp:_ZL12getStartBandjhj:
  137|  1.93k|{
  138|  1.93k|  INT band;
  139|  1.93k|  UINT fsMapped = fs;
  140|  1.93k|  SBR_RATE rate = DUAL;
  141|       |
  142|  1.93k|  if (headerDataFlags & (SBRDEC_SYNTAX_USAC | SBRDEC_SYNTAX_RSVD50)) {
  ------------------
  |  |  206|  1.93k|#define SBRDEC_SYNTAX_USAC 4
  ------------------
                if (headerDataFlags & (SBRDEC_SYNTAX_USAC | SBRDEC_SYNTAX_RSVD50)) {
  ------------------
  |  |  207|  1.93k|#define SBRDEC_SYNTAX_RSVD50 8
  ------------------
  |  Branch (142:7): [True: 545, False: 1.38k]
  ------------------
  143|    545|    if (headerDataFlags & SBRDEC_QUAD_RATE) {
  ------------------
  |  |  215|    545|  128 /* Flag indicating that USAC SBR 4:1 is active. \
  ------------------
  |  Branch (143:9): [True: 140, False: 405]
  ------------------
  144|    140|      rate = QUAD;
  145|    140|    }
  146|    545|    fsMapped = sbrdec_mapToStdSampleRate(fs, 1);
  147|    545|  }
  148|       |
  149|  1.93k|  FDK_ASSERT(2 * (rate + 1) <= (4));
  ------------------
  |  |  221|  1.93k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (149:3): [True: 1.93k, False: 0]
  ------------------
  150|       |
  151|  1.93k|  switch (fsMapped) {
  152|     96|    case 192000:
  ------------------
  |  Branch (152:5): [True: 96, False: 1.83k]
  ------------------
  153|     96|      band = FDK_sbrDecoder_sbr_start_freq_192[startFreq];
  154|     96|      break;
  155|     72|    case 176400:
  ------------------
  |  Branch (155:5): [True: 72, False: 1.86k]
  ------------------
  156|     72|      band = FDK_sbrDecoder_sbr_start_freq_176[startFreq];
  157|     72|      break;
  158|     44|    case 128000:
  ------------------
  |  Branch (158:5): [True: 44, False: 1.89k]
  ------------------
  159|     44|      band = FDK_sbrDecoder_sbr_start_freq_128[startFreq];
  160|     44|      break;
  161|     98|    case 96000:
  ------------------
  |  Branch (161:5): [True: 98, False: 1.83k]
  ------------------
  162|    226|    case 88200:
  ------------------
  |  Branch (162:5): [True: 128, False: 1.80k]
  ------------------
  163|    226|      band = FDK_sbrDecoder_sbr_start_freq_88[rate][startFreq];
  164|    226|      break;
  165|     98|    case 64000:
  ------------------
  |  Branch (165:5): [True: 98, False: 1.83k]
  ------------------
  166|     98|      band = FDK_sbrDecoder_sbr_start_freq_64[rate][startFreq];
  167|     98|      break;
  168|    125|    case 48000:
  ------------------
  |  Branch (168:5): [True: 125, False: 1.80k]
  ------------------
  169|    125|      band = FDK_sbrDecoder_sbr_start_freq_48[rate][startFreq];
  170|    125|      break;
  171|    178|    case 44100:
  ------------------
  |  Branch (171:5): [True: 178, False: 1.75k]
  ------------------
  172|    178|      band = FDK_sbrDecoder_sbr_start_freq_44[rate][startFreq];
  173|    178|      break;
  174|     26|    case 40000:
  ------------------
  |  Branch (174:5): [True: 26, False: 1.90k]
  ------------------
  175|     26|      band = FDK_sbrDecoder_sbr_start_freq_40[rate][startFreq];
  176|     26|      break;
  177|    186|    case 32000:
  ------------------
  |  Branch (177:5): [True: 186, False: 1.74k]
  ------------------
  178|    186|      band = FDK_sbrDecoder_sbr_start_freq_32[rate][startFreq];
  179|    186|      break;
  180|    243|    case 24000:
  ------------------
  |  Branch (180:5): [True: 243, False: 1.69k]
  ------------------
  181|    243|      band = FDK_sbrDecoder_sbr_start_freq_24[rate][startFreq];
  182|    243|      break;
  183|    158|    case 22050:
  ------------------
  |  Branch (183:5): [True: 158, False: 1.77k]
  ------------------
  184|    158|      band = FDK_sbrDecoder_sbr_start_freq_22[rate][startFreq];
  185|    158|      break;
  186|    481|    case 16000:
  ------------------
  |  Branch (186:5): [True: 481, False: 1.45k]
  ------------------
  187|    481|      band = FDK_sbrDecoder_sbr_start_freq_16[rate][startFreq];
  188|    481|      break;
  189|      1|    default:
  ------------------
  |  Branch (189:5): [True: 1, False: 1.93k]
  ------------------
  190|      1|      band = 255;
  191|  1.93k|  }
  192|       |
  193|  1.93k|  return band;
  194|  1.93k|}
sbrdec_freq_sca.cpp:_ZL11getStopBandjhjh:
  209|  1.93k|{
  210|  1.93k|  UCHAR k2;
  211|       |
  212|  1.93k|  if (stopFreq < 14) {
  ------------------
  |  Branch (212:7): [True: 1.84k, False: 87]
  ------------------
  213|  1.84k|    INT stopMin;
  214|  1.84k|    INT num = 2 * (64);
  215|  1.84k|    UCHAR diff_tot[MAX_OCTAVE + MAX_SECOND_REGION];
  216|  1.84k|    UCHAR *diff0 = diff_tot;
  217|  1.84k|    UCHAR *diff1 = diff_tot + MAX_OCTAVE;
  ------------------
  |  |  116|  1.84k|#define MAX_OCTAVE 29
  ------------------
  218|       |
  219|  1.84k|    if (headerDataFlags & SBRDEC_QUAD_RATE) {
  ------------------
  |  |  215|  1.84k|  128 /* Flag indicating that USAC SBR 4:1 is active. \
  ------------------
  |  Branch (219:9): [True: 140, False: 1.70k]
  ------------------
  220|    140|      num >>= 1;
  221|    140|    }
  222|       |
  223|  1.84k|    if (fs < 32000) {
  ------------------
  |  Branch (223:9): [True: 868, False: 978]
  ------------------
  224|    868|      stopMin = (((2 * 6000 * num) / fs) + 1) >> 1;
  225|    978|    } else {
  226|    978|      if (fs < 64000) {
  ------------------
  |  Branch (226:11): [True: 491, False: 487]
  ------------------
  227|    491|        stopMin = (((2 * 8000 * num) / fs) + 1) >> 1;
  228|    491|      } else {
  229|    487|        stopMin = (((2 * 10000 * num) / fs) + 1) >> 1;
  230|    487|      }
  231|    978|    }
  232|       |
  233|  1.84k|    stopMin = fMin(stopMin, 64);
  234|       |
  235|       |    /*
  236|       |      Choose a stop band between k1 and 64 depending on stopFreq (0..13),
  237|       |      based on a logarithmic scale.
  238|       |      The vectors diff0 and diff1 are used temporarily here.
  239|       |    */
  240|  1.84k|    CalcBands(diff0, stopMin, 64, 13);
  241|  1.84k|    shellsort(diff0, 13);
  242|  1.84k|    cumSum(stopMin, diff0, 13, diff1);
  243|  1.84k|    k2 = diff1[stopFreq];
  244|  1.84k|  } else if (stopFreq == 14)
  ------------------
  |  Branch (244:14): [True: 28, False: 59]
  ------------------
  245|     28|    k2 = 2 * k0;
  246|     59|  else
  247|     59|    k2 = 3 * k0;
  248|       |
  249|       |  /* Limit to Nyquist */
  250|  1.93k|  if (k2 > (64)) k2 = (64);
  ------------------
  |  Branch (250:7): [True: 29, False: 1.90k]
  ------------------
  251|       |
  252|       |  /* Range checks */
  253|       |  /* 1 <= difference <= 48; 1 <= fs <= 96000 */
  254|  1.93k|  {
  255|  1.93k|    UCHAR max_freq_coeffs = (headerDataFlags & SBRDEC_QUAD_RATE)
  ------------------
  |  |  215|  1.93k|  128 /* Flag indicating that USAC SBR 4:1 is active. \
  ------------------
  |  Branch (255:29): [True: 140, False: 1.79k]
  ------------------
  256|  1.93k|                                ? MAX_FREQ_COEFFS_QUAD_RATE
  ------------------
  |  |  139|    140|#define MAX_FREQ_COEFFS_QUAD_RATE 56
  ------------------
  257|  1.93k|                                : MAX_FREQ_COEFFS;
  ------------------
  |  |  140|  1.79k|#define MAX_FREQ_COEFFS MAX_FREQ_COEFFS_QUAD_RATE
  |  |  ------------------
  |  |  |  |  139|  3.72k|#define MAX_FREQ_COEFFS_QUAD_RATE 56
  |  |  ------------------
  ------------------
  258|  1.93k|    if (((k2 - k0) > max_freq_coeffs) || (k2 <= k0)) {
  ------------------
  |  Branch (258:9): [True: 3, False: 1.93k]
  |  Branch (258:42): [True: 12, False: 1.91k]
  ------------------
  259|     15|      return 255;
  260|     15|    }
  261|  1.93k|  }
  262|       |
  263|  1.91k|  if (headerDataFlags & SBRDEC_QUAD_RATE) {
  ------------------
  |  |  215|  1.91k|  128 /* Flag indicating that USAC SBR 4:1 is active. \
  ------------------
  |  Branch (263:7): [True: 140, False: 1.77k]
  ------------------
  264|    140|    return k2; /* skip other checks: (k2 - k0) must be <=
  265|       |                  MAX_FREQ_COEFFS_QUAD_RATE for all fs */
  266|    140|  }
  267|  1.77k|  if (headerDataFlags & (SBRDEC_SYNTAX_USAC | SBRDEC_SYNTAX_RSVD50)) {
  ------------------
  |  |  206|  1.77k|#define SBRDEC_SYNTAX_USAC 4
  ------------------
                if (headerDataFlags & (SBRDEC_SYNTAX_USAC | SBRDEC_SYNTAX_RSVD50)) {
  ------------------
  |  |  207|  1.77k|#define SBRDEC_SYNTAX_RSVD50 8
  ------------------
  |  Branch (267:7): [True: 405, False: 1.37k]
  ------------------
  268|       |    /* 1 <= difference <= 35; 42000 <= fs <= 96000 */
  269|    405|    if ((fs >= 42000) && ((k2 - k0) > MAX_FREQ_COEFFS_FS44100)) {
  ------------------
  |  |  142|    143|#define MAX_FREQ_COEFFS_FS44100 35
  ------------------
  |  Branch (269:9): [True: 143, False: 262]
  |  Branch (269:26): [True: 0, False: 143]
  ------------------
  270|      0|      return 255;
  271|      0|    }
  272|       |    /* 1 <= difference <= 32; 46009 <= fs <= 96000 */
  273|    405|    if ((fs >= 46009) && ((k2 - k0) > MAX_FREQ_COEFFS_FS48000)) {
  ------------------
  |  |  143|    120|#define MAX_FREQ_COEFFS_FS48000 32
  ------------------
  |  Branch (273:9): [True: 120, False: 285]
  |  Branch (273:26): [True: 0, False: 120]
  ------------------
  274|      0|      return 255;
  275|      0|    }
  276|  1.37k|  } else {
  277|       |    /* 1 <= difference <= 35; fs == 44100 */
  278|  1.37k|    if ((fs == 44100) && ((k2 - k0) > MAX_FREQ_COEFFS_FS44100)) {
  ------------------
  |  |  142|    144|#define MAX_FREQ_COEFFS_FS44100 35
  ------------------
  |  Branch (278:9): [True: 144, False: 1.22k]
  |  Branch (278:26): [True: 6, False: 138]
  ------------------
  279|      6|      return 255;
  280|      6|    }
  281|       |    /* 1 <= difference <= 32; 48000 <= fs <= 96000 */
  282|  1.36k|    if ((fs >= 48000) && ((k2 - k0) > MAX_FREQ_COEFFS_FS48000)) {
  ------------------
  |  |  143|    524|#define MAX_FREQ_COEFFS_FS48000 32
  ------------------
  |  Branch (282:9): [True: 524, False: 843]
  |  Branch (282:26): [True: 6, False: 518]
  ------------------
  283|      6|      return 255;
  284|      6|    }
  285|  1.36k|  }
  286|       |
  287|  1.76k|  return k2;
  288|  1.77k|}
sbrdec_freq_sca.cpp:_ZL13numberOfBandssiii:
  547|    914|{
  548|    914|  FIXP_SGL num_bands_div128;
  549|    914|  int num_bands;
  550|       |
  551|    914|  num_bands_div128 =
  552|    914|      FX_DBL2FX_SGL(fMult(FDK_getNumOctavesDiv8(start, stop), bpo_div16));
  ------------------
  |  |  220|    914|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|    914|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|    914|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  553|       |
  554|    914|  if (warpFlag) {
  ------------------
  |  Branch (554:7): [True: 261, False: 653]
  ------------------
  555|       |    /* Apply the warp factor of 1.3 to get wider bands.  We use a value
  556|       |       of 32768/25200 instead of the exact value to avoid critical cases
  557|       |       of rounding.
  558|       |    */
  559|    261|    num_bands_div128 = FX_DBL2FX_SGL(
  ------------------
  |  |  220|  1.04k|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|    261|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|    261|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  |  |  |  Branch (220:41): [Folded, False: 261]
  |  |  |  Branch (220:41): [Folded, False: 0]
  |  |  |  Branch (220:41): [True: 261, Folded]
  |  |  ------------------
  ------------------
  560|    261|        fMult(num_bands_div128, FL2FXCONST_SGL(25200.0 / 32768.0)));
  561|    261|  }
  562|       |
  563|       |  /* add scaled 1 for rounding to even numbers: */
  564|    914|  num_bands_div128 = num_bands_div128 + FL2FXCONST_SGL(1.0f / 128.0f);
  ------------------
  |  |  180|    914|  (FIXP_SGL)(                                                                \
  |  |  181|    914|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 914, Folded]
  |  |  ------------------
  |  |  182|    914|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|    914|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|    914|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 914]
  |  |  ------------------
  |  |  183|    914|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|    914|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|    914|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|    914|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|    914|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|    914|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|    914|          : ((((double)(val) * (FRACT_FIX_SCALE)-0.5) <=                     \
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (186:14): [Folded, False: 0]
  |  |  ------------------
  |  |  187|      0|              (double)(MINVAL_SGL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  188|      0|                 ? (SHORT)(MINVAL_SGL_CONST)                                 \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  189|      0|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  565|       |  /* scale back to right aligned integer and double the value: */
  566|    914|  num_bands = 2 * ((LONG)num_bands_div128 >> (FRACT_BITS - 7));
  ------------------
  |  |  112|    914|#define FRACT_BITS 16  /* single precision */
  ------------------
  567|       |
  568|    914|  return (num_bands);
  569|    914|}
sbrdec_freq_sca.cpp:_ZL9CalcBandsPhhhh:
  582|  2.71k|{
  583|  2.71k|  int i;
  584|  2.71k|  int previous;
  585|  2.71k|  int current;
  586|  2.71k|  FIXP_SGL exact, temp;
  587|  2.71k|  FIXP_SGL bandfactor = calcFactorPerBand(start, stop, num_bands);
  588|       |
  589|  2.71k|  previous = stop; /* Start with highest QMF channel */
  590|  2.71k|  exact = (FIXP_SGL)(
  591|  2.71k|      stop << (FRACT_BITS - 8)); /* Shift left to gain some accuracy */
  ------------------
  |  |  112|  2.71k|#define FRACT_BITS 16  /* single precision */
  ------------------
  592|       |
  593|  33.6k|  for (i = num_bands - 1; i >= 0; i--) {
  ------------------
  |  Branch (593:27): [True: 30.8k, False: 2.71k]
  ------------------
  594|       |    /* Calculate border of next lower sbr band */
  595|  30.8k|    exact = FX_DBL2FX_SGL(fMult(exact, bandfactor));
  ------------------
  |  |  220|  30.8k|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|  30.8k|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|  30.8k|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  596|       |
  597|       |    /* Add scaled 0.5 for rounding:
  598|       |       We use a value 128/256 instead of 0.5 to avoid some critical cases of
  599|       |       rounding. */
  600|  30.8k|    temp = exact + FL2FXCONST_SGL(128.0 / 32768.0);
  ------------------
  |  |  180|  30.8k|  (FIXP_SGL)(                                                                \
  |  |  181|  30.8k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 30.8k, Folded]
  |  |  ------------------
  |  |  182|  30.8k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  30.8k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  30.8k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 30.8k]
  |  |  ------------------
  |  |  183|  30.8k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  30.8k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  30.8k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  30.8k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  30.8k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  30.8k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  30.8k|          : ((((double)(val) * (FRACT_FIX_SCALE)-0.5) <=                     \
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (186:14): [Folded, False: 0]
  |  |  ------------------
  |  |  187|      0|              (double)(MINVAL_SGL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  188|      0|                 ? (SHORT)(MINVAL_SGL_CONST)                                 \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  189|      0|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  601|       |
  602|       |    /* scale back to right alinged integer: */
  603|  30.8k|    current = (LONG)temp >> (FRACT_BITS - 8);
  ------------------
  |  |  112|  30.8k|#define FRACT_BITS 16  /* single precision */
  ------------------
  604|       |
  605|       |    /* Save width of band i */
  606|  30.8k|    diff[i] = previous - current;
  607|  30.8k|    previous = current;
  608|  30.8k|  }
  609|  2.71k|}
sbrdec_freq_sca.cpp:_ZL17calcFactorPerBandiii:
  485|  2.71k|static FIXP_SGL calcFactorPerBand(int k_start, int k_stop, int num_bands) {
  486|       |  /* Scaled bandfactor and step 1 bit right to avoid overflow
  487|       |   * use double data type */
  488|  2.71k|  FIXP_DBL bandfactor = FL2FXCONST_DBL(0.25f); /* Start value */
  ------------------
  |  |  192|  2.71k|  (FIXP_DBL)(                                                                \
  |  |  193|  2.71k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 2.71k, Folded]
  |  |  ------------------
  |  |  194|  2.71k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  2.71k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  2.71k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 2.71k]
  |  |  ------------------
  |  |  195|  2.71k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  2.71k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  2.71k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  2.71k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  2.71k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  2.71k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  2.71k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  489|  2.71k|  FIXP_DBL step = FL2FXCONST_DBL(0.125f); /* Initial increment for factor */
  ------------------
  |  |  192|  2.71k|  (FIXP_DBL)(                                                                \
  |  |  193|  2.71k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 2.71k, Folded]
  |  |  ------------------
  |  |  194|  2.71k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  2.71k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  2.71k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 2.71k]
  |  |  ------------------
  |  |  195|  2.71k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  2.71k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  2.71k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  2.71k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  2.71k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  2.71k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  2.71k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  490|       |
  491|  2.71k|  int direction = 1;
  492|       |
  493|       |  /* Because saturation can't be done in INT IIS,
  494|       |   * changed start and stop data type from FIXP_SGL to FIXP_DBL */
  495|  2.71k|  FIXP_DBL start = k_start << (DFRACT_BITS - 8);
  ------------------
  |  |  113|  2.71k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  496|  2.71k|  FIXP_DBL stop = k_stop << (DFRACT_BITS - 8);
  ------------------
  |  |  113|  2.71k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  497|       |
  498|  2.71k|  FIXP_DBL temp;
  499|       |
  500|  2.71k|  int j, i = 0;
  501|       |
  502|   123k|  while (step > FL2FXCONST_DBL(0.0f)) {
  ------------------
  |  |  192|   123k|  (FIXP_DBL)(                                                                \
  |  |  193|   123k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 123k, Folded]
  |  |  ------------------
  |  |  194|   123k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   123k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   123k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 123k]
  |  |  ------------------
  |  |  195|   123k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   123k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   123k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   123k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   123k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   123k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   123k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (502:10): [True: 120k, False: 2.71k]
  ------------------
  503|   120k|    i++;
  504|   120k|    temp = stop;
  505|       |
  506|       |    /* Calculate temp^num_bands: */
  507|  1.49M|    for (j = 0; j < num_bands; j++)
  ------------------
  |  Branch (507:17): [True: 1.37M, False: 120k]
  ------------------
  508|       |      // temp = fMult(temp,bandfactor);
  509|  1.37M|      temp = fMultDiv2(temp, bandfactor) << 2;
  510|       |
  511|   120k|    if (temp < start) { /* Factor too strong, make it weaker */
  ------------------
  |  Branch (511:9): [True: 62.7k, False: 57.9k]
  ------------------
  512|  62.7k|      if (direction == 0)
  ------------------
  |  Branch (512:11): [True: 37.9k, False: 24.7k]
  ------------------
  513|       |        /* Halfen step. Right shift is not done as fract because otherwise the
  514|       |           lowest bit cannot be cleared due to rounding */
  515|  37.9k|        step = (FIXP_DBL)((LONG)step >> 1);
  516|  62.7k|      direction = 1;
  517|  62.7k|      bandfactor = bandfactor + step;
  518|  62.7k|    } else { /* Factor is too weak: make it stronger */
  519|  57.9k|      if (direction == 1) step = (FIXP_DBL)((LONG)step >> 1);
  ------------------
  |  Branch (519:11): [True: 40.6k, False: 17.2k]
  ------------------
  520|  57.9k|      direction = 0;
  521|  57.9k|      bandfactor = bandfactor - step;
  522|  57.9k|    }
  523|       |
  524|   120k|    if (i > 100) {
  ------------------
  |  Branch (524:9): [True: 0, False: 120k]
  ------------------
  525|      0|      step = FL2FXCONST_DBL(0.0f);
  ------------------
  |  |  192|      0|  (FIXP_DBL)(                                                                \
  |  |  193|      0|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 0, Folded]
  |  |  ------------------
  |  |  194|      0|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 0]
  |  |  ------------------
  |  |  195|      0|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|      0|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|      0|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  526|      0|    }
  527|   120k|  }
  528|  2.71k|  return (bandfactor >= FL2FXCONST_DBL(0.5)) ? (FIXP_SGL)MAXVAL_SGL
  ------------------
  |  |  192|  2.71k|  (FIXP_DBL)(                                                                \
  |  |  193|  2.71k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 2.71k, Folded]
  |  |  ------------------
  |  |  194|  2.71k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  2.71k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  2.71k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 2.71k]
  |  |  ------------------
  |  |  195|  2.71k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  2.71k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  2.71k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  2.71k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  2.71k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  2.71k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  2.71k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 0]
  |  |  ------------------
  |  |  199|      0|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|      0|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|      0|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|      0|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|      0|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|      0|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|      0|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                return (bandfactor >= FL2FXCONST_DBL(0.5)) ? (FIXP_SGL)MAXVAL_SGL
  ------------------
  |  |  152|     87|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  ------------------
  |  Branch (528:10): [True: 87, False: 2.62k]
  ------------------
  529|  2.71k|                                             : FX_DBL2FX_SGL(bandfactor << 1);
  ------------------
  |  |  220|  2.62k|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|  2.62k|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|  2.62k|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  530|  2.71k|}
sbrdec_freq_sca.cpp:_ZL6cumSumhPhhS_:
  615|  3.98k|                   UCHAR *start_adress) {
  616|  3.98k|  int i;
  617|  3.98k|  start_adress[0] = start_value;
  618|  47.6k|  for (i = 1; i <= length; i++)
  ------------------
  |  Branch (618:15): [True: 43.6k, False: 3.98k]
  ------------------
  619|  43.6k|    start_adress[i] = start_adress[i - 1] + diff[i - 1];
  620|  3.98k|}
sbrdec_freq_sca.cpp:_ZL11modifyBandshPhh:
  630|     90|                             UCHAR length) {
  631|     90|  int change = max_band_previous - diff[0];
  632|       |
  633|       |  /* Limit the change so that the last band cannot get narrower than the first
  634|       |   * one */
  635|     90|  if (change > (diff[length - 1] - diff[0]) >> 1)
  ------------------
  |  Branch (635:7): [True: 44, False: 46]
  ------------------
  636|     44|    change = (diff[length - 1] - diff[0]) >> 1;
  637|       |
  638|     90|  diff[0] += change;
  639|     90|  diff[length - 1] -= change;
  640|     90|  shellsort(diff, length);
  641|       |
  642|     90|  return SBRDEC_OK;
  643|     90|}
sbrdec_freq_sca.cpp:_ZL17sbrdecUpdateHiResPhS_S_hh:
  650|  1.82k|                              UCHAR xover_band) {
  651|  1.82k|  UCHAR i;
  652|       |
  653|  1.82k|  *num_hires = num_bands - xover_band;
  654|       |
  655|  21.9k|  for (i = xover_band; i <= num_bands; i++) {
  ------------------
  |  Branch (655:24): [True: 20.1k, False: 1.82k]
  ------------------
  656|  20.1k|    h_hires[i - xover_band] = v_k_master[i];
  657|  20.1k|  }
  658|  1.82k|}
sbrdec_freq_sca.cpp:_ZL17sbrdecUpdateLoResPhS_S_h:
  664|  1.82k|                              UCHAR num_hires) {
  665|  1.82k|  UCHAR i;
  666|       |
  667|  1.82k|  if ((num_hires & 1) == 0) {
  ------------------
  |  Branch (667:7): [True: 1.58k, False: 245]
  ------------------
  668|       |    /* If even number of hires bands */
  669|  1.58k|    *num_lores = num_hires >> 1;
  670|       |    /* Use every second lores=hires[0,2,4...] */
  671|  11.0k|    for (i = 0; i <= *num_lores; i++) h_lores[i] = h_hires[i * 2];
  ------------------
  |  Branch (671:17): [True: 9.49k, False: 1.58k]
  ------------------
  672|  1.58k|  } else {
  673|       |    /* Odd number of hires, which means xover is odd */
  674|    245|    *num_lores = (num_hires + 1) >> 1;
  675|       |    /* Use lores=hires[0,1,3,5 ...] */
  676|    245|    h_lores[0] = h_hires[0];
  677|  1.60k|    for (i = 1; i <= *num_lores; i++) {
  ------------------
  |  Branch (677:17): [True: 1.36k, False: 245]
  ------------------
  678|  1.36k|      h_lores[i] = h_hires[i * 2 - 1];
  679|  1.36k|    }
  680|    245|  }
  681|  1.82k|}

sbrDecoder_Open:
  447|  7.39k|                          HANDLE_FDK_QMF_DOMAIN pQmfDomain) {
  448|  7.39k|  HANDLE_SBRDECODER self = NULL;
  449|  7.39k|  SBR_ERROR sbrError = SBRDEC_OK;
  450|  7.39k|  int elIdx;
  451|       |
  452|  7.39k|  if ((pSelf == NULL) || (pQmfDomain == NULL)) {
  ------------------
  |  Branch (452:7): [True: 0, False: 7.39k]
  |  Branch (452:26): [True: 0, False: 7.39k]
  ------------------
  453|      0|    return SBRDEC_INVALID_ARGUMENT;
  454|      0|  }
  455|       |
  456|       |  /* Get memory for this instance */
  457|  7.39k|  self = GetRam_SbrDecoder();
  458|  7.39k|  if (self == NULL) {
  ------------------
  |  Branch (458:7): [True: 0, False: 7.39k]
  ------------------
  459|      0|    sbrError = SBRDEC_MEM_ALLOC_FAILED;
  460|      0|    goto bail;
  461|      0|  }
  462|       |
  463|  7.39k|  self->pQmfDomain = pQmfDomain;
  464|       |
  465|       |  /*
  466|       |  Already zero because of calloc
  467|       |  self->numSbrElements = 0;
  468|       |  self->numSbrChannels = 0;
  469|       |  self->codecFrameSize = 0;
  470|       |  */
  471|       |
  472|  7.39k|  self->numDelayFrames = (1); /* set to the max value by default */
  473|       |
  474|       |  /* Initialize header sync state */
  475|  66.5k|  for (elIdx = 0; elIdx < (8); elIdx += 1) {
  ------------------
  |  Branch (475:19): [True: 59.1k, False: 7.39k]
  ------------------
  476|  59.1k|    int i;
  477|   177k|    for (i = 0; i < (1) + 1; i += 1) {
  ------------------
  |  Branch (477:17): [True: 118k, False: 59.1k]
  ------------------
  478|   118k|      self->sbrHeader[elIdx][i].syncState = SBR_NOT_INITIALIZED;
  479|   118k|    }
  480|  59.1k|  }
  481|       |
  482|  7.39k|  *pSelf = self;
  483|       |
  484|  7.39k|bail:
  485|  7.39k|  return sbrError;
  486|  7.39k|}
sbrDecoder_InitElement:
  532|  2.79k|    const UCHAR configMode, UCHAR *configChanged, const INT downscaleFactor) {
  533|  2.79k|  SBR_ERROR sbrError = SBRDEC_OK;
  534|  2.79k|  int chCnt = 0;
  535|  2.79k|  int nSbrElementsStart;
  536|  2.79k|  int nSbrChannelsStart;
  537|  2.79k|  if (self == NULL) {
  ------------------
  |  Branch (537:7): [True: 0, False: 2.79k]
  ------------------
  538|      0|    return SBRDEC_INVALID_ARGUMENT;
  539|      0|  }
  540|       |
  541|  2.79k|  nSbrElementsStart = self->numSbrElements;
  542|  2.79k|  nSbrChannelsStart = self->numSbrChannels;
  543|       |
  544|       |  /* Check core codec AOT */
  545|  2.79k|  if (!sbrDecoder_isCoreCodecValid(coreCodec) || elementIndex >= (8)) {
  ------------------
  |  Branch (545:7): [True: 0, False: 2.79k]
  |  Branch (545:50): [True: 0, False: 2.79k]
  ------------------
  546|      0|    sbrError = SBRDEC_UNSUPPORTED_CONFIG;
  547|      0|    goto bail;
  548|      0|  }
  549|       |
  550|  2.79k|  if (elementID != ID_SCE && elementID != ID_CPE && elementID != ID_LFE) {
  ------------------
  |  Branch (550:7): [True: 938, False: 1.86k]
  |  Branch (550:30): [True: 134, False: 804]
  |  Branch (550:53): [True: 0, False: 134]
  ------------------
  551|      0|    sbrError = SBRDEC_UNSUPPORTED_CONFIG;
  552|      0|    goto bail;
  553|      0|  }
  554|       |
  555|  2.79k|  if (self->sampleRateIn == sampleRateIn &&
  ------------------
  |  Branch (555:7): [True: 382, False: 2.41k]
  ------------------
  556|    382|      self->codecFrameSize == samplesPerFrame && self->coreCodec == coreCodec &&
  ------------------
  |  Branch (556:7): [True: 376, False: 6]
  |  Branch (556:50): [True: 376, False: 0]
  ------------------
  557|    376|      self->pSbrElement[elementIndex] != NULL &&
  ------------------
  |  Branch (557:7): [True: 0, False: 376]
  ------------------
  558|      0|      self->pSbrElement[elementIndex]->elementID == elementID &&
  ------------------
  |  Branch (558:7): [True: 0, False: 0]
  ------------------
  559|      0|      !(self->flags & SBRDEC_FORCE_RESET) &&
  ------------------
  |  |  231|      0|  32768 /* Flag is used to force a reset of all elements in use. */
  ------------------
  |  Branch (559:7): [True: 0, False: 0]
  ------------------
  560|      0|      ((sampleRateOut == 0) ? 1 : (self->sampleRateOut == sampleRateOut)) &&
  ------------------
  |  Branch (560:7): [True: 0, False: 0]
  |  Branch (560:8): [True: 0, False: 0]
  ------------------
  561|      0|      ((harmonicSBR == 2) ? 1
  ------------------
  |  Branch (561:7): [True: 0, False: 0]
  |  Branch (561:8): [True: 0, False: 0]
  ------------------
  562|      0|                          : (self->harmonicSBR ==
  563|      0|                             harmonicSBR)) /* The value 2 signalizes that
  564|       |                                              harmonicSBR shall be ignored in
  565|       |                                              the config change detection */
  566|  2.79k|  ) {
  567|       |    /* Nothing to do */
  568|      0|    return SBRDEC_OK;
  569|  2.79k|  } else {
  570|  2.79k|    if (configMode & AC_CM_DET_CFG_CHANGE) {
  ------------------
  |  |  334|  2.79k|  0x000001 /*!< Config mode signalizes the callback to work in config change \
  ------------------
  |  Branch (570:9): [True: 1.49k, False: 1.30k]
  ------------------
  571|  1.49k|      *configChanged = 1;
  572|  1.49k|    }
  573|  2.79k|  }
  574|       |
  575|       |  /* reaching this point the SBR-decoder gets (re-)configured */
  576|       |
  577|       |  /* The flags field is used for all elements! */
  578|  2.79k|  self->flags &=
  579|  2.79k|      (SBRDEC_FORCE_RESET | SBRDEC_FLUSH); /* Keep the global flags. They will
  ------------------
  |  |  231|  2.79k|  32768 /* Flag is used to force a reset of all elements in use. */
  ------------------
                    (SBRDEC_FORCE_RESET | SBRDEC_FLUSH); /* Keep the global flags. They will
  ------------------
  |  |  229|  2.79k|#define SBRDEC_FLUSH 16384 /* Flag is used to flush all elements in use. */
  ------------------
  580|       |                                              be reset after decoding. */
  581|  2.79k|  self->flags |= (downscaleFactor > 1) ? SBRDEC_ELD_DOWNSCALE : 0;
  ------------------
  |  |  226|     18|  4096 /* Flag indicating that ELD downscaled mode decoding is used */
  ------------------
  |  Branch (581:18): [True: 18, False: 2.78k]
  ------------------
  582|  2.79k|  self->flags |= (coreCodec == AOT_ER_AAC_ELD) ? SBRDEC_ELD_GRID : 0;
  ------------------
  |  |  204|  1.53k|#define SBRDEC_ELD_GRID 1
  ------------------
  |  Branch (582:18): [True: 1.53k, False: 1.25k]
  ------------------
  583|  2.79k|  self->flags |= (coreCodec == AOT_ER_AAC_SCAL) ? SBRDEC_SYNTAX_SCAL : 0;
  ------------------
  |  |  205|      0|#define SBRDEC_SYNTAX_SCAL 2
  ------------------
  |  Branch (583:18): [True: 0, False: 2.79k]
  ------------------
  584|  2.79k|  self->flags |=
  585|  2.79k|      (coreCodec == AOT_DRM_AAC) ? SBRDEC_SYNTAX_SCAL | SBRDEC_SYNTAX_DRM : 0;
  ------------------
  |  |  205|      0|#define SBRDEC_SYNTAX_SCAL 2
  ------------------
                    (coreCodec == AOT_DRM_AAC) ? SBRDEC_SYNTAX_SCAL | SBRDEC_SYNTAX_DRM : 0;
  ------------------
  |  |  224|      0|  2048 /* Flag indicating that DRM30/DRM+ reverse syntax is being used. */
  ------------------
  |  Branch (585:7): [True: 0, False: 2.79k]
  ------------------
  586|  2.79k|  self->flags |= (coreCodec == AOT_DRM_SURROUND)
  ------------------
  |  Branch (586:18): [True: 0, False: 2.79k]
  ------------------
  587|  2.79k|                     ? SBRDEC_SYNTAX_SCAL | SBRDEC_SYNTAX_DRM
  ------------------
  |  |  205|      0|#define SBRDEC_SYNTAX_SCAL 2
  ------------------
                                   ? SBRDEC_SYNTAX_SCAL | SBRDEC_SYNTAX_DRM
  ------------------
  |  |  224|      0|  2048 /* Flag indicating that DRM30/DRM+ reverse syntax is being used. */
  ------------------
  588|  2.79k|                     : 0;
  589|  2.79k|  self->flags |= (coreCodec == AOT_USAC) ? SBRDEC_SYNTAX_USAC : 0;
  ------------------
  |  |  206|  1.25k|#define SBRDEC_SYNTAX_USAC 4
  ------------------
  |  Branch (589:18): [True: 1.25k, False: 1.53k]
  ------------------
  590|       |  /* Robustness: Take integer division rounding into consideration. E.g. 22050
  591|       |   * Hz with 4:1 SBR => 5512 Hz core sampling rate. */
  592|  2.79k|  self->flags |= (sampleRateIn == sampleRateOut / 4) ? SBRDEC_QUAD_RATE : 0;
  ------------------
  |  |  215|    348|  128 /* Flag indicating that USAC SBR 4:1 is active. \
  ------------------
  |  Branch (592:18): [True: 348, False: 2.45k]
  ------------------
  593|  2.79k|  self->flags |= (harmonicSBR == 1) ? SBRDEC_USAC_HARMONICSBR : 0;
  ------------------
  |  |  218|     89|  256 /* Flag indicating that USAC HBE tool is active. */
  ------------------
  |  Branch (593:18): [True: 89, False: 2.70k]
  ------------------
  594|       |
  595|  2.79k|  if (configMode & AC_CM_DET_CFG_CHANGE) {
  ------------------
  |  |  334|  2.79k|  0x000001 /*!< Config mode signalizes the callback to work in config change \
  ------------------
  |  Branch (595:7): [True: 1.49k, False: 1.30k]
  ------------------
  596|  1.49k|    return SBRDEC_OK;
  597|  1.49k|  }
  598|       |
  599|  1.30k|  self->sampleRateIn = sampleRateIn;
  600|  1.30k|  self->codecFrameSize = samplesPerFrame;
  601|  1.30k|  self->coreCodec = coreCodec;
  602|  1.30k|  self->harmonicSBR = harmonicSBR;
  603|  1.30k|  self->downscaleFactor = downscaleFactor;
  604|       |
  605|       |  /* Init SBR elements */
  606|  1.30k|  {
  607|  1.30k|    int elChannels, ch;
  608|       |
  609|  1.30k|    if (self->pSbrElement[elementIndex] == NULL) {
  ------------------
  |  Branch (609:9): [True: 1.30k, False: 0]
  ------------------
  610|  1.30k|      self->pSbrElement[elementIndex] = GetRam_SbrDecElement(elementIndex);
  611|  1.30k|      if (self->pSbrElement[elementIndex] == NULL) {
  ------------------
  |  Branch (611:11): [True: 0, False: 1.30k]
  ------------------
  612|      0|        sbrError = SBRDEC_MEM_ALLOC_FAILED;
  613|      0|        goto bail;
  614|      0|      }
  615|  1.30k|      self->numSbrElements++;
  616|  1.30k|    } else {
  617|      0|      self->numSbrChannels -= self->pSbrElement[elementIndex]->nChannels;
  618|      0|    }
  619|       |
  620|       |    /* Determine amount of channels for this element */
  621|  1.30k|    switch (elementID) {
  622|      0|      case ID_NONE:
  ------------------
  |  Branch (622:7): [True: 0, False: 1.30k]
  ------------------
  623|    385|      case ID_CPE:
  ------------------
  |  Branch (623:7): [True: 385, False: 923]
  ------------------
  624|    385|        elChannels = 2;
  625|    385|        break;
  626|     58|      case ID_LFE:
  ------------------
  |  Branch (626:7): [True: 58, False: 1.25k]
  ------------------
  627|    923|      case ID_SCE:
  ------------------
  |  Branch (627:7): [True: 865, False: 443]
  ------------------
  628|    923|        elChannels = 1;
  629|    923|        break;
  630|      0|      default:
  ------------------
  |  Branch (630:7): [True: 0, False: 1.30k]
  ------------------
  631|      0|        elChannels = 0;
  632|      0|        break;
  633|  1.30k|    }
  634|       |
  635|       |    /* Handle case of Parametric Stereo */
  636|  1.30k|    if (elementIndex == 0 && elementID == ID_SCE) {
  ------------------
  |  Branch (636:9): [True: 932, False: 376]
  |  Branch (636:30): [True: 847, False: 85]
  ------------------
  637|    847|      switch (coreCodec) {
  638|      0|        case AOT_AAC_LC:
  ------------------
  |  Branch (638:9): [True: 0, False: 847]
  ------------------
  639|      0|        case AOT_SBR:
  ------------------
  |  Branch (639:9): [True: 0, False: 847]
  ------------------
  640|      0|        case AOT_PS:
  ------------------
  |  Branch (640:9): [True: 0, False: 847]
  ------------------
  641|      0|        case AOT_ER_AAC_SCAL:
  ------------------
  |  Branch (641:9): [True: 0, False: 847]
  ------------------
  642|      0|        case AOT_DRM_AAC:
  ------------------
  |  Branch (642:9): [True: 0, False: 847]
  ------------------
  643|      0|        case AOT_DRM_SURROUND:
  ------------------
  |  Branch (643:9): [True: 0, False: 847]
  ------------------
  644|      0|          elChannels = 2;
  645|      0|          break;
  646|    847|        default:
  ------------------
  |  Branch (646:9): [True: 847, False: 0]
  ------------------
  647|    847|          break;
  648|    847|      }
  649|    847|    }
  650|       |
  651|       |    /* Sanity check to avoid memory leaks */
  652|  1.30k|    if (elChannels < self->pSbrElement[elementIndex]->nChannels ||
  ------------------
  |  Branch (652:9): [True: 0, False: 1.30k]
  ------------------
  653|  1.30k|        (self->numSbrChannels + elChannels) > (8) + (1)) {
  ------------------
  |  Branch (653:9): [True: 0, False: 1.30k]
  ------------------
  654|      0|      self->numSbrChannels += self->pSbrElement[elementIndex]->nChannels;
  655|      0|      sbrError = SBRDEC_PARSE_ERROR;
  656|      0|      goto bail;
  657|      0|    }
  658|       |
  659|       |    /* Save element ID for sanity checks and to have a fallback for concealment.
  660|       |     */
  661|  1.30k|    self->pSbrElement[elementIndex]->elementID = elementID;
  662|  1.30k|    self->pSbrElement[elementIndex]->nChannels = elChannels;
  663|       |
  664|  3.00k|    for (ch = 0; ch < elChannels; ch++) {
  ------------------
  |  Branch (664:18): [True: 1.69k, False: 1.30k]
  ------------------
  665|  1.69k|      if (self->pSbrElement[elementIndex]->pSbrChannel[ch] == NULL) {
  ------------------
  |  Branch (665:11): [True: 1.69k, False: 0]
  ------------------
  666|  1.69k|        self->pSbrElement[elementIndex]->pSbrChannel[ch] =
  667|  1.69k|            GetRam_SbrDecChannel(chCnt);
  668|  1.69k|        if (self->pSbrElement[elementIndex]->pSbrChannel[ch] == NULL) {
  ------------------
  |  Branch (668:13): [True: 0, False: 1.69k]
  ------------------
  669|      0|          sbrError = SBRDEC_MEM_ALLOC_FAILED;
  670|      0|          goto bail;
  671|      0|        }
  672|  1.69k|      }
  673|  1.69k|      self->numSbrChannels++;
  674|       |
  675|  1.69k|      sbrDecoder_drcInitChannel(&self->pSbrElement[elementIndex]
  676|  1.69k|                                     ->pSbrChannel[ch]
  677|  1.69k|                                     ->SbrDec.sbrDrcChannel);
  678|       |
  679|  1.69k|      chCnt++;
  680|  1.69k|    }
  681|  1.30k|  }
  682|       |
  683|  1.30k|  if (!self->pQmfDomain->globalConf.qmfDomainExplicitConfig) {
  ------------------
  |  Branch (683:7): [True: 1.30k, False: 0]
  ------------------
  684|  1.30k|    self->pQmfDomain->globalConf.nInputChannels_requested =
  685|  1.30k|        self->numSbrChannels;
  686|  1.30k|    self->pQmfDomain->globalConf.nOutputChannels_requested =
  687|  1.30k|        fMax((INT)self->numSbrChannels,
  688|  1.30k|             (INT)self->pQmfDomain->globalConf.nOutputChannels_requested);
  689|  1.30k|  }
  690|       |
  691|       |  /* Make sure each SBR channel has one QMF channel assigned even if
  692|       |   * numSbrChannels or element set-up has changed. */
  693|  1.30k|  sbrDecoder_AssignQmfChannels2SbrChannels(self);
  694|       |
  695|       |  /* clear error flags for all delay slots */
  696|  1.30k|  FDKmemclear(self->pSbrElement[elementIndex]->frameErrorFlag,
  697|  1.30k|              ((1) + 1) * sizeof(UCHAR));
  698|       |
  699|  1.30k|  {
  700|  1.30k|    int overlap;
  701|       |
  702|  1.30k|    if (coreCodec == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (702:9): [True: 749, False: 559]
  ------------------
  703|    749|      overlap = 0;
  704|    749|    } else if (self->flags & SBRDEC_QUAD_RATE) {
  ------------------
  |  |  215|    559|  128 /* Flag indicating that USAC SBR 4:1 is active. \
  ------------------
  |  Branch (704:16): [True: 148, False: 411]
  ------------------
  705|    148|      overlap = (3 * 4);
  706|    411|    } else {
  707|    411|      overlap = (3 * 2);
  708|    411|    }
  709|       |    /* Initialize this instance */
  710|  1.30k|    sbrError = sbrDecoder_ResetElement(self, sampleRateIn, sampleRateOut,
  711|  1.30k|                                       samplesPerFrame, elementID, elementIndex,
  712|  1.30k|                                       overlap);
  713|  1.30k|  }
  714|       |
  715|  1.30k|bail:
  716|  1.30k|  if (sbrError != SBRDEC_OK) {
  ------------------
  |  Branch (716:7): [True: 67, False: 1.24k]
  ------------------
  717|     67|    if ((nSbrElementsStart < self->numSbrElements) ||
  ------------------
  |  Branch (717:9): [True: 67, False: 0]
  ------------------
  718|     67|        (nSbrChannelsStart < self->numSbrChannels)) {
  ------------------
  |  Branch (718:9): [True: 0, False: 0]
  ------------------
  719|       |      /* Free the memory allocated for this element */
  720|     67|      sbrDecoder_DestroyElement(self, elementIndex);
  721|     67|    } else if ((elementIndex < (8)) &&
  ------------------
  |  Branch (721:16): [True: 0, False: 0]
  ------------------
  722|      0|               (self->pSbrElement[elementIndex] !=
  ------------------
  |  Branch (722:16): [True: 0, False: 0]
  ------------------
  723|      0|                NULL)) { /* Set error flag to trigger concealment */
  724|      0|      setFrameErrorFlag(self->pSbrElement[elementIndex], FRAME_ERROR);
  ------------------
  |  |  118|      0|#define FRAME_ERROR (1)
  ------------------
  725|      0|    }
  726|     67|  }
  727|       |
  728|  1.30k|  return sbrError;
  729|  1.30k|}
sbrDecoder_FreeMem:
  735|  3.06k|SBR_ERROR sbrDecoder_FreeMem(HANDLE_SBRDECODER *self) {
  736|  3.06k|  int i;
  737|  3.06k|  int elIdx;
  738|       |
  739|  3.06k|  if (self != NULL && *self != NULL) {
  ------------------
  |  Branch (739:7): [True: 3.06k, False: 0]
  |  Branch (739:23): [True: 3.06k, False: 0]
  ------------------
  740|  27.5k|    for (i = 0; i < (8); i++) {
  ------------------
  |  Branch (740:17): [True: 24.4k, False: 3.06k]
  ------------------
  741|  24.4k|      sbrDecoder_DestroyElement(*self, i);
  742|  24.4k|    }
  743|       |
  744|  27.5k|    for (elIdx = 0; elIdx < (8); elIdx += 1) {
  ------------------
  |  Branch (744:21): [True: 24.4k, False: 3.06k]
  ------------------
  745|  73.4k|      for (i = 0; i < (1) + 1; i += 1) {
  ------------------
  |  Branch (745:19): [True: 48.9k, False: 24.4k]
  ------------------
  746|  48.9k|        (*self)->sbrHeader[elIdx][i].syncState = SBR_NOT_INITIALIZED;
  747|  48.9k|      }
  748|  24.4k|    }
  749|  3.06k|  }
  750|       |
  751|  3.06k|  return SBRDEC_OK;
  752|  3.06k|}
sbrDecoder_Header:
  805|  2.79k|                      const INT downscaleFactor) {
  806|  2.79k|  SBR_HEADER_STATUS headerStatus;
  807|  2.79k|  HANDLE_SBR_HEADER_DATA hSbrHeader;
  808|  2.79k|  SBR_ERROR sbrError = SBRDEC_OK;
  809|  2.79k|  int headerIndex;
  810|  2.79k|  UINT flagsSaved =
  811|  2.79k|      0; /* flags should not be changed in AC_CM_DET_CFG_CHANGE - mode after
  812|       |            parsing */
  813|       |
  814|  2.79k|  if (self == NULL || elementIndex >= (8)) {
  ------------------
  |  Branch (814:7): [True: 0, False: 2.79k]
  |  Branch (814:23): [True: 0, False: 2.79k]
  ------------------
  815|      0|    return SBRDEC_UNSUPPORTED_CONFIG;
  816|      0|  }
  817|       |
  818|  2.79k|  if (!sbrDecoder_isCoreCodecValid(coreCodec)) {
  ------------------
  |  Branch (818:7): [True: 0, False: 2.79k]
  ------------------
  819|      0|    return SBRDEC_UNSUPPORTED_CONFIG;
  820|      0|  }
  821|       |
  822|  2.79k|  if (configMode & AC_CM_DET_CFG_CHANGE) {
  ------------------
  |  |  334|  2.79k|  0x000001 /*!< Config mode signalizes the callback to work in config change \
  ------------------
  |  Branch (822:7): [True: 1.49k, False: 1.30k]
  ------------------
  823|  1.49k|    flagsSaved = self->flags; /* store */
  824|  1.49k|  }
  825|       |
  826|  2.79k|  sbrError = sbrDecoder_InitElement(
  827|  2.79k|      self, sampleRateIn, sampleRateOut, samplesPerFrame, coreCodec, elementID,
  828|  2.79k|      elementIndex, harmonicSBR, stereoConfigIndex, configMode, configChanged,
  829|  2.79k|      downscaleFactor);
  830|       |
  831|  2.79k|  if ((sbrError != SBRDEC_OK) || (elementID == ID_LFE)) {
  ------------------
  |  Branch (831:7): [True: 67, False: 2.73k]
  |  Branch (831:34): [True: 134, False: 2.59k]
  ------------------
  832|    201|    goto bail;
  833|    201|  }
  834|       |
  835|  2.59k|  if (configMode & AC_CM_DET_CFG_CHANGE) {
  ------------------
  |  |  334|  2.59k|  0x000001 /*!< Config mode signalizes the callback to work in config change \
  ------------------
  |  Branch (835:7): [True: 1.41k, False: 1.18k]
  ------------------
  836|  1.41k|    hSbrHeader = NULL;
  837|  1.41k|  } else {
  838|  1.18k|    headerIndex = getHeaderSlot(self->pSbrElement[elementIndex]->useFrameSlot,
  839|  1.18k|                                self->pSbrElement[elementIndex]->useHeaderSlot);
  840|       |
  841|  1.18k|    hSbrHeader = &(self->sbrHeader[elementIndex][headerIndex]);
  842|  1.18k|  }
  843|       |
  844|  2.59k|  headerStatus = sbrGetHeaderData(hSbrHeader, hBs, self->flags, 0, configMode);
  845|       |
  846|  2.59k|  if (coreCodec == AOT_USAC) {
  ------------------
  |  Branch (846:7): [True: 1.21k, False: 1.37k]
  ------------------
  847|  1.21k|    if (configMode & AC_CM_DET_CFG_CHANGE) {
  ------------------
  |  |  334|  1.21k|  0x000001 /*!< Config mode signalizes the callback to work in config change \
  ------------------
  |  Branch (847:9): [True: 700, False: 518]
  ------------------
  848|    700|      self->flags = flagsSaved; /* restore */
  849|    700|    }
  850|  1.21k|    return sbrError;
  851|  1.21k|  }
  852|       |
  853|  1.37k|  if (configMode & AC_CM_ALLOC_MEM) {
  ------------------
  |  |  337|  1.37k|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
  |  Branch (853:7): [True: 665, False: 714]
  ------------------
  854|    665|    SBR_DECODER_ELEMENT *pSbrElement;
  855|       |
  856|    665|    pSbrElement = self->pSbrElement[elementIndex];
  857|       |
  858|       |    /* Sanity check */
  859|    665|    if (pSbrElement != NULL) {
  ------------------
  |  Branch (859:9): [True: 665, False: 0]
  ------------------
  860|    665|      if ((elementID == ID_CPE && pSbrElement->nChannels != 2) ||
  ------------------
  |  Branch (860:12): [True: 359, False: 306]
  |  Branch (860:35): [True: 0, False: 359]
  ------------------
  861|    665|          (elementID != ID_CPE && pSbrElement->nChannels != 1)) {
  ------------------
  |  Branch (861:12): [True: 306, False: 359]
  |  Branch (861:35): [True: 0, False: 306]
  ------------------
  862|      0|        return SBRDEC_UNSUPPORTED_CONFIG;
  863|      0|      }
  864|    665|      if (headerStatus == HEADER_RESET) {
  ------------------
  |  Branch (864:11): [True: 665, False: 0]
  ------------------
  865|    665|        sbrError = sbrDecoder_HeaderUpdate(self, hSbrHeader, headerStatus,
  866|    665|                                           pSbrElement->pSbrChannel,
  867|    665|                                           pSbrElement->nChannels);
  868|       |
  869|    665|        if (sbrError == SBRDEC_OK) {
  ------------------
  |  Branch (869:13): [True: 520, False: 145]
  ------------------
  870|    520|          hSbrHeader->syncState = SBR_HEADER;
  871|    520|          hSbrHeader->status |= SBRDEC_HDR_STAT_UPDATE;
  ------------------
  |  |  240|    520|#define SBRDEC_HDR_STAT_UPDATE 2
  ------------------
  872|    520|        } else {
  873|    145|          hSbrHeader->syncState = SBR_NOT_INITIALIZED;
  874|    145|          hSbrHeader->status = HEADER_ERROR;
  875|    145|        }
  876|    665|      }
  877|    665|    }
  878|    665|  }
  879|  1.58k|bail:
  880|  1.58k|  if (configMode & AC_CM_DET_CFG_CHANGE) {
  ------------------
  |  |  334|  1.58k|  0x000001 /*!< Config mode signalizes the callback to work in config change \
  ------------------
  |  Branch (880:7): [True: 790, False: 790]
  ------------------
  881|    790|    self->flags = flagsSaved; /* restore */
  882|    790|  }
  883|  1.58k|  return sbrError;
  884|  1.37k|}
sbrDecoder_SetParam:
  887|  9.96k|                              const INT value) {
  888|  9.96k|  SBR_ERROR errorStatus = SBRDEC_OK;
  889|       |
  890|       |  /* configure the subsystems */
  891|  9.96k|  switch (param) {
  892|  9.96k|    case SBR_SYSTEM_BITSTREAM_DELAY:
  ------------------
  |  Branch (892:5): [True: 9.96k, False: 0]
  ------------------
  893|  9.96k|      if (value < 0 || value > (1)) {
  ------------------
  |  Branch (893:11): [True: 0, False: 9.96k]
  |  Branch (893:24): [True: 0, False: 9.96k]
  ------------------
  894|      0|        errorStatus = SBRDEC_SET_PARAM_FAIL;
  895|      0|        break;
  896|      0|      }
  897|  9.96k|      if (self == NULL) {
  ------------------
  |  Branch (897:11): [True: 0, False: 9.96k]
  ------------------
  898|      0|        errorStatus = SBRDEC_NOT_INITIALIZED;
  899|  9.96k|      } else {
  900|  9.96k|        self->numDelayFrames = (UCHAR)value;
  901|  9.96k|      }
  902|  9.96k|      break;
  903|      0|    case SBR_QMF_MODE:
  ------------------
  |  Branch (903:5): [True: 0, False: 9.96k]
  ------------------
  904|      0|      if (self == NULL) {
  ------------------
  |  Branch (904:11): [True: 0, False: 0]
  ------------------
  905|      0|        errorStatus = SBRDEC_NOT_INITIALIZED;
  906|      0|      } else {
  907|      0|        if (value == 1) {
  ------------------
  |  Branch (907:13): [True: 0, False: 0]
  ------------------
  908|      0|          self->flags |= SBRDEC_LOW_POWER;
  ------------------
  |  |  211|      0|  32 /* Flag indicating that Low Power QMF mode shall be used. */
  ------------------
  909|      0|        } else {
  910|      0|          self->flags &= ~SBRDEC_LOW_POWER;
  ------------------
  |  |  211|      0|  32 /* Flag indicating that Low Power QMF mode shall be used. */
  ------------------
  911|      0|        }
  912|      0|      }
  913|      0|      break;
  914|      0|    case SBR_LD_QMF_TIME_ALIGN:
  ------------------
  |  Branch (914:5): [True: 0, False: 9.96k]
  ------------------
  915|      0|      if (self == NULL) {
  ------------------
  |  Branch (915:11): [True: 0, False: 0]
  ------------------
  916|      0|        errorStatus = SBRDEC_NOT_INITIALIZED;
  917|      0|      } else {
  918|      0|        if (value == 1) {
  ------------------
  |  Branch (918:13): [True: 0, False: 0]
  ------------------
  919|      0|          self->flags |= SBRDEC_LD_MPS_QMF;
  ------------------
  |  |  220|      0|  512 /* Flag indicating that the LD-MPS QMF shall be used. */
  ------------------
  920|      0|        } else {
  921|      0|          self->flags &= ~SBRDEC_LD_MPS_QMF;
  ------------------
  |  |  220|      0|  512 /* Flag indicating that the LD-MPS QMF shall be used. */
  ------------------
  922|      0|        }
  923|      0|      }
  924|      0|      break;
  925|      0|    case SBR_FLUSH_DATA:
  ------------------
  |  Branch (925:5): [True: 0, False: 9.96k]
  ------------------
  926|      0|      if (value != 0) {
  ------------------
  |  Branch (926:11): [True: 0, False: 0]
  ------------------
  927|      0|        if (self == NULL) {
  ------------------
  |  Branch (927:13): [True: 0, False: 0]
  ------------------
  928|      0|          errorStatus = SBRDEC_NOT_INITIALIZED;
  929|      0|        } else {
  930|      0|          self->flags |= SBRDEC_FLUSH;
  ------------------
  |  |  229|      0|#define SBRDEC_FLUSH 16384 /* Flag is used to flush all elements in use. */
  ------------------
  931|      0|        }
  932|      0|      }
  933|      0|      break;
  934|      0|    case SBR_CLEAR_HISTORY:
  ------------------
  |  Branch (934:5): [True: 0, False: 9.96k]
  ------------------
  935|      0|      if (value != 0) {
  ------------------
  |  Branch (935:11): [True: 0, False: 0]
  ------------------
  936|      0|        if (self == NULL) {
  ------------------
  |  Branch (936:13): [True: 0, False: 0]
  ------------------
  937|      0|          errorStatus = SBRDEC_NOT_INITIALIZED;
  938|      0|        } else {
  939|      0|          self->flags |= SBRDEC_FORCE_RESET;
  ------------------
  |  |  231|      0|  32768 /* Flag is used to force a reset of all elements in use. */
  ------------------
  940|      0|        }
  941|      0|      }
  942|      0|      break;
  943|      0|    case SBR_BS_INTERRUPTION: {
  ------------------
  |  Branch (943:5): [True: 0, False: 9.96k]
  ------------------
  944|      0|      int elementIndex;
  945|       |
  946|      0|      if (self == NULL) {
  ------------------
  |  Branch (946:11): [True: 0, False: 0]
  ------------------
  947|      0|        errorStatus = SBRDEC_NOT_INITIALIZED;
  948|      0|        break;
  949|      0|      }
  950|       |
  951|       |      /* Loop over SBR elements */
  952|      0|      for (elementIndex = 0; elementIndex < self->numSbrElements;
  ------------------
  |  Branch (952:30): [True: 0, False: 0]
  ------------------
  953|      0|           elementIndex++) {
  954|      0|        if (self->pSbrElement[elementIndex] != NULL) {
  ------------------
  |  Branch (954:13): [True: 0, False: 0]
  ------------------
  955|      0|          HANDLE_SBR_HEADER_DATA hSbrHeader;
  956|      0|          int headerIndex =
  957|      0|              getHeaderSlot(self->pSbrElement[elementIndex]->useFrameSlot,
  958|      0|                            self->pSbrElement[elementIndex]->useHeaderSlot);
  959|       |
  960|      0|          hSbrHeader = &(self->sbrHeader[elementIndex][headerIndex]);
  961|       |
  962|       |          /* Set sync state UPSAMPLING for the corresponding slot.
  963|       |             This switches off bitstream parsing until a new header arrives. */
  964|      0|          if (hSbrHeader->syncState != SBR_NOT_INITIALIZED) {
  ------------------
  |  Branch (964:15): [True: 0, False: 0]
  ------------------
  965|      0|            hSbrHeader->syncState = UPSAMPLING;
  966|      0|            hSbrHeader->status |= SBRDEC_HDR_STAT_UPDATE;
  ------------------
  |  |  240|      0|#define SBRDEC_HDR_STAT_UPDATE 2
  ------------------
  967|      0|          }
  968|      0|        }
  969|      0|      }
  970|      0|    } break;
  971|       |
  972|      0|    case SBR_SKIP_QMF:
  ------------------
  |  Branch (972:5): [True: 0, False: 9.96k]
  ------------------
  973|      0|      if (self == NULL) {
  ------------------
  |  Branch (973:11): [True: 0, False: 0]
  ------------------
  974|      0|        errorStatus = SBRDEC_NOT_INITIALIZED;
  975|      0|      } else {
  976|      0|        if (value == 1) {
  ------------------
  |  Branch (976:13): [True: 0, False: 0]
  ------------------
  977|      0|          self->flags |= SBRDEC_SKIP_QMF_ANA;
  ------------------
  |  |  233|      0|  (1 << 21) /* Flag indicating that the input data is provided in the QMF \
  ------------------
  978|      0|        } else {
  979|      0|          self->flags &= ~SBRDEC_SKIP_QMF_ANA;
  ------------------
  |  |  233|      0|  (1 << 21) /* Flag indicating that the input data is provided in the QMF \
  ------------------
  980|      0|        }
  981|      0|        if (value == 2) {
  ------------------
  |  Branch (981:13): [True: 0, False: 0]
  ------------------
  982|      0|          self->flags |= SBRDEC_SKIP_QMF_SYN;
  ------------------
  |  |  236|      0|  (1 << 22) /* Flag indicating that the output data is exported in the QMF \
  ------------------
  983|      0|        } else {
  984|      0|          self->flags &= ~SBRDEC_SKIP_QMF_SYN;
  ------------------
  |  |  236|      0|  (1 << 22) /* Flag indicating that the output data is exported in the QMF \
  ------------------
  985|      0|        }
  986|      0|      }
  987|      0|      break;
  988|      0|    default:
  ------------------
  |  Branch (988:5): [True: 0, False: 9.96k]
  ------------------
  989|      0|      errorStatus = SBRDEC_SET_PARAM_FAIL;
  990|      0|      break;
  991|  9.96k|  } /* switch(param) */
  992|       |
  993|  9.96k|  return (errorStatus);
  994|  9.96k|}
sbrDecoder_Close:
 1933|  7.39k|SBR_ERROR sbrDecoder_Close(HANDLE_SBRDECODER *pSelf) {
 1934|  7.39k|  HANDLE_SBRDECODER self = *pSelf;
 1935|  7.39k|  int i;
 1936|       |
 1937|  7.39k|  if (self != NULL) {
  ------------------
  |  Branch (1937:7): [True: 7.39k, False: 0]
  ------------------
 1938|  7.39k|    if (self->hParametricStereoDec != NULL) {
  ------------------
  |  Branch (1938:9): [True: 0, False: 7.39k]
  ------------------
 1939|      0|      DeletePsDec(&self->hParametricStereoDec);
 1940|      0|    }
 1941|       |
 1942|  66.5k|    for (i = 0; i < (8); i++) {
  ------------------
  |  Branch (1942:17): [True: 59.1k, False: 7.39k]
  ------------------
 1943|  59.1k|      sbrDecoder_DestroyElement(self, i);
 1944|  59.1k|    }
 1945|       |
 1946|  7.39k|    FreeRam_SbrDecoder(pSelf);
 1947|  7.39k|  }
 1948|       |
 1949|  7.39k|  return SBRDEC_OK;
 1950|  7.39k|}
sbrdecoder.cpp:_ZL27sbrDecoder_isCoreCodecValid17AUDIO_OBJECT_TYPE:
  493|  5.59k|static int sbrDecoder_isCoreCodecValid(AUDIO_OBJECT_TYPE coreCodec) {
  494|  5.59k|  switch (coreCodec) {
  495|      0|    case AOT_AAC_LC:
  ------------------
  |  Branch (495:5): [True: 0, False: 5.59k]
  ------------------
  496|      0|    case AOT_SBR:
  ------------------
  |  Branch (496:5): [True: 0, False: 5.59k]
  ------------------
  497|      0|    case AOT_PS:
  ------------------
  |  Branch (497:5): [True: 0, False: 5.59k]
  ------------------
  498|      0|    case AOT_ER_AAC_SCAL:
  ------------------
  |  Branch (498:5): [True: 0, False: 5.59k]
  ------------------
  499|  3.07k|    case AOT_ER_AAC_ELD:
  ------------------
  |  Branch (499:5): [True: 3.07k, False: 2.51k]
  ------------------
  500|  3.07k|    case AOT_DRM_AAC:
  ------------------
  |  Branch (500:5): [True: 0, False: 5.59k]
  ------------------
  501|  3.07k|    case AOT_DRM_SURROUND:
  ------------------
  |  Branch (501:5): [True: 0, False: 5.59k]
  ------------------
  502|  5.59k|    case AOT_USAC:
  ------------------
  |  Branch (502:5): [True: 2.51k, False: 3.07k]
  ------------------
  503|  5.59k|      return 1;
  504|      0|    default:
  ------------------
  |  Branch (504:5): [True: 0, False: 5.59k]
  ------------------
  505|      0|      return 0;
  506|  5.59k|  }
  507|  5.59k|}
sbrdecoder.cpp:_ZL40sbrDecoder_AssignQmfChannels2SbrChannelsP20SBR_DECODER_INSTANCE:
  429|  1.30k|static void sbrDecoder_AssignQmfChannels2SbrChannels(HANDLE_SBRDECODER self) {
  430|  1.30k|  int ch, el, absCh_offset = 0;
  431|  3.34k|  for (el = 0; el < self->numSbrElements; el++) {
  ------------------
  |  Branch (431:16): [True: 2.04k, False: 1.30k]
  ------------------
  432|  2.04k|    if (self->pSbrElement[el] != NULL) {
  ------------------
  |  Branch (432:9): [True: 2.04k, False: 0]
  ------------------
  433|  4.80k|      for (ch = 0; ch < self->pSbrElement[el]->nChannels; ch++) {
  ------------------
  |  Branch (433:20): [True: 2.76k, False: 2.04k]
  ------------------
  434|  2.76k|        FDK_ASSERT(((absCh_offset + ch) < ((8) + (1))) &&
  ------------------
  |  |  221|  2.76k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (434:9): [True: 2.76k, False: 0]
  |  Branch (434:9): [True: 2.76k, False: 0]
  |  Branch (434:9): [True: 2.76k, False: 0]
  ------------------
  435|  2.76k|                   ((absCh_offset + ch) < ((8) + (1))));
  436|  2.76k|        self->pSbrElement[el]->pSbrChannel[ch]->SbrDec.qmfDomainInCh =
  437|  2.76k|            &self->pQmfDomain->QmfDomainIn[absCh_offset + ch];
  438|  2.76k|        self->pSbrElement[el]->pSbrChannel[ch]->SbrDec.qmfDomainOutCh =
  439|  2.76k|            &self->pQmfDomain->QmfDomainOut[absCh_offset + ch];
  440|  2.76k|      }
  441|  2.04k|      absCh_offset += self->pSbrElement[el]->nChannels;
  442|  2.04k|    }
  443|  2.04k|  }
  444|  1.30k|}
sbrdecoder.cpp:_ZL23sbrDecoder_ResetElementP20SBR_DECODER_INSTANCEiii14MP4_ELEMENT_IDii:
  278|  1.30k|                                         const int overlap) {
  279|  1.30k|  SBR_ERROR sbrError = SBRDEC_OK;
  280|  1.30k|  HANDLE_SBR_HEADER_DATA hSbrHeader;
  281|  1.30k|  UINT qmfFlags = 0;
  282|       |
  283|  1.30k|  int i, synDownsampleFac;
  284|       |
  285|       |  /* USAC: assuming theoretical case 8 kHz output sample rate with 4:1 SBR */
  286|  1.30k|  const int sbr_min_sample_rate_in = IS_USAC(self->coreCodec) ? 2000 : 6400;
  ------------------
  |  |  226|  1.30k|#define IS_USAC(aot) ((aot) == AOT_USAC)
  |  |  ------------------
  |  |  |  Branch (226:22): [True: 559, False: 749]
  |  |  ------------------
  ------------------
  287|       |
  288|       |  /* Check in/out samplerates */
  289|  1.30k|  if (sampleRateIn < sbr_min_sample_rate_in || sampleRateIn > (96000)) {
  ------------------
  |  Branch (289:7): [True: 14, False: 1.29k]
  |  Branch (289:48): [True: 19, False: 1.27k]
  ------------------
  290|     33|    sbrError = SBRDEC_UNSUPPORTED_CONFIG;
  291|     33|    goto bail;
  292|     33|  }
  293|       |
  294|  1.27k|  if (sampleRateOut > (96000)) {
  ------------------
  |  Branch (294:7): [True: 6, False: 1.26k]
  ------------------
  295|      6|    sbrError = SBRDEC_UNSUPPORTED_CONFIG;
  296|      6|    goto bail;
  297|      6|  }
  298|       |
  299|       |  /* Set QMF mode flags */
  300|  1.26k|  if (self->flags & SBRDEC_LOW_POWER) qmfFlags |= QMF_FLAG_LP;
  ------------------
  |  |  211|  1.26k|  32 /* Flag indicating that Low Power QMF mode shall be used. */
  ------------------
                if (self->flags & SBRDEC_LOW_POWER) qmfFlags |= QMF_FLAG_LP;
  ------------------
  |  |  126|      0|#define QMF_FLAG_LP 1
  ------------------
  |  Branch (300:7): [True: 0, False: 1.26k]
  ------------------
  301|       |
  302|  1.26k|  if (self->coreCodec == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (302:7): [True: 724, False: 545]
  ------------------
  303|    724|    if (self->flags & SBRDEC_LD_MPS_QMF) {
  ------------------
  |  |  220|    724|  512 /* Flag indicating that the LD-MPS QMF shall be used. */
  ------------------
  |  Branch (303:9): [True: 0, False: 724]
  ------------------
  304|      0|      qmfFlags |= QMF_FLAG_MPSLDFB;
  ------------------
  |  |  137|      0|#define QMF_FLAG_MPSLDFB 16
  ------------------
  305|    724|    } else {
  306|    724|      qmfFlags |= QMF_FLAG_CLDFB;
  ------------------
  |  |  133|    724|#define QMF_FLAG_CLDFB 4
  ------------------
  307|    724|    }
  308|    724|  }
  309|       |
  310|       |  /* Set downsampling factor for synthesis filter bank */
  311|  1.26k|  if (sampleRateOut == 0) {
  ------------------
  |  Branch (311:7): [True: 0, False: 1.26k]
  ------------------
  312|       |    /* no single rate mode */
  313|      0|    sampleRateOut =
  314|      0|        sampleRateIn
  315|      0|        << 1; /* In case of implicit signalling, assume dual rate SBR */
  316|      0|  }
  317|       |
  318|  1.26k|  if (sampleRateIn == sampleRateOut) {
  ------------------
  |  Branch (318:7): [True: 526, False: 743]
  ------------------
  319|    526|    synDownsampleFac = 2;
  320|    526|    self->flags |= SBRDEC_DOWNSAMPLE;
  ------------------
  |  |  228|    526|  8192 /* Flag indicating that the downsampling mode is used. */
  ------------------
  321|    743|  } else {
  322|    743|    synDownsampleFac = 1;
  323|    743|    self->flags &= ~SBRDEC_DOWNSAMPLE;
  ------------------
  |  |  228|    743|  8192 /* Flag indicating that the downsampling mode is used. */
  ------------------
  324|    743|  }
  325|       |
  326|  1.26k|  self->synDownsampleFac = synDownsampleFac;
  327|  1.26k|  self->sampleRateOut = sampleRateOut;
  328|       |
  329|  1.26k|  {
  330|  3.80k|    for (i = 0; i < (1) + 1; i++) {
  ------------------
  |  Branch (330:17): [True: 2.53k, False: 1.26k]
  ------------------
  331|  2.53k|      int setDflt;
  332|  2.53k|      hSbrHeader = &(self->sbrHeader[elementIndex][i]);
  333|  2.53k|      setDflt = ((hSbrHeader->syncState == SBR_NOT_INITIALIZED) ||
  ------------------
  |  Branch (333:18): [True: 2.53k, False: 0]
  ------------------
  334|      0|                 (self->flags & SBRDEC_FORCE_RESET))
  ------------------
  |  |  231|      0|  32768 /* Flag is used to force a reset of all elements in use. */
  ------------------
  |  Branch (334:18): [True: 0, False: 0]
  ------------------
  335|  2.53k|                    ? 1
  336|  2.53k|                    : 0;
  337|       |
  338|       |      /* init a default header such that we can at least do upsampling later */
  339|  2.53k|      sbrError = initHeaderData(hSbrHeader, sampleRateIn, sampleRateOut,
  340|  2.53k|                                self->downscaleFactor, samplesPerFrame,
  341|  2.53k|                                self->flags, setDflt);
  342|       |
  343|       |      /* Set synchState to UPSAMPLING in case it already is initialized */
  344|  2.53k|      hSbrHeader->syncState = hSbrHeader->syncState > UPSAMPLING
  ------------------
  |  Branch (344:31): [True: 0, False: 2.53k]
  ------------------
  345|  2.53k|                                  ? UPSAMPLING
  346|  2.53k|                                  : hSbrHeader->syncState;
  347|  2.53k|    }
  348|  1.26k|  }
  349|       |
  350|  1.26k|  if (sbrError != SBRDEC_OK) {
  ------------------
  |  Branch (350:7): [True: 0, False: 1.26k]
  ------------------
  351|      0|    goto bail;
  352|      0|  }
  353|       |
  354|  1.26k|  if (!self->pQmfDomain->globalConf.qmfDomainExplicitConfig) {
  ------------------
  |  Branch (354:7): [True: 1.26k, False: 0]
  ------------------
  355|  1.26k|    self->pQmfDomain->globalConf.flags_requested |= qmfFlags;
  356|  1.26k|    self->pQmfDomain->globalConf.nBandsAnalysis_requested =
  357|  1.26k|        self->sbrHeader[elementIndex][0].numberOfAnalysisBands;
  358|  1.26k|    self->pQmfDomain->globalConf.nBandsSynthesis_requested =
  359|  1.26k|        (synDownsampleFac == 1) ? 64 : 32; /* may be overwritten by MPS */
  ------------------
  |  Branch (359:9): [True: 743, False: 526]
  ------------------
  360|  1.26k|    self->pQmfDomain->globalConf.nBandsSynthesis_requested /=
  361|  1.26k|        self->downscaleFactor;
  362|  1.26k|    self->pQmfDomain->globalConf.nQmfTimeSlots_requested =
  363|  1.26k|        self->sbrHeader[elementIndex][0].numberTimeSlots *
  364|  1.26k|        self->sbrHeader[elementIndex][0].timeStep;
  365|  1.26k|    self->pQmfDomain->globalConf.nQmfOvTimeSlots_requested = overlap;
  366|  1.26k|    self->pQmfDomain->globalConf.nQmfProcBands_requested = 64; /* always 64 */
  367|  1.26k|    self->pQmfDomain->globalConf.nQmfProcChannels_requested =
  368|  1.26k|        1; /* may be overwritten by MPS */
  369|  1.26k|  }
  370|       |
  371|       |  /* Init SBR channels going to be assigned to a SBR element */
  372|  1.26k|  {
  373|  1.26k|    int ch;
  374|  2.88k|    for (ch = 0; ch < self->pSbrElement[elementIndex]->nChannels; ch++) {
  ------------------
  |  Branch (374:18): [True: 1.64k, False: 1.24k]
  ------------------
  375|  1.64k|      int headerIndex =
  376|  1.64k|          getHeaderSlot(self->pSbrElement[elementIndex]->useFrameSlot,
  377|  1.64k|                        self->pSbrElement[elementIndex]->useHeaderSlot);
  378|       |
  379|       |      /* and create sbrDec */
  380|  1.64k|      sbrError =
  381|  1.64k|          createSbrDec(self->pSbrElement[elementIndex]->pSbrChannel[ch],
  382|  1.64k|                       &self->sbrHeader[elementIndex][headerIndex],
  383|  1.64k|                       &self->pSbrElement[elementIndex]->transposerSettings,
  384|  1.64k|                       synDownsampleFac, qmfFlags, self->flags, overlap, ch,
  385|  1.64k|                       self->codecFrameSize);
  386|       |
  387|  1.64k|      if (sbrError != SBRDEC_OK) {
  ------------------
  |  Branch (387:11): [True: 28, False: 1.61k]
  ------------------
  388|     28|        goto bail;
  389|     28|      }
  390|  1.64k|    }
  391|  1.26k|  }
  392|       |
  393|       |  // FDKmemclear(sbr_OverlapBuffer, sizeof(sbr_OverlapBuffer));
  394|       |
  395|  1.24k|  if (self->numSbrElements == 1) {
  ------------------
  |  Branch (395:7): [True: 865, False: 376]
  ------------------
  396|    865|    switch (self->coreCodec) {
  397|      0|      case AOT_AAC_LC:
  ------------------
  |  Branch (397:7): [True: 0, False: 865]
  ------------------
  398|      0|      case AOT_SBR:
  ------------------
  |  Branch (398:7): [True: 0, False: 865]
  ------------------
  399|      0|      case AOT_PS:
  ------------------
  |  Branch (399:7): [True: 0, False: 865]
  ------------------
  400|      0|      case AOT_ER_AAC_SCAL:
  ------------------
  |  Branch (400:7): [True: 0, False: 865]
  ------------------
  401|      0|      case AOT_DRM_AAC:
  ------------------
  |  Branch (401:7): [True: 0, False: 865]
  ------------------
  402|      0|      case AOT_DRM_SURROUND:
  ------------------
  |  Branch (402:7): [True: 0, False: 865]
  ------------------
  403|      0|        if (CreatePsDec(&self->hParametricStereoDec, samplesPerFrame)) {
  ------------------
  |  Branch (403:13): [True: 0, False: 0]
  ------------------
  404|      0|          sbrError = SBRDEC_CREATE_ERROR;
  405|      0|          goto bail;
  406|      0|        }
  407|      0|        break;
  408|    865|      default:
  ------------------
  |  Branch (408:7): [True: 865, False: 0]
  ------------------
  409|    865|        break;
  410|    865|    }
  411|    865|  }
  412|       |
  413|       |  /* Init frame delay slot handling */
  414|  1.24k|  self->pSbrElement[elementIndex]->useFrameSlot = 0;
  415|  3.72k|  for (i = 0; i < ((1) + 1); i++) {
  ------------------
  |  Branch (415:15): [True: 2.48k, False: 1.24k]
  ------------------
  416|  2.48k|    self->pSbrElement[elementIndex]->useHeaderSlot[i] = i;
  417|  2.48k|  }
  418|       |
  419|  1.30k|bail:
  420|       |
  421|  1.30k|  return sbrError;
  422|  1.24k|}
sbrdecoder.cpp:_ZL25sbrDecoder_DestroyElementP20SBR_DECODER_INSTANCEi:
  510|  83.6k|                                      const int elementIndex) {
  511|  83.6k|  if (self->pSbrElement[elementIndex] != NULL) {
  ------------------
  |  Branch (511:7): [True: 1.30k, False: 82.3k]
  ------------------
  512|  1.30k|    int ch;
  513|       |
  514|  3.92k|    for (ch = 0; ch < SBRDEC_MAX_CH_PER_ELEMENT; ch++) {
  ------------------
  |  |  115|  3.92k|#define SBRDEC_MAX_CH_PER_ELEMENT (2)
  ------------------
  |  Branch (514:18): [True: 2.61k, False: 1.30k]
  ------------------
  515|  2.61k|      if (self->pSbrElement[elementIndex]->pSbrChannel[ch] != NULL) {
  ------------------
  |  Branch (515:11): [True: 1.69k, False: 923]
  ------------------
  516|  1.69k|        deleteSbrDec(self->pSbrElement[elementIndex]->pSbrChannel[ch]);
  517|  1.69k|        FreeRam_SbrDecChannel(
  518|  1.69k|            &self->pSbrElement[elementIndex]->pSbrChannel[ch]);
  519|  1.69k|        self->numSbrChannels -= 1;
  520|  1.69k|      }
  521|  2.61k|    }
  522|  1.30k|    FreeRam_SbrDecElement(&self->pSbrElement[elementIndex]);
  523|  1.30k|    self->numSbrElements -= 1;
  524|  1.30k|  }
  525|  83.6k|}
sbrdecoder.cpp:_ZL13getHeaderSlothPh:
  182|  2.83k|static UCHAR getHeaderSlot(UCHAR currentSlot, UCHAR hdrSlotUsage[(1) + 1]) {
  183|  2.83k|  UINT occupied = 0;
  184|  2.83k|  int s;
  185|  2.83k|  UCHAR slot = hdrSlotUsage[currentSlot];
  186|       |
  187|  2.83k|  FDK_ASSERT((1) + 1 < 32);
  ------------------
  |  |  221|  2.83k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (187:3): [True: 2.83k, Folded]
  ------------------
  188|       |
  189|  6.84k|  for (s = 0; s < (1) + 1; s++) {
  ------------------
  |  Branch (189:15): [True: 5.66k, False: 1.18k]
  ------------------
  190|  5.66k|    if ((hdrSlotUsage[s] == slot) && (s != slot)) {
  ------------------
  |  Branch (190:9): [True: 4.47k, False: 1.18k]
  |  Branch (190:38): [True: 1.64k, False: 2.83k]
  ------------------
  191|  1.64k|      occupied = 1;
  192|  1.64k|      break;
  193|  1.64k|    }
  194|  5.66k|  }
  195|       |
  196|  2.83k|  if (occupied) {
  ------------------
  |  Branch (196:7): [True: 1.64k, False: 1.18k]
  ------------------
  197|  1.64k|    occupied = 0;
  198|       |
  199|  4.94k|    for (s = 0; s < (1) + 1; s++) {
  ------------------
  |  Branch (199:17): [True: 3.29k, False: 1.64k]
  ------------------
  200|  3.29k|      occupied |= 1 << hdrSlotUsage[s];
  201|  3.29k|    }
  202|  3.29k|    for (s = 0; s < (1) + 1; s++) {
  ------------------
  |  Branch (202:17): [True: 3.29k, False: 0]
  ------------------
  203|  3.29k|      if (!(occupied & 0x1)) {
  ------------------
  |  Branch (203:11): [True: 1.64k, False: 1.64k]
  ------------------
  204|  1.64k|        slot = s;
  205|  1.64k|        break;
  206|  1.64k|      }
  207|  1.64k|      occupied >>= 1;
  208|  1.64k|    }
  209|  1.64k|  }
  210|       |
  211|  2.83k|  return slot;
  212|  2.83k|}
sbrdecoder.cpp:_ZL23sbrDecoder_HeaderUpdateP20SBR_DECODER_INSTANCEP15SBR_HEADER_DATA17SBR_HEADER_STATUSPP11SBR_CHANNELi:
  768|    665|                                         const int numElementChannels) {
  769|    665|  SBR_ERROR errorStatus = SBRDEC_OK;
  770|       |
  771|       |  /*
  772|       |    change of control data, reset decoder
  773|       |  */
  774|    665|  errorStatus = resetFreqBandTables(hSbrHeader, self->flags);
  775|       |
  776|    665|  if (errorStatus == SBRDEC_OK) {
  ------------------
  |  Branch (776:7): [True: 520, False: 145]
  ------------------
  777|    520|    if (hSbrHeader->syncState == UPSAMPLING && headerStatus != HEADER_RESET) {
  ------------------
  |  Branch (777:9): [True: 0, False: 520]
  |  Branch (777:48): [True: 0, False: 0]
  ------------------
  778|       |#if (SBRDEC_MAX_HB_FADE_FRAMES > 0)
  779|       |      int ch;
  780|       |      for (ch = 0; ch < numElementChannels; ch += 1) {
  781|       |        hSbrChannel[ch]->SbrDec.highBandFadeCnt = SBRDEC_MAX_HB_FADE_FRAMES;
  782|       |      }
  783|       |
  784|       |#endif
  785|       |      /* As the default header would limit the frequency range,
  786|       |         lowSubband and highSubband must be patched. */
  787|      0|      hSbrHeader->freqBandData.lowSubband = hSbrHeader->numberOfAnalysisBands;
  788|      0|      hSbrHeader->freqBandData.highSubband = hSbrHeader->numberOfAnalysisBands;
  789|      0|    }
  790|       |
  791|       |    /* Trigger a reset before processing this slot */
  792|    520|    hSbrHeader->status |= SBRDEC_HDR_STAT_RESET;
  ------------------
  |  |  239|    520|#define SBRDEC_HDR_STAT_RESET 1
  ------------------
  793|    520|  }
  794|       |
  795|    665|  return errorStatus;
  796|    665|}

sbrdec_freq_sca.cpp:_ZL21FDK_getNumOctavesDiv8ii:
  126|  2.62k|{
  127|  2.62k|  return ((SHORT)((LONG)(CalcLdInt(b) - CalcLdInt(a)) >> (FRACT_BITS - 3)));
  ------------------
  |  |  112|  2.62k|#define FRACT_BITS 16  /* single precision */
  ------------------
  128|  2.62k|}

_Z29GetRequiredMemWorkBufferCore5v:
  288|  7.39k|  UINT GetRequiredMem##name(void) {                                         \
  289|  7.39k|    return ALGN_SIZE_EXTRES((num) * sizeof(type) + ALIGNMENT_DEFAULT +      \
  ------------------
  |  |  320|  7.39k|  ((a) + (((INT)ALIGNMENT_EXTRES - ((INT)(a) & (ALIGNMENT_EXTRES - 1))) & \
  |  |  ------------------
  |  |  |  |  318|  7.39k|#define ALIGNMENT_EXTRES (ALIGNMENT_DEFAULT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  256|  7.39k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                 ((a) + (((INT)ALIGNMENT_EXTRES - ((INT)(a) & (ALIGNMENT_EXTRES - 1))) & \
  |  |  ------------------
  |  |  |  |  318|  7.39k|#define ALIGNMENT_EXTRES (ALIGNMENT_DEFAULT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  256|  7.39k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  321|  7.39k|          (ALIGNMENT_EXTRES - 1)))
  |  |  ------------------
  |  |  |  |  318|  7.39k|#define ALIGNMENT_EXTRES (ALIGNMENT_DEFAULT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  256|  7.39k|#define ALIGNMENT_DEFAULT 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  290|  7.39k|                            sizeof(void *));                                \
  291|  7.39k|  }

FDKcalloc:
  192|   202k|void *FDKcalloc(const UINT n, const UINT size) {
  193|   202k|  void *ptr;
  194|       |
  195|   202k|  ptr = calloc(n, size);
  196|       |
  197|   202k|  return ptr;
  198|   202k|}
FDKfree:
  208|   202k|void FDKfree(void *ptr) { free((INT *)ptr); }
FDKaalloc:
  210|  14.3k|void *FDKaalloc(const UINT size, const UINT alignment) {
  211|  14.3k|  void *addr, *result = NULL;
  212|  14.3k|  addr = FDKcalloc(1, size + alignment +
  213|  14.3k|                          (UINT)sizeof(void *)); /* Malloc and clear memory. */
  214|       |
  215|  14.3k|  if (addr != NULL) {
  ------------------
  |  Branch (215:7): [True: 14.3k, False: 0]
  ------------------
  216|  14.3k|    result = ALIGN_PTR((unsigned char *)addr +
  ------------------
  |  |  312|  14.3k|  ((void *)((unsigned char *)(a) +                        \
  |  |  313|  14.3k|            ((((INT)ALIGNMENT_DEFAULT -                   \
  |  |  ------------------
  |  |  |  |  256|  14.3k|#define ALIGNMENT_DEFAULT 8
  |  |  ------------------
  |  |  314|  14.3k|               ((size_t)(a) & (ALIGNMENT_DEFAULT - 1))) & \
  |  |  ------------------
  |  |  |  |  256|  14.3k|#define ALIGNMENT_DEFAULT 8
  |  |  ------------------
  |  |  315|  14.3k|              (ALIGNMENT_DEFAULT - 1)))))
  |  |  ------------------
  |  |  |  |  256|  14.3k|#define ALIGNMENT_DEFAULT 8
  |  |  ------------------
  ------------------
  217|  14.3k|                       sizeof(void *)); /* Get aligned memory base address. */
  218|  14.3k|    *(((void **)result) - 1) = addr;    /* Save malloc'ed memory pointer.   */
  219|  14.3k|    C_ALLOC_ALIGNED_REGISTER(result, size);
  220|  14.3k|  }
  221|       |
  222|  14.3k|  return result; /* Return aligned address.          */
  223|  14.3k|}
FDKafree:
  225|  14.1k|void FDKafree(void *ptr) {
  226|  14.1k|  void *addr;
  227|  14.1k|  addr = *(((void **)ptr) - 1); /* Get pointer to malloc'ed memory. */
  228|       |
  229|  14.1k|  C_ALLOC_ALIGNED_UNREGISTER(ptr);
  230|       |
  231|  14.1k|  FDKfree(addr); /* Free malloc'ed memory area.      */
  232|  14.1k|}
FDKcalloc_L:
  241|  31.2k|void *FDKcalloc_L(const UINT dim, const UINT size, MEMORY_SECTION s) {
  242|  31.2k|  return FDKcalloc(dim, size);
  243|  31.2k|}
FDKfree_L:
  245|  81.7k|void FDKfree_L(void *p) { FDKfree(p); }
FDKaalloc_L:
  247|  28.2k|void *FDKaalloc_L(const UINT size, const UINT alignment, MEMORY_SECTION s) {
  248|  28.2k|  void *addr, *result = NULL;
  249|  28.2k|  addr = FDKcalloc_L(1, size + alignment + (UINT)sizeof(void *),
  250|  28.2k|                     s); /* Malloc and clear memory.         */
  251|       |
  252|  28.2k|  if (addr != NULL) {
  ------------------
  |  Branch (252:7): [True: 28.2k, False: 0]
  ------------------
  253|  28.2k|    result = ALIGN_PTR((unsigned char *)addr +
  ------------------
  |  |  312|  28.2k|  ((void *)((unsigned char *)(a) +                        \
  |  |  313|  28.2k|            ((((INT)ALIGNMENT_DEFAULT -                   \
  |  |  ------------------
  |  |  |  |  256|  28.2k|#define ALIGNMENT_DEFAULT 8
  |  |  ------------------
  |  |  314|  28.2k|               ((size_t)(a) & (ALIGNMENT_DEFAULT - 1))) & \
  |  |  ------------------
  |  |  |  |  256|  28.2k|#define ALIGNMENT_DEFAULT 8
  |  |  ------------------
  |  |  315|  28.2k|              (ALIGNMENT_DEFAULT - 1)))))
  |  |  ------------------
  |  |  |  |  256|  28.2k|#define ALIGNMENT_DEFAULT 8
  |  |  ------------------
  ------------------
  254|  28.2k|                       sizeof(void *)); /* Get aligned memory base address. */
  255|  28.2k|    *(((void **)result) - 1) = addr;    /* Save malloc'ed memory pointer.   */
  256|  28.2k|    C_ALLOC_ALIGNED_REGISTER(result, size);
  257|  28.2k|  }
  258|       |
  259|  28.2k|  return result; /* Return aligned address.          */
  260|  28.2k|}
FDKafree_L:
  262|  28.3k|void FDKafree_L(void *ptr) {
  263|  28.3k|  void *addr;
  264|       |
  265|  28.3k|  addr = *(((void **)ptr) - 1); /* Get pointer to malloc'ed memory. */
  266|       |
  267|  28.3k|  C_ALLOC_ALIGNED_UNREGISTER(ptr);
  268|       |
  269|  28.3k|  FDKfree_L(addr); /* Free malloc'ed memory area.      */
  270|  28.3k|}
FDKmemcpy:
  277|  55.3k|void FDKmemcpy(void *dst, const void *src, const UINT size) {
  278|       |  /* -- check for overlapping memory areas -- */
  279|  55.3k|  FDK_ASSERT(((const unsigned char *)dst - (const unsigned char *)src) >=
  ------------------
  |  |  221|  55.3k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (279:3): [True: 41.2k, False: 14.1k]
  |  Branch (279:3): [True: 14.1k, False: 0]
  |  Branch (279:3): [True: 55.3k, False: 0]
  ------------------
  280|  55.3k|                 (ptrdiff_t)size ||
  281|  55.3k|             ((const unsigned char *)src - (const unsigned char *)dst) >=
  282|  55.3k|                 (ptrdiff_t)size);
  283|       |
  284|       |  /* do the copy */
  285|  55.3k|  memcpy(dst, src, size);
  286|  55.3k|}
FDKmemset:
  292|  2.46M|void FDKmemset(void *memPtr, const INT value, const UINT size) {
  293|  2.46M|  memset(memPtr, value, size);
  294|  2.46M|}
FDKmemclear:
  296|  2.44M|void FDKmemclear(void *memPtr, const UINT size) { FDKmemset(memPtr, 0, size); }
FDKmemcmp:
  301|  78.2k|INT FDKmemcmp(const void *s1, const void *s2, const UINT size) {
  302|  78.2k|  return memcmp(s1, s2, size);
  303|  78.2k|}

FDK_chMapDescr_isValid:
  228|  6.31k|int FDK_chMapDescr_isValid(const FDK_channelMapDescr* const pMapDescr) {
  229|  6.31k|  int result = 0;
  230|  6.31k|  UINT i;
  231|       |
  232|  6.31k|  if (pMapDescr != NULL) {
  ------------------
  |  Branch (232:7): [True: 6.31k, False: 0]
  ------------------
  233|  6.31k|    result = 1;
  234|   101k|    for (i = 0; (i < pMapDescr->mapInfoTabLen) && result; i += 1) {
  ------------------
  |  Branch (234:17): [True: 94.7k, False: 6.31k]
  |  Branch (234:51): [True: 94.7k, False: 0]
  ------------------
  235|  94.7k|      if (!fdk_chMapDescr_isValidMap(&pMapDescr->pMapInfoTab[i])) {
  ------------------
  |  Branch (235:11): [True: 0, False: 94.7k]
  ------------------
  236|      0|        result = 0;
  237|      0|      }
  238|  94.7k|    }
  239|  6.31k|  }
  240|  6.31k|  return result;
  241|  6.31k|}
FDK_chMapDescr_init:
  248|  7.39k|                         const UINT mapInfoTabLen, const UINT fPassThrough) {
  249|  7.39k|  if (pMapDescr != NULL) {
  ------------------
  |  Branch (249:7): [True: 7.39k, False: 0]
  ------------------
  250|  7.39k|    int useDefaultTab = 1;
  251|       |
  252|  7.39k|    pMapDescr->fPassThrough = (fPassThrough == 0) ? 0 : 1;
  ------------------
  |  Branch (252:31): [True: 7.39k, False: 0]
  ------------------
  253|       |
  254|  7.39k|    if ((pMapInfoTab != NULL) && (mapInfoTabLen > 0)) {
  ------------------
  |  Branch (254:9): [True: 0, False: 7.39k]
  |  Branch (254:34): [True: 0, False: 0]
  ------------------
  255|       |      /* Set the valid custom mapping table. */
  256|      0|      pMapDescr->pMapInfoTab = pMapInfoTab;
  257|      0|      pMapDescr->mapInfoTabLen = mapInfoTabLen;
  258|       |      /* Validate the complete descriptor. */
  259|      0|      useDefaultTab = (FDK_chMapDescr_isValid(pMapDescr) == 0) ? 1 : 0;
  ------------------
  |  Branch (259:23): [True: 0, False: 0]
  ------------------
  260|      0|    }
  261|  7.39k|    if (useDefaultTab != 0) {
  ------------------
  |  Branch (261:9): [True: 7.39k, False: 0]
  ------------------
  262|       |      /* Set default table. */
  263|  7.39k|      pMapDescr->pMapInfoTab = mapInfoTabDflt;
  264|  7.39k|      pMapDescr->mapInfoTabLen = DFLT_CH_MAP_TAB_LEN;
  ------------------
  |  |  110|  7.39k|  (15) /* Length of the default channel map info table. */
  ------------------
  265|  7.39k|    }
  266|  7.39k|  }
  267|  7.39k|}
syslib_channelMapDescr.cpp:_ZL25fdk_chMapDescr_isValidMapPK16CHANNEL_MAP_INFO:
  184|  94.7k|static int fdk_chMapDescr_isValidMap(const CHANNEL_MAP_INFO* const pMapInfo) {
  185|  94.7k|  int result = 1;
  186|  94.7k|  UINT i;
  187|       |
  188|  94.7k|  if (pMapInfo == NULL) {
  ------------------
  |  Branch (188:7): [True: 0, False: 94.7k]
  ------------------
  189|      0|    result = 0;
  190|  94.7k|  } else {
  191|  94.7k|    UINT numChannels = pMapInfo->numChannels;
  192|       |
  193|       |    /* Check for all map values if they are inside the range 0 to numChannels-1
  194|       |     * and unique. */
  195|  94.7k|    if (numChannels < 32) { /* Optimized version for less than 32 channels.
  ------------------
  |  Branch (195:9): [True: 94.7k, False: 0]
  ------------------
  196|       |                               Needs only one loop. */
  197|  94.7k|      UINT mappedChMask = 0x0;
  198|  1.18M|      for (i = 0; i < numChannels; i += 1) {
  ------------------
  |  Branch (198:19): [True: 1.09M, False: 94.7k]
  ------------------
  199|  1.09M|        mappedChMask |= 1 << pMapInfo->pChannelMap[i];
  200|  1.09M|      }
  201|  94.7k|      if (mappedChMask != (((UINT)1 << numChannels) - 1)) {
  ------------------
  |  Branch (201:11): [True: 0, False: 94.7k]
  ------------------
  202|      0|        result = 0;
  203|      0|      }
  204|  94.7k|    } else { /* General case that can handle all number of channels but needs
  205|       |                one more loop. */
  206|      0|      for (i = 0; (i < numChannels) && result; i += 1) {
  ------------------
  |  Branch (206:19): [True: 0, False: 0]
  |  Branch (206:40): [True: 0, False: 0]
  ------------------
  207|      0|        UINT j;
  208|      0|        UCHAR value0 = pMapInfo->pChannelMap[i];
  209|       |
  210|      0|        if (value0 > numChannels - 1) { /* out of range? */
  ------------------
  |  Branch (210:13): [True: 0, False: 0]
  ------------------
  211|      0|          result = 0;
  212|      0|        }
  213|      0|        for (j = numChannels - 1; (j > i) && result; j -= 1) {
  ------------------
  |  Branch (213:35): [True: 0, False: 0]
  |  Branch (213:46): [True: 0, False: 0]
  ------------------
  214|      0|          if (value0 == pMapInfo->pChannelMap[j]) { /* not unique */
  ------------------
  |  Branch (214:15): [True: 0, False: 0]
  ------------------
  215|      0|            result = 0;
  216|      0|          }
  217|      0|        }
  218|      0|      }
  219|      0|    }
  220|  94.7k|  }
  221|       |
  222|  94.7k|  return result;
  223|  94.7k|}

LLVMFuzzerTestOneInput:
   20|  7.40k|extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
   21|  7.40k|  HANDLE_AACDECODER aacDecoderInfo = NULL;
   22|       |
   23|  7.40k|  UCHAR *conf[FILEREAD_MAX_LAYERS];
   24|  7.40k|  UINT confSize[FILEREAD_MAX_LAYERS];
   25|       |
   26|  7.40k|  if (Size > 255) return 0;
  ------------------
  |  Branch (26:7): [True: 10, False: 7.39k]
  ------------------
   27|       |
   28|  7.39k|  aacDecoderInfo = aacDecoder_Open(TT_MP4_ADIF, FILEREAD_MAX_LAYERS);
  ------------------
  |  |   18|  7.39k|#define FILEREAD_MAX_LAYERS 1
  ------------------
   29|  7.39k|  FDK_ASSERT(aacDecoderInfo != NULL);
  ------------------
  |  |  221|  7.39k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (29:3): [True: 7.39k, False: 0]
  ------------------
   30|       |
   31|  14.7k|  for (UINT layer = 0; layer < FILEREAD_MAX_LAYERS; layer++) {
  ------------------
  |  |   18|  14.7k|#define FILEREAD_MAX_LAYERS 1
  ------------------
  |  Branch (31:24): [True: 7.39k, False: 7.39k]
  ------------------
   32|  7.39k|    conf[layer] = const_cast<UCHAR *>(Data);
   33|  7.39k|    confSize[layer] = Size;
   34|  7.39k|  }
   35|       |
   36|  7.39k|  aacDecoder_ConfigRaw(aacDecoderInfo, conf, confSize);
   37|  7.39k|  aacDecoder_Close(aacDecoderInfo);
   38|  7.39k|  return 0;
   39|  7.39k|}

