_Z16FDK_Delay_CreateP15FDK_SignalDelayth:
  110|      9|                     const UCHAR num_channels) {
  111|      9|  FDK_ASSERT(data != NULL);
  ------------------
  |  |  221|      9|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (111:3): [True: 9, False: 0]
  ------------------
  112|      9|  FDK_ASSERT(num_channels > 0);
  ------------------
  |  |  221|      9|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (112:3): [True: 9, False: 0]
  ------------------
  113|       |
  114|      9|  if (delay > 0) {
  ------------------
  |  Branch (114:7): [True: 9, False: 0]
  ------------------
  115|      9|    data->delay_line =
  116|      9|        (PCM_DEC*)FDKcalloc(num_channels * delay, sizeof(PCM_DEC));
  117|      9|    if (data->delay_line == NULL) {
  ------------------
  |  Branch (117:9): [True: 0, False: 9]
  ------------------
  118|      0|      return -1;
  119|      0|    }
  120|      9|  } else {
  121|      0|    data->delay_line = NULL;
  122|      0|  }
  123|      9|  data->num_channels = num_channels;
  124|      9|  data->delay = delay;
  125|       |
  126|      9|  return 0;
  127|      9|}
_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: 9, False: 10.4k]
  ------------------
  166|      9|    FDKfree(data->delay_line);
  167|      9|  }
  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.35k|void aacDecoder_drcReset(HANDLE_AAC_DRC self) {
  173|  7.35k|  self->applyExtGain = 0;
  174|  7.35k|  self->additionalGainPrev = AACDEC_DRC_GAIN_INIT_VALUE;
  ------------------
  |  |  114|  7.35k|  (FL2FXCONST_DBL(                 \
  |  |  ------------------
  |  |  |  |  192|  7.35k|  (FIXP_DBL)(                                                                \
  |  |  |  |  193|  7.35k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:7): [True: 7.35k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  194|  7.35k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  7.35k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  7.35k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:14): [Folded, False: 7.35k]
  |  |  |  |  ------------------
  |  |  |  |  195|  7.35k|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|  7.35k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  196|  7.35k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  197|  7.35k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  7.35k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  7.35k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  198|  7.35k|          : ((((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.35k|      1.0f / (1 << AACDEC_DRC_GAIN_SCALING))) /* Init value for DRC gains */
  ------------------
  175|  7.35k|  self->additionalGainFilterState = AACDEC_DRC_GAIN_INIT_VALUE;
  ------------------
  |  |  114|  7.35k|  (FL2FXCONST_DBL(                 \
  |  |  ------------------
  |  |  |  |  192|  7.35k|  (FIXP_DBL)(                                                                \
  |  |  |  |  193|  7.35k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:7): [True: 7.35k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  194|  7.35k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  7.35k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  7.35k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:14): [Folded, False: 7.35k]
  |  |  |  |  ------------------
  |  |  |  |  195|  7.35k|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|  7.35k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  196|  7.35k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  197|  7.35k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  7.35k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  7.35k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  198|  7.35k|          : ((((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.35k|      1.0f / (1 << AACDEC_DRC_GAIN_SCALING))) /* Init value for DRC gains */
  ------------------
  176|  7.35k|  self->additionalGainFilterState1 = AACDEC_DRC_GAIN_INIT_VALUE;
  ------------------
  |  |  114|  7.35k|  (FL2FXCONST_DBL(                 \
  |  |  ------------------
  |  |  |  |  192|  7.35k|  (FIXP_DBL)(                                                                \
  |  |  |  |  193|  7.35k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (193:7): [True: 7.35k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  194|  7.35k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  7.35k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  7.35k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:14): [Folded, False: 7.35k]
  |  |  |  |  ------------------
  |  |  |  |  195|  7.35k|              (double)(MAXVAL_DBL))                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|  7.35k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  196|  7.35k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  |  |  197|  7.35k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  7.35k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  113|  7.35k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  198|  7.35k|          : ((((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.35k|      1.0f / (1 << AACDEC_DRC_GAIN_SCALING))) /* Init value for DRC gains */
  ------------------
  177|  7.35k|}
_Z18aacDecoder_drcInitP8CDrcInfo:
  186|  7.35k|void aacDecoder_drcInit(HANDLE_AAC_DRC self) {
  187|  7.35k|  CDrcParams *pParams;
  188|       |
  189|  7.35k|  if (self == NULL) {
  ------------------
  |  Branch (189:7): [True: 0, False: 7.35k]
  ------------------
  190|      0|    return;
  191|      0|  }
  192|       |
  193|       |  /* init control fields */
  194|  7.35k|  self->enable = OFF;
  ------------------
  |  |  134|  7.35k|#define OFF 0
  ------------------
  195|  7.35k|  self->numThreads = 0;
  196|       |
  197|       |  /* init params */
  198|  7.35k|  pParams = &self->params;
  199|  7.35k|  pParams->bsDelayEnable = 0;
  200|  7.35k|  pParams->cut = FL2FXCONST_DBL(0.0f);
  ------------------
  |  |  192|  7.35k|  (FIXP_DBL)(                                                                \
  |  |  193|  7.35k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 7.35k, Folded]
  |  |  ------------------
  |  |  194|  7.35k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  7.35k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  7.35k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 7.35k]
  |  |  ------------------
  |  |  195|  7.35k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  7.35k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  7.35k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  7.35k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  7.35k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  7.35k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  7.35k|          : ((((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.35k|  pParams->usrCut = FL2FXCONST_DBL(0.0f);
  ------------------
  |  |  192|  7.35k|  (FIXP_DBL)(                                                                \
  |  |  193|  7.35k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 7.35k, Folded]
  |  |  ------------------
  |  |  194|  7.35k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  7.35k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  7.35k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 7.35k]
  |  |  ------------------
  |  |  195|  7.35k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  7.35k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  7.35k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  7.35k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  7.35k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  7.35k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  7.35k|          : ((((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.35k|  pParams->boost = FL2FXCONST_DBL(0.0f);
  ------------------
  |  |  192|  7.35k|  (FIXP_DBL)(                                                                \
  |  |  193|  7.35k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 7.35k, Folded]
  |  |  ------------------
  |  |  194|  7.35k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  7.35k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  7.35k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 7.35k]
  |  |  ------------------
  |  |  195|  7.35k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  7.35k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  7.35k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  7.35k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  7.35k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  7.35k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  7.35k|          : ((((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.35k|  pParams->usrBoost = FL2FXCONST_DBL(0.0f);
  ------------------
  |  |  192|  7.35k|  (FIXP_DBL)(                                                                \
  |  |  193|  7.35k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 7.35k, Folded]
  |  |  ------------------
  |  |  194|  7.35k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  7.35k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  7.35k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 7.35k]
  |  |  ------------------
  |  |  195|  7.35k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  7.35k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  7.35k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  7.35k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  7.35k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  7.35k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  7.35k|          : ((((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.35k|  pParams->targetRefLevel = 96;
  205|  7.35k|  pParams->expiryFrame = AACDEC_DRC_DFLT_EXPIRY_FRAMES;
  ------------------
  |  |  118|  7.35k|  (0) /* Default DRC data expiry time in AAC frames   */
  ------------------
  206|  7.35k|  pParams->applyHeavyCompression = OFF;
  ------------------
  |  |  134|  7.35k|#define OFF 0
  ------------------
  207|  7.35k|  pParams->usrApplyHeavyCompression = OFF;
  ------------------
  |  |  134|  7.35k|#define OFF 0
  ------------------
  208|       |
  209|  7.35k|  pParams->defaultPresentationMode = DISABLED_PARAMETER_HANDLING;
  210|  7.35k|  pParams->encoderTargetLevel = MAX_REFERENCE_LEVEL; /* worst case assumption */
  ------------------
  |  |  128|  7.35k|#define MAX_REFERENCE_LEVEL (127)
  ------------------
  211|       |
  212|  7.35k|  self->update = 1;
  213|  7.35k|  self->numOutChannels = 0;
  214|  7.35k|  self->prevAacNumChannels = 0;
  215|       |
  216|       |  /* initial program ref level = target ref level */
  217|  7.35k|  self->progRefLevel = pParams->targetRefLevel;
  218|  7.35k|  self->progRefLevelPresent = 0;
  219|  7.35k|  self->presMode = -1;
  220|       |
  221|  7.35k|  aacDecoder_drcReset(self);
  222|  7.35k|}
_Z29aacDecoder_drcInitChannelDataP15CDrcChannelData:
  231|  5.90k|void aacDecoder_drcInitChannelData(CDrcChannelData *pDrcChData) {
  232|  5.90k|  if (pDrcChData != NULL) {
  ------------------
  |  Branch (232:7): [True: 5.90k, False: 0]
  ------------------
  233|  5.90k|    pDrcChData->expiryCount = 0;
  234|  5.90k|    pDrcChData->numBands = 1;
  235|  5.90k|    pDrcChData->bandTop[0] = DRC_BLOCK_LEN_DIV_BAND_MULT - 1;
  ------------------
  |  |  126|  5.90k|#define DRC_BLOCK_LEN_DIV_BAND_MULT (DRC_BLOCK_LEN / DRC_BAND_MULT)
  |  |  ------------------
  |  |  |  |  124|  5.90k|#define DRC_BLOCK_LEN (1024)
  |  |  ------------------
  |  |               #define DRC_BLOCK_LEN_DIV_BAND_MULT (DRC_BLOCK_LEN / DRC_BAND_MULT)
  |  |  ------------------
  |  |  |  |  125|  5.90k|#define DRC_BAND_MULT (4)
  |  |  ------------------
  ------------------
  236|  5.90k|    pDrcChData->drcValue[0] = 0;
  237|  5.90k|    pDrcChData->drcInterpolationScheme = 0;
  238|  5.90k|    pDrcChData->drcDataType = UNKNOWN_PAYLOAD;
  239|  5.90k|  }
  240|  5.90k|}
_Z22aacDecoder_drcSetParamP8CDrcInfo16AACDEC_DRC_PARAMi:
  252|  23.1k|                                         AACDEC_DRC_PARAM param, INT value) {
  253|  23.1k|  AAC_DECODER_ERROR ErrorStatus = AAC_DEC_OK;
  254|       |
  255|  23.1k|  switch (param) {
  256|      0|    case DRC_CUT_SCALE:
  ------------------
  |  Branch (256:5): [True: 0, False: 23.1k]
  ------------------
  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.1k]
  ------------------
  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.1k]
  ------------------
  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.1k]
  ------------------
  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.1k]
  ------------------
  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.1k]
  ------------------
  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.2k|    case DRC_BS_DELAY:
  ------------------
  |  Branch (333:5): [True: 17.2k, False: 5.90k]
  ------------------
  334|  17.2k|      if (value < 0 || value > 1) {
  ------------------
  |  Branch (334:11): [True: 0, False: 17.2k]
  |  Branch (334:24): [True: 0, False: 17.2k]
  ------------------
  335|      0|        return AAC_DEC_SET_PARAM_FAIL;
  336|      0|      }
  337|  17.2k|      if (self == NULL) {
  ------------------
  |  Branch (337:11): [True: 0, False: 17.2k]
  ------------------
  338|      0|        return AAC_DEC_INVALID_HANDLE;
  339|      0|      }
  340|  17.2k|      self->params.bsDelayEnable = value;
  341|  17.2k|      break;
  342|  5.90k|    case DRC_DATA_EXPIRY_FRAME:
  ------------------
  |  Branch (342:5): [True: 5.90k, False: 17.2k]
  ------------------
  343|  5.90k|      if (self == NULL) {
  ------------------
  |  Branch (343:11): [True: 0, False: 5.90k]
  ------------------
  344|      0|        return AAC_DEC_INVALID_HANDLE;
  345|      0|      }
  346|  5.90k|      self->params.expiryFrame = (value > 0) ? (UINT)value : 0;
  ------------------
  |  Branch (346:34): [True: 0, False: 5.90k]
  ------------------
  347|  5.90k|      break;
  348|      0|    case MAX_OUTPUT_CHANNELS:
  ------------------
  |  Branch (348:5): [True: 0, False: 23.1k]
  ------------------
  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.1k]
  ------------------
  356|      0|      return AAC_DEC_SET_PARAM_FAIL;
  357|  23.1k|  } /* switch(param) */
  358|       |
  359|  23.1k|  return ErrorStatus;
  360|  23.1k|}

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

_Z23CAacDecoder_AncDataInitP8CAncDataPhi:
  341|  7.35k|                                          unsigned char *buffer, int size) {
  342|  7.35k|  if (size >= 0) {
  ------------------
  |  Branch (342:7): [True: 7.35k, False: 0]
  ------------------
  343|  7.35k|    ancData->buffer = buffer;
  344|  7.35k|    ancData->bufferSize = size;
  345|       |
  346|  7.35k|    CAacDecoder_AncDataReset(ancData);
  347|       |
  348|  7.35k|    return AAC_DEC_OK;
  349|  7.35k|  }
  350|       |
  351|      0|  return AAC_DEC_ANC_DATA_ERROR;
  352|  7.35k|}
_Z16CAacDecoder_Open14TRANSPORT_TYPE:
 1282|  7.35k|{
 1283|  7.35k|  HANDLE_AACDECODER self;
 1284|       |
 1285|  7.35k|  self = GetAacDecoder();
 1286|  7.35k|  if (self == NULL) {
  ------------------
  |  Branch (1286:7): [True: 0, False: 7.35k]
  ------------------
 1287|      0|    goto bail;
 1288|      0|  }
 1289|       |
 1290|  7.35k|  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.35k|  self->streamInfo.pChannelIndices = self->channelIndices;
 1295|  7.35k|  self->streamInfo.pChannelType = self->channelType;
 1296|  7.35k|  self->downscaleFactor = 1;
 1297|  7.35k|  self->downscaleFactorInBS = 1;
 1298|       |
 1299|       |  /* initialize anc data */
 1300|  7.35k|  CAacDecoder_AncDataInit(&self->ancData, NULL, 0);
 1301|       |
 1302|       |  /* initialize stream info */
 1303|  7.35k|  CStreamInfoInit(&self->streamInfo);
 1304|       |
 1305|       |  /* initialize progam config */
 1306|  7.35k|  CProgramConfig_Init(&self->pce);
 1307|       |
 1308|       |  /* initialize error concealment common data */
 1309|  7.35k|  CConcealment_InitCommonData(&self->concealCommonData);
 1310|  7.35k|  self->concealMethodUser = ConcealMethodNone; /* undefined -> auto mode */
 1311|       |
 1312|  7.35k|  self->hDrcInfo = GetDrcInfo();
 1313|  7.35k|  if (self->hDrcInfo == NULL) {
  ------------------
  |  Branch (1313:7): [True: 0, False: 7.35k]
  ------------------
 1314|      0|    goto bail;
 1315|      0|  }
 1316|       |  /* Init common DRC structure */
 1317|  7.35k|  aacDecoder_drcInit(self->hDrcInfo);
 1318|       |  /* Set default frame delay */
 1319|  7.35k|  aacDecoder_drcSetParam(self->hDrcInfo, DRC_BS_DELAY,
 1320|  7.35k|                         CConcealment_GetDelay(&self->concealCommonData));
 1321|  7.35k|  self->workBufferCore1 = (FIXP_DBL *)GetWorkBufferCore1();
 1322|       |
 1323|  7.35k|  self->workBufferCore2 = GetWorkBufferCore2();
 1324|  7.35k|  if (self->workBufferCore2 == NULL) goto bail;
  ------------------
  |  Branch (1324:7): [True: 0, False: 7.35k]
  ------------------
 1325|       |
 1326|       |  /* When RSVD60 is active use dedicated memory for core decoding */
 1327|  7.35k|  self->pTimeData2 = GetWorkBufferCore5();
 1328|  7.35k|  self->timeData2Size = GetRequiredMemWorkBufferCore5();
 1329|  7.35k|  if (self->pTimeData2 == NULL) {
  ------------------
  |  Branch (1329:7): [True: 0, False: 7.35k]
  ------------------
 1330|      0|    goto bail;
 1331|      0|  }
 1332|       |
 1333|  7.35k|  return self;
 1334|       |
 1335|      0|bail:
 1336|      0|  CAacDecoder_Close(self);
 1337|       |
 1338|       |  return NULL;
 1339|  7.35k|}
_Z19CAacDecoder_FreeMemP20AAC_DECODER_INSTANCEi:
 1491|  3.05k|                                                   const int subStreamIndex) {
 1492|  3.05k|  AAC_DECODER_ERROR err = AAC_DEC_OK;
 1493|       |
 1494|  3.05k|  CAacDecoder_DeInit(self, subStreamIndex);
 1495|       |
 1496|  3.05k|  return (err);
 1497|  3.05k|}
_Z17CAacDecoder_CloseP20AAC_DECODER_INSTANCE:
 1500|  7.35k|LINKSPEC_CPP void CAacDecoder_Close(HANDLE_AACDECODER self) {
 1501|  7.35k|  if (self == NULL) return;
  ------------------
  |  Branch (1501:7): [True: 0, False: 7.35k]
  ------------------
 1502|       |
 1503|  7.35k|  CAacDecoder_DeInit(self, 0);
 1504|       |
 1505|  7.35k|  {
 1506|  7.35k|    int ch;
 1507|  66.2k|    for (ch = 0; ch < (8); ch++) {
  ------------------
  |  Branch (1507:18): [True: 58.8k, False: 7.35k]
  ------------------
 1508|  58.8k|      if (self->pTimeDataFlush[ch] != NULL) {
  ------------------
  |  Branch (1508:11): [True: 2.00k, False: 56.8k]
  ------------------
 1509|  2.00k|        FreeTimeDataFlush(&self->pTimeDataFlush[ch]);
 1510|  2.00k|      }
 1511|  58.8k|    }
 1512|  7.35k|  }
 1513|       |
 1514|  7.35k|  if (self->hDrcInfo) {
  ------------------
  |  Branch (1514:7): [True: 7.35k, False: 0]
  ------------------
 1515|  7.35k|    FreeDrcInfo(&self->hDrcInfo);
 1516|  7.35k|  }
 1517|       |
 1518|  7.35k|  if (self->workBufferCore1 != NULL) {
  ------------------
  |  Branch (1518:7): [True: 7.35k, False: 0]
  ------------------
 1519|  7.35k|    FreeWorkBufferCore1((CWorkBufferCore1 **)&self->workBufferCore1);
 1520|  7.35k|  }
 1521|       |
 1522|       |  /* Free WorkBufferCore2 */
 1523|  7.35k|  if (self->workBufferCore2 != NULL) {
  ------------------
  |  Branch (1523:7): [True: 7.35k, False: 0]
  ------------------
 1524|  7.35k|    FreeWorkBufferCore2(&self->workBufferCore2);
 1525|  7.35k|  }
 1526|  7.35k|  if (self->pTimeData2 != NULL) {
  ------------------
  |  Branch (1526:7): [True: 7.35k, False: 0]
  ------------------
 1527|  7.35k|    FreeWorkBufferCore5(&self->pTimeData2);
 1528|  7.35k|  }
 1529|       |
 1530|  7.35k|  FDK_QmfDomain_Close(&self->qmfDomain);
 1531|       |
 1532|  7.35k|  FreeAacDecoder(&self);
 1533|  7.35k|}
_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.30k|    case AOT_ER_AAC_SCAL:
  ------------------
  |  Branch (1577:5): [True: 16, False: 6.30k]
  ------------------
 1578|  1.30k|      if (asc->m_sc.m_gaSpecificConfig.m_layer > 0) {
  ------------------
  |  Branch (1578:11): [True: 4, False: 1.29k]
  ------------------
 1579|       |        /* aac_scalable_extension_element() currently not supported. */
 1580|      4|        return AAC_DEC_UNSUPPORTED_FORMAT;
 1581|      4|      }
 1582|  1.29k|      FDK_FALLTHROUGH;
  ------------------
  |  |  386|  1.29k|#define FDK_FALLTHROUGH [[clang::fallthrough]]
  ------------------
 1583|  1.29k|    case AOT_SBR:
  ------------------
  |  Branch (1583:5): [True: 0, False: 6.31k]
  ------------------
 1584|  1.29k|    case AOT_PS:
  ------------------
  |  Branch (1584:5): [True: 0, False: 6.31k]
  ------------------
 1585|  1.32k|    case AOT_ER_AAC_LC:
  ------------------
  |  Branch (1585:5): [True: 23, False: 6.29k]
  ------------------
 1586|  1.47k|    case AOT_ER_AAC_LD:
  ------------------
  |  Branch (1586:5): [True: 149, False: 6.17k]
  ------------------
 1587|  1.47k|    case AOT_DRM_AAC:
  ------------------
  |  Branch (1587:5): [True: 0, False: 6.31k]
  ------------------
 1588|  1.47k|    case AOT_DRM_SURROUND:
  ------------------
  |  Branch (1588:5): [True: 0, False: 6.31k]
  ------------------
 1589|  1.47k|      initRenderMode = AACDEC_RENDER_IMDCT;
 1590|  1.47k|      break;
 1591|    867|    case AOT_ER_AAC_ELD:
  ------------------
  |  Branch (1591:5): [True: 867, False: 5.45k]
  ------------------
 1592|    867|      initRenderMode = AACDEC_RENDER_ELDFB;
 1593|    867|      break;
 1594|  3.92k|    case AOT_USAC:
  ------------------
  |  Branch (1594:5): [True: 3.92k, False: 2.39k]
  ------------------
 1595|  3.92k|      initRenderMode = AACDEC_RENDER_IMDCT;
 1596|  3.92k|      break;
 1597|     57|    default:
  ------------------
  |  Branch (1597:5): [True: 57, False: 6.26k]
  ------------------
 1598|     57|      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: 142, False: 6.11k]
  |  Branch (1601:45): [True: 0, False: 142]
  ------------------
 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|    464|    case 0:
  ------------------
  |  Branch (1622:5): [True: 464, False: 5.79k]
  ------------------
 1623|    464|      switch (asc->m_aot) {
 1624|      0|        case AOT_USAC:
  ------------------
  |  Branch (1624:9): [True: 0, False: 464]
  ------------------
 1625|      0|          self->chMapIndex = 0;
 1626|      0|          ascChannels = asc->m_sc.m_usacConfig.m_nUsacChannels;
 1627|      0|          break;
 1628|    464|        default:
  ------------------
  |  Branch (1628:9): [True: 464, False: 0]
  ------------------
 1629|       |          /* get channels from program config (ASC) */
 1630|    464|          if (CProgramConfig_IsValid(&asc->m_progrConfigElement)) {
  ------------------
  |  Branch (1630:15): [True: 347, False: 117]
  ------------------
 1631|    347|            ascChannels = asc->m_progrConfigElement.NumChannels;
 1632|    347|            if (ascChannels > 0) {
  ------------------
  |  Branch (1632:17): [True: 321, False: 26]
  ------------------
 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.8k|              for (; el_tmp < (3 * ((8) * 2) + (((8) * 2)) / 2 + 4 * (1) + 1);
  ------------------
  |  Branch (1642:22): [True: 18.5k, False: 321]
  ------------------
 1643|  18.5k|                   el_tmp++) {
 1644|  18.5k|                self->elements[el_tmp] = ID_NONE;
 1645|  18.5k|              }
 1646|    321|            } else {
 1647|     26|              return AAC_DEC_UNSUPPORTED_CHANNELCONFIG;
 1648|     26|            }
 1649|    347|          } else {
 1650|    117|            self->chMapIndex = 0;
 1651|    117|            return AAC_DEC_UNSUPPORTED_CHANNELCONFIG;
 1652|    117|          }
 1653|    321|          break;
 1654|    464|      }
 1655|    321|      break;
 1656|  4.29k|    case 1:
  ------------------
  |  Branch (1656:5): [True: 4.29k, False: 1.96k]
  ------------------
 1657|  4.56k|    case 2:
  ------------------
  |  Branch (1657:5): [True: 270, False: 5.98k]
  ------------------
 1658|  4.75k|    case 3:
  ------------------
  |  Branch (1658:5): [True: 190, False: 6.06k]
  ------------------
 1659|  4.83k|    case 4:
  ------------------
  |  Branch (1659:5): [True: 89, False: 6.16k]
  ------------------
 1660|  5.11k|    case 5:
  ------------------
  |  Branch (1660:5): [True: 277, False: 5.98k]
  ------------------
 1661|  5.21k|    case 6:
  ------------------
  |  Branch (1661:5): [True: 94, False: 6.16k]
  ------------------
 1662|  5.21k|      ascChannels = asc->m_channelConfiguration;
 1663|  5.21k|      break;
 1664|     84|    case 11:
  ------------------
  |  Branch (1664:5): [True: 84, False: 6.17k]
  ------------------
 1665|     84|      ascChannels = 7;
 1666|     84|      break;
 1667|    169|    case 7:
  ------------------
  |  Branch (1667:5): [True: 169, False: 6.08k]
  ------------------
 1668|    303|    case 12:
  ------------------
  |  Branch (1668:5): [True: 134, False: 6.12k]
  ------------------
 1669|    369|    case 14:
  ------------------
  |  Branch (1669:5): [True: 66, False: 6.19k]
  ------------------
 1670|    369|      ascChannels = 8;
 1671|    369|      break;
 1672|    131|    default:
  ------------------
  |  Branch (1672:5): [True: 131, False: 6.12k]
  ------------------
 1673|    131|      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.06k]
  ------------------
 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.06k]
  |  |  ------------------
  ------------------
 1685|  11.5k|    for (int el = 0; el < (INT)asc->m_sc.m_usacConfig.m_usacNumElements; el++) {
  ------------------
  |  Branch (1685:22): [True: 7.59k, False: 3.92k]
  ------------------
 1686|       |      /* fix number of core channels aka ascChannels for stereoConfigIndex = 1
 1687|       |       * cases */
 1688|  7.59k|      if (asc->m_sc.m_usacConfig.element[el].m_stereoConfigIndex == 1) {
  ------------------
  |  Branch (1688:11): [True: 16, False: 7.57k]
  ------------------
 1689|     16|        ascChannels--; /* stereoConfigIndex == 1 stereo cases do actually
 1690|       |                          contain only a mono core channel. */
 1691|  7.57k|      } else if (asc->m_sc.m_usacConfig.element[el].m_stereoConfigIndex == 2) {
  ------------------
  |  Branch (1691:18): [True: 34, False: 7.54k]
  ------------------
 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|     34|        if (asc->m_sc.m_usacConfig.element[el].m_harmonicSBR) {
  ------------------
  |  Branch (1697:13): [True: 16, False: 18]
  ------------------
 1698|     16|          usacResidualDelayCompSamples += asc->m_samplesPerFrame;
 1699|     16|        }
 1700|     34|        if (asc->m_sc.m_usacConfig.m_coreSbrFrameLengthIndex == 4) {
  ------------------
  |  Branch (1700:13): [True: 14, False: 20]
  ------------------
 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|     34|      }
 1707|  7.59k|    }
 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.74k]
  |  |  ------------------
  ------------------
 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.97k]
  ------------------
 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.59k, False: 3.92k]
  ------------------
 1749|  7.59k|           _el++) {
 1750|  7.59k|        int el = _el + elementOffset;
 1751|  7.59k|        if (self->elements[el] !=
  ------------------
  |  Branch (1751:13): [True: 7.59k, False: 0]
  ------------------
 1752|  7.59k|            self->pUsacConfig[streamIndex]->element[_el].usacElementType) {
 1753|  7.59k|          ascChanged = 1;
 1754|  7.59k|        }
 1755|  7.59k|        if (self->usacStereoConfigIndex[el] !=
  ------------------
  |  Branch (1755:13): [True: 78, False: 7.51k]
  ------------------
 1756|  7.59k|            asc->m_sc.m_usacConfig.element[_el].m_stereoConfigIndex) {
 1757|     78|          ascChanged = 1;
 1758|     78|        }
 1759|  7.59k|        if (configMode & AC_CM_ALLOC_MEM) {
  ------------------
  |  |  337|  7.59k|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
  |  Branch (1759:13): [True: 3.77k, False: 3.82k]
  ------------------
 1760|  3.77k|          self->elements[el] =
 1761|  3.77k|              self->pUsacConfig[streamIndex]->element[_el].usacElementType;
 1762|       |          /* for Unified Stereo Coding */
 1763|  3.77k|          self->usacStereoConfigIndex[el] =
 1764|  3.77k|              asc->m_sc.m_usacConfig.element[_el].m_stereoConfigIndex;
 1765|  3.77k|          if (self->elements[el] == ID_USAC_CPE) {
  ------------------
  |  Branch (1765:15): [True: 59, False: 3.71k]
  ------------------
 1766|     59|            mpsEnableCurr |= self->usacStereoConfigIndex[el] ? 1 : 0;
  ------------------
  |  Branch (1766:30): [True: 36, False: 23]
  ------------------
 1767|     59|          }
 1768|  3.77k|        }
 1769|       |
 1770|  7.59k|        elFlags[el] |= (asc->m_sc.m_usacConfig.element[_el].m_noiseFilling)
  ------------------
  |  Branch (1770:24): [True: 851, False: 6.74k]
  ------------------
 1771|  7.59k|                           ? AC_EL_USAC_NOISE
  ------------------
  |  |  344|    851|#define AC_EL_USAC_NOISE 0x000002 /*!< USAC noise filling is active */
  ------------------
 1772|  7.59k|                           : 0;
 1773|  7.59k|        elFlags[el] |=
 1774|  7.59k|            (asc->m_sc.m_usacConfig.element[_el].m_stereoConfigIndex > 0)
  ------------------
  |  Branch (1774:13): [True: 78, False: 7.51k]
  ------------------
 1775|  7.59k|                ? AC_EL_USAC_MPS212
  ------------------
  |  |  348|     78|#define AC_EL_USAC_MPS212 0x000010 /*!< USAC MPS212 tool is active */
  ------------------
 1776|  7.59k|                : 0;
 1777|  7.59k|        elFlags[el] |= (asc->m_sc.m_usacConfig.element[_el].m_interTes)
  ------------------
  |  Branch (1777:24): [True: 76, False: 7.51k]
  ------------------
 1778|  7.59k|                           ? AC_EL_USAC_ITES
  ------------------
  |  |  345|     76|#define AC_EL_USAC_ITES 0x000004  /*!< USAC SBR inter-TES tool is active */
  ------------------
 1779|  7.59k|                           : 0;
 1780|  7.59k|        elFlags[el] |=
 1781|  7.59k|            (asc->m_sc.m_usacConfig.element[_el].m_pvc) ? AC_EL_USAC_PVC : 0;
  ------------------
  |  |  347|     83|  0x000008 /*!< USAC SBR predictive vector coding tool is active */
  ------------------
  |  Branch (1781:13): [True: 83, False: 7.51k]
  ------------------
 1782|  7.59k|        elFlags[el] |=
 1783|  7.59k|            (asc->m_sc.m_usacConfig.element[_el].usacElementType == ID_USAC_LFE)
  ------------------
  |  Branch (1783:13): [True: 0, False: 7.59k]
  ------------------
 1784|  7.59k|                ? AC_EL_USAC_LFE
  ------------------
  |  |  349|      0|#define AC_EL_USAC_LFE 0x000020    /*!< USAC element is LFE */
  ------------------
 1785|  7.59k|                : 0;
 1786|  7.59k|        elFlags[el] |=
 1787|  7.59k|            (asc->m_sc.m_usacConfig.element[_el].usacElementType == ID_USAC_LFE)
  ------------------
  |  Branch (1787:13): [True: 0, False: 7.59k]
  ------------------
 1788|  7.59k|                ? AC_EL_LFE
  ------------------
  |  |  359|      0|#define AC_EL_LFE 0x002000              /*!< The element is of type LFE. */
  ------------------
 1789|  7.59k|                : 0;
 1790|  7.59k|        if ((asc->m_sc.m_usacConfig.element[_el].usacElementType ==
  ------------------
  |  Branch (1790:13): [True: 125, False: 7.46k]
  ------------------
 1791|  7.59k|             ID_USAC_CPE) &&
 1792|    125|            ((self->usacStereoConfigIndex[el] == 0))) {
  ------------------
  |  Branch (1792:13): [True: 89, False: 36]
  ------------------
 1793|     89|          elFlags[el] |= AC_EL_USAC_CP_POSSIBLE;
  ------------------
  |  |  351|     89|  0x000040 /*!< USAC may use Complex Stereo Prediction in this channel element \
  ------------------
 1794|     89|        }
 1795|  7.59k|      }
 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.97k]
  ------------------
 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.74k|      int i;
 1810|  13.9k|      for (i = 0; i < AACDEC_CH_ELEMENTS_TAB_SIZE; i++) {
  ------------------
  |  |  122|  13.9k|#define AACDEC_CH_ELEMENTS_TAB_SIZE 7 /*!< Size of element tables */
  ------------------
  |  Branch (1810:19): [True: 12.2k, False: 1.74k]
  ------------------
 1811|  12.2k|        self->elements[i] = elementsTab[asc->m_channelConfiguration - 1][i];
 1812|  12.2k|      }
 1813|  95.8k|      for (; i < (3 * ((8) * 2) + (((8) * 2)) / 2 + 4 * (1) + 1); i++) {
  ------------------
  |  Branch (1813:14): [True: 94.1k, False: 1.74k]
  ------------------
 1814|  94.1k|        self->elements[i] = ID_NONE;
 1815|  94.1k|      }
 1816|  1.74k|    }
 1817|       |
 1818|  5.66k|    {
 1819|  5.66k|      int ch;
 1820|       |
 1821|  16.8k|      for (ch = 0; ch < ascChannels; ch++) {
  ------------------
  |  Branch (1821:20): [True: 11.2k, False: 5.66k]
  ------------------
 1822|  11.2k|        self->chMapping[ch] = ch;
 1823|  11.2k|      }
 1824|  39.7k|      for (; ch < (8); ch++) {
  ------------------
  |  Branch (1824:14): [True: 34.0k, False: 5.66k]
  ------------------
 1825|  34.0k|        self->chMapping[ch] = 255;
 1826|  34.0k|      }
 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.85k, False: 3.12k]
  ------------------
 1844|  2.85k|      self->streamInfo.aot = asc->m_aot;
 1845|  2.85k|    }
 1846|  5.97k|    ascChanged = 1;
 1847|  5.97k|  }
 1848|       |
 1849|  5.97k|  if (asc->m_aot == AOT_ER_AAC_ELD &&
  ------------------
  |  Branch (1849:7): [True: 865, False: 5.11k]
  ------------------
 1850|    865|      asc->m_sc.m_eldSpecificConfig.m_downscaledSamplingFrequency != 0) {
  ------------------
  |  Branch (1850:7): [True: 865, False: 0]
  ------------------
 1851|    865|    if (self->samplingRateInfo[0].samplingRate !=
  ------------------
  |  Branch (1851:9): [True: 865, False: 0]
  ------------------
 1852|    865|            asc->m_sc.m_eldSpecificConfig.m_downscaledSamplingFrequency ||
 1853|      0|        self->samplingRateInfo[0].samplingRate * self->downscaleFactor !=
  ------------------
  |  Branch (1853:9): [True: 0, False: 0]
  ------------------
 1854|    865|            asc->m_samplingFrequency) {
 1855|       |      /* get downscaledSamplingFrequency from ESC and compute the downscale
 1856|       |       * factor */
 1857|    865|      downscaleFactorInBS =
 1858|    865|          asc->m_samplingFrequency /
 1859|    865|          asc->m_sc.m_eldSpecificConfig.m_downscaledSamplingFrequency;
 1860|    865|      if ((downscaleFactorInBS == 1 || downscaleFactorInBS == 2 ||
  ------------------
  |  Branch (1860:12): [True: 764, False: 101]
  |  Branch (1860:40): [True: 16, False: 85]
  ------------------
 1861|     85|           (downscaleFactorInBS == 3 &&
  ------------------
  |  Branch (1861:13): [True: 12, False: 73]
  ------------------
 1862|     12|            asc->m_sc.m_eldSpecificConfig.m_frameLengthFlag) ||
  ------------------
  |  Branch (1862:13): [True: 8, False: 4]
  ------------------
 1863|     77|           downscaleFactorInBS == 4) &&
  ------------------
  |  Branch (1863:12): [True: 10, False: 67]
  ------------------
 1864|    798|          ((asc->m_samplingFrequency %
  ------------------
  |  Branch (1864:11): [True: 768, False: 30]
  ------------------
 1865|    798|            asc->m_sc.m_eldSpecificConfig.m_downscaledSamplingFrequency) ==
 1866|    798|           0)) {
 1867|    768|        downscaleFactor = downscaleFactorInBS;
 1868|    768|      } else {
 1869|     97|        downscaleFactorInBS = 1;
 1870|     97|        downscaleFactor = 1;
 1871|     97|      }
 1872|    865|    }
 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: 16, False: 5.96k]
  ------------------
 1879|     16|    if (configMode & AC_CM_ALLOC_MEM) {
  ------------------
  |  |  337|     16|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
  |  Branch (1879:9): [True: 6, False: 10]
  ------------------
 1880|      6|      self->downscaleFactorInBS = downscaleFactorInBS;
 1881|      6|      self->downscaleFactor = downscaleFactor;
 1882|      6|    }
 1883|     16|    ascChanged = 1;
 1884|     16|  }
 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: 865, False: 5.11k]
  ------------------
 1894|    865|    if (self->useLdQmfTimeAlign !=
  ------------------
  |  Branch (1894:9): [True: 143, False: 722]
  ------------------
 1895|    865|        asc->m_sc.m_eldSpecificConfig.m_useLdQmfTimeAlign) {
 1896|    143|      ascChanged = 1;
 1897|    143|    }
 1898|    865|    if (configMode & AC_CM_ALLOC_MEM) {
  ------------------
  |  |  337|    865|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
  |  Branch (1898:9): [True: 347, False: 518]
  ------------------
 1899|    347|      self->useLdQmfTimeAlign =
 1900|    347|          asc->m_sc.m_eldSpecificConfig.m_useLdQmfTimeAlign;
 1901|    347|    }
 1902|    865|    if (sbrEnabled != asc->m_sbrPresentFlag) {
  ------------------
  |  Branch (1902:9): [True: 585, False: 280]
  ------------------
 1903|    585|      ascChanged = 1;
 1904|    585|    }
 1905|    865|  }
 1906|       |
 1907|  5.97k|  self->streamInfo.extAot = asc->m_extensionAudioObjectType;
 1908|  5.97k|  if (self->streamInfo.extSamplingRate !=
  ------------------
  |  Branch (1908:7): [True: 2.22k, False: 3.75k]
  ------------------
 1909|  5.97k|      (INT)asc->m_extensionSamplingFrequency) {
 1910|  2.22k|    ascChanged = 1;
 1911|  2.22k|  }
 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.85k, False: 3.12k]
  ------------------
 1913|  2.85k|    self->streamInfo.extSamplingRate = asc->m_extensionSamplingFrequency;
 1914|  2.85k|  }
 1915|  5.97k|  flags |= (asc->m_sbrPresentFlag) ? AC_SBR_PRESENT : 0;
  ------------------
  |  |  311|  1.94k|#define AC_SBR_PRESENT 0x008000 /*!< SBR present flag (from ASC) */
  ------------------
  |  Branch (1915:12): [True: 1.94k, False: 4.03k]
  ------------------
 1916|  5.97k|  flags |= (asc->m_psPresentFlag) ? AC_PS_PRESENT : 0;
  ------------------
  |  |  314|     65|#define AC_PS_PRESENT 0x020000 /*!< PS present flag (from ASC or implicit)  */
  ------------------
  |  Branch (1916:12): [True: 65, False: 5.91k]
  ------------------
 1917|  5.97k|  if (asc->m_sbrPresentFlag) {
  ------------------
  |  Branch (1917:7): [True: 1.94k, False: 4.03k]
  ------------------
 1918|  1.94k|    sbrEnabled = 1;
 1919|  1.94k|    sbrEnabledPrev = 1;
 1920|  4.03k|  } else {
 1921|  4.03k|    sbrEnabled = 0;
 1922|  4.03k|    sbrEnabledPrev = 0;
 1923|  4.03k|  }
 1924|  5.97k|  if (sbrEnabled && asc->m_extensionSamplingFrequency) {
  ------------------
  |  Branch (1924:7): [True: 1.94k, False: 4.03k]
  |  Branch (1924:21): [True: 1.94k, False: 0]
  ------------------
 1925|  1.94k|    if (downscaleFactor != 1 && (downscaleFactor)&1) {
  ------------------
  |  Branch (1925:9): [True: 12, False: 1.92k]
  |  Branch (1925:33): [True: 0, False: 12]
  ------------------
 1926|      0|      return AAC_DEC_UNSUPPORTED_SAMPLINGRATE; /* SBR needs an even downscale
 1927|       |                                                  factor */
 1928|      0|    }
 1929|  1.94k|    if (configMode & AC_CM_ALLOC_MEM) {
  ------------------
  |  |  337|  1.94k|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
  |  Branch (1929:9): [True: 832, False: 1.10k]
  ------------------
 1930|    832|      self->streamInfo.extSamplingRate =
 1931|    832|          self->streamInfo.extSamplingRate / self->downscaleFactor;
 1932|    832|    }
 1933|  1.94k|  }
 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: 208, False: 816]
  ------------------
 1935|    208|      (asc->m_extensionSamplingFrequency > (2 * asc->m_samplingFrequency))) {
  ------------------
  |  Branch (1935:7): [True: 70, False: 138]
  ------------------
 1936|     70|    return AAC_DEC_UNSUPPORTED_SAMPLINGRATE; /* Core decoder supports at most a
 1937|       |                                                1:2 upsampling for HE-AAC and
 1938|       |                                                HE-AACv2 */
 1939|     70|  }
 1940|       |
 1941|       |  /* --------- vcb11 ------------ */
 1942|  5.90k|  flags |= (asc->m_vcb11Flag) ? AC_ER_VCB11 : 0;
  ------------------
  |  |  294|    425|  0x000001 /*!< aacSectionDataResilienceFlag     flag (from ASC): 1 means use \
  ------------------
  |  Branch (1942:12): [True: 425, False: 5.48k]
  ------------------
 1943|       |
 1944|       |  /* ---------- rvlc ------------ */
 1945|  5.90k|  flags |= (asc->m_rvlcFlag) ? AC_ER_RVLC : 0;
  ------------------
  |  |  297|    383|  0x000002 /*!< aacSpectralDataResilienceFlag     flag (from ASC): 1 means use \
  ------------------
  |  Branch (1945:12): [True: 383, False: 5.52k]
  ------------------
 1946|       |
 1947|       |  /* ----------- hcr ------------ */
 1948|  5.90k|  flags |= (asc->m_hcrFlag) ? AC_ER_HCR : 0;
  ------------------
  |  |  300|    408|  0x000004 /*!< aacSectionDataResilienceFlag     flag (from ASC): 1 means use \
  ------------------
  |  Branch (1948:12): [True: 408, False: 5.50k]
  ------------------
 1949|       |
 1950|  5.90k|  if (asc->m_aot == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (1950:7): [True: 865, False: 5.04k]
  ------------------
 1951|    865|    mpsEnableCurr = 0;
 1952|    865|    flags |= AC_ELD;
  ------------------
  |  |  303|    865|#define AC_ELD 0x000010         /*!< AAC-ELD */
  ------------------
 1953|    865|    flags |= (asc->m_sbrPresentFlag)
  ------------------
  |  Branch (1953:14): [True: 585, False: 280]
  ------------------
 1954|    865|                 ? AC_SBR_PRESENT
  ------------------
  |  |  311|    585|#define AC_SBR_PRESENT 0x008000 /*!< SBR present flag (from ASC) */
  ------------------
 1955|    865|                 : 0; /* Need to set the SBR flag for backward-compatibility
 1956|       |                               reasons. Even if SBR is not supported. */
 1957|    865|    flags |= (asc->m_sc.m_eldSpecificConfig.m_sbrCrcFlag) ? AC_SBRCRC : 0;
  ------------------
  |  |  313|    205|  0x010000 /*!< SBR CRC present flag. Only relevant for AAC-ELD for now. */
  ------------------
  |  Branch (1957:14): [True: 205, False: 660]
  ------------------
 1958|    865|    flags |= (asc->m_sc.m_eldSpecificConfig.m_useLdQmfTimeAlign)
  ------------------
  |  Branch (1958:14): [True: 143, False: 722]
  ------------------
 1959|    865|                 ? AC_MPS_PRESENT
  ------------------
  |  |  316|    143|  0x040000                    /*!< MPS present flag (from ASC or implicit) \
  ------------------
 1960|    865|                 : 0;
 1961|    865|    if (self->mpsApplicable) {
  ------------------
  |  Branch (1961:9): [True: 103, False: 762]
  ------------------
 1962|    103|      mpsEnableCurr = asc->m_sc.m_eldSpecificConfig.m_useLdQmfTimeAlign;
 1963|    103|    }
 1964|    865|  }
 1965|  5.90k|  flags |= (asc->m_aot == AOT_ER_AAC_LD) ? AC_LD : 0;
  ------------------
  |  |  304|    136|#define AC_LD 0x000020          /*!< AAC-LD */
  ------------------
  |  Branch (1965:12): [True: 136, False: 5.77k]
  ------------------
 1966|  5.90k|  flags |= (asc->m_epConfig >= 0) ? AC_ER : 0;
  ------------------
  |  |  305|  1.03k|#define AC_ER 0x000040          /*!< ER syntax */
  ------------------
  |  Branch (1966:12): [True: 1.03k, False: 4.87k]
  ------------------
 1967|       |
 1968|  5.90k|  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: 78, False: 3.84k]
  ------------------
 1971|  3.92k|                 ? AC_MPS_PRESENT
  ------------------
  |  |  316|     78|  0x040000                    /*!< MPS present flag (from ASC or implicit) \
  ------------------
 1972|  3.92k|                 : 0;
 1973|  3.92k|  }
 1974|  5.90k|  if (asc->m_aot == AOT_DRM_AAC) {
  ------------------
  |  Branch (1974:7): [True: 0, False: 5.90k]
  ------------------
 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.90k|  if (asc->m_aot == AOT_DRM_SURROUND) {
  ------------------
  |  Branch (1977:7): [True: 0, False: 5.90k]
  ------------------
 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.90k|  if ((asc->m_aot == AOT_AAC_SCAL) || (asc->m_aot == AOT_ER_AAC_SCAL)) {
  ------------------
  |  Branch (1981:7): [True: 0, False: 5.90k]
  |  Branch (1981:39): [True: 12, False: 5.89k]
  ------------------
 1982|     12|    flags |= AC_SCALABLE;
  ------------------
  |  |  302|     12|#define AC_SCALABLE 0x000008    /*!< AAC Scalable*/
  ------------------
 1983|     12|  }
 1984|       |
 1985|  5.90k|  if ((asc->m_epConfig >= 0) && (asc->m_channelConfiguration <= 0)) {
  ------------------
  |  Branch (1985:7): [True: 1.03k, False: 4.87k]
  |  Branch (1985:33): [True: 0, False: 1.03k]
  ------------------
 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.90k|  self->streamInfo.epConfig = asc->m_epConfig;
 1992|       |  /* self->hInput->asc.m_epConfig = asc->m_epConfig; */
 1993|       |
 1994|  5.90k|  if (asc->m_epConfig > 1) return AAC_DEC_UNSUPPORTED_ER_FORMAT;
  ------------------
  |  Branch (1994:7): [True: 0, False: 5.90k]
  ------------------
 1995|       |
 1996|       |  /* Check if samplerate changed. */
 1997|  5.90k|  if ((self->samplingRateInfo[streamIndex].samplingRate !=
  ------------------
  |  Branch (1997:7): [True: 5.90k, False: 2]
  ------------------
 1998|  5.90k|       asc->m_samplingFrequency) ||
 1999|      2|      (self->streamInfo.aacSamplesPerFrame !=
  ------------------
  |  Branch (1999:7): [True: 2, False: 0]
  ------------------
 2000|  5.90k|       (INT)asc->m_samplesPerFrame / downscaleFactor)) {
 2001|  5.90k|    AAC_DECODER_ERROR error;
 2002|       |
 2003|  5.90k|    ascChanged = 1;
 2004|       |
 2005|  5.90k|    if (configMode & AC_CM_ALLOC_MEM) {
  ------------------
  |  |  337|  5.90k|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
  |  Branch (2005:9): [True: 2.85k, False: 3.05k]
  ------------------
 2006|       |      /* Update samplerate info. */
 2007|  2.85k|      error = getSamplingRateInfo(
 2008|  2.85k|          &self->samplingRateInfo[streamIndex], asc->m_samplesPerFrame,
 2009|  2.85k|          asc->m_samplingFrequencyIndex, asc->m_samplingFrequency);
 2010|  2.85k|      if (error != AAC_DEC_OK) {
  ------------------
  |  Branch (2010:11): [True: 0, False: 2.85k]
  ------------------
 2011|      0|        return error;
 2012|      0|      }
 2013|  2.85k|      self->streamInfo.aacSampleRate =
 2014|  2.85k|          self->samplingRateInfo[0].samplingRate / self->downscaleFactor;
 2015|  2.85k|      self->streamInfo.aacSamplesPerFrame =
 2016|  2.85k|          asc->m_samplesPerFrame / self->downscaleFactor;
 2017|  2.85k|      if (self->streamInfo.aacSampleRate <= 0) {
  ------------------
  |  Branch (2017:11): [True: 0, False: 2.85k]
  ------------------
 2018|      0|        return AAC_DEC_UNSUPPORTED_SAMPLINGRATE;
 2019|      0|      }
 2020|  2.85k|    }
 2021|  5.90k|  }
 2022|       |
 2023|       |  /* Check if amount of channels has changed. */
 2024|  5.90k|  if (self->ascChannels[streamIndex] != ascChannels) {
  ------------------
  |  Branch (2024:7): [True: 5.90k, False: 0]
  ------------------
 2025|  5.90k|    ascChanged = 1;
 2026|  5.90k|  }
 2027|       |
 2028|       |  /* detect config change */
 2029|  5.90k|  if (configMode & AC_CM_DET_CFG_CHANGE) {
  ------------------
  |  |  334|  5.90k|  0x000001 /*!< Config mode signalizes the callback to work in config change \
  ------------------
  |  Branch (2029:7): [True: 3.05k, False: 2.85k]
  ------------------
 2030|  3.05k|    if (ascChanged != 0) {
  ------------------
  |  Branch (2030:9): [True: 3.05k, False: 0]
  ------------------
 2031|  3.05k|      *configChanged = 1;
 2032|  3.05k|    }
 2033|       |
 2034|  3.05k|    CAacDecoder_AcceptFlags(self, asc, flags, elFlags, streamIndex,
 2035|  3.05k|                            elementOffset);
 2036|       |
 2037|  3.05k|    return err;
 2038|  3.05k|  }
 2039|       |
 2040|       |  /* set AC_USAC_SCFGI3 globally if any usac element uses */
 2041|  2.85k|  switch (asc->m_aot) {
 2042|  1.94k|    case AOT_USAC:
  ------------------
  |  Branch (2042:5): [True: 1.94k, False: 909]
  ------------------
 2043|  1.94k|      if (sbrEnabled) {
  ------------------
  |  Branch (2043:11): [True: 530, False: 1.41k]
  ------------------
 2044|    530|        for (int _el = 0;
 2045|  1.56k|             _el < (int)self->pUsacConfig[streamIndex]->m_usacNumElements;
  ------------------
  |  Branch (2045:14): [True: 1.03k, False: 530]
  ------------------
 2046|  1.03k|             _el++) {
 2047|  1.03k|          int el = elementOffset + _el;
 2048|  1.03k|          if (IS_USAC_CHANNEL_ELEMENT(self->elements[el])) {
  ------------------
  |  |  484|  1.03k|  ((elementId) == ID_USAC_SCE || (elementId) == ID_USAC_CPE || \
  |  |  ------------------
  |  |  |  Branch (484:4): [True: 480, False: 551]
  |  |  |  Branch (484:34): [True: 50, False: 501]
  |  |  ------------------
  |  |  485|  1.03k|   (elementId) == ID_USAC_LFE)
  |  |  ------------------
  |  |  |  Branch (485:4): [True: 0, False: 501]
  |  |  ------------------
  ------------------
 2049|    530|            if (usacStereoConfigIndex < 0) {
  ------------------
  |  Branch (2049:17): [True: 530, False: 0]
  ------------------
 2050|    530|              usacStereoConfigIndex = self->usacStereoConfigIndex[el];
 2051|    530|            } 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|    530|          }
 2058|  1.03k|        }
 2059|       |
 2060|    530|        if (usacStereoConfigIndex < 0) {
  ------------------
  |  Branch (2060:13): [True: 0, False: 530]
  ------------------
 2061|      0|          goto bail;
 2062|      0|        }
 2063|       |
 2064|    530|        if (usacStereoConfigIndex == 3) {
  ------------------
  |  Branch (2064:13): [True: 14, False: 516]
  ------------------
 2065|     14|          flags |= AC_USAC_SCFGI3;
  ------------------
  |  |  329|     14|  0x8000000 /*!< USAC flag: If stereoConfigIndex is 3 the flag is set. */
  ------------------
 2066|     14|        }
 2067|    530|      }
 2068|  1.94k|      break;
 2069|  1.94k|    default:
  ------------------
  |  Branch (2069:5): [True: 909, False: 1.94k]
  ------------------
 2070|    909|      break;
 2071|  2.85k|  }
 2072|       |
 2073|  2.85k|  if (*configChanged) {
  ------------------
  |  Branch (2073:7): [True: 2.85k, 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.85k|    switch (asc->m_aot) {
 2079|  1.94k|      case AOT_USAC:
  ------------------
  |  Branch (2079:7): [True: 1.94k, False: 909]
  ------------------
 2080|  1.94k|        if (sbrEnabled) {
  ------------------
  |  Branch (2080:13): [True: 530, False: 1.41k]
  ------------------
 2081|    530|          const UCHAR map_sbrRatio_2_nAnaBands[] = {16, 24, 32};
 2082|       |
 2083|    530|          FDK_ASSERT(asc->m_sc.m_usacConfig.m_sbrRatioIndex > 0);
  ------------------
  |  |  221|    530|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (2083:11): [True: 530, False: 0]
  ------------------
 2084|    530|          FDK_ASSERT(streamIndex == 0);
  ------------------
  |  |  221|    530|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (2084:11): [True: 530, Folded]
  ------------------
 2085|       |
 2086|    530|          self->qmfDomain.globalConf.nInputChannels_requested = ascChannels;
 2087|    530|          self->qmfDomain.globalConf.nOutputChannels_requested =
 2088|    530|              (usacStereoConfigIndex == 1) ? 2 : ascChannels;
  ------------------
  |  Branch (2088:15): [True: 7, False: 523]
  ------------------
 2089|    530|          self->qmfDomain.globalConf.flags_requested = 0;
 2090|    530|          self->qmfDomain.globalConf.nBandsAnalysis_requested =
 2091|    530|              map_sbrRatio_2_nAnaBands[asc->m_sc.m_usacConfig.m_sbrRatioIndex -
 2092|    530|                                       1];
 2093|    530|          self->qmfDomain.globalConf.nBandsSynthesis_requested = 64;
 2094|    530|          self->qmfDomain.globalConf.nQmfTimeSlots_requested =
 2095|    530|              (asc->m_sc.m_usacConfig.m_sbrRatioIndex == 1) ? 64 : 32;
  ------------------
  |  Branch (2095:15): [True: 152, False: 378]
  ------------------
 2096|    530|          self->qmfDomain.globalConf.nQmfOvTimeSlots_requested =
 2097|    530|              (asc->m_sc.m_usacConfig.m_sbrRatioIndex == 1) ? 12 : 6;
  ------------------
  |  Branch (2097:15): [True: 152, False: 378]
  ------------------
 2098|    530|          self->qmfDomain.globalConf.nQmfProcBands_requested = 64;
 2099|    530|          self->qmfDomain.globalConf.nQmfProcChannels_requested = 1;
 2100|    530|          self->qmfDomain.globalConf.parkChannel =
 2101|    530|              (usacStereoConfigIndex == 3) ? 1 : 0;
  ------------------
  |  Branch (2101:15): [True: 14, False: 516]
  ------------------
 2102|    530|          self->qmfDomain.globalConf.parkChannel_requested =
 2103|    530|              (usacStereoConfigIndex == 3) ? 1 : 0;
  ------------------
  |  Branch (2103:15): [True: 14, False: 516]
  ------------------
 2104|    530|          self->qmfDomain.globalConf.qmfDomainExplicitConfig = 1;
 2105|    530|        }
 2106|  1.94k|        break;
 2107|  1.94k|      case AOT_ER_AAC_ELD:
  ------------------
  |  Branch (2107:7): [True: 347, False: 2.50k]
  ------------------
 2108|    347|        if (mpsEnableCurr &&
  ------------------
  |  Branch (2108:13): [True: 48, False: 299]
  ------------------
 2109|     48|            asc->m_sc.m_eldSpecificConfig.m_useLdQmfTimeAlign) {
  ------------------
  |  Branch (2109:13): [True: 48, False: 0]
  ------------------
 2110|     48|          SAC_INPUT_CONFIG sac_interface = (sbrEnabled && self->hSbrDecoder)
  ------------------
  |  Branch (2110:45): [True: 3, False: 45]
  |  Branch (2110:59): [True: 3, False: 0]
  ------------------
 2111|     48|                                               ? SAC_INTERFACE_QMF
 2112|     48|                                               : SAC_INTERFACE_TIME;
 2113|     48|          mpegSurroundDecoder_ConfigureQmfDomain(
 2114|     48|              (CMpegSurroundDecoder *)self->pMpegSurroundDecoder, sac_interface,
 2115|     48|              (UINT)self->streamInfo.aacSampleRate, asc->m_aot);
 2116|     48|          self->qmfDomain.globalConf.qmfDomainExplicitConfig = 1;
 2117|     48|        }
 2118|    347|        break;
 2119|    562|      default:
  ------------------
  |  Branch (2119:7): [True: 562, False: 2.28k]
  ------------------
 2120|    562|        self->qmfDomain.globalConf.qmfDomainExplicitConfig =
 2121|    562|            0; /* qmfDomain is initialized by SBR and MPS init functions if
 2122|       |                  required */
 2123|    562|        break;
 2124|  2.85k|    }
 2125|       |
 2126|       |    /* Allocate all memory structures for each channel */
 2127|  2.85k|    {
 2128|  2.85k|      int ch = aacChannelsOffset;
 2129|  8.75k|      for (int _ch = 0; _ch < ascChannels; _ch++) {
  ------------------
  |  Branch (2129:25): [True: 5.90k, False: 2.85k]
  ------------------
 2130|  5.90k|        if (ch >= (8)) {
  ------------------
  |  Branch (2130:13): [True: 0, False: 5.90k]
  ------------------
 2131|      0|          goto bail;
 2132|      0|        }
 2133|  5.90k|        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.90k|        if (self->pAacDecoderChannelInfo[ch] == NULL) {
  ------------------
  |  Branch (2136:13): [True: 0, False: 5.90k]
  ------------------
 2137|      0|          goto bail;
 2138|      0|        }
 2139|  5.90k|        ch++;
 2140|  5.90k|      }
 2141|       |
 2142|  2.85k|      int chIdx = aacChannelsOffsetIdx;
 2143|  2.85k|      ch = aacChannelsOffset;
 2144|  2.85k|      int _numElements;
 2145|  2.85k|      _numElements = (((8)) + (8));
 2146|  2.85k|      if (flags & (AC_RSV603DA | AC_USAC)) {
  ------------------
  |  |  308|  2.85k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
                    if (flags & (AC_RSV603DA | AC_USAC)) {
  ------------------
  |  |  307|  2.85k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
  |  Branch (2146:11): [True: 1.94k, False: 909]
  ------------------
 2147|  1.94k|        _numElements = (int)asc->m_sc.m_usacConfig.m_usacNumElements;
 2148|  1.94k|      }
 2149|  11.1k|      for (int _el = 0; _el < _numElements; _el++) {
  ------------------
  |  Branch (2149:25): [True: 9.20k, False: 1.96k]
  ------------------
 2150|  9.20k|        int el_channels = 0;
 2151|  9.20k|        int el = elementOffset + _el;
 2152|       |
 2153|  9.20k|        if (flags &
  ------------------
  |  Branch (2153:13): [True: 5.15k, False: 4.05k]
  ------------------
 2154|  9.20k|            (AC_ER | AC_LD | AC_ELD | AC_RSV603DA | AC_USAC | AC_RSVD50)) {
  ------------------
  |  |  305|  9.20k|#define AC_ER 0x000040          /*!< ER syntax */
  ------------------
                          (AC_ER | AC_LD | AC_ELD | AC_RSV603DA | AC_USAC | AC_RSVD50)) {
  ------------------
  |  |  304|  9.20k|#define AC_LD 0x000020          /*!< AAC-LD */
  ------------------
                          (AC_ER | AC_LD | AC_ELD | AC_RSV603DA | AC_USAC | AC_RSVD50)) {
  ------------------
  |  |  303|  9.20k|#define AC_ELD 0x000010         /*!< AAC-ELD */
  ------------------
                          (AC_ER | AC_LD | AC_ELD | AC_RSV603DA | AC_USAC | AC_RSVD50)) {
  ------------------
  |  |  308|  9.20k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
                          (AC_ER | AC_LD | AC_ELD | AC_RSV603DA | AC_USAC | AC_RSVD50)) {
  ------------------
  |  |  307|  9.20k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                          (AC_ER | AC_LD | AC_ELD | AC_RSV603DA | AC_USAC | AC_RSVD50)) {
  ------------------
  |  |  310|  9.20k|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
 2155|  5.15k|          if (ch >= ascChannels) {
  ------------------
  |  Branch (2155:15): [True: 556, False: 4.59k]
  ------------------
 2156|    556|            break;
 2157|    556|          }
 2158|  5.15k|        }
 2159|       |
 2160|  8.65k|        switch (self->elements[el]) {
 2161|  1.05k|          case ID_SCE:
  ------------------
  |  Branch (2161:11): [True: 1.05k, False: 7.59k]
  ------------------
 2162|  2.33k|          case ID_CPE:
  ------------------
  |  Branch (2162:11): [True: 1.27k, False: 7.37k]
  ------------------
 2163|  2.63k|          case ID_LFE:
  ------------------
  |  Branch (2163:11): [True: 305, False: 8.34k]
  ------------------
 2164|  4.52k|          case ID_USAC_SCE:
  ------------------
  |  Branch (2164:11): [True: 1.88k, False: 6.77k]
  ------------------
 2165|  4.58k|          case ID_USAC_CPE:
  ------------------
  |  Branch (2165:11): [True: 59, False: 8.59k]
  ------------------
 2166|  4.58k|          case ID_USAC_LFE:
  ------------------
  |  Branch (2166:11): [True: 0, False: 8.65k]
  ------------------
 2167|       |
 2168|  4.58k|            el_channels = CAacDecoder_GetELChannels(
 2169|  4.58k|                self->elements[el], self->usacStereoConfigIndex[el]);
 2170|       |
 2171|  4.58k|            {
 2172|  4.58k|              self->pAacDecoderChannelInfo[ch]->pComStaticData =
 2173|  4.58k|                  (CAacDecoderCommonStaticData *)FDKcalloc(
 2174|  4.58k|                      1, sizeof(CAacDecoderCommonStaticData));
 2175|  4.58k|              if (self->pAacDecoderChannelInfo[ch]->pComStaticData == NULL) {
  ------------------
  |  Branch (2175:19): [True: 0, False: 4.58k]
  ------------------
 2176|      0|                goto bail;
 2177|      0|              }
 2178|  4.58k|              if (ch == aacChannelsOffset) {
  ------------------
  |  Branch (2178:19): [True: 2.85k, False: 1.73k]
  ------------------
 2179|  2.85k|                self->pAacDecoderChannelInfo[ch]->pComData =
 2180|  2.85k|                    (CAacDecoderCommonData *)GetWorkBufferCore6();
 2181|  2.85k|                self->pAacDecoderChannelInfo[ch]
 2182|  2.85k|                    ->pComStaticData->pWorkBufferCore1 = GetWorkBufferCore1();
 2183|  2.85k|              } else {
 2184|  1.73k|                self->pAacDecoderChannelInfo[ch]->pComData =
 2185|  1.73k|                    (CAacDecoderCommonData *)FDKaalloc(
 2186|  1.73k|                        sizeof(CAacDecoderCommonData), ALIGNMENT_DEFAULT);
  ------------------
  |  |  256|  1.73k|#define ALIGNMENT_DEFAULT 8
  ------------------
 2187|  1.73k|                self->pAacDecoderChannelInfo[ch]
 2188|  1.73k|                    ->pComStaticData->pWorkBufferCore1 =
 2189|  1.73k|                    self->pAacDecoderChannelInfo[aacChannelsOffset]
 2190|  1.73k|                        ->pComStaticData->pWorkBufferCore1;
 2191|  1.73k|              }
 2192|  4.58k|              if ((self->pAacDecoderChannelInfo[ch]->pComData == NULL) ||
  ------------------
  |  Branch (2192:19): [True: 0, False: 4.58k]
  ------------------
 2193|  4.58k|                  (self->pAacDecoderChannelInfo[ch]
  ------------------
  |  Branch (2193:19): [True: 0, False: 4.58k]
  ------------------
 2194|  4.58k|                       ->pComStaticData->pWorkBufferCore1 == NULL)) {
 2195|      0|                goto bail;
 2196|      0|              }
 2197|  4.58k|              self->pAacDecoderChannelInfo[ch]->pDynData =
 2198|  4.58k|                  &(self->pAacDecoderChannelInfo[ch]
 2199|  4.58k|                        ->pComData->pAacDecoderDynamicData[0]);
 2200|  4.58k|              self->pAacDecoderChannelInfo[ch]->pSpectralCoefficient =
 2201|  4.58k|                  (SPECTRAL_PTR)&self->workBufferCore2[ch * 1024];
 2202|       |
 2203|  4.58k|              if (el_channels == 2) {
  ------------------
  |  Branch (2203:19): [True: 1.32k, False: 3.25k]
  ------------------
 2204|  1.32k|                if (ch >= (8) - 1) {
  ------------------
  |  Branch (2204:21): [True: 0, False: 1.32k]
  ------------------
 2205|      0|                  return AAC_DEC_UNSUPPORTED_CHANNELCONFIG;
 2206|      0|                }
 2207|  1.32k|                self->pAacDecoderChannelInfo[ch + 1]->pComData =
 2208|  1.32k|                    self->pAacDecoderChannelInfo[ch]->pComData;
 2209|  1.32k|                self->pAacDecoderChannelInfo[ch + 1]->pComStaticData =
 2210|  1.32k|                    self->pAacDecoderChannelInfo[ch]->pComStaticData;
 2211|  1.32k|                self->pAacDecoderChannelInfo[ch + 1]
 2212|  1.32k|                    ->pComStaticData->pWorkBufferCore1 =
 2213|  1.32k|                    self->pAacDecoderChannelInfo[ch]
 2214|  1.32k|                        ->pComStaticData->pWorkBufferCore1;
 2215|  1.32k|                self->pAacDecoderChannelInfo[ch + 1]->pDynData =
 2216|  1.32k|                    &(self->pAacDecoderChannelInfo[ch]
 2217|  1.32k|                          ->pComData->pAacDecoderDynamicData[1]);
 2218|  1.32k|                self->pAacDecoderChannelInfo[ch + 1]->pSpectralCoefficient =
 2219|  1.32k|                    (SPECTRAL_PTR)&self->workBufferCore2[(ch + 1) * 1024];
 2220|  1.32k|              }
 2221|       |
 2222|  4.58k|              ch += el_channels;
 2223|  4.58k|            }
 2224|      0|            chIdx += el_channels;
 2225|  4.58k|            break;
 2226|       |
 2227|  4.07k|          default:
  ------------------
  |  Branch (2227:11): [True: 4.07k, False: 4.58k]
  ------------------
 2228|  4.07k|            break;
 2229|  8.65k|        }
 2230|       |
 2231|  8.65k|        if (self->elements[el] == ID_END) {
  ------------------
  |  Branch (2231:13): [True: 335, False: 8.31k]
  ------------------
 2232|    335|          break;
 2233|    335|        }
 2234|       |
 2235|  8.31k|        el++;
 2236|  8.31k|      }
 2237|       |
 2238|  2.85k|      chIdx = aacChannelsOffsetIdx;
 2239|  2.85k|      ch = aacChannelsOffset;
 2240|  8.75k|      for (int _ch = 0; _ch < ascChannels; _ch++) {
  ------------------
  |  Branch (2240:25): [True: 5.90k, False: 2.85k]
  ------------------
 2241|       |        /* Allocate persistent channel memory */
 2242|  5.90k|        {
 2243|  5.90k|          self->pAacDecoderStaticChannelInfo[ch] =
 2244|  5.90k|              GetAacDecoderStaticChannelInfo(ch);
 2245|  5.90k|          if (self->pAacDecoderStaticChannelInfo[ch] == NULL) {
  ------------------
  |  Branch (2245:15): [True: 0, False: 5.90k]
  ------------------
 2246|      0|            goto bail;
 2247|      0|          }
 2248|  5.90k|          self->pAacDecoderStaticChannelInfo[ch]->pOverlapBuffer =
 2249|  5.90k|              GetOverlapBuffer(ch); /* This area size depends on the AOT */
 2250|  5.90k|          if (self->pAacDecoderStaticChannelInfo[ch]->pOverlapBuffer == NULL) {
  ------------------
  |  Branch (2250:15): [True: 0, False: 5.90k]
  ------------------
 2251|      0|            goto bail;
 2252|      0|          }
 2253|  5.90k|          if (flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA /*|AC_BSAC*/)) {
  ------------------
  |  |  307|  5.90k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                        if (flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA /*|AC_BSAC*/)) {
  ------------------
  |  |  310|  5.90k|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
                        if (flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA /*|AC_BSAC*/)) {
  ------------------
  |  |  308|  5.90k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (2253:15): [True: 1.99k, False: 3.91k]
  ------------------
 2254|  1.99k|            self->pAacDecoderStaticChannelInfo[ch]->hArCo = CArco_Create();
 2255|  1.99k|            if (self->pAacDecoderStaticChannelInfo[ch]->hArCo == NULL) {
  ------------------
  |  Branch (2255:17): [True: 0, False: 1.99k]
  ------------------
 2256|      0|              goto bail;
 2257|      0|            }
 2258|  1.99k|          }
 2259|       |
 2260|  5.90k|          if (!(flags & (AC_USAC | AC_RSV603DA))) {
  ------------------
  |  |  307|  5.90k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                        if (!(flags & (AC_USAC | AC_RSV603DA))) {
  ------------------
  |  |  308|  5.90k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (2260:15): [True: 3.91k, False: 1.99k]
  ------------------
 2261|  3.91k|            CPns_UpdateNoiseState(
 2262|  3.91k|                &self->pAacDecoderChannelInfo[ch]->data.aac.PnsData,
 2263|  3.91k|                &self->pAacDecoderStaticChannelInfo[ch]->pnsCurrentSeed,
 2264|  3.91k|                self->pAacDecoderChannelInfo[ch]->pComData->pnsRandomSeed);
 2265|  3.91k|          }
 2266|  5.90k|          ch++;
 2267|  5.90k|        }
 2268|      0|        chIdx++;
 2269|  5.90k|      }
 2270|       |
 2271|  2.85k|      if (flags & AC_USAC) {
  ------------------
  |  |  307|  2.85k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
  |  Branch (2271:11): [True: 1.94k, False: 909]
  ------------------
 2272|  3.94k|        for (int _ch = 0; _ch < flushChannels; _ch++) {
  ------------------
  |  Branch (2272:27): [True: 2.00k, False: 1.94k]
  ------------------
 2273|  2.00k|          ch = aacChannelsOffset + _ch;
 2274|  2.00k|          if (self->pTimeDataFlush[ch] == NULL) {
  ------------------
  |  Branch (2274:15): [True: 2.00k, False: 0]
  ------------------
 2275|  2.00k|            self->pTimeDataFlush[ch] = GetTimeDataFlush(ch);
 2276|  2.00k|            if (self->pTimeDataFlush[ch] == NULL) {
  ------------------
  |  Branch (2276:17): [True: 0, False: 2.00k]
  ------------------
 2277|      0|              goto bail;
 2278|      0|            }
 2279|  2.00k|          }
 2280|  2.00k|        }
 2281|  1.94k|      }
 2282|       |
 2283|  2.85k|      if (flags & (AC_USAC | AC_RSV603DA)) {
  ------------------
  |  |  307|  2.85k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                    if (flags & (AC_USAC | AC_RSV603DA)) {
  ------------------
  |  |  308|  2.85k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (2283:11): [True: 1.94k, False: 909]
  ------------------
 2284|  1.94k|        int complexStereoPredPossible = 0;
 2285|  1.94k|        ch = aacChannelsOffset;
 2286|  1.94k|        chIdx = aacChannelsOffsetIdx;
 2287|  5.71k|        for (int _el2 = 0; _el2 < (int)asc->m_sc.m_usacConfig.m_usacNumElements;
  ------------------
  |  Branch (2287:28): [True: 3.77k, False: 1.94k]
  ------------------
 2288|  3.77k|             _el2++) {
 2289|  3.77k|          int el2 = elementOffset + _el2;
 2290|  3.77k|          int elCh = 0, ch2;
 2291|       |
 2292|  3.77k|          if ((self->elements[el2] == ID_USAC_CPE) &&
  ------------------
  |  Branch (2292:15): [True: 59, False: 3.71k]
  ------------------
 2293|     59|              !(self->usacStereoConfigIndex[el2] == 1)) {
  ------------------
  |  Branch (2293:15): [True: 52, False: 7]
  ------------------
 2294|     52|            elCh = 2;
 2295|  3.72k|          } else if (IS_CHANNEL_ELEMENT(self->elements[el2])) {
  ------------------
  |  |  459|  3.72k|  ((elementId) == ID_SCE || (elementId) == ID_CPE || (elementId) == ID_LFE || \
  |  |  ------------------
  |  |  |  Branch (459:4): [True: 0, False: 3.72k]
  |  |  |  Branch (459:29): [True: 0, False: 3.72k]
  |  |  |  Branch (459:54): [True: 0, False: 3.72k]
  |  |  ------------------
  |  |  460|  3.72k|   (elementId) == ID_USAC_SCE || (elementId) == ID_USAC_CPE ||                \
  |  |  ------------------
  |  |  |  Branch (460:4): [True: 1.88k, False: 1.83k]
  |  |  |  Branch (460:34): [True: 7, False: 1.83k]
  |  |  ------------------
  |  |  461|  3.72k|   (elementId) == ID_USAC_LFE)
  |  |  ------------------
  |  |  |  Branch (461:4): [True: 0, False: 1.83k]
  |  |  ------------------
  ------------------
 2296|  1.89k|            elCh = 1;
 2297|  1.89k|          }
 2298|       |
 2299|  3.77k|          if (elFlags[el2] & AC_EL_USAC_CP_POSSIBLE) {
  ------------------
  |  |  351|  3.77k|  0x000040 /*!< USAC may use Complex Stereo Prediction in this channel element \
  ------------------
  |  Branch (2299:15): [True: 23, False: 3.74k]
  ------------------
 2300|     23|            complexStereoPredPossible = 1;
 2301|     23|            if (self->cpeStaticData[el2] == NULL) {
  ------------------
  |  Branch (2301:17): [True: 23, False: 0]
  ------------------
 2302|     23|              self->cpeStaticData[el2] = GetCpePersistentData();
 2303|     23|              if (self->cpeStaticData[el2] == NULL) {
  ------------------
  |  Branch (2303:19): [True: 0, False: 23]
  ------------------
 2304|      0|                goto bail;
 2305|      0|              }
 2306|     23|            }
 2307|     23|          }
 2308|       |
 2309|  5.76k|          for (ch2 = 0; ch2 < elCh; ch2++) {
  ------------------
  |  Branch (2309:25): [True: 1.99k, False: 3.77k]
  ------------------
 2310|       |            /* Hook element specific cpeStaticData into channel specific
 2311|       |             * aacDecoderStaticChannelInfo */
 2312|  1.99k|            self->pAacDecoderStaticChannelInfo[ch]->pCpeStaticData =
 2313|  1.99k|                self->cpeStaticData[el2];
 2314|  1.99k|            if (self->pAacDecoderStaticChannelInfo[ch]->pCpeStaticData !=
  ------------------
  |  Branch (2314:17): [True: 46, False: 1.94k]
  ------------------
 2315|  1.99k|                NULL) {
 2316|     46|              self->pAacDecoderStaticChannelInfo[ch]
 2317|     46|                  ->pCpeStaticData->jointStereoPersistentData
 2318|     46|                  .spectralCoeffs[ch2] =
 2319|     46|                  self->pAacDecoderStaticChannelInfo[ch]
 2320|     46|                      ->concealmentInfo.spectralCoefficient;
 2321|     46|              self->pAacDecoderStaticChannelInfo[ch]
 2322|     46|                  ->pCpeStaticData->jointStereoPersistentData.specScale[ch2] =
 2323|     46|                  self->pAacDecoderStaticChannelInfo[ch]
 2324|     46|                      ->concealmentInfo.specScale;
 2325|     46|              self->pAacDecoderStaticChannelInfo[ch]
 2326|     46|                  ->pCpeStaticData->jointStereoPersistentData.scratchBuffer =
 2327|     46|                  (FIXP_DBL *)self->pTimeData2;
 2328|     46|            }
 2329|  1.99k|            chIdx++;
 2330|  1.99k|            ch++;
 2331|  1.99k|          } /* for each channel in current element */
 2332|  3.77k|          if (complexStereoPredPossible && (elCh == 2)) {
  ------------------
  |  Branch (2332:15): [True: 97, False: 3.67k]
  |  Branch (2332:44): [True: 23, False: 74]
  ------------------
 2333|       |            /* needed once for all channels */
 2334|     23|            if (self->pAacDecoderChannelInfo[ch - 1]
  ------------------
  |  Branch (2334:17): [True: 23, False: 0]
  ------------------
 2335|     23|                    ->pComStaticData->cplxPredictionData == NULL) {
 2336|     23|              self->pAacDecoderChannelInfo[ch - 1]
 2337|     23|                  ->pComStaticData->cplxPredictionData =
 2338|     23|                  GetCplxPredictionData();
 2339|     23|            }
 2340|     23|            if (self->pAacDecoderChannelInfo[ch - 1]
  ------------------
  |  Branch (2340:17): [True: 0, False: 23]
  ------------------
 2341|     23|                    ->pComStaticData->cplxPredictionData == NULL) {
 2342|      0|              goto bail;
 2343|      0|            }
 2344|     23|          }
 2345|  3.77k|          if (elCh > 0) {
  ------------------
  |  Branch (2345:15): [True: 1.94k, False: 1.83k]
  ------------------
 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: 59, False: 1.88k]
  ------------------
 2349|     59|              if (asc->m_sc.m_usacConfig.element[el2].m_stereoConfigIndex !=
  ------------------
  |  Branch (2349:19): [True: 52, False: 7]
  ------------------
 2350|     59|                  1) {
 2351|     52|                self->pAacDecoderStaticChannelInfo[ch - elCh + 1]
 2352|     52|                    ->nfRandomSeed = (ULONG)0x10932;
 2353|     52|              }
 2354|     59|            }
 2355|  1.94k|          }
 2356|  3.77k|        } /* for each element */
 2357|  1.94k|      }
 2358|       |
 2359|  2.85k|      if (ascChannels != self->aacChannels) {
  ------------------
  |  Branch (2359:11): [True: 2.85k, False: 0]
  ------------------
 2360|       |        /* Make allocated channel count persistent in decoder context. */
 2361|  2.85k|        self->aacChannels = aacChannelsOffset + ch;
 2362|  2.85k|      }
 2363|  2.85k|    }
 2364|       |
 2365|  2.85k|    if (usacResidualDelayCompSamples) {
  ------------------
  |  Branch (2365:9): [True: 9, False: 2.84k]
  ------------------
 2366|      9|      INT delayErr = FDK_Delay_Create(&self->usacResidualDelay,
 2367|      9|                                      (USHORT)usacResidualDelayCompSamples, 1);
 2368|      9|      if (delayErr) {
  ------------------
  |  Branch (2368:11): [True: 0, False: 9]
  ------------------
 2369|      0|        goto bail;
 2370|      0|      }
 2371|      9|    }
 2372|       |
 2373|       |    /* Make amount of signalled channels persistent in decoder context. */
 2374|  2.85k|    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.85k|    self->aacChannelsPrev = 0;
 2379|  2.85k|  }
 2380|       |
 2381|  2.85k|  if (self->pAacDecoderChannelInfo[0] != NULL) {
  ------------------
  |  Branch (2381:7): [True: 2.85k, False: 0]
  ------------------
 2382|  2.85k|    self->pDrmBsBuffer = self->pAacDecoderChannelInfo[0]
 2383|  2.85k|                             ->pComStaticData->pWorkBufferCore1->DrmBsBuffer;
 2384|  2.85k|    self->drmBsBufferSize = DRM_BS_BUFFER_SIZE;
  ------------------
  |  |  136|  2.85k|  (512) /* size of the dynamic buffer which is used to reverse the bits of \
  ------------------
 2385|  2.85k|  }
 2386|       |
 2387|       |  /* Update structures */
 2388|  2.85k|  if (*configChanged) {
  ------------------
  |  Branch (2388:7): [True: 2.85k, 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.85k|    int ch = 0;
 2394|  2.85k|    int chIdx = 0;
 2395|  8.75k|    for (int _ch = 0; _ch < self->ascChannels[streamIndex]; _ch++) {
  ------------------
  |  Branch (2395:23): [True: 5.90k, False: 2.85k]
  ------------------
 2396|  5.90k|      switch (self->streamInfo.aot) {
 2397|  1.21k|        case AOT_ER_AAC_ELD:
  ------------------
  |  Branch (2397:9): [True: 1.21k, False: 4.69k]
  ------------------
 2398|  1.52k|        case AOT_ER_AAC_LD:
  ------------------
  |  Branch (2398:9): [True: 309, False: 5.59k]
  ------------------
 2399|  1.52k|          self->pAacDecoderChannelInfo[ch]->granuleLength =
 2400|  1.52k|              self->streamInfo.aacSamplesPerFrame;
 2401|  1.52k|          break;
 2402|  4.38k|        default:
  ------------------
  |  Branch (2402:9): [True: 4.38k, False: 1.52k]
  ------------------
 2403|  4.38k|          self->pAacDecoderChannelInfo[ch]->granuleLength =
 2404|  4.38k|              self->streamInfo.aacSamplesPerFrame / 8;
 2405|  4.38k|          break;
 2406|  5.90k|      }
 2407|  5.90k|      self->pAacDecoderChannelInfo[ch]->renderMode = initRenderMode;
 2408|       |
 2409|  5.90k|      mdct_init(&self->pAacDecoderStaticChannelInfo[ch]->IMdct,
 2410|  5.90k|                self->pAacDecoderStaticChannelInfo[ch]->pOverlapBuffer,
 2411|  5.90k|                OverlapBufferSize);
  ------------------
  |  |  109|  5.90k|#define OverlapBufferSize (768)
  ------------------
 2412|       |
 2413|  5.90k|      self->pAacDecoderStaticChannelInfo[ch]->last_core_mode = FD_LONG;
 2414|  5.90k|      self->pAacDecoderStaticChannelInfo[ch]->last_lpd_mode = 255;
 2415|       |
 2416|  5.90k|      self->pAacDecoderStaticChannelInfo[ch]->last_tcx_pitch = L_DIV;
  ------------------
  |  |  192|  5.90k|#define L_DIV L_DIV_1024
  |  |  ------------------
  |  |  |  |  158|  5.90k|  (L_FRAME_PLUS_1024 / NB_DIV) /* length of one acelp or tcx20 frame */
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|  5.90k|#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.90k|#define NB_DIV 4   /* number of division (20ms) per 80ms frame */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2417|       |
 2418|       |      /* Reset DRC control data for this channel */
 2419|  5.90k|      aacDecoder_drcInitChannelData(
 2420|  5.90k|          &self->pAacDecoderStaticChannelInfo[ch]->drcData);
 2421|       |
 2422|       |      /* Delete mixdown metadata from the past */
 2423|  5.90k|      pcmDmx_Reset(self->hPcmUtils, PCMDMX_RESET_BS_DATA);
  ------------------
  |  |  324|  5.90k|#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.90k|      CConcealment_InitChannelData(
 2428|  5.90k|          &self->pAacDecoderStaticChannelInfo[ch]->concealmentInfo,
 2429|  5.90k|          &self->concealCommonData, initRenderMode,
 2430|  5.90k|          self->streamInfo.aacSamplesPerFrame);
 2431|  5.90k|      ch++;
 2432|  5.90k|      chIdx++;
 2433|  5.90k|    }
 2434|  2.85k|  }
 2435|       |
 2436|  2.85k|  if (*configChanged) {
  ------------------
  |  Branch (2436:7): [True: 2.85k, False: 0]
  ------------------
 2437|  2.85k|    int drcDecSampleRate, drcDecFrameSize;
 2438|       |
 2439|  2.85k|    if (self->streamInfo.extSamplingRate != 0) {
  ------------------
  |  Branch (2439:9): [True: 976, False: 1.87k]
  ------------------
 2440|    976|      drcDecSampleRate = self->streamInfo.extSamplingRate;
 2441|    976|      drcDecFrameSize = (self->streamInfo.aacSamplesPerFrame *
 2442|    976|                         self->streamInfo.extSamplingRate) /
 2443|    976|                        self->streamInfo.aacSampleRate;
 2444|  1.87k|    } else {
 2445|  1.87k|      drcDecSampleRate = self->streamInfo.aacSampleRate;
 2446|  1.87k|      drcDecFrameSize = self->streamInfo.aacSamplesPerFrame;
 2447|  1.87k|    }
 2448|       |
 2449|  2.85k|    if (FDK_drcDec_Init(self->hUniDrcDecoder, drcDecFrameSize, drcDecSampleRate,
  ------------------
  |  Branch (2449:9): [True: 0, False: 2.85k]
  ------------------
 2450|  2.85k|                        self->aacChannels) != 0)
 2451|      0|      goto bail;
 2452|  2.85k|  }
 2453|       |
 2454|  2.85k|  if (*configChanged) {
  ------------------
  |  Branch (2454:7): [True: 2.85k, False: 0]
  ------------------
 2455|  2.85k|    if (asc->m_aot == AOT_USAC) {
  ------------------
  |  Branch (2455:9): [True: 1.94k, False: 909]
  ------------------
 2456|  1.94k|      aacDecoder_drcDisable(self->hDrcInfo);
 2457|  1.94k|    }
 2458|  2.85k|  }
 2459|       |
 2460|  2.85k|  if (asc->m_aot == AOT_USAC) {
  ------------------
  |  Branch (2460:7): [True: 1.94k, False: 909]
  ------------------
 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.85k|  CAacDecoder_AcceptFlags(self, asc, flags, elFlags, streamIndex,
 2466|  2.85k|                          elementOffset);
 2467|  2.85k|  self->sbrEnabled = sbrEnabled;
 2468|  2.85k|  self->sbrEnabledPrev = sbrEnabledPrev;
 2469|  2.85k|  self->mpsEnableCurr = mpsEnableCurr;
 2470|       |
 2471|       |  /* Update externally visible copy of flags */
 2472|  2.85k|  self->streamInfo.flags = self->flags[0];
 2473|       |
 2474|  2.85k|  return err;
 2475|       |
 2476|      0|bail:
 2477|      0|  CAacDecoder_DeInit(self, 0);
 2478|      0|  return AAC_DEC_OUT_OF_MEMORY;
 2479|  2.85k|}
aacdecoder.cpp:_ZL24CAacDecoder_AncDataResetP8CAncData:
  321|  7.35k|static AAC_DECODER_ERROR CAacDecoder_AncDataReset(CAncData *ancData) {
  322|  7.35k|  int i;
  323|  66.2k|  for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (323:15): [True: 58.8k, False: 7.35k]
  ------------------
  324|  58.8k|    ancData->offset[i] = 0;
  325|  58.8k|  }
  326|  7.35k|  ancData->nrElements = 0;
  327|       |
  328|  7.35k|  return AAC_DEC_OK;
  329|  7.35k|}
aacdecoder.cpp:_ZL15CStreamInfoInitP11CStreamInfo:
 1239|  7.35k|static void CStreamInfoInit(CStreamInfo *pStreamInfo) {
 1240|  7.35k|  pStreamInfo->aacSampleRate = 0;
 1241|  7.35k|  pStreamInfo->profile = -1;
 1242|  7.35k|  pStreamInfo->aot = AOT_NONE;
 1243|       |
 1244|  7.35k|  pStreamInfo->channelConfig = -1;
 1245|  7.35k|  pStreamInfo->bitRate = 0;
 1246|  7.35k|  pStreamInfo->aacSamplesPerFrame = 0;
 1247|       |
 1248|  7.35k|  pStreamInfo->extAot = AOT_NONE;
 1249|  7.35k|  pStreamInfo->extSamplingRate = 0;
 1250|       |
 1251|  7.35k|  pStreamInfo->flags = 0;
 1252|       |
 1253|  7.35k|  pStreamInfo->epConfig = -1; /* default: no ER */
 1254|       |
 1255|  7.35k|  pStreamInfo->numChannels = 0;
 1256|  7.35k|  pStreamInfo->sampleRate = 0;
 1257|  7.35k|  pStreamInfo->frameSize = 0;
 1258|       |
 1259|  7.35k|  pStreamInfo->outputDelay = 0;
 1260|       |
 1261|       |  /* DRC */
 1262|  7.35k|  pStreamInfo->drcProgRefLev =
 1263|  7.35k|      -1; /* set program reference level to not indicated */
 1264|  7.35k|  pStreamInfo->drcPresMode = -1; /* default: presentation mode not indicated */
 1265|       |
 1266|  7.35k|  pStreamInfo->outputLoudness = -1; /* default: no loudness metadata present */
 1267|  7.35k|}
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|  93.7k|  for (ch = aacChannelOffset; ch < aacChannelOffset + aacChannels; ch++) {
  ------------------
  |  Branch (1356:31): [True: 83.3k, False: 10.4k]
  ------------------
 1357|  83.3k|    if (self->pAacDecoderChannelInfo[ch] != NULL) {
  ------------------
  |  Branch (1357:9): [True: 5.90k, False: 77.4k]
  ------------------
 1358|  5.90k|      if (self->pAacDecoderChannelInfo[ch]->pComStaticData != NULL) {
  ------------------
  |  Branch (1358:11): [True: 4.58k, False: 1.32k]
  ------------------
 1359|  4.58k|        if (self->pAacDecoderChannelInfo[ch]
  ------------------
  |  Branch (1359:13): [True: 4.58k, False: 0]
  ------------------
 1360|  4.58k|                ->pComStaticData->pWorkBufferCore1 != NULL) {
 1361|  4.58k|          if (ch == aacChannelOffset) {
  ------------------
  |  Branch (1361:15): [True: 2.85k, False: 1.73k]
  ------------------
 1362|  2.85k|            FreeWorkBufferCore1(&self->pAacDecoderChannelInfo[ch]
 1363|  2.85k|                                     ->pComStaticData->pWorkBufferCore1);
 1364|  2.85k|          }
 1365|  4.58k|        }
 1366|  4.58k|        if (self->pAacDecoderChannelInfo[ch]
  ------------------
  |  Branch (1366:13): [True: 23, False: 4.55k]
  ------------------
 1367|  4.58k|                ->pComStaticData->cplxPredictionData != NULL) {
 1368|     23|          FreeCplxPredictionData(&self->pAacDecoderChannelInfo[ch]
 1369|     23|                                      ->pComStaticData->cplxPredictionData);
 1370|     23|        }
 1371|       |        /* Avoid double free of linked pComStaticData in case of CPE by settings
 1372|       |         * pointer to NULL. */
 1373|  4.58k|        if (ch < (8) - 1) {
  ------------------
  |  Branch (1373:13): [True: 4.41k, False: 171]
  ------------------
 1374|  4.41k|          if ((self->pAacDecoderChannelInfo[ch + 1] != NULL) &&
  ------------------
  |  Branch (1374:15): [True: 2.12k, False: 2.28k]
  ------------------
 1375|  2.12k|              (self->pAacDecoderChannelInfo[ch + 1]->pComStaticData ==
  ------------------
  |  Branch (1375:15): [True: 1.32k, False: 796]
  ------------------
 1376|  2.12k|               self->pAacDecoderChannelInfo[ch]->pComStaticData)) {
 1377|  1.32k|            self->pAacDecoderChannelInfo[ch + 1]->pComStaticData = NULL;
 1378|  1.32k|          }
 1379|  4.41k|        }
 1380|  4.58k|        FDKfree(self->pAacDecoderChannelInfo[ch]->pComStaticData);
 1381|  4.58k|        self->pAacDecoderChannelInfo[ch]->pComStaticData = NULL;
 1382|  4.58k|      }
 1383|  5.90k|      if (self->pAacDecoderChannelInfo[ch]->pComData != NULL) {
  ------------------
  |  Branch (1383:11): [True: 4.58k, False: 1.32k]
  ------------------
 1384|       |        /* Avoid double free of linked pComData in case of CPE by settings
 1385|       |         * pointer to NULL. */
 1386|  4.58k|        if (ch < (8) - 1) {
  ------------------
  |  Branch (1386:13): [True: 4.41k, False: 171]
  ------------------
 1387|  4.41k|          if ((self->pAacDecoderChannelInfo[ch + 1] != NULL) &&
  ------------------
  |  Branch (1387:15): [True: 2.12k, False: 2.28k]
  ------------------
 1388|  2.12k|              (self->pAacDecoderChannelInfo[ch + 1]->pComData ==
  ------------------
  |  Branch (1388:15): [True: 1.32k, False: 796]
  ------------------
 1389|  2.12k|               self->pAacDecoderChannelInfo[ch]->pComData)) {
 1390|  1.32k|            self->pAacDecoderChannelInfo[ch + 1]->pComData = NULL;
 1391|  1.32k|          }
 1392|  4.41k|        }
 1393|  4.58k|        if (ch == aacChannelOffset) {
  ------------------
  |  Branch (1393:13): [True: 2.85k, False: 1.73k]
  ------------------
 1394|  2.85k|          FreeWorkBufferCore6(
 1395|  2.85k|              (SCHAR **)&self->pAacDecoderChannelInfo[ch]->pComData);
 1396|  2.85k|        } else {
 1397|  1.73k|          FDKafree(self->pAacDecoderChannelInfo[ch]->pComData);
 1398|  1.73k|        }
 1399|  4.58k|        self->pAacDecoderChannelInfo[ch]->pComData = NULL;
 1400|  4.58k|      }
 1401|  5.90k|    }
 1402|  83.3k|    if (self->pAacDecoderStaticChannelInfo[ch] != NULL) {
  ------------------
  |  Branch (1402:9): [True: 5.90k, False: 77.4k]
  ------------------
 1403|  5.90k|      if (self->pAacDecoderStaticChannelInfo[ch]->pOverlapBuffer != NULL) {
  ------------------
  |  Branch (1403:11): [True: 5.90k, False: 0]
  ------------------
 1404|  5.90k|        FreeOverlapBuffer(
 1405|  5.90k|            &self->pAacDecoderStaticChannelInfo[ch]->pOverlapBuffer);
 1406|  5.90k|      }
 1407|  5.90k|      if (self->pAacDecoderStaticChannelInfo[ch]->hArCo != NULL) {
  ------------------
  |  Branch (1407:11): [True: 1.99k, False: 3.91k]
  ------------------
 1408|  1.99k|        CArco_Destroy(self->pAacDecoderStaticChannelInfo[ch]->hArCo);
 1409|  1.99k|      }
 1410|  5.90k|      FreeAacDecoderStaticChannelInfo(&self->pAacDecoderStaticChannelInfo[ch]);
 1411|  5.90k|    }
 1412|  83.3k|    if (self->pAacDecoderChannelInfo[ch] != NULL) {
  ------------------
  |  Branch (1412:9): [True: 5.90k, False: 77.4k]
  ------------------
 1413|  5.90k|      FreeAacDecoderChannelInfo(&self->pAacDecoderChannelInfo[ch]);
 1414|  5.90k|    }
 1415|  83.3k|  }
 1416|       |
 1417|  10.4k|  {
 1418|  10.4k|    int el;
 1419|   645k|    for (el = elementOffset; el < elementOffset + numElements; el++) {
  ------------------
  |  Branch (1419:30): [True: 635k, False: 10.4k]
  ------------------
 1420|   635k|      if (self->cpeStaticData[el] != NULL) {
  ------------------
  |  Branch (1420:11): [True: 23, False: 635k]
  ------------------
 1421|     23|        FreeCpePersistentData(&self->cpeStaticData[el]);
 1422|     23|      }
 1423|   635k|    }
 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.90k|                                    int elementOffset) {
 1452|  5.90k|  FDKmemcpy(self->elFlags, elFlags, sizeof(self->elFlags));
 1453|       |
 1454|  5.90k|  self->flags[streamIndex] = flags;
 1455|  5.90k|}
aacdecoder.cpp:_ZL25CAacDecoder_GetELChannels14MP4_ELEMENT_IDh:
  286|  4.58k|                                     UCHAR usacStereoConfigIndex) {
  287|  4.58k|  int el_channels = 0;
  288|       |
  289|  4.58k|  switch (type) {
  290|     59|    case ID_USAC_CPE:
  ------------------
  |  Branch (290:5): [True: 59, False: 4.52k]
  ------------------
  291|     59|      if (usacStereoConfigIndex == 1) {
  ------------------
  |  Branch (291:11): [True: 7, False: 52]
  ------------------
  292|      7|        el_channels = 1;
  293|     52|      } else {
  294|     52|        el_channels = 2;
  295|     52|      }
  296|     59|      break;
  297|  1.27k|    case ID_CPE:
  ------------------
  |  Branch (297:5): [True: 1.27k, False: 3.30k]
  ------------------
  298|  1.27k|      el_channels = 2;
  299|  1.27k|      break;
  300|  1.88k|    case ID_USAC_SCE:
  ------------------
  |  Branch (300:5): [True: 1.88k, False: 2.69k]
  ------------------
  301|  1.88k|    case ID_USAC_LFE:
  ------------------
  |  Branch (301:5): [True: 0, False: 4.58k]
  ------------------
  302|  2.94k|    case ID_SCE:
  ------------------
  |  Branch (302:5): [True: 1.05k, False: 3.52k]
  ------------------
  303|  3.24k|    case ID_LFE:
  ------------------
  |  Branch (303:5): [True: 305, False: 4.27k]
  ------------------
  304|  3.24k|      el_channels = 1;
  305|  3.24k|      break;
  306|      0|    default:
  ------------------
  |  Branch (306:5): [True: 0, False: 4.58k]
  ------------------
  307|      0|      el_channels = 0;
  308|      0|      break;
  309|  4.58k|  }
  310|       |
  311|  4.58k|  return el_channels;
  312|  4.58k|}

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

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

_Z27CConcealment_InitCommonDataP14CConcealParams:
  265|  7.35k|void CConcealment_InitCommonData(CConcealParams *pConcealCommonData) {
  266|  7.35k|  if (pConcealCommonData != NULL) {
  ------------------
  |  Branch (266:7): [True: 7.35k, False: 0]
  ------------------
  267|  7.35k|    int i;
  268|       |
  269|       |    /* Set default error concealment technique */
  270|  7.35k|    pConcealCommonData->method = ConcealMethodInter;
  271|       |
  272|  7.35k|    pConcealCommonData->numFadeOutFrames = CONCEAL_DFLT_FADEOUT_FRAMES;
  ------------------
  |  |  161|  7.35k|#define CONCEAL_DFLT_FADEOUT_FRAMES (6)
  ------------------
  273|  7.35k|    pConcealCommonData->numFadeInFrames = CONCEAL_DFLT_FADEIN_FRAMES;
  ------------------
  |  |  162|  7.35k|#define CONCEAL_DFLT_FADEIN_FRAMES (5)
  ------------------
  274|  7.35k|    pConcealCommonData->numMuteReleaseFrames = CONCEAL_DFLT_MUTE_RELEASE_FRAMES;
  ------------------
  |  |  163|  7.35k|#define CONCEAL_DFLT_MUTE_RELEASE_FRAMES (0)
  ------------------
  275|       |
  276|  7.35k|    pConcealCommonData->comfortNoiseLevel =
  277|  7.35k|        (FIXP_DBL)CONCEAL_DFLT_COMF_NOISE_LEVEL;
  ------------------
  |  |  156|  7.35k|#define CONCEAL_DFLT_COMF_NOISE_LEVEL (0x100000)
  ------------------
  278|       |
  279|       |    /* Init fade factors (symetric) */
  280|  7.35k|    pConcealCommonData->fadeOutFactor[0] =
  281|  7.35k|        FL2FXCONST_SGL(CONCEAL_DFLT_FADE_FACTOR);
  ------------------
  |  |  180|  7.35k|  (FIXP_SGL)(                                                                \
  |  |  181|  7.35k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 7.35k, Folded]
  |  |  ------------------
  |  |  182|  7.35k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  7.35k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  7.35k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 7.35k]
  |  |  ------------------
  |  |  183|  7.35k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  7.35k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  7.35k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  7.35k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  7.35k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  7.35k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  7.35k|          : ((((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.35k|    pConcealCommonData->fadeInFactor[0] = pConcealCommonData->fadeOutFactor[0];
  283|       |
  284|   235k|    for (i = 1; i < CONCEAL_MAX_NUM_FADE_FACTORS; i++) {
  ------------------
  |  |  113|   235k|#define CONCEAL_MAX_NUM_FADE_FACTORS (32)
  ------------------
  |  Branch (284:17): [True: 228k, False: 7.35k]
  ------------------
  285|   228k|      pConcealCommonData->fadeOutFactor[i] =
  286|   228k|          FX_DBL2FX_SGL(fMult(pConcealCommonData->fadeOutFactor[i - 1],
  ------------------
  |  |  220|   912k|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|   228k|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|   228k|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  |  |  |  Branch (220:41): [Folded, False: 228k]
  |  |  |  Branch (220:41): [Folded, False: 0]
  |  |  |  Branch (220:41): [True: 228k, Folded]
  |  |  ------------------
  ------------------
  287|   228k|                              FL2FXCONST_SGL(CONCEAL_DFLT_FADE_FACTOR)));
  288|   228k|      pConcealCommonData->fadeInFactor[i] =
  289|   228k|          pConcealCommonData->fadeOutFactor[i];
  290|   228k|    }
  291|  7.35k|  }
  292|  7.35k|}
_Z22CConcealment_GetMethodP14CConcealParams:
  300|  17.2k|CConcealmentMethod CConcealment_GetMethod(CConcealParams *pConcealCommonData) {
  301|  17.2k|  CConcealmentMethod method = ConcealMethodNone;
  302|       |
  303|  17.2k|  if (pConcealCommonData != NULL) {
  ------------------
  |  Branch (303:7): [True: 17.2k, False: 0]
  ------------------
  304|  17.2k|    method = pConcealCommonData->method;
  305|  17.2k|  }
  306|       |
  307|  17.2k|  return (method);
  308|  17.2k|}
_Z28CConcealment_InitChannelDataP16CConcealmentInfoP14CConcealParams18AACDEC_RENDER_MODEi:
  322|  5.90k|                                  int samplesPerFrame) {
  323|  5.90k|  int i;
  324|  5.90k|  pConcealChannelInfo->TDNoiseSeed = 0;
  325|  5.90k|  FDKmemclear(pConcealChannelInfo->TDNoiseStates,
  326|  5.90k|              sizeof(pConcealChannelInfo->TDNoiseStates));
  327|  5.90k|  pConcealChannelInfo->TDNoiseCoef[0] = FL2FXCONST_SGL(0.05f);
  ------------------
  |  |  180|  5.90k|  (FIXP_SGL)(                                                                \
  |  |  181|  5.90k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 5.90k, Folded]
  |  |  ------------------
  |  |  182|  5.90k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  5.90k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  5.90k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 5.90k]
  |  |  ------------------
  |  |  183|  5.90k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  5.90k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  5.90k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  5.90k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  5.90k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  5.90k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  5.90k|          : ((((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.90k|  pConcealChannelInfo->TDNoiseCoef[1] = FL2FXCONST_SGL(0.5f);
  ------------------
  |  |  180|  5.90k|  (FIXP_SGL)(                                                                \
  |  |  181|  5.90k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 5.90k, Folded]
  |  |  ------------------
  |  |  182|  5.90k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  5.90k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  5.90k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 5.90k]
  |  |  ------------------
  |  |  183|  5.90k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  5.90k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  5.90k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  5.90k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  5.90k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  5.90k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  5.90k|          : ((((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.90k|  pConcealChannelInfo->TDNoiseCoef[2] = FL2FXCONST_SGL(0.45f);
  ------------------
  |  |  180|  5.90k|  (FIXP_SGL)(                                                                \
  |  |  181|  5.90k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 5.90k, Folded]
  |  |  ------------------
  |  |  182|  5.90k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  5.90k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  5.90k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 5.90k]
  |  |  ------------------
  |  |  183|  5.90k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  5.90k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  5.90k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  5.90k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  5.90k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  5.90k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  5.90k|          : ((((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.90k|  pConcealChannelInfo->pConcealParams = pConcealCommonData;
  332|       |
  333|  5.90k|  pConcealChannelInfo->lastRenderMode = initRenderMode;
  334|       |
  335|  5.90k|  pConcealChannelInfo->windowShape = CONCEAL_NOT_DEFINED;
  ------------------
  |  |  158|  5.90k|#define CONCEAL_NOT_DEFINED ((UCHAR)-1)
  ------------------
  336|  5.90k|  pConcealChannelInfo->windowSequence = BLOCK_LONG; /* default type */
  337|  5.90k|  pConcealChannelInfo->lastWinGrpLen = 1;
  338|       |
  339|  5.90k|  pConcealChannelInfo->concealState = ConcealState_Ok;
  340|       |
  341|  5.90k|  FDKmemclear(pConcealChannelInfo->spectralCoefficient,
  342|  5.90k|              1024 * sizeof(FIXP_CNCL));
  343|       |
  344|  53.1k|  for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (344:15): [True: 47.2k, False: 5.90k]
  ------------------
  345|  47.2k|    pConcealChannelInfo->specScale[i] = 0;
  346|  47.2k|  }
  347|       |
  348|  5.90k|  pConcealChannelInfo->iRandomPhase = 0;
  349|       |
  350|  5.90k|  pConcealChannelInfo->prevFrameOk[0] = 1;
  351|  5.90k|  pConcealChannelInfo->prevFrameOk[1] = 1;
  352|       |
  353|  5.90k|  pConcealChannelInfo->cntFadeFrames = 0;
  354|  5.90k|  pConcealChannelInfo->cntValidFrames = 0;
  355|  5.90k|  pConcealChannelInfo->fade_old = (FIXP_DBL)MAXVAL_DBL;
  ------------------
  |  |  156|  5.90k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  356|  5.90k|  pConcealChannelInfo->winGrpOffset[0] = 0;
  357|  5.90k|  pConcealChannelInfo->winGrpOffset[1] = 0;
  358|  5.90k|  pConcealChannelInfo->attGrpOffset[0] = 0;
  359|  5.90k|  pConcealChannelInfo->attGrpOffset[1] = 0;
  360|  5.90k|}
_Z22CConcealment_SetParamsP14CConcealParamsiiiii:
  375|  9.92k|                       FIXP_DBL comfNoiseLevel) {
  376|       |  /* set concealment technique */
  377|  9.92k|  if (method != AACDEC_CONCEAL_PARAM_NOT_SPECIFIED) {
  ------------------
  |  |  108|  9.92k|#define AACDEC_CONCEAL_PARAM_NOT_SPECIFIED (0xFFFE)
  ------------------
  |  Branch (377:7): [True: 9.92k, False: 0]
  ------------------
  378|  9.92k|    switch ((CConcealmentMethod)method) {
  379|      0|      case ConcealMethodMute:
  ------------------
  |  Branch (379:7): [True: 0, False: 9.92k]
  ------------------
  380|  2.56k|      case ConcealMethodNoise:
  ------------------
  |  Branch (380:7): [True: 2.56k, False: 7.35k]
  ------------------
  381|  9.92k|      case ConcealMethodInter:
  ------------------
  |  Branch (381:7): [True: 7.35k, False: 2.56k]
  ------------------
  382|       |        /* Be sure to enable delay adjustment of SBR decoder! */
  383|  9.92k|        if (concealParams == NULL) {
  ------------------
  |  Branch (383:13): [True: 0, False: 9.92k]
  ------------------
  384|      0|          return AAC_DEC_INVALID_HANDLE;
  385|  9.92k|        } else {
  386|       |          /* set param */
  387|  9.92k|          concealParams->method = (CConcealmentMethod)method;
  388|  9.92k|        }
  389|  9.92k|        break;
  390|       |
  391|  9.92k|      default:
  ------------------
  |  Branch (391:7): [True: 0, False: 9.92k]
  ------------------
  392|      0|        return AAC_DEC_SET_PARAM_FAIL;
  393|  9.92k|    }
  394|  9.92k|  }
  395|       |
  396|       |  /* set number of frames for fade-out slope */
  397|  9.92k|  if (fadeOutSlope != AACDEC_CONCEAL_PARAM_NOT_SPECIFIED) {
  ------------------
  |  |  108|  9.92k|#define AACDEC_CONCEAL_PARAM_NOT_SPECIFIED (0xFFFE)
  ------------------
  |  Branch (397:7): [True: 0, False: 9.92k]
  ------------------
  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.92k|  if (fadeInSlope != AACDEC_CONCEAL_PARAM_NOT_SPECIFIED) {
  ------------------
  |  |  108|  9.92k|#define AACDEC_CONCEAL_PARAM_NOT_SPECIFIED (0xFFFE)
  ------------------
  |  Branch (411:7): [True: 0, False: 9.92k]
  ------------------
  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.92k|  if (muteRelease != AACDEC_CONCEAL_PARAM_NOT_SPECIFIED) {
  ------------------
  |  |  108|  9.92k|#define AACDEC_CONCEAL_PARAM_NOT_SPECIFIED (0xFFFE)
  ------------------
  |  Branch (425:7): [True: 0, False: 9.92k]
  ------------------
  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.92k|  if (comfNoiseLevel != (FIXP_DBL)AACDEC_CONCEAL_PARAM_NOT_SPECIFIED) {
  ------------------
  |  |  108|  9.92k|#define AACDEC_CONCEAL_PARAM_NOT_SPECIFIED (0xFFFE)
  ------------------
  |  Branch (440:7): [True: 0, False: 9.92k]
  ------------------
  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.92k|  return (AAC_DEC_OK);
  453|  9.92k|}
_Z21CConcealment_GetDelayP14CConcealParams:
 1651|  32.1k|UINT CConcealment_GetDelay(CConcealParams *pConcealCommonData) {
 1652|  32.1k|  UINT frameDelay = 0;
 1653|       |
 1654|  32.1k|  if (pConcealCommonData != NULL) {
  ------------------
  |  Branch (1654:7): [True: 32.1k, False: 0]
  ------------------
 1655|  32.1k|    switch (pConcealCommonData->method) {
 1656|      0|      case ConcealMethodTonal:
  ------------------
  |  Branch (1656:7): [True: 0, False: 32.1k]
  ------------------
 1657|  27.1k|      case ConcealMethodInter:
  ------------------
  |  Branch (1657:7): [True: 27.1k, False: 4.92k]
  ------------------
 1658|  27.1k|        frameDelay = 1;
 1659|  27.1k|        break;
 1660|  4.92k|      default:
  ------------------
  |  Branch (1660:7): [True: 4.92k, False: 27.1k]
  ------------------
 1661|  4.92k|        break;
 1662|  32.1k|    }
 1663|  32.1k|  }
 1664|       |
 1665|  32.1k|  return frameDelay;
 1666|  32.1k|}

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

FDK_drcDec_Open:
  216|  7.35k|                const DRC_DEC_FUNCTIONAL_RANGE functionalRange) {
  217|  7.35k|  DRC_ERROR dErr = DE_OK;
  218|  7.35k|  DRCDEC_SELECTION_PROCESS_RETURN sErr = DRCDEC_SELECTION_PROCESS_NO_ERROR;
  219|  7.35k|  HANDLE_DRC_DECODER hDrcDec;
  220|       |
  221|  7.35k|  *phDrcDec = (HANDLE_DRC_DECODER)FDKcalloc(1, sizeof(DRC_DECODER));
  222|  7.35k|  if (!*phDrcDec) return DRC_DEC_OUT_OF_MEMORY;
  ------------------
  |  Branch (222:7): [True: 0, False: 7.35k]
  ------------------
  223|  7.35k|  hDrcDec = *phDrcDec;
  224|       |
  225|  7.35k|  hDrcDec->functionalRange = functionalRange;
  226|       |
  227|  7.35k|  hDrcDec->status = DRC_DEC_NOT_INITIALIZED;
  228|  7.35k|  hDrcDec->codecMode = DRC_DEC_CODEC_MODE_UNDEFINED;
  229|       |
  230|  7.35k|  if (hDrcDec->functionalRange & DRC_DEC_SELECTION) {
  ------------------
  |  Branch (230:7): [True: 7.35k, False: 0]
  ------------------
  231|  7.35k|    sErr = drcDec_SelectionProcess_Create(&(hDrcDec->hSelectionProc));
  232|  7.35k|    if (sErr) return DRC_DEC_OUT_OF_MEMORY;
  ------------------
  |  Branch (232:9): [True: 0, False: 7.35k]
  ------------------
  233|  7.35k|    sErr = drcDec_SelectionProcess_Init(hDrcDec->hSelectionProc);
  234|  7.35k|    if (sErr) return DRC_DEC_NOT_OK;
  ------------------
  |  Branch (234:9): [True: 0, False: 7.35k]
  ------------------
  235|  7.35k|    hDrcDec->selProcInputDiff = 1;
  236|  7.35k|  }
  237|       |
  238|  7.35k|  if (hDrcDec->functionalRange & DRC_DEC_GAIN) {
  ------------------
  |  Branch (238:7): [True: 7.35k, False: 0]
  ------------------
  239|  7.35k|    dErr = drcDec_GainDecoder_Open(&(hDrcDec->hGainDec));
  240|  7.35k|    if (dErr) return DRC_DEC_OUT_OF_MEMORY;
  ------------------
  |  Branch (240:9): [True: 0, False: 7.35k]
  ------------------
  241|  7.35k|  }
  242|       |
  243|  7.35k|  return DRC_DEC_OK;
  244|  7.35k|}
FDK_drcDec_SetCodecMode:
  248|  38.8k|                        const DRC_DEC_CODEC_MODE codecMode) {
  249|  38.8k|  DRC_ERROR dErr = DE_OK;
  250|  38.8k|  DRCDEC_SELECTION_PROCESS_RETURN sErr = DRCDEC_SELECTION_PROCESS_NO_ERROR;
  251|       |
  252|  38.8k|  if (hDrcDec == NULL) return DRC_DEC_NOT_OPENED;
  ------------------
  |  Branch (252:7): [True: 0, False: 38.8k]
  ------------------
  253|       |
  254|  38.8k|  if (hDrcDec->codecMode ==
  ------------------
  |  Branch (254:7): [True: 5.11k, False: 33.7k]
  ------------------
  255|  38.8k|      DRC_DEC_CODEC_MODE_UNDEFINED) { /* Set codec mode, if it is set for the
  256|       |                                         first time */
  257|  5.11k|    hDrcDec->codecMode = codecMode;
  258|       |
  259|  5.11k|    if (hDrcDec->functionalRange & DRC_DEC_SELECTION) {
  ------------------
  |  Branch (259:9): [True: 5.11k, False: 0]
  ------------------
  260|  5.11k|      sErr = drcDec_SelectionProcess_SetCodecMode(
  261|  5.11k|          hDrcDec->hSelectionProc, (SEL_PROC_CODEC_MODE)codecMode);
  262|  5.11k|      if (sErr) return DRC_DEC_NOT_OK;
  ------------------
  |  Branch (262:11): [True: 0, False: 5.11k]
  ------------------
  263|  5.11k|      hDrcDec->selProcInputDiff = 1;
  264|  5.11k|    }
  265|       |
  266|  5.11k|    if (hDrcDec->functionalRange & DRC_DEC_GAIN) {
  ------------------
  |  Branch (266:9): [True: 5.11k, False: 0]
  ------------------
  267|  5.11k|      DELAY_MODE delayMode;
  268|  5.11k|      int timeDomainSupported;
  269|  5.11k|      SUBBAND_DOMAIN_MODE subbandDomainSupported;
  270|       |
  271|  5.11k|      switch (hDrcDec->codecMode) {
  272|      0|        case DRC_DEC_MPEG_4_AAC:
  ------------------
  |  Branch (272:9): [True: 0, False: 5.11k]
  ------------------
  273|  5.11k|        case DRC_DEC_MPEG_D_USAC:
  ------------------
  |  Branch (273:9): [True: 5.11k, False: 0]
  ------------------
  274|  5.11k|        case DRC_DEC_MPEG_H_3DA:
  ------------------
  |  Branch (274:9): [True: 0, False: 5.11k]
  ------------------
  275|  5.11k|        default:
  ------------------
  |  Branch (275:9): [True: 0, False: 5.11k]
  ------------------
  276|  5.11k|          delayMode = DM_REGULAR_DELAY;
  277|  5.11k|      }
  278|       |
  279|  5.11k|      switch (hDrcDec->codecMode) {
  280|      0|        case DRC_DEC_MPEG_4_AAC:
  ------------------
  |  Branch (280:9): [True: 0, False: 5.11k]
  ------------------
  281|  5.11k|        case DRC_DEC_MPEG_D_USAC:
  ------------------
  |  Branch (281:9): [True: 5.11k, False: 0]
  ------------------
  282|  5.11k|          timeDomainSupported = 1;
  283|  5.11k|          subbandDomainSupported = SDM_OFF;
  284|  5.11k|          break;
  285|      0|        case DRC_DEC_MPEG_H_3DA:
  ------------------
  |  Branch (285:9): [True: 0, False: 5.11k]
  ------------------
  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.11k]
  ------------------
  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.11k]
  ------------------
  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.11k]
  ------------------
  299|      0|          timeDomainSupported = 0;
  300|      0|          subbandDomainSupported = SDM_STFT256;
  301|      0|          break;
  302|       |
  303|      0|        default:
  ------------------
  |  Branch (303:9): [True: 0, False: 5.11k]
  ------------------
  304|      0|          timeDomainSupported = 0;
  305|      0|          subbandDomainSupported = SDM_OFF;
  306|  5.11k|      }
  307|       |
  308|  5.11k|      dErr = drcDec_GainDecoder_SetCodecDependentParameters(
  309|  5.11k|          hDrcDec->hGainDec, delayMode, timeDomainSupported,
  310|  5.11k|          subbandDomainSupported);
  311|  5.11k|      if (dErr) return DRC_DEC_NOT_OK;
  ------------------
  |  Branch (311:11): [True: 0, False: 5.11k]
  ------------------
  312|  5.11k|    }
  313|  5.11k|  }
  314|       |
  315|       |  /* Don't allow changing codecMode if it has already been set. */
  316|  38.8k|  if (hDrcDec->codecMode != codecMode) return DRC_DEC_NOT_OK;
  ------------------
  |  Branch (316:7): [True: 0, False: 38.8k]
  ------------------
  317|       |
  318|  38.8k|  return DRC_DEC_OK;
  319|  38.8k|}
FDK_drcDec_Init:
  323|  2.85k|                const int sampleRate, const int baseChannelCount) {
  324|  2.85k|  DRC_ERROR dErr = DE_OK;
  325|  2.85k|  DRCDEC_SELECTION_PROCESS_RETURN sErr = DRCDEC_SELECTION_PROCESS_NO_ERROR;
  326|       |
  327|  2.85k|  if (hDrcDec == NULL || frameSize == 0 || sampleRate == 0 ||
  ------------------
  |  Branch (327:7): [True: 0, False: 2.85k]
  |  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.35k|FDK_drcDec_Close(HANDLE_DRC_DECODER* phDrcDec) {
  362|  7.35k|  HANDLE_DRC_DECODER hDrcDec;
  363|       |
  364|  7.35k|  if (phDrcDec == NULL) {
  ------------------
  |  Branch (364:7): [True: 0, False: 7.35k]
  ------------------
  365|      0|    return DRC_DEC_OK;
  366|      0|  }
  367|       |
  368|  7.35k|  hDrcDec = *phDrcDec;
  369|       |
  370|  7.35k|  if (hDrcDec == NULL) return DRC_DEC_NOT_OPENED;
  ------------------
  |  Branch (370:7): [True: 0, False: 7.35k]
  ------------------
  371|       |
  372|  7.35k|  if (hDrcDec->functionalRange & DRC_DEC_GAIN) {
  ------------------
  |  Branch (372:7): [True: 7.35k, False: 0]
  ------------------
  373|  7.35k|    drcDec_GainDecoder_Close(&(hDrcDec->hGainDec));
  374|  7.35k|  }
  375|       |
  376|  7.35k|  if (hDrcDec->functionalRange & DRC_DEC_SELECTION) {
  ------------------
  |  Branch (376:7): [True: 7.35k, False: 0]
  ------------------
  377|  7.35k|    drcDec_SelectionProcess_Delete(&(hDrcDec->hSelectionProc));
  378|  7.35k|  }
  379|       |
  380|  7.35k|  FDKfree(*phDrcDec);
  381|  7.35k|  *phDrcDec = NULL;
  382|       |
  383|  7.35k|  return DRC_DEC_OK;
  384|  7.35k|}
FDK_drcDec_ReadUniDrcConfig:
  585|  33.3k|                            HANDLE_FDK_BITSTREAM hBitstream) {
  586|  33.3k|  DRC_ERROR dErr = DE_OK;
  587|       |
  588|  33.3k|  if (hDrcDec == NULL) return DRC_DEC_NOT_OPENED;
  ------------------
  |  Branch (588:7): [True: 0, False: 33.3k]
  ------------------
  589|       |
  590|  33.3k|  if (hDrcDec->codecMode == DRC_DEC_MPEG_D_USAC) {
  ------------------
  |  Branch (590:7): [True: 33.3k, False: 0]
  ------------------
  591|  33.3k|    dErr = drcDec_readUniDrcConfig(hBitstream, &(hDrcDec->uniDrcConfig));
  592|  33.3k|  } else
  593|      0|    return DRC_DEC_NOT_OK;
  594|       |
  595|  33.3k|  if (dErr) {
  ------------------
  |  Branch (595:7): [True: 20.9k, False: 12.3k]
  ------------------
  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.3k|  startSelectionProcess(hDrcDec);
  602|       |
  603|  33.3k|  return DRC_DEC_OK;
  604|  33.3k|}
FDK_drcDec_ReadLoudnessInfoSet:
  680|  5.53k|                               HANDLE_FDK_BITSTREAM hBitstream) {
  681|  5.53k|  DRC_ERROR dErr = DE_OK;
  682|       |
  683|  5.53k|  if (hDrcDec == NULL) return DRC_DEC_NOT_OPENED;
  ------------------
  |  Branch (683:7): [True: 0, False: 5.53k]
  ------------------
  684|       |
  685|  5.53k|  if (hDrcDec->codecMode == DRC_DEC_MPEG_D_USAC) {
  ------------------
  |  Branch (685:7): [True: 5.53k, False: 0]
  ------------------
  686|  5.53k|    dErr = drcDec_readLoudnessInfoSet(hBitstream, &(hDrcDec->loudnessInfoSet));
  687|  5.53k|  } else
  688|      0|    return DRC_DEC_NOT_OK;
  689|       |
  690|  5.53k|  if (dErr) {
  ------------------
  |  Branch (690:7): [True: 974, False: 4.56k]
  ------------------
  691|       |    /* clear config, if parsing error occurred */
  692|    974|    FDKmemclear(&hDrcDec->loudnessInfoSet, sizeof(hDrcDec->loudnessInfoSet));
  693|    974|    hDrcDec->loudnessInfoSet.diff = 1;
  694|    974|  }
  695|       |
  696|  5.53k|  startSelectionProcess(hDrcDec);
  697|       |
  698|  5.53k|  return DRC_DEC_OK;
  699|  5.53k|}
FDK_drcDecLib.cpp:_ZL21startSelectionProcessP13s_drc_decoder:
  180|  41.6k|static void startSelectionProcess(HANDLE_DRC_DECODER hDrcDec) {
  181|  41.6k|  int uniDrcConfigHasChanged = 0;
  182|  41.6k|  SEL_PROC_OUTPUT oldSelProcOutput = hDrcDec->selProcOutput;
  183|       |
  184|  41.6k|  if (!hDrcDec->status) return;
  ------------------
  |  Branch (184:7): [True: 38.8k, 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: 105, False: 2.74k]
  |  Branch (188:39): [True: 185, 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.73k, False: 116]
  |  Branch (205:53): [True: 1, False: 115]
  ------------------
  206|  2.73k|      drcDec_GainDecoder_Config(hDrcDec->hGainDec, &(hDrcDec->uniDrcConfig),
  207|  2.73k|                                hDrcDec->selProcOutput.numSelectedDrcSets,
  208|  2.73k|                                hDrcDec->selProcOutput.selectedDrcSetIds,
  209|  2.73k|                                hDrcDec->selProcOutput.selectedDownmixIds);
  210|  2.73k|    }
  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.73k, False: 116]
  ------------------
  157|  2.84k|      oldSelProcOutput.numSelectedDrcSets) {
  158|  2.73k|    resetNeeded = 1;
  159|  2.73k|  } else {
  160|    116|    for (i = 0; i < hDrcDec->selProcOutput.numSelectedDrcSets; i++) {
  ------------------
  |  Branch (160:17): [True: 0, False: 116]
  ------------------
  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|    116|  }
  169|       |
  170|  2.84k|  if (hDrcDec->selProcOutput.boost != oldSelProcOutput.boost) resetNeeded = 1;
  ------------------
  |  Branch (170:7): [True: 2.73k, False: 116]
  ------------------
  171|  2.84k|  if (hDrcDec->selProcOutput.compress != oldSelProcOutput.compress)
  ------------------
  |  Branch (171:7): [True: 2.73k, False: 116]
  ------------------
  172|  2.73k|    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.35k|drcDec_GainDecoder_Open(HANDLE_DRC_GAIN_DECODER* phGainDec) {
  159|  7.35k|  DRC_GAIN_DECODER* hGainDec = NULL;
  160|       |
  161|  7.35k|  hGainDec = (DRC_GAIN_DECODER*)FDKcalloc(1, sizeof(DRC_GAIN_DECODER));
  162|  7.35k|  if (hGainDec == NULL) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (162:7): [True: 0, False: 7.35k]
  ------------------
  163|       |
  164|  7.35k|  hGainDec->multiBandActiveDrcIndex = -1;
  165|  7.35k|  hGainDec->channelGainActiveDrcIndex = -1;
  166|       |
  167|  7.35k|  *phGainDec = hGainDec;
  168|       |
  169|  7.35k|  return DE_OK;
  170|  7.35k|}
_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.11k|    const SUBBAND_DOMAIN_MODE subbandDomainSupported) {
  208|  5.11k|  if ((delayMode != DM_REGULAR_DELAY) && (delayMode != DM_LOW_DELAY)) {
  ------------------
  |  Branch (208:7): [True: 0, False: 5.11k]
  |  Branch (208:42): [True: 0, False: 0]
  ------------------
  209|      0|    return DE_NOT_OK;
  210|      0|  }
  211|  5.11k|  hGainDec->delayMode = delayMode;
  212|  5.11k|  hGainDec->timeDomainSupported = timeDomainSupported;
  213|  5.11k|  hGainDec->subbandDomainSupported = subbandDomainSupported;
  214|       |
  215|  5.11k|  return DE_OK;
  216|  5.11k|}
_Z25drcDec_GainDecoder_ConfigP16DRC_GAIN_DECODERP14UNI_DRC_CONFIGhPKaPKh:
  223|  2.73k|                          const UCHAR* selectedDownmixIds) {
  224|  2.73k|  DRC_ERROR err = DE_OK;
  225|  2.73k|  int a;
  226|       |
  227|  2.73k|  hGainDec->nActiveDrcs = 0;
  228|  2.73k|  hGainDec->multiBandActiveDrcIndex = -1;
  229|  2.73k|  hGainDec->channelGainActiveDrcIndex = -1;
  230|  5.69k|  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: 36, False: 2.96k]
  ------------------
  234|  2.99k|  }
  235|       |
  236|  2.69k|  err = initActiveDrcOffset(hGainDec);
  237|  2.69k|  if (err) return err;
  ------------------
  |  Branch (237:7): [True: 2, False: 2.69k]
  ------------------
  238|       |
  239|  2.69k|  return err;
  240|  2.69k|}
_Z24drcDec_GainDecoder_ClosePP16DRC_GAIN_DECODER:
  243|  7.35k|drcDec_GainDecoder_Close(HANDLE_DRC_GAIN_DECODER* phGainDec) {
  244|  7.35k|  if (*phGainDec != NULL) {
  ------------------
  |  Branch (244:7): [True: 7.35k, False: 0]
  ------------------
  245|  7.35k|    FDKfree(*phGainDec);
  246|  7.35k|    *phGainDec = NULL;
  247|  7.35k|  }
  248|       |
  249|  7.35k|  return DE_OK;
  250|  7.35k|}

_Z23drcDec_readUniDrcConfigP13FDK_BITSTREAMP14UNI_DRC_CONFIG:
 1676|  33.3k|                        HANDLE_UNI_DRC_CONFIG hUniDrcConfig) {
 1677|  33.3k|  DRC_ERROR err = DE_OK;
 1678|  33.3k|  int i, diff = 0;
 1679|  33.3k|  int drcDescriptionBasicPresent, drcCoefficientsBasicCount,
 1680|  33.3k|      drcInstructionsBasicCount;
 1681|  33.3k|  CHANNEL_LAYOUT tmpChan;
 1682|  33.3k|  FDKmemclear(&tmpChan, sizeof(CHANNEL_LAYOUT));
 1683|  33.3k|  if (hUniDrcConfig == NULL) return DE_NOT_OK;
  ------------------
  |  Branch (1683:7): [True: 0, False: 33.3k]
  ------------------
 1684|       |
 1685|  33.3k|  diff |= _compAssign(&hUniDrcConfig->sampleRatePresent, FDKreadBits(hBs, 1));
 1686|       |
 1687|  33.3k|  if (hUniDrcConfig->sampleRatePresent == 1) {
  ------------------
  |  Branch (1687:7): [True: 958, False: 32.3k]
  ------------------
 1688|    958|    diff |=
 1689|    958|        _compAssign(&hUniDrcConfig->sampleRate, FDKreadBits(hBs, 18) + 1000);
 1690|    958|  }
 1691|       |
 1692|  33.3k|  diff |= _compAssign(&hUniDrcConfig->downmixInstructionsCountV0,
 1693|  33.3k|                      FDKreadBits(hBs, 7));
 1694|       |
 1695|  33.3k|  drcDescriptionBasicPresent = FDKreadBits(hBs, 1);
 1696|  33.3k|  if (drcDescriptionBasicPresent == 1) {
  ------------------
  |  Branch (1696:7): [True: 2.44k, False: 30.8k]
  ------------------
 1697|  2.44k|    drcCoefficientsBasicCount = FDKreadBits(hBs, 3);
 1698|  2.44k|    drcInstructionsBasicCount = FDKreadBits(hBs, 4);
 1699|  30.8k|  } else {
 1700|  30.8k|    drcCoefficientsBasicCount = 0;
 1701|  30.8k|    drcInstructionsBasicCount = 0;
 1702|  30.8k|  }
 1703|       |
 1704|  33.3k|  diff |= _compAssign(&hUniDrcConfig->drcCoefficientsUniDrcCountV0,
 1705|  33.3k|                      FDKreadBits(hBs, 3));
 1706|  33.3k|  diff |= _compAssign(&hUniDrcConfig->drcInstructionsUniDrcCountV0,
 1707|  33.3k|                      FDKreadBits(hBs, 6));
 1708|       |
 1709|  33.3k|  err = _readChannelLayout(hBs, &tmpChan);
 1710|  33.3k|  if (err) return err;
  ------------------
  |  Branch (1710:7): [True: 199, False: 33.1k]
  ------------------
 1711|       |
 1712|  33.1k|  if (!diff)
  ------------------
  |  Branch (1712:7): [True: 17.6k, False: 15.4k]
  ------------------
 1713|  17.6k|    diff |= (FDKmemcmp(&tmpChan, &hUniDrcConfig->channelLayout,
 1714|  17.6k|                       sizeof(CHANNEL_LAYOUT)) != 0);
 1715|  33.1k|  hUniDrcConfig->channelLayout = tmpChan;
 1716|       |
 1717|  33.1k|  hUniDrcConfig->downmixInstructionsCount =
 1718|  33.1k|      fMin(hUniDrcConfig->downmixInstructionsCountV0, (UCHAR)6);
 1719|  1.20M|  for (i = 0; i < hUniDrcConfig->downmixInstructionsCountV0; i++) {
  ------------------
  |  Branch (1719:15): [True: 1.17M, False: 33.0k]
  ------------------
 1720|  1.17M|    DOWNMIX_INSTRUCTIONS tmpDown;
 1721|  1.17M|    FDKmemclear(&tmpDown, sizeof(DOWNMIX_INSTRUCTIONS));
 1722|  1.17M|    err = _readDownmixInstructions(hBs, 0, &hUniDrcConfig->channelLayout,
 1723|  1.17M|                                   &tmpDown);
 1724|  1.17M|    if (err) return err;
  ------------------
  |  Branch (1724:9): [True: 88, False: 1.17M]
  ------------------
 1725|  1.17M|    if (i >= 6) continue;
  ------------------
  |  Branch (1725:9): [True: 1.10M, False: 69.8k]
  ------------------
 1726|  69.8k|    if (!diff)
  ------------------
  |  Branch (1726:9): [True: 12.4k, False: 57.4k]
  ------------------
 1727|  12.4k|      diff |= (FDKmemcmp(&tmpDown, &(hUniDrcConfig->downmixInstructions[i]),
 1728|  12.4k|                         sizeof(DOWNMIX_INSTRUCTIONS)) != 0);
 1729|  69.8k|    hUniDrcConfig->downmixInstructions[i] = tmpDown;
 1730|  69.8k|  }
 1731|       |
 1732|  37.4k|  for (i = 0; i < drcCoefficientsBasicCount; i++) {
  ------------------
  |  Branch (1732:15): [True: 4.40k, False: 33.0k]
  ------------------
 1733|  4.40k|    _skipDrcCoefficientsBasic(hBs);
 1734|  4.40k|  }
 1735|  52.5k|  for (i = 0; i < drcInstructionsBasicCount; i++) {
  ------------------
  |  Branch (1735:15): [True: 19.5k, False: 33.0k]
  ------------------
 1736|  19.5k|    _skipDrcInstructionsBasic(hBs);
 1737|  19.5k|  }
 1738|       |
 1739|  33.0k|  hUniDrcConfig->drcCoefficientsUniDrcCount =
 1740|  33.0k|      fMin(hUniDrcConfig->drcCoefficientsUniDrcCountV0, (UCHAR)2);
 1741|  83.0k|  for (i = 0; i < hUniDrcConfig->drcCoefficientsUniDrcCountV0; i++) {
  ------------------
  |  Branch (1741:15): [True: 50.1k, False: 32.9k]
  ------------------
 1742|  50.1k|    DRC_COEFFICIENTS_UNI_DRC tmpCoef;
 1743|  50.1k|    FDKmemclear(&tmpCoef, sizeof(DRC_COEFFICIENTS_UNI_DRC));
 1744|  50.1k|    err = _readDrcCoefficientsUniDrc(hBs, 0, &tmpCoef);
 1745|  50.1k|    if (err) return err;
  ------------------
  |  Branch (1745:9): [True: 89, False: 50.0k]
  ------------------
 1746|  50.0k|    if (i >= 2) continue;
  ------------------
  |  Branch (1746:9): [True: 29.4k, False: 20.5k]
  ------------------
 1747|  20.5k|    if (!diff)
  ------------------
  |  Branch (1747:9): [True: 5.48k, False: 15.0k]
  ------------------
 1748|  5.48k|      diff |= (FDKmemcmp(&tmpCoef, &(hUniDrcConfig->drcCoefficientsUniDrc[i]),
 1749|  5.48k|                         sizeof(DRC_COEFFICIENTS_UNI_DRC)) != 0);
 1750|  20.5k|    hUniDrcConfig->drcCoefficientsUniDrc[i] = tmpCoef;
 1751|  20.5k|  }
 1752|       |
 1753|  32.9k|  hUniDrcConfig->drcInstructionsUniDrcCount =
 1754|  32.9k|      fMin(hUniDrcConfig->drcInstructionsUniDrcCountV0, (UCHAR)12);
 1755|   732k|  for (i = 0; i < hUniDrcConfig->drcInstructionsUniDrcCountV0; i++) {
  ------------------
  |  Branch (1755:15): [True: 701k, False: 31.2k]
  ------------------
 1756|   701k|    DRC_INSTRUCTIONS_UNI_DRC tmpInst;
 1757|   701k|    FDKmemclear(&tmpInst, sizeof(DRC_INSTRUCTIONS_UNI_DRC));
 1758|   701k|    err = _readDrcInstructionsUniDrc(hBs, 0, hUniDrcConfig, &tmpInst);
 1759|   701k|    if (err) return err;
  ------------------
  |  Branch (1759:9): [True: 1.72k, False: 699k]
  ------------------
 1760|   699k|    if (i >= 12) continue;
  ------------------
  |  Branch (1760:9): [True: 527k, False: 172k]
  ------------------
 1761|   172k|    if (!diff)
  ------------------
  |  Branch (1761:9): [True: 40.5k, False: 131k]
  ------------------
 1762|  40.5k|      diff |= (FDKmemcmp(&tmpInst, &(hUniDrcConfig->drcInstructionsUniDrc[i]),
 1763|  40.5k|                         sizeof(DRC_INSTRUCTIONS_UNI_DRC)) != 0);
 1764|   172k|    hUniDrcConfig->drcInstructionsUniDrc[i] = tmpInst;
 1765|   172k|  }
 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.8k, False: 11.3k]
  ------------------
 1772|  19.8k|    err = _readUniDrcConfigExtension(hBs, hUniDrcConfig);
 1773|  19.8k|    if (err) return err;
  ------------------
  |  Branch (1773:9): [True: 18.8k, False: 972]
  ------------------
 1774|  19.8k|  }
 1775|       |
 1776|  12.3k|  return err;
 1777|  31.2k|}
_Z26drcDec_readLoudnessInfoSetP13FDK_BITSTREAMP17LOUDNESS_INFO_SET:
 1995|  5.53k|                           HANDLE_LOUDNESS_INFO_SET hLoudnessInfoSet) {
 1996|  5.53k|  DRC_ERROR err = DE_OK;
 1997|  5.53k|  int i, diff = 0;
 1998|  5.53k|  if (hLoudnessInfoSet == NULL) return DE_NOT_OK;
  ------------------
  |  Branch (1998:7): [True: 0, False: 5.53k]
  ------------------
 1999|       |
 2000|  5.53k|  diff |= _compAssign(&hLoudnessInfoSet->loudnessInfoAlbumCountV0,
 2001|  5.53k|                      FDKreadBits(hBs, 6));
 2002|  5.53k|  diff |=
 2003|  5.53k|      _compAssign(&hLoudnessInfoSet->loudnessInfoCountV0, FDKreadBits(hBs, 6));
 2004|       |
 2005|  5.53k|  hLoudnessInfoSet->loudnessInfoAlbumCount =
 2006|  5.53k|      fMin(hLoudnessInfoSet->loudnessInfoAlbumCountV0, (UCHAR)12);
 2007|  10.8k|  for (i = 0; i < hLoudnessInfoSet->loudnessInfoAlbumCountV0; i++) {
  ------------------
  |  Branch (2007:15): [True: 5.65k, False: 5.19k]
  ------------------
 2008|  5.65k|    LOUDNESS_INFO tmpLoud;
 2009|  5.65k|    FDKmemclear(&tmpLoud, sizeof(LOUDNESS_INFO));
 2010|  5.65k|    err = _readLoudnessInfo(hBs, 0, &tmpLoud);
 2011|  5.65k|    if (err) return err;
  ------------------
  |  Branch (2011:9): [True: 344, False: 5.31k]
  ------------------
 2012|  5.31k|    if (i >= 12) continue;
  ------------------
  |  Branch (2012:9): [True: 2.71k, False: 2.60k]
  ------------------
 2013|  2.60k|    if (!diff)
  ------------------
  |  Branch (2013:9): [True: 267, False: 2.33k]
  ------------------
 2014|    267|      diff |= (FDKmemcmp(&tmpLoud, &(hLoudnessInfoSet->loudnessInfoAlbum[i]),
 2015|    267|                         sizeof(LOUDNESS_INFO)) != 0);
 2016|  2.60k|    hLoudnessInfoSet->loudnessInfoAlbum[i] = tmpLoud;
 2017|  2.60k|  }
 2018|       |
 2019|  5.19k|  hLoudnessInfoSet->loudnessInfoCount =
 2020|  5.19k|      fMin(hLoudnessInfoSet->loudnessInfoCountV0, (UCHAR)12);
 2021|  13.8k|  for (i = 0; i < hLoudnessInfoSet->loudnessInfoCountV0; i++) {
  ------------------
  |  Branch (2021:15): [True: 8.73k, False: 5.10k]
  ------------------
 2022|  8.73k|    LOUDNESS_INFO tmpLoud;
 2023|  8.73k|    FDKmemclear(&tmpLoud, sizeof(LOUDNESS_INFO));
 2024|  8.73k|    err = _readLoudnessInfo(hBs, 0, &tmpLoud);
 2025|  8.73k|    if (err) return err;
  ------------------
  |  Branch (2025:9): [True: 90, False: 8.64k]
  ------------------
 2026|  8.64k|    if (i >= 12) continue;
  ------------------
  |  Branch (2026:9): [True: 3.23k, False: 5.40k]
  ------------------
 2027|  5.40k|    if (!diff)
  ------------------
  |  Branch (2027:9): [True: 1.85k, False: 3.54k]
  ------------------
 2028|  1.85k|      diff |= (FDKmemcmp(&tmpLoud, &(hLoudnessInfoSet->loudnessInfo[i]),
 2029|  1.85k|                         sizeof(LOUDNESS_INFO)) != 0);
 2030|  5.40k|    hLoudnessInfoSet->loudnessInfo[i] = tmpLoud;
 2031|  5.40k|  }
 2032|       |
 2033|  5.10k|  diff |= _compAssign(&hLoudnessInfoSet->loudnessInfoSetExtPresent,
 2034|  5.10k|                      FDKreadBits(hBs, 1));
 2035|  5.10k|  hLoudnessInfoSet->diff = diff;
 2036|       |
 2037|  5.10k|  if (hLoudnessInfoSet->loudnessInfoSetExtPresent) {
  ------------------
  |  Branch (2037:7): [True: 1.09k, False: 4.00k]
  ------------------
 2038|  1.09k|    err = _readLoudnessInfoSetExtension(hBs, hLoudnessInfoSet);
 2039|  1.09k|    if (err) return err;
  ------------------
  |  Branch (2039:9): [True: 540, False: 554]
  ------------------
 2040|  1.09k|  }
 2041|       |
 2042|  4.56k|  return err;
 2043|  5.10k|}
drcDec_reader.cpp:_ZL11_compAssignPhh:
  139|   246k|static inline int _compAssign(UCHAR* dest, const UCHAR src) {
  140|   246k|  int diff = 0;
  141|   246k|  if (*dest != src) diff = 1;
  ------------------
  |  Branch (141:7): [True: 67.8k, False: 178k]
  ------------------
  142|   246k|  *dest = src;
  143|   246k|  return diff;
  144|   246k|}
drcDec_reader.cpp:_ZL11_compAssignPjj:
  146|    958|static inline int _compAssign(ULONG* dest, const ULONG src) {
  147|    958|  int diff = 0;
  148|    958|  if (*dest != src) diff = 1;
  ------------------
  |  Branch (148:7): [True: 525, False: 433]
  ------------------
  149|    958|  *dest = src;
  150|    958|  return diff;
  151|    958|}
drcDec_reader.cpp:_ZL18_readChannelLayoutP13FDK_BITSTREAMP14CHANNEL_LAYOUT:
 1478|  33.3k|                                    CHANNEL_LAYOUT* pChan) {
 1479|  33.3k|  DRC_ERROR err = DE_OK;
 1480|       |
 1481|  33.3k|  pChan->baseChannelCount = FDKreadBits(hBs, 7);
 1482|       |
 1483|  33.3k|  if (pChan->baseChannelCount > 8) return DE_NOT_OK;
  ------------------
  |  Branch (1483:7): [True: 199, False: 33.1k]
  ------------------
 1484|       |
 1485|  33.1k|  pChan->layoutSignalingPresent = FDKreadBits(hBs, 1);
 1486|       |
 1487|  33.1k|  if (pChan->layoutSignalingPresent) {
  ------------------
  |  Branch (1487:7): [True: 6.88k, False: 26.2k]
  ------------------
 1488|  6.88k|    pChan->definedLayout = FDKreadBits(hBs, 8);
 1489|       |
 1490|  6.88k|    if (pChan->definedLayout == 0) {
  ------------------
  |  Branch (1490:9): [True: 411, False: 6.47k]
  ------------------
 1491|    411|      int i;
 1492|  2.02k|      for (i = 0; i < pChan->baseChannelCount; i++) {
  ------------------
  |  Branch (1492:19): [True: 1.61k, False: 411]
  ------------------
 1493|  1.61k|        if (i < 8) {
  ------------------
  |  Branch (1493:13): [True: 1.61k, False: 0]
  ------------------
 1494|  1.61k|          pChan->speakerPosition[i] = FDKreadBits(hBs, 7);
 1495|  1.61k|        } else {
 1496|      0|          FDKpushFor(hBs, 7);
 1497|      0|        }
 1498|  1.61k|      }
 1499|    411|    }
 1500|  6.88k|  }
 1501|  33.1k|  return err;
 1502|  33.3k|}
drcDec_reader.cpp:_ZL24_readDownmixInstructionsP13FDK_BITSTREAMiP14CHANNEL_LAYOUTP20DOWNMIX_INSTRUCTIONS:
 1507|  1.21M|                                          DOWNMIX_INSTRUCTIONS* pDown) {
 1508|  1.21M|  DRC_ERROR err = DE_OK;
 1509|       |
 1510|  1.21M|  pDown->downmixId = FDKreadBits(hBs, 7);
 1511|  1.21M|  pDown->targetChannelCount = FDKreadBits(hBs, 7);
 1512|  1.21M|  pDown->targetLayout = FDKreadBits(hBs, 8);
 1513|  1.21M|  pDown->downmixCoefficientsPresent = FDKreadBits(hBs, 1);
 1514|       |
 1515|  1.21M|  if (pDown->downmixCoefficientsPresent) {
  ------------------
  |  Branch (1515:7): [True: 3.66k, False: 1.20M]
  ------------------
 1516|  3.66k|    int nDownmixCoeffs = pDown->targetChannelCount * pChan->baseChannelCount;
 1517|  3.66k|    int i;
 1518|  3.66k|    if (nDownmixCoeffs > 8 * 8) return DE_NOT_OK;
  ------------------
  |  Branch (1518:9): [True: 178, False: 3.48k]
  ------------------
 1519|  3.48k|    if (version == 0) {
  ------------------
  |  Branch (1519:9): [True: 2.47k, False: 1.01k]
  ------------------
 1520|  2.47k|      pDown->bsDownmixOffset = 0;
 1521|  21.5k|      for (i = 0; i < nDownmixCoeffs; i++) {
  ------------------
  |  Branch (1521:19): [True: 19.0k, False: 2.47k]
  ------------------
 1522|       |        /* LFE downmix coefficients are not supported. */
 1523|  19.0k|        pDown->downmixCoefficient[i] = downmixCoeff[FDKreadBits(hBs, 4)];
 1524|  19.0k|      }
 1525|  2.47k|    } else {
 1526|  1.01k|      pDown->bsDownmixOffset = FDKreadBits(hBs, 4);
 1527|  5.89k|      for (i = 0; i < nDownmixCoeffs; i++) {
  ------------------
  |  Branch (1527:19): [True: 4.87k, False: 1.01k]
  ------------------
 1528|  4.87k|        pDown->downmixCoefficient[i] = downmixCoeffV1[FDKreadBits(hBs, 5)];
 1529|  4.87k|      }
 1530|  1.01k|    }
 1531|  3.48k|  }
 1532|  1.21M|  return err;
 1533|  1.21M|}
drcDec_reader.cpp:_ZL25_skipDrcCoefficientsBasicP13FDK_BITSTREAM:
 1104|  4.40k|static void _skipDrcCoefficientsBasic(HANDLE_FDK_BITSTREAM hBs) {
 1105|  4.40k|  FDKpushFor(hBs, 4); /* drcLocation */
 1106|  4.40k|  FDKpushFor(hBs, 7); /* drcCharacteristic */
 1107|  4.40k|}
drcDec_reader.cpp:_ZL25_skipDrcInstructionsBasicP13FDK_BITSTREAM:
 1215|  19.5k|static void _skipDrcInstructionsBasic(HANDLE_FDK_BITSTREAM hBs) {
 1216|  19.5k|  int drcSetEffect;
 1217|  19.5k|  int additionalDownmixIdPresent, additionalDownmixIdCount,
 1218|  19.5k|      limiterPeakTargetPresent;
 1219|  19.5k|  int drcSetTargetLoudnessPresent, drcSetTargetLoudnessValueLowerPresent;
 1220|       |
 1221|  19.5k|  FDKpushFor(hBs, 6); /* drcSetId */
 1222|  19.5k|  FDKpushFor(hBs, 4); /* drcLocation */
 1223|  19.5k|  FDKpushFor(hBs, 7); /* downmixId */
 1224|  19.5k|  additionalDownmixIdPresent = FDKreadBits(hBs, 1);
 1225|  19.5k|  if (additionalDownmixIdPresent) {
  ------------------
  |  Branch (1225:7): [True: 1.87k, False: 17.6k]
  ------------------
 1226|  1.87k|    additionalDownmixIdCount = FDKreadBits(hBs, 3);
 1227|  1.87k|    FDKpushFor(hBs, 7 * additionalDownmixIdCount); /* additionalDownmixId */
 1228|  1.87k|  }
 1229|       |
 1230|  19.5k|  drcSetEffect = FDKreadBits(hBs, 16);
 1231|  19.5k|  if (!(drcSetEffect & (EB_DUCK_OTHER | EB_DUCK_SELF))) {
  ------------------
  |  Branch (1231:7): [True: 18.2k, False: 1.28k]
  ------------------
 1232|  18.2k|    limiterPeakTargetPresent = FDKreadBits(hBs, 1);
 1233|  18.2k|    if (limiterPeakTargetPresent) {
  ------------------
  |  Branch (1233:9): [True: 1.29k, False: 16.9k]
  ------------------
 1234|  1.29k|      FDKpushFor(hBs, 8); /* bsLimiterPeakTarget */
 1235|  1.29k|    }
 1236|  18.2k|  }
 1237|       |
 1238|  19.5k|  drcSetTargetLoudnessPresent = FDKreadBits(hBs, 1);
 1239|  19.5k|  if (drcSetTargetLoudnessPresent) {
  ------------------
  |  Branch (1239:7): [True: 1.69k, False: 17.8k]
  ------------------
 1240|  1.69k|    FDKpushFor(hBs, 6); /* bsDrcSetTargetLoudnessValueUpper */
 1241|  1.69k|    drcSetTargetLoudnessValueLowerPresent = FDKreadBits(hBs, 1);
 1242|  1.69k|    if (drcSetTargetLoudnessValueLowerPresent) {
  ------------------
  |  Branch (1242:9): [True: 788, False: 911]
  ------------------
 1243|    788|      FDKpushFor(hBs, 6); /* bsDrcSetTargetLoudnessValueLower */
 1244|    788|    }
 1245|  1.69k|  }
 1246|  19.5k|}
drcDec_reader.cpp:_ZL26_readDrcCoefficientsUniDrcP13FDK_BITSTREAMiP24DRC_COEFFICIENTS_UNI_DRC:
 1111|  76.9k|                                            DRC_COEFFICIENTS_UNI_DRC* pCoef) {
 1112|  76.9k|  DRC_ERROR err = DE_OK;
 1113|  76.9k|  int i, bsDrcFrameSize;
 1114|  76.9k|  int gainSequenceIndex = -1;
 1115|       |
 1116|  76.9k|  pCoef->drcLocation = FDKreadBits(hBs, 4);
 1117|  76.9k|  pCoef->drcFrameSizePresent = FDKreadBits(hBs, 1);
 1118|       |
 1119|  76.9k|  if (pCoef->drcFrameSizePresent == 1) {
  ------------------
  |  Branch (1119:7): [True: 4.12k, False: 72.7k]
  ------------------
 1120|  4.12k|    bsDrcFrameSize = FDKreadBits(hBs, 15);
 1121|  4.12k|    pCoef->drcFrameSize = bsDrcFrameSize + 1;
 1122|  4.12k|  }
 1123|  76.9k|  if (version == 0) {
  ------------------
  |  Branch (1123:7): [True: 50.1k, False: 26.7k]
  ------------------
 1124|  50.1k|    int gainSequenceCount = 0, gainSetCount;
 1125|  50.1k|    pCoef->characteristicLeftCount = 0;
 1126|  50.1k|    pCoef->characteristicRightCount = 0;
 1127|  50.1k|    gainSetCount = FDKreadBits(hBs, 6);
 1128|  50.1k|    pCoef->gainSetCount = fMin(gainSetCount, 12);
 1129|  82.5k|    for (i = 0; i < gainSetCount; i++) {
  ------------------
  |  Branch (1129:17): [True: 32.4k, False: 50.0k]
  ------------------
 1130|  32.4k|      GAIN_SET tmpGset;
 1131|  32.4k|      FDKmemclear(&tmpGset, sizeof(GAIN_SET));
 1132|  32.4k|      err = _readGainSet(hBs, version, &gainSequenceIndex, &tmpGset, 0);
 1133|  32.4k|      if (err) return err;
  ------------------
  |  Branch (1133:11): [True: 89, False: 32.4k]
  ------------------
 1134|  32.4k|      gainSequenceCount += tmpGset.bandCount;
 1135|       |
 1136|  32.4k|      if (i >= 12) continue;
  ------------------
  |  Branch (1136:11): [True: 20.0k, False: 12.3k]
  ------------------
 1137|  12.3k|      pCoef->gainSet[i] = tmpGset;
 1138|  12.3k|    }
 1139|  50.0k|    pCoef->gainSequenceCount = gainSequenceCount;
 1140|  50.0k|  } else { /* (version == 1) */
 1141|  26.7k|    UCHAR drcCharacteristicLeftPresent, drcCharacteristicRightPresent;
 1142|  26.7k|    UCHAR shapeFiltersPresent, shapeFilterCount, tmpPresent;
 1143|  26.7k|    int gainSetCount;
 1144|  26.7k|    drcCharacteristicLeftPresent = FDKreadBits(hBs, 1);
 1145|  26.7k|    if (drcCharacteristicLeftPresent) {
  ------------------
  |  Branch (1145:9): [True: 2.18k, False: 24.5k]
  ------------------
 1146|  2.18k|      pCoef->characteristicLeftCount = FDKreadBits(hBs, 4);
 1147|  2.18k|      if ((pCoef->characteristicLeftCount + 1) > 16) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (1147:11): [True: 0, False: 2.18k]
  ------------------
 1148|  8.42k|      for (i = 0; i < pCoef->characteristicLeftCount; i++) {
  ------------------
  |  Branch (1148:19): [True: 6.23k, False: 2.18k]
  ------------------
 1149|  6.23k|        err = _readCustomDrcCharacteristic(
 1150|  6.23k|            hBs, CS_LEFT, &(pCoef->characteristicLeftFormat[i + 1]),
 1151|  6.23k|            &(pCoef->customCharacteristicLeft[i + 1]), 0);
 1152|  6.23k|        if (err) return err;
  ------------------
  |  Branch (1152:13): [True: 0, False: 6.23k]
  ------------------
 1153|  6.23k|      }
 1154|  2.18k|    }
 1155|  26.7k|    drcCharacteristicRightPresent = FDKreadBits(hBs, 1);
 1156|  26.7k|    if (drcCharacteristicRightPresent) {
  ------------------
  |  Branch (1156:9): [True: 2.05k, False: 24.7k]
  ------------------
 1157|  2.05k|      pCoef->characteristicRightCount = FDKreadBits(hBs, 4);
 1158|  2.05k|      if ((pCoef->characteristicRightCount + 1) > 16) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (1158:11): [True: 0, False: 2.05k]
  ------------------
 1159|  8.08k|      for (i = 0; i < pCoef->characteristicRightCount; i++) {
  ------------------
  |  Branch (1159:19): [True: 6.03k, False: 2.05k]
  ------------------
 1160|  6.03k|        err = _readCustomDrcCharacteristic(
 1161|  6.03k|            hBs, CS_RIGHT, &(pCoef->characteristicRightFormat[i + 1]),
 1162|  6.03k|            &(pCoef->customCharacteristicRight[i + 1]), 0);
 1163|  6.03k|        if (err) return err;
  ------------------
  |  Branch (1163:13): [True: 0, False: 6.03k]
  ------------------
 1164|  6.03k|      }
 1165|  2.05k|    }
 1166|  26.7k|    shapeFiltersPresent = FDKreadBits(hBs, 1);
 1167|  26.7k|    if (shapeFiltersPresent) {
  ------------------
  |  Branch (1167:9): [True: 3.39k, False: 23.3k]
  ------------------
 1168|  3.39k|      shapeFilterCount = FDKreadBits(hBs, 4);
 1169|  23.6k|      for (i = 0; i < shapeFilterCount; i++) {
  ------------------
  |  Branch (1169:19): [True: 20.2k, False: 3.39k]
  ------------------
 1170|  20.2k|        tmpPresent = FDKreadBits(hBs, 1);
 1171|  20.2k|        if (tmpPresent) /* lfCutParams */
  ------------------
  |  Branch (1171:13): [True: 4.41k, False: 15.8k]
  ------------------
 1172|  4.41k|          FDKpushFor(hBs, 5);
 1173|       |
 1174|  20.2k|        tmpPresent = FDKreadBits(hBs, 1);
 1175|  20.2k|        if (tmpPresent) /* lfBoostParams */
  ------------------
  |  Branch (1175:13): [True: 4.60k, False: 15.6k]
  ------------------
 1176|  4.60k|          FDKpushFor(hBs, 5);
 1177|       |
 1178|  20.2k|        tmpPresent = FDKreadBits(hBs, 1);
 1179|  20.2k|        if (tmpPresent) /* hfCutParams */
  ------------------
  |  Branch (1179:13): [True: 4.91k, False: 15.3k]
  ------------------
 1180|  4.91k|          FDKpushFor(hBs, 5);
 1181|       |
 1182|  20.2k|        tmpPresent = FDKreadBits(hBs, 1);
 1183|  20.2k|        if (tmpPresent) /* hfBoostParams */
  ------------------
  |  Branch (1183:13): [True: 2.72k, False: 17.5k]
  ------------------
 1184|  2.72k|          FDKpushFor(hBs, 5);
 1185|  20.2k|      }
 1186|  3.39k|    }
 1187|  26.7k|    pCoef->gainSequenceCount = FDKreadBits(hBs, 6);
 1188|  26.7k|    gainSetCount = FDKreadBits(hBs, 6);
 1189|  26.7k|    pCoef->gainSetCount = fMin(gainSetCount, 12);
 1190|  82.6k|    for (i = 0; i < gainSetCount; i++) {
  ------------------
  |  Branch (1190:17): [True: 55.9k, False: 26.6k]
  ------------------
 1191|  55.9k|      GAIN_SET tmpGset;
 1192|  55.9k|      FDKmemclear(&tmpGset, sizeof(GAIN_SET));
 1193|  55.9k|      err = _readGainSet(hBs, version, &gainSequenceIndex, &tmpGset, 0);
 1194|  55.9k|      if (err) return err;
  ------------------
  |  Branch (1194:11): [True: 90, False: 55.8k]
  ------------------
 1195|       |
 1196|  55.8k|      if (i >= 12) continue;
  ------------------
  |  Branch (1196:11): [True: 30.1k, False: 25.6k]
  ------------------
 1197|  25.6k|      pCoef->gainSet[i] = tmpGset;
 1198|  25.6k|    }
 1199|  26.7k|  }
 1200|   997k|  for (i = 0; i < 12; i++) {
  ------------------
  |  Branch (1200:15): [True: 920k, False: 76.7k]
  ------------------
 1201|   920k|    pCoef->gainSetIndexForGainSequence[i] = 255;
 1202|   920k|  }
 1203|   114k|  for (i = 0; i < pCoef->gainSetCount; i++) {
  ------------------
  |  Branch (1203:15): [True: 37.8k, False: 76.7k]
  ------------------
 1204|  37.8k|    int b;
 1205|  54.3k|    for (b = 0; b < pCoef->gainSet[i].bandCount; b++) {
  ------------------
  |  Branch (1205:17): [True: 16.4k, False: 37.8k]
  ------------------
 1206|  16.4k|      if (pCoef->gainSet[i].gainSequenceIndex[b] >= 12) continue;
  ------------------
  |  Branch (1206:11): [True: 4.45k, False: 12.0k]
  ------------------
 1207|  12.0k|      pCoef->gainSetIndexForGainSequence[pCoef->gainSet[i]
 1208|  12.0k|                                             .gainSequenceIndex[b]] = i;
 1209|  12.0k|    }
 1210|  37.8k|  }
 1211|       |
 1212|  76.7k|  return err;
 1213|  76.9k|}
drcDec_reader.cpp:_ZL12_readGainSetP13FDK_BITSTREAMiPiP8GAIN_SETi:
  708|  88.4k|                              int isBox) {
  709|  88.4k|  if (isBox) FDKpushFor(hBs, 2); /* reserved */
  ------------------
  |  Branch (709:7): [True: 0, False: 88.4k]
  ------------------
  710|  88.4k|  pGSet->gainCodingProfile = FDKreadBits(hBs, 2);
  711|  88.4k|  pGSet->gainInterpolationType = FDKreadBits(hBs, 1);
  712|  88.4k|  pGSet->fullFrame = FDKreadBits(hBs, 1);
  713|  88.4k|  pGSet->timeAlignment = FDKreadBits(hBs, 1);
  714|  88.4k|  pGSet->timeDeltaMinPresent = FDKreadBits(hBs, 1);
  715|       |
  716|  88.4k|  if (pGSet->timeDeltaMinPresent) {
  ------------------
  |  Branch (716:7): [True: 2.22k, False: 86.1k]
  ------------------
  717|  2.22k|    int bsTimeDeltaMin;
  718|  2.22k|    if (isBox) FDKpushFor(hBs, 5); /* reserved */
  ------------------
  |  Branch (718:9): [True: 0, False: 2.22k]
  ------------------
  719|  2.22k|    bsTimeDeltaMin = FDKreadBits(hBs, 11);
  720|  2.22k|    pGSet->timeDeltaMin = bsTimeDeltaMin + 1;
  721|  2.22k|  }
  722|       |
  723|  88.4k|  if (pGSet->gainCodingProfile != GCP_CONSTANT) {
  ------------------
  |  Branch (723:7): [True: 83.6k, False: 4.75k]
  ------------------
  724|  83.6k|    int i;
  725|  83.6k|    if (isBox) FDKpushFor(hBs, 3); /* reserved */
  ------------------
  |  Branch (725:9): [True: 0, False: 83.6k]
  ------------------
  726|  83.6k|    pGSet->bandCount = FDKreadBits(hBs, 4);
  727|  83.6k|    if (pGSet->bandCount > 4) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (727:9): [True: 179, False: 83.4k]
  ------------------
  728|       |
  729|  83.4k|    if ((pGSet->bandCount > 1) || isBox) {
  ------------------
  |  Branch (729:9): [True: 3.57k, False: 79.9k]
  |  Branch (729:35): [True: 0, False: 79.9k]
  ------------------
  730|  3.57k|      pGSet->drcBandType = FDKreadBits(hBs, 1);
  731|  3.57k|    }
  732|       |
  733|  95.4k|    for (i = 0; i < pGSet->bandCount; i++) {
  ------------------
  |  Branch (733:17): [True: 11.9k, False: 83.4k]
  ------------------
  734|  11.9k|      if (version == 0) {
  ------------------
  |  Branch (734:11): [True: 2.53k, False: 9.40k]
  ------------------
  735|  2.53k|        *gainSequenceIndex = (*gainSequenceIndex) + 1;
  736|  9.40k|      } else {
  737|  9.40k|        int indexPresent;
  738|  9.40k|        indexPresent = (isBox) ? 1 : FDKreadBits(hBs, 1);
  ------------------
  |  Branch (738:24): [True: 0, False: 9.40k]
  ------------------
  739|  9.40k|        if (indexPresent) {
  ------------------
  |  Branch (739:13): [True: 2.78k, False: 6.61k]
  ------------------
  740|  2.78k|          int bsIndex;
  741|  2.78k|          bsIndex = FDKreadBits(hBs, 6);
  742|  2.78k|          *gainSequenceIndex = bsIndex;
  743|  6.61k|        } else {
  744|  6.61k|          *gainSequenceIndex = (*gainSequenceIndex) + 1;
  745|  6.61k|        }
  746|  9.40k|      }
  747|  11.9k|      pGSet->gainSequenceIndex[i] = *gainSequenceIndex;
  748|  11.9k|      _readDrcCharacteristic(hBs, version, &(pGSet->drcCharacteristic[i]),
  749|  11.9k|                             isBox);
  750|  11.9k|    }
  751|  90.5k|    for (i = 1; i < pGSet->bandCount; i++) {
  ------------------
  |  Branch (751:17): [True: 7.09k, False: 83.4k]
  ------------------
  752|  7.09k|      _readBandBorder(hBs, &(pGSet->bandBorder[i]), pGSet->drcBandType, isBox);
  753|  7.09k|    }
  754|  83.4k|  } else {
  755|  4.75k|    pGSet->bandCount = 1;
  756|  4.75k|    *gainSequenceIndex = (*gainSequenceIndex) + 1;
  757|  4.75k|    pGSet->gainSequenceIndex[0] = *gainSequenceIndex;
  758|  4.75k|  }
  759|       |
  760|  88.2k|  return DE_OK;
  761|  88.4k|}
drcDec_reader.cpp:_ZL22_readDrcCharacteristicP13FDK_BITSTREAMiP18DRC_CHARACTERISTICi:
  669|  11.9k|                                   DRC_CHARACTERISTIC* pDChar, int isBox) {
  670|  11.9k|  if (version == 0) {
  ------------------
  |  Branch (670:7): [True: 2.53k, False: 9.40k]
  ------------------
  671|  2.53k|    if (isBox) FDKpushFor(hBs, 1); /* reserved */
  ------------------
  |  Branch (671:9): [True: 0, False: 2.53k]
  ------------------
  672|  2.53k|    pDChar->cicpIndex = FDKreadBits(hBs, 7);
  673|  2.53k|    if (pDChar->cicpIndex > 0) {
  ------------------
  |  Branch (673:9): [True: 1.19k, False: 1.33k]
  ------------------
  674|  1.19k|      pDChar->present = 1;
  675|  1.19k|      pDChar->isCICP = 1;
  676|  1.33k|    } else {
  677|  1.33k|      pDChar->present = 0;
  678|  1.33k|    }
  679|  9.40k|  } else {
  680|  9.40k|    pDChar->present = FDKreadBits(hBs, 1);
  681|  9.40k|    if (isBox) pDChar->isCICP = FDKreadBits(hBs, 1);
  ------------------
  |  Branch (681:9): [True: 0, False: 9.40k]
  ------------------
  682|  9.40k|    if (pDChar->present) {
  ------------------
  |  Branch (682:9): [True: 3.16k, False: 6.23k]
  ------------------
  683|  3.16k|      if (!isBox) pDChar->isCICP = FDKreadBits(hBs, 1);
  ------------------
  |  Branch (683:11): [True: 3.16k, False: 0]
  ------------------
  684|  3.16k|      if (pDChar->isCICP) {
  ------------------
  |  Branch (684:11): [True: 1.10k, False: 2.05k]
  ------------------
  685|  1.10k|        if (isBox) FDKpushFor(hBs, 1); /* reserved */
  ------------------
  |  Branch (685:13): [True: 0, False: 1.10k]
  ------------------
  686|  1.10k|        pDChar->cicpIndex = FDKreadBits(hBs, 7);
  687|  2.05k|      } else {
  688|  2.05k|        pDChar->custom.left = FDKreadBits(hBs, 4);
  689|  2.05k|        pDChar->custom.right = FDKreadBits(hBs, 4);
  690|  2.05k|      }
  691|  3.16k|    }
  692|  9.40k|  }
  693|  11.9k|}
drcDec_reader.cpp:_ZL15_readBandBorderP13FDK_BITSTREAMP11BAND_BORDERii:
  696|  7.09k|                            int drcBandType, int isBox) {
  697|  7.09k|  if (drcBandType) {
  ------------------
  |  Branch (697:7): [True: 4.01k, False: 3.07k]
  ------------------
  698|  4.01k|    if (isBox) FDKpushFor(hBs, 4); /* reserved */
  ------------------
  |  Branch (698:9): [True: 0, False: 4.01k]
  ------------------
  699|  4.01k|    pBBord->crossoverFreqIndex = FDKreadBits(hBs, 4);
  700|  4.01k|  } else {
  701|  3.07k|    if (isBox) FDKpushFor(hBs, 6); /* reserved */
  ------------------
  |  Branch (701:9): [True: 0, False: 3.07k]
  ------------------
  702|  3.07k|    pBBord->startSubBandIndex = FDKreadBits(hBs, 10);
  703|  3.07k|  }
  704|  7.09k|}
drcDec_reader.cpp:_ZL28_readCustomDrcCharacteristicP13FDK_BITSTREAM19CHARACTERISTIC_SIDEPhP15CUSTOM_DRC_CHARi:
  767|  12.2k|                                              int isBox) {
  768|  12.2k|  if (isBox) FDKpushFor(hBs, 7); /* reserved */
  ------------------
  |  Branch (768:7): [True: 0, False: 12.2k]
  ------------------
  769|  12.2k|  *pCharacteristicFormat = FDKreadBits(hBs, 1);
  770|  12.2k|  if (*pCharacteristicFormat == CF_SIGMOID) {
  ------------------
  |  Branch (770:7): [True: 10.0k, False: 2.26k]
  ------------------
  771|  10.0k|    int bsGain, bsIoRatio, bsExp;
  772|  10.0k|    if (isBox) FDKpushFor(hBs, 1); /* reserved */
  ------------------
  |  Branch (772:9): [True: 0, False: 10.0k]
  ------------------
  773|  10.0k|    bsGain = FDKreadBits(hBs, 6);
  774|  10.0k|    if (side == CS_LEFT) {
  ------------------
  |  Branch (774:9): [True: 4.70k, False: 5.29k]
  ------------------
  775|  4.70k|      pCChar->sigmoid.gain = (FIXP_SGL)(bsGain << (FRACT_BITS - 1 - 6));
  ------------------
  |  |  112|  4.70k|#define FRACT_BITS 16  /* single precision */
  ------------------
  776|  5.29k|    } else {
  777|  5.29k|      pCChar->sigmoid.gain = (FIXP_SGL)(-bsGain << (FRACT_BITS - 1 - 6));
  ------------------
  |  |  112|  5.29k|#define FRACT_BITS 16  /* single precision */
  ------------------
  778|  5.29k|    }
  779|  10.0k|    bsIoRatio = FDKreadBits(hBs, 4);
  780|       |    /* pCChar->sigmoid.ioRatio = 0.05 + 0.15 * bsIoRatio; */
  781|  10.0k|    pCChar->sigmoid.ioRatio =
  782|  10.0k|        FL2FXCONST_SGL(0.05f / (float)(1 << 2)) +
  ------------------
  |  |  180|  10.0k|  (FIXP_SGL)(                                                                \
  |  |  181|  10.0k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 10.0k, Folded]
  |  |  ------------------
  |  |  182|  10.0k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  10.0k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  10.0k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 10.0k]
  |  |  ------------------
  |  |  183|  10.0k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  10.0k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  10.0k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  10.0k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  10.0k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  10.0k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  10.0k|          : ((((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|  10.0k|        (FIXP_SGL)((((3 * bsIoRatio) << (FRACT_BITS - 1)) / 5) >> 4);
  ------------------
  |  |  112|  10.0k|#define FRACT_BITS 16  /* single precision */
  ------------------
  784|  10.0k|    bsExp = FDKreadBits(hBs, 4);
  785|  10.0k|    if (bsExp < 15) {
  ------------------
  |  Branch (785:9): [True: 9.55k, False: 452]
  ------------------
  786|  9.55k|      pCChar->sigmoid.exp = (FIXP_SGL)((1 + 2 * bsExp) << (FRACT_BITS - 1 - 5));
  ------------------
  |  |  112|  9.55k|#define FRACT_BITS 16  /* single precision */
  ------------------
  787|  9.55k|    } else {
  788|    452|      pCChar->sigmoid.exp = (FIXP_SGL)MAXVAL_SGL; /* represents infinity */
  ------------------
  |  |  152|    452|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  ------------------
  789|    452|    }
  790|  10.0k|    pCChar->sigmoid.flipSign = FDKreadBits(hBs, 1);
  791|  10.0k|  } else { /* CF_NODES */
  792|  2.26k|    int i, bsCharacteristicNodeCount, bsNodeLevelDelta, bsNodeGain;
  793|  2.26k|    if (isBox) FDKpushFor(hBs, 6); /* reserved */
  ------------------
  |  Branch (793:9): [True: 0, False: 2.26k]
  ------------------
  794|  2.26k|    bsCharacteristicNodeCount = FDKreadBits(hBs, 2);
  795|  2.26k|    pCChar->nodes.characteristicNodeCount = bsCharacteristicNodeCount + 1;
  796|  2.26k|    if (pCChar->nodes.characteristicNodeCount > 4) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (796:9): [True: 0, False: 2.26k]
  ------------------
  797|  2.26k|    pCChar->nodes.nodeLevel[0] = DRC_INPUT_LOUDNESS_TARGET_SGL;
  ------------------
  |  |  140|  2.26k|#define DRC_INPUT_LOUDNESS_TARGET_SGL FL2FXCONST_SGL(-31.0f / (float)(1 << 7))
  |  |  ------------------
  |  |  |  |  180|  2.26k|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|  2.26k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [Folded, False: 2.26k]
  |  |  |  |  ------------------
  |  |  |  |  182|  2.26k|          ? ((((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|  2.26k|          : ((((double)(val) * (FRACT_FIX_SCALE)-0.5) <=                     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  2.26k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  2.26k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (186:14): [Folded, False: 2.26k]
  |  |  |  |  ------------------
  |  |  |  |  187|  2.26k|              (double)(MINVAL_SGL_CONST))                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  177|  2.26k|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|  2.26k|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  188|  2.26k|                 ? (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|  2.26k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE)-0.5)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  2.26k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  2.26k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  798|  2.26k|    pCChar->nodes.nodeGain[0] = (FIXP_SGL)0;
  799|  7.20k|    for (i = 0; i < pCChar->nodes.characteristicNodeCount; i++) {
  ------------------
  |  Branch (799:17): [True: 4.93k, False: 2.26k]
  ------------------
  800|  4.93k|      if (isBox) FDKpushFor(hBs, 3); /* reserved */
  ------------------
  |  Branch (800:11): [True: 0, False: 4.93k]
  ------------------
  801|  4.93k|      bsNodeLevelDelta = FDKreadBits(hBs, 5);
  802|  4.93k|      if (side == CS_LEFT) {
  ------------------
  |  Branch (802:11): [True: 3.20k, False: 1.72k]
  ------------------
  803|  3.20k|        pCChar->nodes.nodeLevel[i + 1] =
  804|  3.20k|            pCChar->nodes.nodeLevel[i] -
  805|  3.20k|            (FIXP_SGL)((1 + bsNodeLevelDelta) << (FRACT_BITS - 1 - 7));
  ------------------
  |  |  112|  3.20k|#define FRACT_BITS 16  /* single precision */
  ------------------
  806|  3.20k|      } else {
  807|  1.72k|        pCChar->nodes.nodeLevel[i + 1] =
  808|  1.72k|            pCChar->nodes.nodeLevel[i] +
  809|  1.72k|            (FIXP_SGL)((1 + bsNodeLevelDelta) << (FRACT_BITS - 1 - 7));
  ------------------
  |  |  112|  1.72k|#define FRACT_BITS 16  /* single precision */
  ------------------
  810|  1.72k|      }
  811|  4.93k|      bsNodeGain = FDKreadBits(hBs, 8);
  812|  4.93k|      pCChar->nodes.nodeGain[i + 1] = (FIXP_SGL)(
  813|  4.93k|          (bsNodeGain - 128)
  814|  4.93k|          << (FRACT_BITS - 1 - 1 - 7)); /* 0.5f * bsNodeGain - 64.0f; */
  ------------------
  |  |  112|  4.93k|#define FRACT_BITS 16  /* single precision */
  ------------------
  815|  4.93k|    }
  816|  2.26k|  }
  817|  12.2k|  return DE_OK;
  818|  12.2k|}
drcDec_reader.cpp:_ZL26_readDrcInstructionsUniDrcP13FDK_BITSTREAMiP14UNI_DRC_CONFIGP24DRC_INSTRUCTIONS_UNI_DRC:
 1251|   767k|                                            DRC_INSTRUCTIONS_UNI_DRC* pInst) {
 1252|   767k|  DRC_ERROR err = DE_OK;
 1253|   767k|  int i, g, c;
 1254|   767k|  int downmixIdPresent, additionalDownmixIdPresent, additionalDownmixIdCount;
 1255|   767k|  int bsLimiterPeakTarget, channelCount;
 1256|   767k|  DRC_COEFFICIENTS_UNI_DRC* pCoef = NULL;
 1257|   767k|  int repeatParameters, bsRepeatParametersCount;
 1258|   767k|  int repeatSequenceIndex, bsRepeatSequenceCount;
 1259|   767k|  SCHAR* gainSetIndex = pInst->gainSetIndex;
 1260|   767k|  SCHAR channelGroupForChannel[8];
 1261|   767k|  DUCKING_MODIFICATION duckingModificationForChannelGroup[8];
 1262|       |
 1263|   767k|  pInst->drcSetId = FDKreadBits(hBs, 6);
 1264|   767k|  if (version == 0) {
  ------------------
  |  Branch (1264:7): [True: 701k, False: 66.4k]
  ------------------
 1265|       |    /* Assume all v0 DRC sets to be manageable in terms of complexity */
 1266|   701k|    pInst->drcSetComplexityLevel = 2;
 1267|   701k|  } else {
 1268|  66.4k|    pInst->drcSetComplexityLevel = FDKreadBits(hBs, 4);
 1269|  66.4k|  }
 1270|   767k|  pInst->drcLocation = FDKreadBits(hBs, 4);
 1271|   767k|  if (version == 0) {
  ------------------
  |  Branch (1271:7): [True: 701k, False: 66.4k]
  ------------------
 1272|   701k|    downmixIdPresent = 1;
 1273|   701k|  } else {
 1274|  66.4k|    downmixIdPresent = FDKreadBits(hBs, 1);
 1275|  66.4k|  }
 1276|   767k|  if (downmixIdPresent) {
  ------------------
  |  Branch (1276:7): [True: 703k, False: 64.4k]
  ------------------
 1277|   703k|    pInst->downmixId[0] = FDKreadBits(hBs, 7);
 1278|   703k|    if (version == 0) {
  ------------------
  |  Branch (1278:9): [True: 701k, False: 2.00k]
  ------------------
 1279|   701k|      if (pInst->downmixId[0] == 0)
  ------------------
  |  Branch (1279:11): [True: 691k, False: 9.88k]
  ------------------
 1280|   691k|        pInst->drcApplyToDownmix = 0;
 1281|  9.88k|      else
 1282|  9.88k|        pInst->drcApplyToDownmix = 1;
 1283|   701k|    } else {
 1284|  2.00k|      pInst->drcApplyToDownmix = FDKreadBits(hBs, 1);
 1285|  2.00k|    }
 1286|       |
 1287|   703k|    additionalDownmixIdPresent = FDKreadBits(hBs, 1);
 1288|   703k|    if (additionalDownmixIdPresent) {
  ------------------
  |  Branch (1288:9): [True: 7.60k, False: 695k]
  ------------------
 1289|  7.60k|      additionalDownmixIdCount = FDKreadBits(hBs, 3);
 1290|  7.60k|      if ((1 + additionalDownmixIdCount) > 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (1290:11): [True: 0, False: 7.60k]
  ------------------
 1291|  28.8k|      for (i = 0; i < additionalDownmixIdCount; i++) {
  ------------------
  |  Branch (1291:19): [True: 21.1k, False: 7.60k]
  ------------------
 1292|  21.1k|        pInst->downmixId[i + 1] = FDKreadBits(hBs, 7);
 1293|  21.1k|      }
 1294|  7.60k|      pInst->downmixIdCount = 1 + additionalDownmixIdCount;
 1295|   695k|    } else {
 1296|   695k|      pInst->downmixIdCount = 1;
 1297|   695k|    }
 1298|   703k|  } else {
 1299|  64.4k|    pInst->downmixId[0] = 0;
 1300|  64.4k|    pInst->downmixIdCount = 1;
 1301|  64.4k|  }
 1302|       |
 1303|   767k|  pInst->drcSetEffect = FDKreadBits(hBs, 16);
 1304|       |
 1305|   767k|  if ((pInst->drcSetEffect & (EB_DUCK_OTHER | EB_DUCK_SELF)) == 0) {
  ------------------
  |  Branch (1305:7): [True: 760k, False: 6.94k]
  ------------------
 1306|   760k|    pInst->limiterPeakTargetPresent = FDKreadBits(hBs, 1);
 1307|   760k|    if (pInst->limiterPeakTargetPresent) {
  ------------------
  |  Branch (1307:9): [True: 1.82k, False: 759k]
  ------------------
 1308|  1.82k|      bsLimiterPeakTarget = FDKreadBits(hBs, 8);
 1309|  1.82k|      pInst->limiterPeakTarget = -(FIXP_SGL)(
 1310|  1.82k|          bsLimiterPeakTarget
 1311|  1.82k|          << (FRACT_BITS - 1 - 3 - 5)); /* - bsLimiterPeakTarget * 0.125; */
  ------------------
  |  |  112|  1.82k|#define FRACT_BITS 16  /* single precision */
  ------------------
 1312|  1.82k|    }
 1313|   760k|  }
 1314|       |
 1315|   767k|  pInst->drcSetTargetLoudnessPresent = FDKreadBits(hBs, 1);
 1316|       |
 1317|       |  /* set default values */
 1318|   767k|  pInst->drcSetTargetLoudnessValueUpper = 0;
 1319|   767k|  pInst->drcSetTargetLoudnessValueLower = -63;
 1320|       |
 1321|   767k|  if (pInst->drcSetTargetLoudnessPresent == 1) {
  ------------------
  |  Branch (1321:7): [True: 4.61k, False: 763k]
  ------------------
 1322|  4.61k|    int bsDrcSetTargetLoudnessValueUpper, bsDrcSetTargetLoudnessValueLower;
 1323|  4.61k|    int drcSetTargetLoudnessValueLowerPresent;
 1324|  4.61k|    bsDrcSetTargetLoudnessValueUpper = FDKreadBits(hBs, 6);
 1325|  4.61k|    pInst->drcSetTargetLoudnessValueUpper =
 1326|  4.61k|        bsDrcSetTargetLoudnessValueUpper - 63;
 1327|  4.61k|    drcSetTargetLoudnessValueLowerPresent = FDKreadBits(hBs, 1);
 1328|  4.61k|    if (drcSetTargetLoudnessValueLowerPresent == 1) {
  ------------------
  |  Branch (1328:9): [True: 1.92k, False: 2.69k]
  ------------------
 1329|  1.92k|      bsDrcSetTargetLoudnessValueLower = FDKreadBits(hBs, 6);
 1330|  1.92k|      pInst->drcSetTargetLoudnessValueLower =
 1331|  1.92k|          bsDrcSetTargetLoudnessValueLower - 63;
 1332|  1.92k|    }
 1333|  4.61k|  }
 1334|       |
 1335|   767k|  pInst->dependsOnDrcSetPresent = FDKreadBits(hBs, 1);
 1336|       |
 1337|   767k|  pInst->noIndependentUse = 0;
 1338|   767k|  if (pInst->dependsOnDrcSetPresent) {
  ------------------
  |  Branch (1338:7): [True: 4.41k, False: 763k]
  ------------------
 1339|  4.41k|    pInst->dependsOnDrcSet = FDKreadBits(hBs, 6);
 1340|   763k|  } else {
 1341|   763k|    pInst->noIndependentUse = FDKreadBits(hBs, 1);
 1342|   763k|  }
 1343|       |
 1344|   767k|  if (version == 0) {
  ------------------
  |  Branch (1344:7): [True: 701k, False: 66.4k]
  ------------------
 1345|   701k|    pInst->requiresEq = 0;
 1346|   701k|  } else {
 1347|  66.4k|    pInst->requiresEq = FDKreadBits(hBs, 1);
 1348|  66.4k|  }
 1349|       |
 1350|   767k|  pCoef = selectDrcCoefficients(hUniDrcConfig, pInst->drcLocation);
 1351|       |
 1352|   767k|  pInst->drcChannelCount = channelCount =
 1353|   767k|      hUniDrcConfig->channelLayout.baseChannelCount;
 1354|       |
 1355|   767k|  if (pInst->drcSetEffect & (EB_DUCK_OTHER | EB_DUCK_SELF)) {
  ------------------
  |  Branch (1355:7): [True: 6.94k, False: 760k]
  ------------------
 1356|  6.94k|    DUCKING_MODIFICATION* pDModForChannel =
 1357|  6.94k|        pInst->duckingModificationForChannel;
 1358|  6.94k|    c = 0;
 1359|  21.2k|    while (c < channelCount) {
  ------------------
  |  Branch (1359:12): [True: 14.5k, False: 6.70k]
  ------------------
 1360|  14.5k|      int bsGainSetIndex;
 1361|  14.5k|      bsGainSetIndex = FDKreadBits(hBs, 6);
 1362|  14.5k|      if (c >= 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (1362:11): [True: 0, False: 14.5k]
  ------------------
 1363|  14.5k|      gainSetIndex[c] = bsGainSetIndex - 1;
 1364|  14.5k|      _decodeDuckingModification(hBs, &(pDModForChannel[c]), 0);
 1365|       |
 1366|  14.5k|      c++;
 1367|  14.5k|      repeatParameters = FDKreadBits(hBs, 1);
 1368|  14.5k|      if (repeatParameters == 1) {
  ------------------
  |  Branch (1368:11): [True: 1.35k, False: 13.1k]
  ------------------
 1369|  1.35k|        bsRepeatParametersCount = FDKreadBits(hBs, 5);
 1370|  1.35k|        bsRepeatParametersCount += 1;
 1371|  6.95k|        for (i = 0; i < bsRepeatParametersCount; i++) {
  ------------------
  |  Branch (1371:21): [True: 5.83k, False: 1.11k]
  ------------------
 1372|  5.83k|          if (c >= 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (1372:15): [True: 241, False: 5.59k]
  ------------------
 1373|  5.59k|          gainSetIndex[c] = gainSetIndex[c - 1];
 1374|  5.59k|          pDModForChannel[c] = pDModForChannel[c - 1];
 1375|  5.59k|          c++;
 1376|  5.59k|        }
 1377|  1.35k|      }
 1378|  14.5k|    }
 1379|  6.70k|    if (c > channelCount) {
  ------------------
  |  Branch (1379:9): [True: 87, False: 6.61k]
  ------------------
 1380|     87|      return DE_NOT_OK;
 1381|     87|    }
 1382|       |
 1383|  6.61k|    err = deriveDrcChannelGroups(
 1384|  6.61k|        pInst->drcSetEffect, pInst->drcChannelCount, gainSetIndex,
 1385|  6.61k|        pDModForChannel, &pInst->nDrcChannelGroups,
 1386|  6.61k|        pInst->gainSetIndexForChannelGroup, channelGroupForChannel,
 1387|  6.61k|        duckingModificationForChannelGroup);
 1388|  6.61k|    if (err) return (err);
  ------------------
  |  Branch (1388:9): [True: 998, False: 5.61k]
  ------------------
 1389|   760k|  } else {
 1390|   760k|    int deriveChannelCount = 0;
 1391|   760k|    if (((version == 0) || (pInst->drcApplyToDownmix != 0)) &&
  ------------------
  |  Branch (1391:10): [True: 695k, False: 65.4k]
  |  Branch (1391:28): [True: 636, False: 64.7k]
  ------------------
 1392|   696k|        (pInst->downmixId[0] != DOWNMIX_ID_BASE_LAYOUT) &&
  ------------------
  |  |  122|   696k|#define DOWNMIX_ID_BASE_LAYOUT 0x0
  ------------------
  |  Branch (1392:9): [True: 6.33k, False: 689k]
  ------------------
 1393|  6.33k|        (pInst->downmixId[0] != DOWNMIX_ID_ANY_DOWNMIX) &&
  ------------------
  |  |  123|  6.33k|#define DOWNMIX_ID_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (1393:9): [True: 5.86k, False: 475]
  ------------------
 1394|  5.86k|        (pInst->downmixIdCount == 1)) {
  ------------------
  |  Branch (1394:9): [True: 2.24k, False: 3.61k]
  ------------------
 1395|  2.24k|      if (hUniDrcConfig->downmixInstructionsCount != 0) {
  ------------------
  |  Branch (1395:11): [True: 751, False: 1.49k]
  ------------------
 1396|    751|        DOWNMIX_INSTRUCTIONS* pDown =
 1397|    751|            selectDownmixInstructions(hUniDrcConfig, pInst->downmixId[0]);
 1398|    751|        if (pDown == NULL) return DE_NOT_OK;
  ------------------
  |  Branch (1398:13): [True: 244, False: 507]
  ------------------
 1399|    507|        pInst->drcChannelCount = channelCount =
 1400|    507|            pDown->targetChannelCount; /* targetChannelCountFromDownmixId*/
 1401|  1.49k|      } else {
 1402|  1.49k|        deriveChannelCount = 1;
 1403|  1.49k|        channelCount = 1;
 1404|  1.49k|      }
 1405|   758k|    } else if (((version == 0) || (pInst->drcApplyToDownmix != 0)) &&
  ------------------
  |  Branch (1405:17): [True: 693k, False: 65.2k]
  |  Branch (1405:35): [True: 458, False: 64.7k]
  ------------------
 1406|   693k|               ((pInst->downmixId[0] == DOWNMIX_ID_ANY_DOWNMIX) ||
  ------------------
  |  |  123|   693k|#define DOWNMIX_ID_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (1406:17): [True: 475, False: 693k]
  ------------------
 1407|   693k|                (pInst->downmixIdCount > 1))) {
  ------------------
  |  Branch (1407:17): [True: 3.65k, False: 689k]
  ------------------
 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|   760k|    c = 0;
 1415|  6.08M|    while (c < channelCount) {
  ------------------
  |  Branch (1415:12): [True: 5.32M, False: 760k]
  ------------------
 1416|  5.32M|      int bsGainSetIndex;
 1417|  5.32M|      bsGainSetIndex = FDKreadBits(hBs, 6);
 1418|  5.32M|      if (c >= 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (1418:11): [True: 107, False: 5.32M]
  ------------------
 1419|  5.32M|      gainSetIndex[c] = bsGainSetIndex - 1;
 1420|  5.32M|      c++;
 1421|  5.32M|      repeatSequenceIndex = FDKreadBits(hBs, 1);
 1422|       |
 1423|  5.32M|      if (repeatSequenceIndex == 1) {
  ------------------
  |  Branch (1423:11): [True: 5.45k, False: 5.32M]
  ------------------
 1424|  5.45k|        bsRepeatSequenceCount = FDKreadBits(hBs, 5);
 1425|  5.45k|        bsRepeatSequenceCount += 1;
 1426|  5.45k|        if (deriveChannelCount) {
  ------------------
  |  Branch (1426:13): [True: 594, False: 4.85k]
  ------------------
 1427|    594|          channelCount = 1 + bsRepeatSequenceCount;
 1428|    594|        }
 1429|  26.5k|        for (i = 0; i < bsRepeatSequenceCount; i++) {
  ------------------
  |  Branch (1429:21): [True: 21.3k, False: 5.16k]
  ------------------
 1430|  21.3k|          if (c >= 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (1430:15): [True: 283, False: 21.0k]
  ------------------
 1431|  21.0k|          gainSetIndex[c] = bsGainSetIndex - 1;
 1432|  21.0k|          c++;
 1433|  21.0k|        }
 1434|  5.45k|      }
 1435|  5.32M|    }
 1436|   760k|    if (c > channelCount) {
  ------------------
  |  Branch (1436:9): [True: 110, False: 760k]
  ------------------
 1437|    110|      return DE_NOT_OK;
 1438|    110|    }
 1439|   760k|    if (deriveChannelCount) {
  ------------------
  |  Branch (1439:9): [True: 1.46k, False: 758k]
  ------------------
 1440|  1.46k|      pInst->drcChannelCount = channelCount;
 1441|  1.46k|    }
 1442|       |
 1443|       |    /* DOWNMIX_ID_ANY_DOWNMIX: channelCount is 1. Distribute gainSetIndex to all
 1444|       |     * channels. */
 1445|   760k|    if ((pInst->downmixId[0] == DOWNMIX_ID_ANY_DOWNMIX) ||
  ------------------
  |  |  123|   760k|#define DOWNMIX_ID_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (1445:9): [True: 559, False: 759k]
  ------------------
 1446|   759k|        (pInst->downmixIdCount > 1)) {
  ------------------
  |  Branch (1446:9): [True: 3.86k, False: 755k]
  ------------------
 1447|  32.6k|      for (c = 1; c < pInst->drcChannelCount; c++) {
  ------------------
  |  Branch (1447:19): [True: 28.2k, False: 4.42k]
  ------------------
 1448|  28.2k|        gainSetIndex[c] = gainSetIndex[0];
 1449|  28.2k|      }
 1450|  4.42k|    }
 1451|       |
 1452|   760k|    err = deriveDrcChannelGroups(pInst->drcSetEffect, pInst->drcChannelCount,
 1453|   760k|                                 gainSetIndex, NULL, &pInst->nDrcChannelGroups,
 1454|   760k|                                 pInst->gainSetIndexForChannelGroup,
 1455|   760k|                                 channelGroupForChannel, NULL);
 1456|   760k|    if (err) return (err);
  ------------------
  |  Branch (1456:9): [True: 0, False: 760k]
  ------------------
 1457|       |
 1458|   794k|    for (g = 0; g < pInst->nDrcChannelGroups; g++) {
  ------------------
  |  Branch (1458:17): [True: 33.8k, False: 760k]
  ------------------
 1459|  33.8k|      int set, bandCount;
 1460|  33.8k|      set = pInst->gainSetIndexForChannelGroup[g];
 1461|       |
 1462|       |      /* get bandCount */
 1463|  33.8k|      if (pCoef != NULL && set < pCoef->gainSetCount) {
  ------------------
  |  Branch (1463:11): [True: 17.5k, False: 16.2k]
  |  Branch (1463:28): [True: 1.09k, False: 16.4k]
  ------------------
 1464|  1.09k|        bandCount = pCoef->gainSet[set].bandCount;
 1465|  32.7k|      } else {
 1466|  32.7k|        bandCount = 1;
 1467|  32.7k|      }
 1468|       |
 1469|  33.8k|      _decodeGainModification(hBs, version, bandCount,
 1470|  33.8k|                              pInst->gainModificationForChannelGroup[g], 0);
 1471|  33.8k|    }
 1472|   760k|  }
 1473|       |
 1474|   765k|  return err;
 1475|   767k|}
drcDec_reader.cpp:_ZL26_decodeDuckingModificationP13FDK_BITSTREAMP20DUCKING_MODIFICATIONi:
  535|  14.5k|                                       DUCKING_MODIFICATION* pDMod, int isBox) {
  536|  14.5k|  int bsDuckingScaling, sigma, mu;
  537|       |
  538|  14.5k|  if (isBox) FDKpushFor(hBs, 7); /* reserved */
  ------------------
  |  Branch (538:7): [True: 0, False: 14.5k]
  ------------------
  539|  14.5k|  pDMod->duckingScalingPresent = FDKreadBits(hBs, 1);
  540|       |
  541|  14.5k|  if (pDMod->duckingScalingPresent) {
  ------------------
  |  Branch (541:7): [True: 3.02k, False: 11.4k]
  ------------------
  542|  3.02k|    if (isBox) FDKpushFor(hBs, 4); /* reserved */
  ------------------
  |  Branch (542:9): [True: 0, False: 3.02k]
  ------------------
  543|  3.02k|    bsDuckingScaling = FDKreadBits(hBs, 4);
  544|  3.02k|    sigma = bsDuckingScaling >> 3;
  545|  3.02k|    mu = bsDuckingScaling & 0x7;
  546|       |
  547|  3.02k|    if (sigma) {
  ------------------
  |  Branch (547:9): [True: 1.60k, False: 1.41k]
  ------------------
  548|  1.60k|      pDMod->duckingScaling = (FIXP_SGL)(
  549|  1.60k|          (7 - mu) << (FRACT_BITS - 1 - 3 - 2)); /* 1.0 - 0.125 * (1 + mu); */
  ------------------
  |  |  112|  1.60k|#define FRACT_BITS 16  /* single precision */
  ------------------
  550|  1.60k|    } else {
  551|  1.41k|      pDMod->duckingScaling = (FIXP_SGL)(
  552|  1.41k|          (9 + mu) << (FRACT_BITS - 1 - 3 - 2)); /* 1.0 + 0.125 * (1 + mu); */
  ------------------
  |  |  112|  1.41k|#define FRACT_BITS 16  /* single precision */
  ------------------
  553|  1.41k|    }
  554|  11.4k|  } else {
  555|  11.4k|    pDMod->duckingScaling = (FIXP_SGL)(1 << (FRACT_BITS - 1 - 2)); /* 1.0 */
  ------------------
  |  |  112|  11.4k|#define FRACT_BITS 16  /* single precision */
  ------------------
  556|  11.4k|  }
  557|  14.5k|}
drcDec_reader.cpp:_ZL23_decodeGainModificationP13FDK_BITSTREAMiiP17GAIN_MODIFICATIONi:
  561|  33.8k|                                    int isBox) {
  562|  33.8k|  int sign, bsGainOffset, bsAttenuationScaling, bsAmplificationScaling;
  563|       |
  564|  33.8k|  if (version > 0) {
  ------------------
  |  Branch (564:7): [True: 7.94k, False: 25.8k]
  ------------------
  565|  7.94k|    int b, shapeFilterPresent;
  566|       |
  567|  7.94k|    if (isBox) {
  ------------------
  |  Branch (567:9): [True: 0, False: 7.94k]
  ------------------
  568|      0|      FDKpushFor(hBs, 4); /* reserved */
  569|      0|      bandCount = FDKreadBits(hBs, 4);
  570|      0|    }
  571|       |
  572|  15.8k|    for (b = 0; b < bandCount; b++) {
  ------------------
  |  Branch (572:17): [True: 7.93k, False: 7.94k]
  ------------------
  573|  7.93k|      if (isBox) {
  ------------------
  |  Branch (573:11): [True: 0, False: 7.93k]
  ------------------
  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.93k|      if (!isBox)
  ------------------
  |  Branch (581:11): [True: 7.93k, False: 0]
  ------------------
  582|  7.93k|        pGMod[b].targetCharacteristicLeftPresent = FDKreadBits(hBs, 1);
  583|  7.93k|      if (pGMod[b].targetCharacteristicLeftPresent) {
  ------------------
  |  Branch (583:11): [True: 1.87k, False: 6.05k]
  ------------------
  584|  1.87k|        if (isBox) FDKpushFor(hBs, 4); /* reserved */
  ------------------
  |  Branch (584:13): [True: 0, False: 1.87k]
  ------------------
  585|  1.87k|        pGMod[b].targetCharacteristicLeftIndex = FDKreadBits(hBs, 4);
  586|  1.87k|      }
  587|  7.93k|      if (!isBox)
  ------------------
  |  Branch (587:11): [True: 7.93k, False: 0]
  ------------------
  588|  7.93k|        pGMod[b].targetCharacteristicRightPresent = FDKreadBits(hBs, 1);
  589|  7.93k|      if (pGMod[b].targetCharacteristicRightPresent) {
  ------------------
  |  Branch (589:11): [True: 2.32k, False: 5.60k]
  ------------------
  590|  2.32k|        if (isBox) FDKpushFor(hBs, 4); /* reserved */
  ------------------
  |  Branch (590:13): [True: 0, False: 2.32k]
  ------------------
  591|  2.32k|        pGMod[b].targetCharacteristicRightIndex = FDKreadBits(hBs, 4);
  592|  2.32k|      }
  593|  7.93k|      if (!isBox) pGMod[b].gainScalingPresent = FDKreadBits(hBs, 1);
  ------------------
  |  Branch (593:11): [True: 7.93k, False: 0]
  ------------------
  594|  7.93k|      if (pGMod[b].gainScalingPresent) {
  ------------------
  |  Branch (594:11): [True: 2.16k, False: 5.77k]
  ------------------
  595|  2.16k|        bsAttenuationScaling = FDKreadBits(hBs, 4);
  596|  2.16k|        pGMod[b].attenuationScaling = (FIXP_SGL)(
  597|  2.16k|            bsAttenuationScaling
  598|  2.16k|            << (FRACT_BITS - 1 - 3 - 2)); /* bsAttenuationScaling * 0.125; */
  ------------------
  |  |  112|  2.16k|#define FRACT_BITS 16  /* single precision */
  ------------------
  599|  2.16k|        bsAmplificationScaling = FDKreadBits(hBs, 4);
  600|  2.16k|        pGMod[b].amplificationScaling = (FIXP_SGL)(
  601|  2.16k|            bsAmplificationScaling
  602|  2.16k|            << (FRACT_BITS - 1 - 3 - 2)); /* bsAmplificationScaling * 0.125; */
  ------------------
  |  |  112|  2.16k|#define FRACT_BITS 16  /* single precision */
  ------------------
  603|  2.16k|      }
  604|  7.93k|      if (!isBox) pGMod[b].gainOffsetPresent = FDKreadBits(hBs, 1);
  ------------------
  |  Branch (604:11): [True: 7.93k, False: 0]
  ------------------
  605|  7.93k|      if (pGMod[b].gainOffsetPresent) {
  ------------------
  |  Branch (605:11): [True: 2.33k, False: 5.60k]
  ------------------
  606|  2.33k|        if (isBox) FDKpushFor(hBs, 2); /* reserved */
  ------------------
  |  Branch (606:13): [True: 0, False: 2.33k]
  ------------------
  607|  2.33k|        sign = FDKreadBits(hBs, 1);
  608|  2.33k|        bsGainOffset = FDKreadBits(hBs, 5);
  609|  2.33k|        pGMod[b].gainOffset = (FIXP_SGL)(
  610|  2.33k|            (1 + bsGainOffset)
  611|  2.33k|            << (FRACT_BITS - 1 - 2 - 4)); /* (1+bsGainOffset) * 0.25; */
  ------------------
  |  |  112|  2.33k|#define FRACT_BITS 16  /* single precision */
  ------------------
  612|  2.33k|        if (sign) {
  ------------------
  |  Branch (612:13): [True: 991, False: 1.34k]
  ------------------
  613|    991|          pGMod[b].gainOffset = -pGMod[b].gainOffset;
  614|    991|        }
  615|  2.33k|      }
  616|  7.93k|    }
  617|  7.94k|    if (bandCount == 1) {
  ------------------
  |  Branch (617:9): [True: 7.61k, False: 329]
  ------------------
  618|  7.61k|      shapeFilterPresent = FDKreadBits(hBs, 1);
  619|  7.61k|      if (shapeFilterPresent) {
  ------------------
  |  Branch (619:11): [True: 1.94k, False: 5.67k]
  ------------------
  620|  1.94k|        if (isBox) FDKpushFor(hBs, 3); /* reserved */
  ------------------
  |  Branch (620:13): [True: 0, False: 1.94k]
  ------------------
  621|  1.94k|        FDKpushFor(hBs, 4);            /* pGMod->shapeFilterIndex */
  622|  5.67k|      } else {
  623|  5.67k|        if (isBox) FDKpushFor(hBs, 7); /* reserved */
  ------------------
  |  Branch (623:13): [True: 0, False: 5.67k]
  ------------------
  624|  5.67k|      }
  625|  7.61k|    }
  626|  25.8k|  } else {
  627|  25.8k|    int b, gainScalingPresent, gainOffsetPresent;
  628|  25.8k|    FIXP_SGL attenuationScaling = FL2FXCONST_SGL(1.0f / (float)(1 << 2)),
  ------------------
  |  |  180|  25.8k|  (FIXP_SGL)(                                                                \
  |  |  181|  25.8k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 25.8k, Folded]
  |  |  ------------------
  |  |  182|  25.8k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  25.8k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  25.8k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 25.8k]
  |  |  ------------------
  |  |  183|  25.8k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  25.8k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  25.8k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  25.8k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  25.8k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  25.8k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  25.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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  629|  25.8k|             amplificationScaling = FL2FXCONST_SGL(1.0f / (float)(1 << 2)),
  ------------------
  |  |  180|  25.8k|  (FIXP_SGL)(                                                                \
  |  |  181|  25.8k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 25.8k, Folded]
  |  |  ------------------
  |  |  182|  25.8k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  25.8k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  25.8k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 25.8k]
  |  |  ------------------
  |  |  183|  25.8k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  25.8k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  25.8k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  25.8k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  25.8k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  25.8k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  25.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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  630|  25.8k|             gainOffset = (FIXP_SGL)0;
  631|  25.8k|    if (isBox) FDKpushFor(hBs, 7); /* reserved */
  ------------------
  |  Branch (631:9): [True: 0, False: 25.8k]
  ------------------
  632|  25.8k|    gainScalingPresent = FDKreadBits(hBs, 1);
  633|  25.8k|    if (gainScalingPresent) {
  ------------------
  |  Branch (633:9): [True: 15.3k, False: 10.5k]
  ------------------
  634|  15.3k|      bsAttenuationScaling = FDKreadBits(hBs, 4);
  635|  15.3k|      attenuationScaling = (FIXP_SGL)(
  636|  15.3k|          bsAttenuationScaling
  637|  15.3k|          << (FRACT_BITS - 1 - 3 - 2)); /* bsAttenuationScaling * 0.125; */
  ------------------
  |  |  112|  15.3k|#define FRACT_BITS 16  /* single precision */
  ------------------
  638|  15.3k|      bsAmplificationScaling = FDKreadBits(hBs, 4);
  639|  15.3k|      amplificationScaling = (FIXP_SGL)(
  640|  15.3k|          bsAmplificationScaling
  641|  15.3k|          << (FRACT_BITS - 1 - 3 - 2)); /* bsAmplificationScaling * 0.125; */
  ------------------
  |  |  112|  15.3k|#define FRACT_BITS 16  /* single precision */
  ------------------
  642|  15.3k|    }
  643|  25.8k|    if (isBox) FDKpushFor(hBs, 7); /* reserved */
  ------------------
  |  Branch (643:9): [True: 0, False: 25.8k]
  ------------------
  644|  25.8k|    gainOffsetPresent = FDKreadBits(hBs, 1);
  645|  25.8k|    if (gainOffsetPresent) {
  ------------------
  |  Branch (645:9): [True: 13.4k, False: 12.4k]
  ------------------
  646|  13.4k|      if (isBox) FDKpushFor(hBs, 2); /* reserved */
  ------------------
  |  Branch (646:11): [True: 0, False: 13.4k]
  ------------------
  647|  13.4k|      sign = FDKreadBits(hBs, 1);
  648|  13.4k|      bsGainOffset = FDKreadBits(hBs, 5);
  649|  13.4k|      gainOffset =
  650|  13.4k|          (FIXP_SGL)((1 + bsGainOffset) << (FRACT_BITS - 1 - 2 -
  ------------------
  |  |  112|  13.4k|#define FRACT_BITS 16  /* single precision */
  ------------------
  651|  13.4k|                                            4)); /* (1+bsGainOffset) * 0.25; */
  652|  13.4k|      if (sign) {
  ------------------
  |  Branch (652:11): [True: 7.48k, False: 5.96k]
  ------------------
  653|  7.48k|        gainOffset = -gainOffset;
  654|  7.48k|      }
  655|  13.4k|    }
  656|   129k|    for (b = 0; b < 4; b++) {
  ------------------
  |  Branch (656:17): [True: 103k, False: 25.8k]
  ------------------
  657|   103k|      pGMod[b].targetCharacteristicLeftPresent = 0;
  658|   103k|      pGMod[b].targetCharacteristicRightPresent = 0;
  659|   103k|      pGMod[b].gainScalingPresent = gainScalingPresent;
  660|   103k|      pGMod[b].attenuationScaling = attenuationScaling;
  661|   103k|      pGMod[b].amplificationScaling = amplificationScaling;
  662|   103k|      pGMod[b].gainOffsetPresent = gainOffsetPresent;
  663|   103k|      pGMod[b].gainOffset = gainOffset;
  664|   103k|    }
  665|  25.8k|  }
  666|  33.8k|}
drcDec_reader.cpp:_ZL26_readUniDrcConfigExtensionP13FDK_BITSTREAMP14UNI_DRC_CONFIG:
 1636|  19.8k|    HANDLE_FDK_BITSTREAM hBs, HANDLE_UNI_DRC_CONFIG hUniDrcConfig) {
 1637|  19.8k|  DRC_ERROR err = DE_OK;
 1638|  19.8k|  int k, bitSizeLen, extSizeBits, bitSize;
 1639|  19.8k|  INT nBitsRemaining;
 1640|  19.8k|  UNI_DRC_CONFIG_EXTENSION* pExt = &(hUniDrcConfig->uniDrcConfigExt);
 1641|       |
 1642|  19.8k|  k = 0;
 1643|  19.8k|  pExt->uniDrcConfigExtType[k] = FDKreadBits(hBs, 4);
 1644|  39.0k|  while (pExt->uniDrcConfigExtType[k] != UNIDRCCONFEXT_TERM) {
  ------------------
  |  |  117|  39.0k|#define UNIDRCCONFEXT_TERM 0x0
  ------------------
  |  Branch (1644:10): [True: 38.0k, False: 972]
  ------------------
 1645|  38.0k|    if (k >= (8 - 1)) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (1645:9): [True: 579, False: 37.4k]
  ------------------
 1646|  37.4k|    bitSizeLen = FDKreadBits(hBs, 4);
 1647|  37.4k|    extSizeBits = bitSizeLen + 4;
 1648|       |
 1649|  37.4k|    bitSize = FDKreadBits(hBs, extSizeBits);
 1650|  37.4k|    pExt->extBitSize[k] = bitSize + 1;
 1651|  37.4k|    nBitsRemaining = (INT)FDKgetValidBits(hBs);
 1652|       |
 1653|  37.4k|    switch (pExt->uniDrcConfigExtType[k]) {
 1654|  21.6k|      case UNIDRCCONFEXT_V1:
  ------------------
  |  |  112|  21.6k|#define UNIDRCCONFEXT_V1 0x2
  ------------------
  |  Branch (1654:7): [True: 21.6k, False: 15.8k]
  ------------------
 1655|  21.6k|        err = _readDrcExtensionV1(hBs, hUniDrcConfig);
 1656|  21.6k|        if (err) return err;
  ------------------
  |  Branch (1656:13): [True: 530, False: 21.1k]
  ------------------
 1657|  21.1k|        if (nBitsRemaining !=
  ------------------
  |  Branch (1657:13): [True: 17.7k, False: 3.40k]
  ------------------
 1658|  21.1k|            ((INT)pExt->extBitSize[k] + (INT)FDKgetValidBits(hBs)))
 1659|  17.7k|          return DE_NOT_OK;
 1660|  3.40k|        break;
 1661|  3.40k|      case UNIDRCCONFEXT_PARAM_DRC:
  ------------------
  |  |  111|    758|#define UNIDRCCONFEXT_PARAM_DRC 0x1
  ------------------
  |  Branch (1661:7): [True: 758, False: 36.7k]
  ------------------
 1662|       |      /* add future extensions here */
 1663|  15.8k|      default:
  ------------------
  |  Branch (1663:7): [True: 15.0k, False: 22.4k]
  ------------------
 1664|  15.8k|        FDKpushFor(hBs, pExt->extBitSize[k]);
 1665|  15.8k|        break;
 1666|  37.4k|    }
 1667|  19.2k|    k++;
 1668|  19.2k|    pExt->uniDrcConfigExtType[k] = FDKreadBits(hBs, 4);
 1669|  19.2k|  }
 1670|       |
 1671|    972|  return err;
 1672|  19.8k|}
drcDec_reader.cpp:_ZL19_readDrcExtensionV1P13FDK_BITSTREAMP14UNI_DRC_CONFIG:
 1536|  21.6k|                                     HANDLE_UNI_DRC_CONFIG hUniDrcConfig) {
 1537|  21.6k|  DRC_ERROR err = DE_OK;
 1538|  21.6k|  int downmixInstructionsV1Present;
 1539|  21.6k|  int drcCoeffsAndInstructionsUniDrcV1Present;
 1540|  21.6k|  int loudEqInstructionsPresent, loudEqInstructionsCount;
 1541|  21.6k|  int eqPresent, eqInstructionsCount;
 1542|  21.6k|  int i, offset;
 1543|  21.6k|  int diff = hUniDrcConfig->diff;
 1544|       |
 1545|  21.6k|  downmixInstructionsV1Present = FDKreadBits(hBs, 1);
 1546|  21.6k|  if (downmixInstructionsV1Present == 1) {
  ------------------
  |  Branch (1546:7): [True: 3.12k, False: 18.5k]
  ------------------
 1547|  3.12k|    diff |= _compAssign(&hUniDrcConfig->downmixInstructionsCountV1,
 1548|  3.12k|                        FDKreadBits(hBs, 7));
 1549|  3.12k|    offset = hUniDrcConfig->downmixInstructionsCountV0;
 1550|  3.12k|    hUniDrcConfig->downmixInstructionsCount = fMin(
 1551|  3.12k|        (UCHAR)(offset + hUniDrcConfig->downmixInstructionsCountV1), (UCHAR)6);
 1552|  41.9k|    for (i = 0; i < hUniDrcConfig->downmixInstructionsCountV1; i++) {
  ------------------
  |  Branch (1552:17): [True: 38.9k, False: 3.03k]
  ------------------
 1553|  38.9k|      DOWNMIX_INSTRUCTIONS tmpDown;
 1554|  38.9k|      FDKmemclear(&tmpDown, sizeof(DOWNMIX_INSTRUCTIONS));
 1555|  38.9k|      err = _readDownmixInstructions(hBs, 1, &hUniDrcConfig->channelLayout,
 1556|  38.9k|                                     &tmpDown);
 1557|  38.9k|      if (err) return err;
  ------------------
  |  Branch (1557:11): [True: 90, False: 38.8k]
  ------------------
 1558|  38.8k|      if ((offset + i) >= 6) continue;
  ------------------
  |  Branch (1558:11): [True: 31.7k, False: 7.13k]
  ------------------
 1559|  7.13k|      if (!diff)
  ------------------
  |  Branch (1559:11): [True: 239, False: 6.89k]
  ------------------
 1560|    239|        diff |= (FDKmemcmp(&tmpDown,
 1561|    239|                           &(hUniDrcConfig->downmixInstructions[offset + i]),
 1562|    239|                           sizeof(DOWNMIX_INSTRUCTIONS)) != 0);
 1563|  7.13k|      hUniDrcConfig->downmixInstructions[offset + i] = tmpDown;
 1564|  7.13k|    }
 1565|  18.5k|  } else {
 1566|  18.5k|    diff |= _compAssign(&hUniDrcConfig->downmixInstructionsCountV1, 0);
 1567|  18.5k|  }
 1568|       |
 1569|  21.6k|  drcCoeffsAndInstructionsUniDrcV1Present = FDKreadBits(hBs, 1);
 1570|  21.6k|  if (drcCoeffsAndInstructionsUniDrcV1Present == 1) {
  ------------------
  |  Branch (1570:7): [True: 10.3k, False: 11.2k]
  ------------------
 1571|  10.3k|    diff |= _compAssign(&hUniDrcConfig->drcCoefficientsUniDrcCountV1,
 1572|  10.3k|                        FDKreadBits(hBs, 3));
 1573|  10.3k|    offset = hUniDrcConfig->drcCoefficientsUniDrcCountV0;
 1574|  10.3k|    hUniDrcConfig->drcCoefficientsUniDrcCount =
 1575|  10.3k|        fMin((UCHAR)(offset + hUniDrcConfig->drcCoefficientsUniDrcCountV1),
 1576|  10.3k|             (UCHAR)2);
 1577|  37.0k|    for (i = 0; i < hUniDrcConfig->drcCoefficientsUniDrcCountV1; i++) {
  ------------------
  |  Branch (1577:17): [True: 26.7k, False: 10.2k]
  ------------------
 1578|  26.7k|      DRC_COEFFICIENTS_UNI_DRC tmpCoef;
 1579|  26.7k|      FDKmemclear(&tmpCoef, sizeof(DRC_COEFFICIENTS_UNI_DRC));
 1580|  26.7k|      err = _readDrcCoefficientsUniDrc(hBs, 1, &tmpCoef);
 1581|  26.7k|      if (err) return err;
  ------------------
  |  Branch (1581:11): [True: 90, False: 26.6k]
  ------------------
 1582|  26.6k|      if ((offset + i) >= 2) continue;
  ------------------
  |  Branch (1582:11): [True: 19.6k, False: 7.00k]
  ------------------
 1583|  7.00k|      if (!diff)
  ------------------
  |  Branch (1583:11): [True: 297, False: 6.71k]
  ------------------
 1584|    297|        diff |= (FDKmemcmp(&tmpCoef,
 1585|    297|                           &(hUniDrcConfig->drcCoefficientsUniDrc[offset + i]),
 1586|    297|                           sizeof(DRC_COEFFICIENTS_UNI_DRC)) != 0);
 1587|  7.00k|      hUniDrcConfig->drcCoefficientsUniDrc[offset + i] = tmpCoef;
 1588|  7.00k|    }
 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|  76.4k|    for (i = 0; i < hUniDrcConfig->drcInstructionsUniDrcCount; i++) {
  ------------------
  |  Branch (1596:17): [True: 66.4k, False: 9.93k]
  ------------------
 1597|  66.4k|      DRC_INSTRUCTIONS_UNI_DRC tmpInst;
 1598|  66.4k|      FDKmemclear(&tmpInst, sizeof(DRC_INSTRUCTIONS_UNI_DRC));
 1599|  66.4k|      err = _readDrcInstructionsUniDrc(hBs, 1, hUniDrcConfig, &tmpInst);
 1600|  66.4k|      if (err) return err;
  ------------------
  |  Branch (1600:11): [True: 350, False: 66.1k]
  ------------------
 1601|  66.1k|      if ((offset + i) >= 12) continue;
  ------------------
  |  Branch (1601:11): [True: 43.7k, False: 22.3k]
  ------------------
 1602|  22.3k|      if (!diff)
  ------------------
  |  Branch (1602:11): [True: 472, False: 21.8k]
  ------------------
 1603|    472|        diff |= (FDKmemcmp(&tmpInst,
 1604|    472|                           &(hUniDrcConfig->drcInstructionsUniDrc[offset + i]),
 1605|    472|                           sizeof(DRC_INSTRUCTIONS_UNI_DRC)) != 0);
 1606|  22.3k|      hUniDrcConfig->drcInstructionsUniDrc[offset + i] = tmpInst;
 1607|  22.3k|    }
 1608|  11.2k|  } else {
 1609|  11.2k|    diff |= _compAssign(&hUniDrcConfig->drcCoefficientsUniDrcCountV1, 0);
 1610|  11.2k|    diff |= _compAssign(&hUniDrcConfig->drcInstructionsUniDrcCountV1, 0);
 1611|  11.2k|  }
 1612|       |
 1613|  21.1k|  loudEqInstructionsPresent = FDKreadBits(hBs, 1);
 1614|  21.1k|  if (loudEqInstructionsPresent == 1) {
  ------------------
  |  Branch (1614:7): [True: 4.54k, False: 16.6k]
  ------------------
 1615|  4.54k|    loudEqInstructionsCount = FDKreadBits(hBs, 4);
 1616|  25.0k|    for (i = 0; i < loudEqInstructionsCount; i++) {
  ------------------
  |  Branch (1616:17): [True: 20.4k, False: 4.54k]
  ------------------
 1617|  20.4k|      _skipLoudEqInstructions(hBs);
 1618|  20.4k|    }
 1619|  4.54k|  }
 1620|       |
 1621|  21.1k|  eqPresent = FDKreadBits(hBs, 1);
 1622|  21.1k|  if (eqPresent == 1) {
  ------------------
  |  Branch (1622:7): [True: 6.89k, False: 14.2k]
  ------------------
 1623|  6.89k|    _skipEqCoefficients(hBs);
 1624|  6.89k|    eqInstructionsCount = FDKreadBits(hBs, 4);
 1625|  41.2k|    for (i = 0; i < eqInstructionsCount; i++) {
  ------------------
  |  Branch (1625:17): [True: 34.3k, False: 6.89k]
  ------------------
 1626|  34.3k|      _skipEqInstructions(hBs, hUniDrcConfig);
 1627|  34.3k|    }
 1628|  6.89k|  }
 1629|       |
 1630|  21.1k|  hUniDrcConfig->diff = diff;
 1631|       |
 1632|  21.1k|  return err;
 1633|  21.6k|}
drcDec_reader.cpp:_ZL23_skipLoudEqInstructionsP13FDK_BITSTREAM:
  820|  20.4k|static void _skipLoudEqInstructions(HANDLE_FDK_BITSTREAM hBs) {
  821|  20.4k|  int i;
  822|  20.4k|  int downmixIdPresent, additionalDownmixIdPresent,
  823|  20.4k|      additionalDownmixIdCount = 0;
  824|  20.4k|  int drcSetIdPresent, additionalDrcSetIdPresent, additionalDrcSetIdCount = 0;
  825|  20.4k|  int eqSetIdPresent, additionalEqSetIdPresent, additionalEqSetIdCount = 0;
  826|  20.4k|  int loudEqGainSequenceCount, drcCharacteristicFormatIsCICP;
  827|       |
  828|  20.4k|  FDKpushFor(hBs, 4); /* loudEqSetId */
  829|  20.4k|  FDKpushFor(hBs, 4); /* drcLocation */
  830|  20.4k|  downmixIdPresent = FDKreadBits(hBs, 1);
  831|  20.4k|  if (downmixIdPresent) {
  ------------------
  |  Branch (831:7): [True: 2.41k, False: 18.0k]
  ------------------
  832|  2.41k|    FDKpushFor(hBs, 7); /* downmixId */
  833|  2.41k|    additionalDownmixIdPresent = FDKreadBits(hBs, 1);
  834|  2.41k|    if (additionalDownmixIdPresent) {
  ------------------
  |  Branch (834:9): [True: 1.18k, False: 1.22k]
  ------------------
  835|  1.18k|      additionalDownmixIdCount = FDKreadBits(hBs, 7);
  836|  21.0k|      for (i = 0; i < additionalDownmixIdCount; i++) {
  ------------------
  |  Branch (836:19): [True: 19.9k, False: 1.18k]
  ------------------
  837|  19.9k|        FDKpushFor(hBs, 7); /* additionalDownmixId */
  838|  19.9k|      }
  839|  1.18k|    }
  840|  2.41k|  }
  841|       |
  842|  20.4k|  drcSetIdPresent = FDKreadBits(hBs, 1);
  843|  20.4k|  if (drcSetIdPresent) {
  ------------------
  |  Branch (843:7): [True: 2.37k, False: 18.1k]
  ------------------
  844|  2.37k|    FDKpushFor(hBs, 6); /* drcSetId */
  845|  2.37k|    additionalDrcSetIdPresent = FDKreadBits(hBs, 1);
  846|  2.37k|    if (additionalDrcSetIdPresent) {
  ------------------
  |  Branch (846:9): [True: 800, False: 1.57k]
  ------------------
  847|    800|      additionalDrcSetIdCount = FDKreadBits(hBs, 6);
  848|  7.28k|      for (i = 0; i < additionalDrcSetIdCount; i++) {
  ------------------
  |  Branch (848:19): [True: 6.48k, False: 800]
  ------------------
  849|  6.48k|        FDKpushFor(hBs, 6); /* additionalDrcSetId; */
  850|  6.48k|      }
  851|    800|    }
  852|  2.37k|  }
  853|       |
  854|  20.4k|  eqSetIdPresent = FDKreadBits(hBs, 1);
  855|  20.4k|  if (eqSetIdPresent) {
  ------------------
  |  Branch (855:7): [True: 1.75k, False: 18.7k]
  ------------------
  856|  1.75k|    FDKpushFor(hBs, 6); /* eqSetId */
  857|  1.75k|    additionalEqSetIdPresent = FDKreadBits(hBs, 1);
  858|  1.75k|    if (additionalEqSetIdPresent) {
  ------------------
  |  Branch (858:9): [True: 1.06k, False: 684]
  ------------------
  859|  1.06k|      additionalEqSetIdCount = FDKreadBits(hBs, 6);
  860|  8.46k|      for (i = 0; i < additionalEqSetIdCount; i++) {
  ------------------
  |  Branch (860:19): [True: 7.39k, False: 1.06k]
  ------------------
  861|  7.39k|        FDKpushFor(hBs, 6); /* additionalEqSetId; */
  862|  7.39k|      }
  863|  1.06k|    }
  864|  1.75k|  }
  865|       |
  866|  20.4k|  FDKpushFor(hBs, 1); /* loudnessAfterDrc */
  867|  20.4k|  FDKpushFor(hBs, 1); /* loudnessAfterEq */
  868|  20.4k|  loudEqGainSequenceCount = FDKreadBits(hBs, 6);
  869|  30.5k|  for (i = 0; i < loudEqGainSequenceCount; i++) {
  ------------------
  |  Branch (869:15): [True: 10.0k, False: 20.4k]
  ------------------
  870|  10.0k|    FDKpushFor(hBs, 6); /* gainSequenceIndex */
  871|  10.0k|    drcCharacteristicFormatIsCICP = FDKreadBits(hBs, 1);
  872|  10.0k|    if (drcCharacteristicFormatIsCICP) {
  ------------------
  |  Branch (872:9): [True: 937, False: 9.08k]
  ------------------
  873|    937|      FDKpushFor(hBs, 7); /* drcCharacteristic */
  874|  9.08k|    } else {
  875|  9.08k|      FDKpushFor(hBs, 4); /* drcCharacteristicLeftIndex */
  876|  9.08k|      FDKpushFor(hBs, 4); /* drcCharacteristicRightIndex */
  877|  9.08k|    }
  878|  10.0k|    FDKpushFor(hBs, 6); /* frequencyRangeIndex */
  879|  10.0k|    FDKpushFor(hBs, 3); /* bsLoudEqScaling */
  880|  10.0k|    FDKpushFor(hBs, 5); /* bsLoudEqOffset */
  881|  10.0k|  }
  882|  20.4k|}
drcDec_reader.cpp:_ZL19_skipEqCoefficientsP13FDK_BITSTREAM:
  911|  6.89k|static void _skipEqCoefficients(HANDLE_FDK_BITSTREAM hBs) {
  912|  6.89k|  int j, k;
  913|  6.89k|  int eqDelayMaxPresent;
  914|  6.89k|  int uniqueFilterBlockCount, filterElementCount, filterElementGainPresent;
  915|  6.89k|  int uniqueTdFilterElementCount, eqFilterFormat, bsRealZeroRadiusOneCount,
  916|  6.89k|      realZeroCount, genericZeroCount, realPoleCount, complexPoleCount,
  917|  6.89k|      firFilterOrder;
  918|  6.89k|  int uniqueEqSubbandGainsCount, eqSubbandGainRepresentation,
  919|  6.89k|      eqSubbandGainCount;
  920|  6.89k|  int eqSubbandGainFormat;
  921|       |
  922|  6.89k|  eqDelayMaxPresent = FDKreadBits(hBs, 1);
  923|  6.89k|  if (eqDelayMaxPresent) {
  ------------------
  |  Branch (923:7): [True: 1.44k, False: 5.44k]
  ------------------
  924|  1.44k|    FDKpushFor(hBs, 8); /* bsEqDelayMax */
  925|  1.44k|  }
  926|       |
  927|  6.89k|  uniqueFilterBlockCount = FDKreadBits(hBs, 6);
  928|  22.7k|  for (j = 0; j < uniqueFilterBlockCount; j++) {
  ------------------
  |  Branch (928:15): [True: 15.8k, False: 6.89k]
  ------------------
  929|  15.8k|    filterElementCount = FDKreadBits(hBs, 6);
  930|  30.0k|    for (k = 0; k < filterElementCount; k++) {
  ------------------
  |  Branch (930:17): [True: 14.1k, False: 15.8k]
  ------------------
  931|  14.1k|      FDKpushFor(hBs, 6); /* filterElementIndex */
  932|  14.1k|      filterElementGainPresent = FDKreadBits(hBs, 1);
  933|  14.1k|      if (filterElementGainPresent) {
  ------------------
  |  Branch (933:11): [True: 574, False: 13.5k]
  ------------------
  934|    574|        FDKpushFor(hBs, 10); /* bsFilterElementGain */
  935|    574|      }
  936|  14.1k|    }
  937|  15.8k|  }
  938|  6.89k|  uniqueTdFilterElementCount = FDKreadBits(hBs, 6);
  939|  25.6k|  for (j = 0; j < uniqueTdFilterElementCount; j++) {
  ------------------
  |  Branch (939:15): [True: 18.7k, False: 6.89k]
  ------------------
  940|  18.7k|    eqFilterFormat = FDKreadBits(hBs, 1);
  941|  18.7k|    if (eqFilterFormat == 0) { /* pole/zero */
  ------------------
  |  Branch (941:9): [True: 17.5k, False: 1.21k]
  ------------------
  942|  17.5k|      bsRealZeroRadiusOneCount = FDKreadBits(hBs, 3);
  943|  17.5k|      realZeroCount = FDKreadBits(hBs, 6);
  944|  17.5k|      genericZeroCount = FDKreadBits(hBs, 6);
  945|  17.5k|      realPoleCount = FDKreadBits(hBs, 4);
  946|  17.5k|      complexPoleCount = FDKreadBits(hBs, 4);
  947|  17.5k|      FDKpushFor(hBs, 2 * bsRealZeroRadiusOneCount * 1);
  948|  17.5k|      FDKpushFor(hBs, realZeroCount * 8);
  949|  17.5k|      FDKpushFor(hBs, genericZeroCount * 14);
  950|  17.5k|      FDKpushFor(hBs, realPoleCount * 8);
  951|  17.5k|      FDKpushFor(hBs, complexPoleCount * 14);
  952|  17.5k|    } 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|  18.7k|  }
  958|  6.89k|  uniqueEqSubbandGainsCount = FDKreadBits(hBs, 6);
  959|  6.89k|  if (uniqueEqSubbandGainsCount > 0) {
  ------------------
  |  Branch (959:7): [True: 4.00k, False: 2.89k]
  ------------------
  960|  4.00k|    eqSubbandGainRepresentation = FDKreadBits(hBs, 1);
  961|  4.00k|    eqSubbandGainFormat = FDKreadBits(hBs, 4);
  962|  4.00k|    switch (eqSubbandGainFormat) {
  963|    346|      case GF_QMF32:
  ------------------
  |  Branch (963:7): [True: 346, False: 3.65k]
  ------------------
  964|    346|        eqSubbandGainCount = 32;
  965|    346|        break;
  966|     97|      case GF_QMFHYBRID39:
  ------------------
  |  Branch (966:7): [True: 97, False: 3.90k]
  ------------------
  967|     97|        eqSubbandGainCount = 39;
  968|     97|        break;
  969|    505|      case GF_QMF64:
  ------------------
  |  Branch (969:7): [True: 505, False: 3.49k]
  ------------------
  970|    505|        eqSubbandGainCount = 64;
  971|    505|        break;
  972|      9|      case GF_QMFHYBRID71:
  ------------------
  |  Branch (972:7): [True: 9, False: 3.99k]
  ------------------
  973|      9|        eqSubbandGainCount = 71;
  974|      9|        break;
  975|    103|      case GF_QMF128:
  ------------------
  |  Branch (975:7): [True: 103, False: 3.89k]
  ------------------
  976|    103|        eqSubbandGainCount = 128;
  977|    103|        break;
  978|    144|      case GF_QMFHYBRID135:
  ------------------
  |  Branch (978:7): [True: 144, False: 3.85k]
  ------------------
  979|    144|        eqSubbandGainCount = 135;
  980|    144|        break;
  981|    560|      case GF_UNIFORM:
  ------------------
  |  Branch (981:7): [True: 560, False: 3.44k]
  ------------------
  982|  2.79k|      default:
  ------------------
  |  Branch (982:7): [True: 2.23k, False: 1.76k]
  ------------------
  983|  2.79k|        eqSubbandGainCount = FDKreadBits(hBs, 8);
  984|  2.79k|        eqSubbandGainCount++;
  985|  2.79k|        break;
  986|  4.00k|    }
  987|   120k|    for (k = 0; k < uniqueEqSubbandGainsCount; k++) {
  ------------------
  |  Branch (987:17): [True: 116k, False: 4.00k]
  ------------------
  988|   116k|      if (eqSubbandGainRepresentation == 1) {
  ------------------
  |  Branch (988:11): [True: 21.7k, False: 94.7k]
  ------------------
  989|  21.7k|        _skipEqSubbandGainSpline(hBs);
  990|  94.7k|      } else {
  991|  94.7k|        FDKpushFor(hBs, eqSubbandGainCount * 9);
  992|  94.7k|      }
  993|   116k|    }
  994|  4.00k|  }
  995|  6.89k|}
drcDec_reader.cpp:_ZL24_skipEqSubbandGainSplineP13FDK_BITSTREAM:
  884|  21.7k|static void _skipEqSubbandGainSpline(HANDLE_FDK_BITSTREAM hBs) {
  885|  21.7k|  int nEqNodes, k, bits;
  886|  21.7k|  nEqNodes = FDKreadBits(hBs, 5);
  887|  21.7k|  nEqNodes += 2;
  888|  68.1k|  for (k = 0; k < nEqNodes; k++) {
  ------------------
  |  Branch (888:15): [True: 46.3k, False: 21.7k]
  ------------------
  889|  46.3k|    bits = FDKreadBits(hBs, 1);
  890|  46.3k|    if (!bits) {
  ------------------
  |  Branch (890:9): [True: 43.9k, False: 2.37k]
  ------------------
  891|  43.9k|      FDKpushFor(hBs, 4);
  892|  43.9k|    }
  893|  46.3k|  }
  894|  21.7k|  FDKpushFor(hBs, 4 * (nEqNodes - 1));
  895|  21.7k|  bits = FDKreadBits(hBs, 2);
  896|  21.7k|  switch (bits) {
  ------------------
  |  Branch (896:11): [True: 21.7k, False: 0]
  ------------------
  897|  20.4k|    case 0:
  ------------------
  |  Branch (897:5): [True: 20.4k, False: 1.30k]
  ------------------
  898|  20.4k|      FDKpushFor(hBs, 5);
  899|  20.4k|      break;
  900|    369|    case 1:
  ------------------
  |  Branch (900:5): [True: 369, False: 21.4k]
  ------------------
  901|    849|    case 2:
  ------------------
  |  Branch (901:5): [True: 480, False: 21.3k]
  ------------------
  902|    849|      FDKpushFor(hBs, 4);
  903|    849|      break;
  904|    457|    case 3:
  ------------------
  |  Branch (904:5): [True: 457, False: 21.3k]
  ------------------
  905|    457|      FDKpushFor(hBs, 3);
  906|    457|      break;
  907|  21.7k|  }
  908|  21.7k|  FDKpushFor(hBs, 5 * (nEqNodes - 1));
  909|  21.7k|}
drcDec_reader.cpp:_ZL19_skipEqInstructionsP13FDK_BITSTREAMP14UNI_DRC_CONFIG:
 1019|  34.3k|                                     HANDLE_UNI_DRC_CONFIG hUniDrcConfig) {
 1020|  34.3k|  DRC_ERROR err = DE_OK;
 1021|  34.3k|  int c, i, k, channelCount;
 1022|  34.3k|  int downmixIdPresent, downmixId, eqApplyToDownmix, additionalDownmixIdPresent,
 1023|  34.3k|      additionalDownmixIdCount = 0;
 1024|  34.3k|  int additionalDrcSetIdPresent, additionalDrcSetIdCount;
 1025|  34.3k|  int dependsOnEqSetPresent, eqChannelGroupCount, tdFilterCascadePresent,
 1026|  34.3k|      subbandGainsPresent, eqTransitionDurationPresent;
 1027|  34.3k|  UCHAR eqChannelGroupForChannel[8];
 1028|       |
 1029|  34.3k|  FDKpushFor(hBs, 6); /* eqSetId */
 1030|  34.3k|  FDKpushFor(hBs, 4); /* eqSetComplexityLevel */
 1031|  34.3k|  downmixIdPresent = FDKreadBits(hBs, 1);
 1032|  34.3k|  if (downmixIdPresent) {
  ------------------
  |  Branch (1032:7): [True: 5.43k, False: 28.9k]
  ------------------
 1033|  5.43k|    downmixId = FDKreadBits(hBs, 7);
 1034|  5.43k|    eqApplyToDownmix = FDKreadBits(hBs, 1);
 1035|  5.43k|    additionalDownmixIdPresent = FDKreadBits(hBs, 1);
 1036|  5.43k|    if (additionalDownmixIdPresent) {
  ------------------
  |  Branch (1036:9): [True: 1.38k, False: 4.05k]
  ------------------
 1037|  1.38k|      additionalDownmixIdCount = FDKreadBits(hBs, 7);
 1038|  1.38k|      FDKpushFor(hBs, additionalDownmixIdCount * 7); /* additionalDownmixId */
 1039|  1.38k|    }
 1040|  28.9k|  } else {
 1041|  28.9k|    downmixId = 0;
 1042|  28.9k|    eqApplyToDownmix = 0;
 1043|  28.9k|  }
 1044|  34.3k|  FDKpushFor(hBs, 6); /* drcSetId */
 1045|  34.3k|  additionalDrcSetIdPresent = FDKreadBits(hBs, 1);
 1046|  34.3k|  if (additionalDrcSetIdPresent) {
  ------------------
  |  Branch (1046:7): [True: 2.40k, False: 31.9k]
  ------------------
 1047|  2.40k|    additionalDrcSetIdCount = FDKreadBits(hBs, 6);
 1048|  16.5k|    for (i = 0; i < additionalDrcSetIdCount; i++) {
  ------------------
  |  Branch (1048:17): [True: 14.1k, False: 2.40k]
  ------------------
 1049|  14.1k|      FDKpushFor(hBs, 6); /* additionalDrcSetId */
 1050|  14.1k|    }
 1051|  2.40k|  }
 1052|  34.3k|  FDKpushFor(hBs, 16); /* eqSetPurpose */
 1053|  34.3k|  dependsOnEqSetPresent = FDKreadBits(hBs, 1);
 1054|  34.3k|  if (dependsOnEqSetPresent) {
  ------------------
  |  Branch (1054:7): [True: 3.84k, False: 30.4k]
  ------------------
 1055|  3.84k|    FDKpushFor(hBs, 6); /* dependsOnEqSet */
 1056|  30.4k|  } else {
 1057|  30.4k|    FDKpushFor(hBs, 1); /* noIndependentEqUse */
 1058|  30.4k|  }
 1059|       |
 1060|  34.3k|  channelCount = hUniDrcConfig->channelLayout.baseChannelCount;
 1061|  34.3k|  if ((downmixIdPresent == 1) && (eqApplyToDownmix == 1) && (downmixId != 0) &&
  ------------------
  |  Branch (1061:7): [True: 5.43k, False: 28.9k]
  |  Branch (1061:34): [True: 2.64k, False: 2.79k]
  |  Branch (1061:61): [True: 2.39k, False: 245]
  ------------------
 1062|  2.39k|      (downmixId != DOWNMIX_ID_ANY_DOWNMIX) &&
  ------------------
  |  |  123|  2.39k|#define DOWNMIX_ID_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (1062:7): [True: 2.02k, False: 367]
  ------------------
 1063|  2.02k|      (additionalDownmixIdCount == 0)) {
  ------------------
  |  Branch (1063:7): [True: 1.50k, False: 523]
  ------------------
 1064|  1.50k|    DOWNMIX_INSTRUCTIONS* pDown =
 1065|  1.50k|        selectDownmixInstructions(hUniDrcConfig, downmixId);
 1066|  1.50k|    if (pDown == NULL) return DE_NOT_OK;
  ------------------
  |  Branch (1066:9): [True: 1.24k, False: 258]
  ------------------
 1067|       |
 1068|    258|    channelCount =
 1069|    258|        pDown->targetChannelCount; /* targetChannelCountFromDownmixId*/
 1070|  32.8k|  } else if ((downmixId == DOWNMIX_ID_ANY_DOWNMIX) ||
  ------------------
  |  |  123|  32.8k|#define DOWNMIX_ID_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (1070:14): [True: 554, False: 32.2k]
  ------------------
 1071|  32.2k|             (additionalDownmixIdCount > 1)) {
  ------------------
  |  Branch (1071:14): [True: 628, False: 31.6k]
  ------------------
 1072|  1.18k|    channelCount = 1;
 1073|  1.18k|  }
 1074|       |
 1075|  33.0k|  eqChannelGroupCount = 0;
 1076|   109k|  for (c = 0; c < channelCount; c++) {
  ------------------
  |  Branch (1076:15): [True: 76.6k, False: 32.8k]
  ------------------
 1077|  76.6k|    int newGroup = 1;
 1078|  76.6k|    if (c >= 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (1078:9): [True: 228, False: 76.4k]
  ------------------
 1079|  76.4k|    eqChannelGroupForChannel[c] = FDKreadBits(hBs, 7);
 1080|   265k|    for (k = 0; k < c; k++) {
  ------------------
  |  Branch (1080:17): [True: 189k, False: 76.4k]
  ------------------
 1081|   189k|      if (eqChannelGroupForChannel[c] == eqChannelGroupForChannel[k]) {
  ------------------
  |  Branch (1081:11): [True: 169k, False: 20.2k]
  ------------------
 1082|   169k|        newGroup = 0;
 1083|   169k|      }
 1084|   189k|    }
 1085|  76.4k|    if (newGroup == 1) {
  ------------------
  |  Branch (1085:9): [True: 25.7k, False: 50.6k]
  ------------------
 1086|  25.7k|      eqChannelGroupCount += 1;
 1087|  25.7k|    }
 1088|  76.4k|  }
 1089|  32.8k|  tdFilterCascadePresent = FDKreadBits(hBs, 1);
 1090|  32.8k|  if (tdFilterCascadePresent) {
  ------------------
  |  Branch (1090:7): [True: 3.55k, False: 29.3k]
  ------------------
 1091|  3.55k|    _skipTdFilterCascade(hBs, eqChannelGroupCount);
 1092|  3.55k|  }
 1093|  32.8k|  subbandGainsPresent = FDKreadBits(hBs, 1);
 1094|  32.8k|  if (subbandGainsPresent) {
  ------------------
  |  Branch (1094:7): [True: 2.97k, False: 29.8k]
  ------------------
 1095|  2.97k|    FDKpushFor(hBs, eqChannelGroupCount * 6); /* subbandGainsIndex */
 1096|  2.97k|  }
 1097|  32.8k|  eqTransitionDurationPresent = FDKreadBits(hBs, 1);
 1098|  32.8k|  if (eqTransitionDurationPresent) {
  ------------------
  |  Branch (1098:7): [True: 2.83k, False: 30.0k]
  ------------------
 1099|  2.83k|    FDKpushFor(hBs, 5); /* bsEqTransitionDuration */
 1100|  2.83k|  }
 1101|  32.8k|  return err;
 1102|  33.0k|}
drcDec_reader.cpp:_ZL20_skipTdFilterCascadeP13FDK_BITSTREAMi:
  998|  3.55k|                                 const int eqChannelGroupCount) {
  999|  3.55k|  int i, eqCascadeGainPresent, filterBlockCount, eqPhaseAlignmentPresent;
 1000|  7.04k|  for (i = 0; i < eqChannelGroupCount; i++) {
  ------------------
  |  Branch (1000:15): [True: 3.49k, False: 3.55k]
  ------------------
 1001|  3.49k|    eqCascadeGainPresent = FDKreadBits(hBs, 1);
 1002|  3.49k|    if (eqCascadeGainPresent) {
  ------------------
  |  Branch (1002:9): [True: 1.46k, False: 2.03k]
  ------------------
 1003|  1.46k|      FDKpushFor(hBs, 10); /* bsEqCascadeGain */
 1004|  1.46k|    }
 1005|  3.49k|    filterBlockCount = FDKreadBits(hBs, 4);
 1006|  3.49k|    FDKpushFor(hBs, filterBlockCount * 7); /* filterBlockIndex */
 1007|  3.49k|  }
 1008|  3.55k|  eqPhaseAlignmentPresent = FDKreadBits(hBs, 1);
 1009|  3.55k|  {
 1010|  3.55k|    if (eqPhaseAlignmentPresent) {
  ------------------
  |  Branch (1010:9): [True: 2.06k, False: 1.48k]
  ------------------
 1011|  2.85k|      for (i = 0; i < eqChannelGroupCount; i++) {
  ------------------
  |  Branch (1011:19): [True: 791, False: 2.06k]
  ------------------
 1012|    791|        FDKpushFor(hBs, (eqChannelGroupCount - i - 1) * 1);
 1013|    791|      }
 1014|  2.06k|    }
 1015|  3.55k|  }
 1016|  3.55k|}
drcDec_reader.cpp:_ZL17_readLoudnessInfoP13FDK_BITSTREAMiP13LOUDNESS_INFO:
 1853|  17.7k|                                   LOUDNESS_INFO* loudnessInfo) {
 1854|  17.7k|  DRC_ERROR err = DE_OK;
 1855|  17.7k|  int bsSamplePeakLevel, bsTruePeakLevel, i;
 1856|  17.7k|  int measurementCount;
 1857|       |
 1858|  17.7k|  loudnessInfo->drcSetId = FDKreadBits(hBs, 6);
 1859|  17.7k|  if (version >= 1) {
  ------------------
  |  Branch (1859:7): [True: 3.37k, False: 14.3k]
  ------------------
 1860|  3.37k|    loudnessInfo->eqSetId = FDKreadBits(hBs, 6);
 1861|  14.3k|  } else {
 1862|  14.3k|    loudnessInfo->eqSetId = 0;
 1863|  14.3k|  }
 1864|  17.7k|  loudnessInfo->downmixId = FDKreadBits(hBs, 7);
 1865|       |
 1866|  17.7k|  loudnessInfo->samplePeakLevelPresent = FDKreadBits(hBs, 1);
 1867|  17.7k|  if (loudnessInfo->samplePeakLevelPresent) {
  ------------------
  |  Branch (1867:7): [True: 1.65k, False: 16.1k]
  ------------------
 1868|  1.65k|    bsSamplePeakLevel = FDKreadBits(hBs, 12);
 1869|  1.65k|    if (bsSamplePeakLevel == 0) {
  ------------------
  |  Branch (1869:9): [True: 80, False: 1.57k]
  ------------------
 1870|     80|      loudnessInfo->samplePeakLevelPresent = 0;
 1871|     80|      loudnessInfo->samplePeakLevel = (FIXP_DBL)0;
 1872|  1.57k|    } else { /* 20.0 - bsSamplePeakLevel * 0.03125; */
 1873|  1.57k|      loudnessInfo->samplePeakLevel =
 1874|  1.57k|          FL2FXCONST_DBL(20.0f / (float)(1 << 7)) -
  ------------------
  |  |  192|  1.57k|  (FIXP_DBL)(                                                                \
  |  |  193|  1.57k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 1.57k, Folded]
  |  |  ------------------
  |  |  194|  1.57k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  1.57k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.57k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 1.57k]
  |  |  ------------------
  |  |  195|  1.57k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  1.57k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  1.57k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  1.57k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  1.57k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.57k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  1.57k|          : ((((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.57k|          (FIXP_DBL)(bsSamplePeakLevel << (DFRACT_BITS - 1 - 5 - 7));
  ------------------
  |  |  113|  1.57k|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1876|  1.57k|    }
 1877|  1.65k|  }
 1878|       |
 1879|  17.7k|  loudnessInfo->truePeakLevelPresent = FDKreadBits(hBs, 1);
 1880|  17.7k|  if (loudnessInfo->truePeakLevelPresent) {
  ------------------
  |  Branch (1880:7): [True: 858, False: 16.9k]
  ------------------
 1881|    858|    bsTruePeakLevel = FDKreadBits(hBs, 12);
 1882|    858|    if (bsTruePeakLevel == 0) {
  ------------------
  |  Branch (1882:9): [True: 108, False: 750]
  ------------------
 1883|    108|      loudnessInfo->truePeakLevelPresent = 0;
 1884|    108|      loudnessInfo->truePeakLevel = (FIXP_DBL)0;
 1885|    750|    } else {
 1886|    750|      loudnessInfo->truePeakLevel =
 1887|    750|          FL2FXCONST_DBL(20.0f / (float)(1 << 7)) -
  ------------------
  |  |  192|    750|  (FIXP_DBL)(                                                                \
  |  |  193|    750|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 750, Folded]
  |  |  ------------------
  |  |  194|    750|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|    750|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    750|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 750]
  |  |  ------------------
  |  |  195|    750|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|    750|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|    750|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|    750|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|    750|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    750|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|    750|          : ((((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|    750|          (FIXP_DBL)(bsTruePeakLevel << (DFRACT_BITS - 1 - 5 - 7));
  ------------------
  |  |  113|    750|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1889|    750|    }
 1890|    858|    loudnessInfo->truePeakLevelMeasurementSystem = FDKreadBits(hBs, 4);
 1891|    858|    loudnessInfo->truePeakLevelReliability = FDKreadBits(hBs, 2);
 1892|    858|  }
 1893|       |
 1894|  17.7k|  measurementCount = FDKreadBits(hBs, 4);
 1895|  17.7k|  loudnessInfo->measurementCount = fMin(measurementCount, 8);
 1896|  23.7k|  for (i = 0; i < measurementCount; i++) {
  ------------------
  |  Branch (1896:15): [True: 6.59k, False: 17.1k]
  ------------------
 1897|  6.59k|    LOUDNESS_MEASUREMENT tmpMeas;
 1898|  6.59k|    FDKmemclear(&tmpMeas, sizeof(LOUDNESS_MEASUREMENT));
 1899|  6.59k|    err = _readLoudnessMeasurement(hBs, &tmpMeas);
 1900|  6.59k|    if (err) return err;
  ------------------
  |  Branch (1900:9): [True: 589, False: 6.01k]
  ------------------
 1901|  6.01k|    if (i >= 8) continue;
  ------------------
  |  Branch (1901:9): [True: 596, False: 5.41k]
  ------------------
 1902|  5.41k|    loudnessInfo->loudnessMeasurement[i] = tmpMeas;
 1903|  5.41k|  }
 1904|       |
 1905|  17.1k|  return err;
 1906|  17.7k|}
drcDec_reader.cpp:_ZL24_readLoudnessMeasurementP13FDK_BITSTREAMP20LOUDNESS_MEASUREMENT:
 1839|  6.59k|                                          LOUDNESS_MEASUREMENT* pMeas) {
 1840|  6.59k|  DRC_ERROR err = DE_OK;
 1841|       |
 1842|  6.59k|  pMeas->methodDefinition = FDKreadBits(hBs, 4);
 1843|  6.59k|  err =
 1844|  6.59k|      _decodeMethodValue(hBs, pMeas->methodDefinition, &pMeas->methodValue, 0);
 1845|  6.59k|  if (err) return err;
  ------------------
  |  Branch (1845:7): [True: 589, False: 6.01k]
  ------------------
 1846|  6.01k|  pMeas->measurementSystem = FDKreadBits(hBs, 4);
 1847|  6.01k|  pMeas->reliability = FDKreadBits(hBs, 2);
 1848|       |
 1849|  6.01k|  return err;
 1850|  6.59k|}
drcDec_reader.cpp:_ZL18_decodeMethodValueP13FDK_BITSTREAMhPii:
 1785|  6.59k|                                    FIXP_DBL* methodValue, INT isBox) {
 1786|  6.59k|  int tmp;
 1787|  6.59k|  FIXP_DBL val;
 1788|  6.59k|  switch (methodDefinition) {
 1789|  1.75k|    case MD_UNKNOWN_OTHER:
  ------------------
  |  Branch (1789:5): [True: 1.75k, False: 4.84k]
  ------------------
 1790|  2.49k|    case MD_PROGRAM_LOUDNESS:
  ------------------
  |  Branch (1790:5): [True: 741, False: 5.85k]
  ------------------
 1791|  2.98k|    case MD_ANCHOR_LOUDNESS:
  ------------------
  |  Branch (1791:5): [True: 488, False: 6.11k]
  ------------------
 1792|  3.20k|    case MD_MAX_OF_LOUDNESS_RANGE:
  ------------------
  |  Branch (1792:5): [True: 224, False: 6.37k]
  ------------------
 1793|  3.55k|    case MD_MOMENTARY_LOUDNESS_MAX:
  ------------------
  |  Branch (1793:5): [True: 343, False: 6.25k]
  ------------------
 1794|  3.71k|    case MD_SHORT_TERM_LOUDNESS_MAX:
  ------------------
  |  Branch (1794:5): [True: 167, False: 6.43k]
  ------------------
 1795|  3.71k|      tmp = FDKreadBits(hBs, 8);
 1796|  3.71k|      val = FL2FXCONST_DBL(-57.75f / (float)(1 << 7)) +
  ------------------
  |  |  192|  3.71k|  (FIXP_DBL)(                                                                \
  |  |  193|  3.71k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 3.71k]
  |  |  ------------------
  |  |  194|  3.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 (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.71k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|  3.71k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  3.71k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 3.71k]
  |  |  ------------------
  |  |  199|  3.71k|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|  3.71k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|  3.71k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|  3.71k|                 ? (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.71k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|  3.71k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  3.71k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1797|  3.71k|            (FIXP_DBL)(
 1798|  3.71k|                tmp << (DFRACT_BITS - 1 - 2 - 7)); /* -57.75 + tmp * 0.25; */
  ------------------
  |  |  113|  3.71k|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1799|  3.71k|      break;
 1800|    634|    case MD_LOUDNESS_RANGE:
  ------------------
  |  Branch (1800:5): [True: 634, False: 5.96k]
  ------------------
 1801|    634|      tmp = FDKreadBits(hBs, 8);
 1802|    634|      if (tmp == 0)
  ------------------
  |  Branch (1802:11): [True: 77, False: 557]
  ------------------
 1803|     77|        val = (FIXP_DBL)0;
 1804|    557|      else if (tmp <= 128)
  ------------------
  |  Branch (1804:16): [True: 276, False: 281]
  ------------------
 1805|    276|        val = (FIXP_DBL)(tmp << (DFRACT_BITS - 1 - 2 - 7)); /* tmp * 0.25; */
  ------------------
  |  |  113|    276|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1806|    281|      else if (tmp <= 204) {
  ------------------
  |  Branch (1806:16): [True: 167, False: 114]
  ------------------
 1807|    167|        val = (FIXP_DBL)(tmp << (DFRACT_BITS - 1 - 1 - 7)) -
  ------------------
  |  |  113|    167|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1808|    167|              FL2FXCONST_DBL(32.0f / (float)(1 << 7)); /* 0.5 * tmp - 32.0f; */
  ------------------
  |  |  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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1809|    167|      } else {
 1810|       |        /* downscale by 1 more bit to prevent overflow at intermediate result */
 1811|    114|        val = (FIXP_DBL)(tmp << (DFRACT_BITS - 1 - 8)) -
  ------------------
  |  |  113|    114|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1812|    114|              FL2FXCONST_DBL(134.0f / (float)(1 << 8)); /* tmp - 134.0; */
  ------------------
  |  |  192|    114|  (FIXP_DBL)(                                                                \
  |  |  193|    114|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 114, Folded]
  |  |  ------------------
  |  |  194|    114|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|    114|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    114|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 114]
  |  |  ------------------
  |  |  195|    114|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|    114|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|    114|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|    114|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|    114|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    114|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|    114|          : ((((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|    114|        val <<= 1;
 1814|    114|      }
 1815|    634|      break;
 1816|    568|    case MD_MIXING_LEVEL:
  ------------------
  |  Branch (1816:5): [True: 568, False: 6.03k]
  ------------------
 1817|    568|      tmp = FDKreadBits(hBs, isBox ? 8 : 5);
  ------------------
  |  Branch (1817:30): [True: 0, False: 568]
  ------------------
 1818|    568|      val = (FIXP_DBL)(tmp << (DFRACT_BITS - 1 - 7)) +
  ------------------
  |  |  113|    568|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1819|    568|            FL2FXCONST_DBL(80.0f / (float)(1 << 7)); /* tmp + 80.0; */
  ------------------
  |  |  192|    568|  (FIXP_DBL)(                                                                \
  |  |  193|    568|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 568, Folded]
  |  |  ------------------
  |  |  194|    568|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|    568|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    568|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 568]
  |  |  ------------------
  |  |  195|    568|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|    568|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|    568|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|    568|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|    568|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    568|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|    568|          : ((((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|    568|      break;
 1821|    856|    case MD_ROOM_TYPE:
  ------------------
  |  Branch (1821:5): [True: 856, False: 5.74k]
  ------------------
 1822|    856|      tmp = FDKreadBits(hBs, isBox ? 8 : 2);
  ------------------
  |  Branch (1822:30): [True: 0, False: 856]
  ------------------
 1823|    856|      val = (FIXP_DBL)(tmp << (DFRACT_BITS - 1 - 7)); /* tmp; */
  ------------------
  |  |  113|    856|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1824|    856|      break;
 1825|    235|    case MD_SHORT_TERM_LOUDNESS:
  ------------------
  |  Branch (1825:5): [True: 235, False: 6.36k]
  ------------------
 1826|    235|      tmp = FDKreadBits(hBs, 8);
 1827|    235|      val = FL2FXCONST_DBL(-116.0f / (float)(1 << 7)) +
  ------------------
  |  |  192|    235|  (FIXP_DBL)(                                                                \
  |  |  193|    235|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 235]
  |  |  ------------------
  |  |  194|    235|          ? ((((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|    235|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|    235|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    235|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 235]
  |  |  ------------------
  |  |  199|    235|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|    235|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|    235|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|    235|                 ? (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|    235|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|    235|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    235|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1828|    235|            (FIXP_DBL)(
 1829|    235|                tmp << (DFRACT_BITS - 1 - 1 - 7)); /* -116.0 + tmp * 0.5; */
  ------------------
  |  |  113|    235|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1830|    235|      break;
 1831|    589|    default:
  ------------------
  |  Branch (1831:5): [True: 589, False: 6.01k]
  ------------------
 1832|    589|      return DE_NOT_OK; /* invalid methodDefinition value */
 1833|  6.59k|  }
 1834|  6.01k|  *methodValue = val;
 1835|  6.01k|  return DE_OK;
 1836|  6.59k|}
drcDec_reader.cpp:_ZL29_readLoudnessInfoSetExtensionP13FDK_BITSTREAMP17LOUDNESS_INFO_SET:
 1955|  1.09k|    HANDLE_FDK_BITSTREAM hBs, HANDLE_LOUDNESS_INFO_SET hLoudnessInfoSet) {
 1956|  1.09k|  DRC_ERROR err = DE_OK;
 1957|  1.09k|  int k, bitSizeLen, extSizeBits, bitSize;
 1958|  1.09k|  INT nBitsRemaining;
 1959|  1.09k|  LOUDNESS_INFO_SET_EXTENSION* pExt = &(hLoudnessInfoSet->loudnessInfoSetExt);
 1960|       |
 1961|  1.09k|  k = 0;
 1962|  1.09k|  pExt->loudnessInfoSetExtType[k] = FDKreadBits(hBs, 4);
 1963|  1.95k|  while (pExt->loudnessInfoSetExtType[k] != UNIDRCLOUDEXT_TERM) {
  ------------------
  |  |  116|  1.95k|#define UNIDRCLOUDEXT_TERM 0x0
  ------------------
  |  Branch (1963:10): [True: 1.39k, False: 554]
  ------------------
 1964|  1.39k|    if (k >= (8 - 1)) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (1964:9): [True: 62, False: 1.33k]
  ------------------
 1965|  1.33k|    bitSizeLen = FDKreadBits(hBs, 4);
 1966|  1.33k|    extSizeBits = bitSizeLen + 4;
 1967|       |
 1968|  1.33k|    bitSize = FDKreadBits(hBs, extSizeBits);
 1969|  1.33k|    pExt->extBitSize[k] = bitSize + 1;
 1970|  1.33k|    nBitsRemaining = (INT)FDKgetValidBits(hBs);
 1971|       |
 1972|  1.33k|    switch (pExt->loudnessInfoSetExtType[k]) {
 1973|    714|      case UNIDRCLOUDEXT_EQ:
  ------------------
  |  |  113|    714|#define UNIDRCLOUDEXT_EQ 0x1
  ------------------
  |  Branch (1973:7): [True: 714, False: 622]
  ------------------
 1974|    714|        err = _readLoudnessInfoSetExtEq(hBs, hLoudnessInfoSet);
 1975|    714|        if (err) return err;
  ------------------
  |  Branch (1975:13): [True: 155, False: 559]
  ------------------
 1976|    559|        if (nBitsRemaining !=
  ------------------
  |  Branch (1976:13): [True: 323, False: 236]
  ------------------
 1977|    559|            ((INT)pExt->extBitSize[k] + (INT)FDKgetValidBits(hBs)))
 1978|    323|          return DE_NOT_OK;
 1979|    236|        break;
 1980|       |      /* add future extensions here */
 1981|    622|      default:
  ------------------
  |  Branch (1981:7): [True: 622, False: 714]
  ------------------
 1982|    622|        FDKpushFor(hBs, pExt->extBitSize[k]);
 1983|    622|        break;
 1984|  1.33k|    }
 1985|    858|    k++;
 1986|    858|    pExt->loudnessInfoSetExtType[k] = FDKreadBits(hBs, 4);
 1987|    858|  }
 1988|       |
 1989|    554|  return err;
 1990|  1.09k|}
drcDec_reader.cpp:_ZL25_readLoudnessInfoSetExtEqP13FDK_BITSTREAMP17LOUDNESS_INFO_SET:
 1909|    714|    HANDLE_FDK_BITSTREAM hBs, HANDLE_LOUDNESS_INFO_SET hLoudnessInfoSet) {
 1910|    714|  DRC_ERROR err = DE_OK;
 1911|    714|  int i, offset;
 1912|    714|  int diff = hLoudnessInfoSet->diff;
 1913|       |
 1914|    714|  diff |= _compAssign(&hLoudnessInfoSet->loudnessInfoAlbumCountV1,
 1915|    714|                      FDKreadBits(hBs, 6));
 1916|    714|  diff |=
 1917|    714|      _compAssign(&hLoudnessInfoSet->loudnessInfoCountV1, FDKreadBits(hBs, 6));
 1918|       |
 1919|    714|  offset = hLoudnessInfoSet->loudnessInfoAlbumCountV0;
 1920|    714|  hLoudnessInfoSet->loudnessInfoAlbumCount = fMin(
 1921|    714|      (UCHAR)(offset + hLoudnessInfoSet->loudnessInfoAlbumCountV1), (UCHAR)12);
 1922|  2.47k|  for (i = 0; i < hLoudnessInfoSet->loudnessInfoAlbumCountV1; i++) {
  ------------------
  |  Branch (1922:15): [True: 1.84k, False: 626]
  ------------------
 1923|  1.84k|    LOUDNESS_INFO tmpLoud;
 1924|  1.84k|    FDKmemclear(&tmpLoud, sizeof(LOUDNESS_INFO));
 1925|  1.84k|    err = _readLoudnessInfo(hBs, 1, &tmpLoud);
 1926|  1.84k|    if (err) return err;
  ------------------
  |  Branch (1926:9): [True: 88, False: 1.75k]
  ------------------
 1927|  1.75k|    if ((offset + i) >= 12) continue;
  ------------------
  |  Branch (1927:9): [True: 1.04k, False: 712]
  ------------------
 1928|    712|    if (!diff)
  ------------------
  |  Branch (1928:9): [True: 88, False: 624]
  ------------------
 1929|     88|      diff |= (FDKmemcmp(&tmpLoud,
 1930|     88|                         &(hLoudnessInfoSet->loudnessInfoAlbum[offset + i]),
 1931|     88|                         sizeof(LOUDNESS_INFO)) != 0);
 1932|    712|    hLoudnessInfoSet->loudnessInfoAlbum[offset + i] = tmpLoud;
 1933|    712|  }
 1934|       |
 1935|    626|  offset = hLoudnessInfoSet->loudnessInfoCountV0;
 1936|    626|  hLoudnessInfoSet->loudnessInfoCount =
 1937|    626|      fMin((UCHAR)(offset + hLoudnessInfoSet->loudnessInfoCountV1), (UCHAR)12);
 1938|  2.08k|  for (i = 0; i < hLoudnessInfoSet->loudnessInfoCountV1; i++) {
  ------------------
  |  Branch (1938:15): [True: 1.52k, False: 559]
  ------------------
 1939|  1.52k|    LOUDNESS_INFO tmpLoud;
 1940|  1.52k|    FDKmemclear(&tmpLoud, sizeof(LOUDNESS_INFO));
 1941|  1.52k|    err = _readLoudnessInfo(hBs, 1, &tmpLoud);
 1942|  1.52k|    if (err) return err;
  ------------------
  |  Branch (1942:9): [True: 67, False: 1.45k]
  ------------------
 1943|  1.45k|    if ((offset + i) >= 12) continue;
  ------------------
  |  Branch (1943:9): [True: 850, False: 608]
  ------------------
 1944|    608|    if (!diff)
  ------------------
  |  Branch (1944:9): [True: 122, False: 486]
  ------------------
 1945|    122|      diff |=
 1946|    122|          (FDKmemcmp(&tmpLoud, &(hLoudnessInfoSet->loudnessInfo[offset + i]),
 1947|    122|                     sizeof(LOUDNESS_INFO)) != 0);
 1948|    608|    hLoudnessInfoSet->loudnessInfo[offset + i] = tmpLoud;
 1949|    608|  }
 1950|    559|  hLoudnessInfoSet->diff = diff;
 1951|    559|  return err;
 1952|    626|}

_Z30drcDec_SelectionProcess_CreatePP26s_drcdec_selection_process:
  436|  7.35k|drcDec_SelectionProcess_Create(HANDLE_DRC_SELECTION_PROCESS* phInstance) {
  437|  7.35k|  HANDLE_DRC_SELECTION_PROCESS hInstance;
  438|  7.35k|  hInstance = (HANDLE_DRC_SELECTION_PROCESS)FDKcalloc(
  439|  7.35k|      1, sizeof(struct s_drcdec_selection_process));
  440|       |
  441|  7.35k|  if (!hInstance) return DRCDEC_SELECTION_PROCESS_OUTOFMEMORY;
  ------------------
  |  Branch (441:7): [True: 0, False: 7.35k]
  ------------------
  442|       |
  443|  7.35k|  hInstance->codecMode = SEL_PROC_CODEC_MODE_UNDEFINED;
  444|       |
  445|  7.35k|  *phInstance = hInstance;
  446|  7.35k|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
  447|  7.35k|}
_Z28drcDec_SelectionProcess_InitP26s_drcdec_selection_process:
  450|  7.35k|drcDec_SelectionProcess_Init(HANDLE_DRC_SELECTION_PROCESS hInstance) {
  451|  7.35k|  if (!hInstance) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (451:7): [True: 0, False: 7.35k]
  ------------------
  452|       |
  453|  7.35k|  _initDefaultParams(&hInstance->selProcInput);
  454|  7.35k|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
  455|  7.35k|}
_Z36drcDec_SelectionProcess_SetCodecModeP26s_drcdec_selection_process19SEL_PROC_CODEC_MODE:
  459|  5.11k|                                     const SEL_PROC_CODEC_MODE codecMode) {
  460|  5.11k|  DRCDEC_SELECTION_PROCESS_RETURN retVal = DRCDEC_SELECTION_PROCESS_NO_ERROR;
  461|       |
  462|  5.11k|  if (!hInstance) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (462:7): [True: 0, False: 5.11k]
  ------------------
  463|       |
  464|  5.11k|  switch (codecMode) {
  465|      0|    case SEL_PROC_MPEG_4_AAC:
  ------------------
  |  Branch (465:5): [True: 0, False: 5.11k]
  ------------------
  466|  5.11k|    case SEL_PROC_MPEG_D_USAC:
  ------------------
  |  Branch (466:5): [True: 5.11k, False: 0]
  ------------------
  467|  5.11k|    case SEL_PROC_TEST_TIME_DOMAIN:
  ------------------
  |  Branch (467:5): [True: 0, False: 5.11k]
  ------------------
  468|  5.11k|    case SEL_PROC_TEST_QMF_DOMAIN:
  ------------------
  |  Branch (468:5): [True: 0, False: 5.11k]
  ------------------
  469|  5.11k|    case SEL_PROC_TEST_STFT_DOMAIN:
  ------------------
  |  Branch (469:5): [True: 0, False: 5.11k]
  ------------------
  470|  5.11k|      hInstance->codecMode = codecMode;
  471|  5.11k|      break;
  472|       |
  473|      0|    case SEL_PROC_CODEC_MODE_UNDEFINED:
  ------------------
  |  Branch (473:5): [True: 0, False: 5.11k]
  ------------------
  474|      0|    default:
  ------------------
  |  Branch (474:5): [True: 0, False: 5.11k]
  ------------------
  475|      0|      return DRCDEC_SELECTION_PROCESS_NOT_OK;
  476|  5.11k|  }
  477|       |
  478|  5.11k|  retVal = _initCodecModeParams(&(hInstance->selProcInput),
  479|  5.11k|                                hInstance->codecMode = codecMode);
  480|       |
  481|  5.11k|  return retVal;
  482|  5.11k|}
_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.35k|drcDec_SelectionProcess_Delete(HANDLE_DRC_SELECTION_PROCESS* phInstance) {
  648|  7.35k|  if (phInstance == NULL || *phInstance == NULL)
  ------------------
  |  Branch (648:7): [True: 0, False: 7.35k]
  |  Branch (648:29): [True: 0, False: 7.35k]
  ------------------
  649|      0|    return DRCDEC_SELECTION_PROCESS_INVALID_HANDLE;
  650|       |
  651|  7.35k|  FDKfree(*phInstance);
  652|       |  *phInstance = NULL;
  653|  7.35k|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
  654|  7.35k|}
_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.76k, False: 79]
  ------------------
  677|  2.84k|      hUniDrcConfig->channelLayout.baseChannelCount) {
  678|  2.76k|    hInstance->selProcInput.baseChannelCount =
  679|  2.76k|        hUniDrcConfig->channelLayout.baseChannelCount;
  680|  2.76k|  }
  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: 19, 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: 77, False: 2.73k]
  ------------------
  719|       |
  720|  2.73k|  retVal = _generateOutputInfo(
  721|  2.73k|      &(hInstance->selProcInput), hSelProcOutput, hUniDrcConfig,
  722|  2.73k|      hLoudnessInfoSet, &(pCandidatesSelected->data[0]), hInstance->codecMode);
  723|       |
  724|  2.73k|  if (_isError(retVal)) return (retVal);
  ------------------
  |  Branch (724:7): [True: 180, 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.48k|void _initValueOrder(VALUE_ORDER* pValue) {
 2588|  5.48k|  pValue->value = (FIXP_DBL)0;
 2589|  5.48k|  pValue->order = -1;
 2590|  5.48k|}
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.58k|static int _isError(int x) {
  254|  5.58k|  if (x < DRCDEC_SELECTION_PROCESS_WARNING) {
  ------------------
  |  Branch (254:7): [True: 180, False: 5.40k]
  ------------------
  255|    180|    return 1;
  256|    180|  }
  257|       |
  258|  5.40k|  return 0;
  259|  5.58k|}
drcDec_selectionProcess.cpp:_ZL18_initDefaultParamsP14SEL_PROC_INPUT:
  737|  7.35k|    HANDLE_SEL_PROC_INPUT hSelProcInput) {
  738|  7.35k|  DRCDEC_SELECTION_PROCESS_RETURN retVal = DRCDEC_SELECTION_PROCESS_NO_ERROR;
  739|       |
  740|  7.35k|  if (hSelProcInput == NULL) return DRCDEC_SELECTION_PROCESS_INVALID_HANDLE;
  ------------------
  |  Branch (740:7): [True: 0, False: 7.35k]
  ------------------
  741|       |
  742|       |  /* system parameters */
  743|  7.35k|  hSelProcInput->baseChannelCount = -1;
  744|  7.35k|  hSelProcInput->baseLayout = -1;
  745|  7.35k|  hSelProcInput->targetConfigRequestType = TCRT_DOWNMIX_ID;
  746|  7.35k|  hSelProcInput->numDownmixIdRequests = 0;
  747|       |
  748|       |  /* loudness normalization parameters */
  749|  7.35k|  hSelProcInput->albumMode = 0;
  750|  7.35k|  hSelProcInput->peakLimiterPresent = 0;
  751|  7.35k|  hSelProcInput->loudnessNormalizationOn = 1;
  752|  7.35k|  hSelProcInput->targetLoudness = FL2FXCONST_DBL(-24.0f / (float)(1 << 7));
  ------------------
  |  |  192|  7.35k|  (FIXP_DBL)(                                                                \
  |  |  193|  7.35k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 7.35k]
  |  |  ------------------
  |  |  194|  7.35k|          ? ((((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.35k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|  7.35k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  7.35k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 7.35k]
  |  |  ------------------
  |  |  199|  7.35k|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|  7.35k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|  7.35k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|  7.35k|                 ? (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.35k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|  7.35k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  7.35k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  753|  7.35k|  hSelProcInput->loudnessDeviationMax = DEFAULT_LOUDNESS_DEVIATION_MAX;
  ------------------
  |  |  137|  7.35k|#define DEFAULT_LOUDNESS_DEVIATION_MAX 63
  ------------------
  754|  7.35k|  hSelProcInput->loudnessMeasurementMethod = MDR_ANCHOR_LOUDNESS;
  755|  7.35k|  hSelProcInput->loudnessMeasurementSystem = MSR_EXPERT_PANEL;
  756|  7.35k|  hSelProcInput->loudnessMeasurementPreProc = LPR_DEFAULT;
  757|  7.35k|  hSelProcInput->deviceCutOffFrequency = 500;
  758|  7.35k|  hSelProcInput->loudnessNormalizationGainDbMax =
  759|  7.35k|      (FIXP_DBL)MAXVAL_DBL; /* infinity as default */
  ------------------
  |  |  156|  7.35k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  760|  7.35k|  hSelProcInput->loudnessNormalizationGainModificationDb = (FIXP_DBL)0;
  761|  7.35k|  hSelProcInput->outputPeakLevelMax = (FIXP_DBL)0;
  762|  7.35k|  if (hSelProcInput->peakLimiterPresent == 1) {
  ------------------
  |  Branch (762:7): [True: 0, False: 7.35k]
  ------------------
  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.35k|  hSelProcInput->dynamicRangeControlOn = 1;
  768|       |
  769|  7.35k|  hSelProcInput->numDrcFeatureRequests = 0;
  770|       |
  771|       |  /* other parameters */
  772|  7.35k|  hSelProcInput->boost = FL2FXCONST_SGL(1.f / (float)(1 << 1));
  ------------------
  |  |  180|  7.35k|  (FIXP_SGL)(                                                                \
  |  |  181|  7.35k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 7.35k, Folded]
  |  |  ------------------
  |  |  182|  7.35k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  7.35k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  7.35k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 7.35k]
  |  |  ------------------
  |  |  183|  7.35k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  7.35k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  7.35k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  7.35k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  7.35k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  7.35k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  7.35k|          : ((((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.35k|  hSelProcInput->compress = FL2FXCONST_SGL(1.f / (float)(1 << 1));
  ------------------
  |  |  180|  7.35k|  (FIXP_SGL)(                                                                \
  |  |  181|  7.35k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 7.35k, Folded]
  |  |  ------------------
  |  |  182|  7.35k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  7.35k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  7.35k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 7.35k]
  |  |  ------------------
  |  |  183|  7.35k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  7.35k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  7.35k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  7.35k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  7.35k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  7.35k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  7.35k|          : ((((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.35k|  hSelProcInput->drcCharacteristicTarget = 0;
  775|       |
  776|  7.35k|  return retVal;
  777|  7.35k|}
drcDec_selectionProcess.cpp:_ZL20_initCodecModeParamsP14SEL_PROC_INPUT19SEL_PROC_CODEC_MODE:
  780|  5.11k|    HANDLE_SEL_PROC_INPUT hSelProcInput, const SEL_PROC_CODEC_MODE codecMode) {
  781|  5.11k|  DRCDEC_SELECTION_PROCESS_RETURN retVal = DRCDEC_SELECTION_PROCESS_NO_ERROR;
  782|       |
  783|  5.11k|  if (hSelProcInput == NULL) return DRCDEC_SELECTION_PROCESS_INVALID_HANDLE;
  ------------------
  |  Branch (783:7): [True: 0, False: 5.11k]
  ------------------
  784|       |
  785|  5.11k|  switch (codecMode) {
  786|      0|    case SEL_PROC_MPEG_H_3DA:
  ------------------
  |  Branch (786:5): [True: 0, False: 5.11k]
  ------------------
  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.11k]
  ------------------
  795|  5.11k|    case SEL_PROC_MPEG_D_USAC:
  ------------------
  |  Branch (795:5): [True: 5.11k, False: 0]
  ------------------
  796|  5.11k|      hSelProcInput->loudnessDeviationMax = DEFAULT_LOUDNESS_DEVIATION_MAX;
  ------------------
  |  |  137|  5.11k|#define DEFAULT_LOUDNESS_DEVIATION_MAX 63
  ------------------
  797|  5.11k|      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.11k|      hSelProcInput->outputPeakLevelMax =
  802|  5.11k|          FL2FXCONST_DBL(6.0f / (float)(1 << 7));
  ------------------
  |  |  192|  5.11k|  (FIXP_DBL)(                                                                \
  |  |  193|  5.11k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 5.11k, Folded]
  |  |  ------------------
  |  |  194|  5.11k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  5.11k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  5.11k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 5.11k]
  |  |  ------------------
  |  |  195|  5.11k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  5.11k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  5.11k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  5.11k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  5.11k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  5.11k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  5.11k|          : ((((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.11k|      break;
  804|      0|    case SEL_PROC_TEST_TIME_DOMAIN:
  ------------------
  |  Branch (804:5): [True: 0, False: 5.11k]
  ------------------
  805|      0|    case SEL_PROC_TEST_QMF_DOMAIN:
  ------------------
  |  Branch (805:5): [True: 0, False: 5.11k]
  ------------------
  806|      0|    case SEL_PROC_TEST_STFT_DOMAIN:
  ------------------
  |  Branch (806:5): [True: 0, False: 5.11k]
  ------------------
  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.11k]
  ------------------
  812|      0|    default:
  ------------------
  |  Branch (812:5): [True: 0, False: 5.11k]
  ------------------
  813|      0|      hSelProcInput->loudnessDeviationMax = DEFAULT_LOUDNESS_DEVIATION_MAX;
  ------------------
  |  |  137|      0|#define DEFAULT_LOUDNESS_DEVIATION_MAX 63
  ------------------
  814|      0|      hSelProcInput->peakLimiterPresent = 0;
  815|  5.11k|  }
  816|       |
  817|  5.11k|  return retVal;
  818|  5.11k|}
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.33k, False: 479]
  ------------------
 1941|  2.33k|    _swapSelection(ppCandidatesPotential, ppCandidatesSelected);
 1942|       |    /* finished */
 1943|  2.33k|  } else /* > 1 */
 1944|    479|  {
 1945|    479|    retVal = _drcSetFinalSelection_peakValue0(*ppCandidatesPotential,
 1946|    479|                                              *ppCandidatesSelected);
 1947|    479|    if (retVal) return (retVal);
  ------------------
  |  Branch (1947:9): [True: 0, False: 479]
  ------------------
 1948|       |
 1949|    479|    if (_drcdec_selection_getNumber(*ppCandidatesSelected) > 1) {
  ------------------
  |  Branch (1949:9): [True: 386, False: 93]
  ------------------
 1950|    386|      _swapSelectionAndClear(ppCandidatesPotential, ppCandidatesSelected);
 1951|    386|      retVal = _drcSetFinalSelection_downmixId(
 1952|    386|          hSelProcInput, ppCandidatesPotential, ppCandidatesSelected);
 1953|    386|      if (retVal) return (retVal);
  ------------------
  |  Branch (1953:11): [True: 0, False: 386]
  ------------------
 1954|    386|    }
 1955|       |
 1956|    479|    if (_drcdec_selection_getNumber(*ppCandidatesSelected) > 1) {
  ------------------
  |  Branch (1956:9): [True: 386, False: 93]
  ------------------
 1957|    386|      _swapSelectionAndClear(ppCandidatesPotential, ppCandidatesSelected);
 1958|    386|      retVal = _drcSetFinalSelection_effectTypes(*ppCandidatesPotential,
 1959|    386|                                                 *ppCandidatesSelected);
 1960|    386|      if (retVal) return (retVal);
  ------------------
  |  Branch (1960:11): [True: 0, False: 386]
  ------------------
 1961|    386|    }
 1962|       |
 1963|    479|    if (_drcdec_selection_getNumber(*ppCandidatesSelected) > 1) {
  ------------------
  |  Branch (1963:9): [True: 285, False: 194]
  ------------------
 1964|    285|      _swapSelectionAndClear(ppCandidatesPotential, ppCandidatesSelected);
 1965|    285|      retVal = _drcSetFinalSelection_targetLoudness(
 1966|    285|          hSelProcInput->targetLoudness, *ppCandidatesPotential,
 1967|    285|          *ppCandidatesSelected);
 1968|    285|      if (retVal) return (retVal);
  ------------------
  |  Branch (1968:11): [True: 0, False: 285]
  ------------------
 1969|    285|    }
 1970|       |
 1971|    479|    if (_drcdec_selection_getNumber(*ppCandidatesSelected) > 1) {
  ------------------
  |  Branch (1971:9): [True: 259, False: 220]
  ------------------
 1972|    259|      _swapSelectionAndClear(ppCandidatesPotential, ppCandidatesSelected);
 1973|    259|      retVal = _drcSetFinalSelection_peakValueLargest(*ppCandidatesPotential,
 1974|    259|                                                      *ppCandidatesSelected);
 1975|    259|      if (retVal) return (retVal);
  ------------------
  |  Branch (1975:11): [True: 0, False: 259]
  ------------------
 1976|    259|    }
 1977|       |
 1978|    479|    if (_drcdec_selection_getNumber(*ppCandidatesSelected) > 1) {
  ------------------
  |  Branch (1978:9): [True: 237, False: 242]
  ------------------
 1979|    237|      _swapSelectionAndClear(ppCandidatesPotential, ppCandidatesSelected);
 1980|    237|      retVal = _drcSetFinalSelection_drcSetId(*ppCandidatesPotential,
 1981|    237|                                              *ppCandidatesSelected);
 1982|    237|      if (retVal) return (retVal);
  ------------------
  |  Branch (1982:11): [True: 0, False: 237]
  ------------------
 1983|    237|    }
 1984|    479|  }
 1985|       |
 1986|  2.80k|  if (_drcdec_selection_getNumber(*ppCandidatesSelected) == 0) {
  ------------------
  |  Branch (1986:7): [True: 77, False: 2.73k]
  ------------------
 1987|     77|    return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1988|     77|  }
 1989|       |
 1990|  2.73k|  return retVal;
 1991|  2.80k|}
drcDec_selectionProcess.cpp:_ZL32_drcSetFinalSelection_peakValue0P16DRCDEC_SELECTIONS0_:
 1670|    479|    DRCDEC_SELECTION* pCandidatesSelected) {
 1671|    479|  int i;
 1672|       |
 1673|  2.50k|  for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1673:15): [True: 2.02k, False: 479]
  ------------------
 1674|  2.02k|    DRCDEC_SELECTION_DATA* pCandidate =
 1675|  2.02k|        _drcdec_selection_getAt(pCandidatesPotential, i);
 1676|  2.02k|    if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1676:9): [True: 0, False: 2.02k]
  ------------------
 1677|       |
 1678|  2.02k|    if (pCandidate->outputPeakLevel <= FIXP_DBL(0)) {
  ------------------
  |  Branch (1678:9): [True: 1.63k, False: 390]
  ------------------
 1679|  1.63k|      if (_drcdec_selection_add(pCandidatesSelected, pCandidate) == NULL)
  ------------------
  |  Branch (1679:11): [True: 0, False: 1.63k]
  ------------------
 1680|      0|        return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1681|  1.63k|    }
 1682|  2.02k|  }
 1683|       |
 1684|    479|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1685|    479|}
drcDec_selectionProcess.cpp:_ZL23_drcdec_selection_getAtP16DRCDEC_SELECTIONi:
 2469|  27.2k|    DRCDEC_SELECTION* pSelection, int at) {
 2470|  27.2k|  if (at >= 0 && at < (12 + 1 + 6)) {
  ------------------
  |  Branch (2470:7): [True: 27.2k, False: 0]
  |  Branch (2470:18): [True: 27.2k, False: 0]
  ------------------
 2471|  27.2k|    return &(pSelection->data[at]);
 2472|  27.2k|  } else {
 2473|       |    return NULL;
 2474|      0|  }
 2475|  27.2k|}
drcDec_selectionProcess.cpp:_ZL21_drcdec_selection_addP16DRCDEC_SELECTIONP21DRCDEC_SELECTION_DATA:
 2441|  15.6k|    DRCDEC_SELECTION* pSelection, DRCDEC_SELECTION_DATA* pDataIn) {
 2442|  15.6k|  if (pSelection->numData < (12 + 1 + 6)) {
  ------------------
  |  Branch (2442:7): [True: 15.6k, False: 0]
  ------------------
 2443|  15.6k|    DRCDEC_SELECTION_DATA* pData = &(pSelection->data[pSelection->numData]);
 2444|  15.6k|    FDKmemcpy(pData, pDataIn, sizeof(DRCDEC_SELECTION_DATA));
 2445|  15.6k|    pSelection->numData++;
 2446|  15.6k|    return pData;
 2447|  15.6k|  } else {
 2448|       |    return NULL;
 2449|      0|  }
 2450|  15.6k|}
drcDec_selectionProcess.cpp:_ZL31_drcSetFinalSelection_downmixIdP14SEL_PROC_INPUTPP16DRCDEC_SELECTIONS3_:
 1690|    386|    DRCDEC_SELECTION** ppCandidatesSelected) {
 1691|    386|  int i, j;
 1692|    386|  DRCDEC_SELECTION_DATA* pCandidate = NULL;
 1693|    386|  DRC_INSTRUCTIONS_UNI_DRC* pInst = NULL;
 1694|       |
 1695|  2.00k|  for (i = 0; i < _drcdec_selection_getNumber(*ppCandidatesPotential); i++) {
  ------------------
  |  Branch (1695:15): [True: 1.61k, False: 386]
  ------------------
 1696|  1.61k|    pCandidate = _drcdec_selection_getAt(*ppCandidatesPotential, i);
 1697|  1.61k|    if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1697:9): [True: 0, False: 1.61k]
  ------------------
 1698|       |
 1699|  1.61k|    pInst = pCandidate->pInst;
 1700|       |
 1701|  3.42k|    for (j = 0; j < pInst->downmixIdCount; j++) {
  ------------------
  |  Branch (1701:17): [True: 1.81k, False: 1.61k]
  ------------------
 1702|  1.81k|      if (DOWNMIX_ID_BASE_LAYOUT != pInst->downmixId[j] &&
  ------------------
  |  |  122|  1.81k|#define DOWNMIX_ID_BASE_LAYOUT 0x0
  ------------------
  |  Branch (1702:11): [True: 296, False: 1.51k]
  ------------------
 1703|    296|          DOWNMIX_ID_ANY_DOWNMIX != pInst->downmixId[j] &&
  ------------------
  |  |  123|    296|#define DOWNMIX_ID_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (1703:11): [True: 77, False: 219]
  ------------------
 1704|     77|          hSelProcInput
  ------------------
  |  Branch (1704:11): [True: 0, False: 77]
  ------------------
 1705|     77|                  ->downmixIdRequested[pCandidate->downmixIdRequestIndex] ==
 1706|     77|              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.81k|    }
 1711|  1.61k|  }
 1712|       |
 1713|    386|  if (_drcdec_selection_getNumber(*ppCandidatesSelected) == 0) {
  ------------------
  |  Branch (1713:7): [True: 386, False: 0]
  ------------------
 1714|    386|    _swapSelection(ppCandidatesPotential, ppCandidatesSelected);
 1715|    386|  }
 1716|       |
 1717|    386|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1718|    386|}
drcDec_selectionProcess.cpp:_ZL33_drcSetFinalSelection_effectTypesP16DRCDEC_SELECTIONS0_:
 1736|    386|    DRCDEC_SELECTION* pCandidatesSelected) {
 1737|    386|  int i;
 1738|    386|  int minNumEffects = 1000;
 1739|    386|  int numEffects = 0;
 1740|    386|  int effects = 0;
 1741|    386|  DRCDEC_SELECTION_DATA* pCandidate = NULL;
 1742|    386|  DRC_INSTRUCTIONS_UNI_DRC* pInst = NULL;
 1743|       |
 1744|  2.00k|  for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1744:15): [True: 1.61k, False: 386]
  ------------------
 1745|  1.61k|    pCandidate = _drcdec_selection_getAt(pCandidatesPotential, i);
 1746|  1.61k|    if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1746:9): [True: 0, False: 1.61k]
  ------------------
 1747|       |
 1748|  1.61k|    pInst = pCandidate->pInst;
 1749|       |
 1750|  1.61k|    effects = pInst->drcSetEffect;
 1751|  1.61k|    effects &= 0xffff ^ (EB_GENERAL_COMPR);
 1752|  1.61k|    numEffects = _crossSum(effects);
 1753|       |
 1754|  1.61k|    if (numEffects < minNumEffects) {
  ------------------
  |  Branch (1754:9): [True: 556, False: 1.06k]
  ------------------
 1755|    556|      minNumEffects = numEffects;
 1756|    556|    }
 1757|  1.61k|  }
 1758|       |
 1759|       |  /* add all with minimum number of effects */
 1760|  2.00k|  for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1760:15): [True: 1.61k, False: 386]
  ------------------
 1761|  1.61k|    pCandidate = _drcdec_selection_getAt(pCandidatesPotential, i);
 1762|  1.61k|    if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1762:9): [True: 0, False: 1.61k]
  ------------------
 1763|       |
 1764|  1.61k|    pInst = pCandidate->pInst;
 1765|       |
 1766|  1.61k|    effects = pInst->drcSetEffect;
 1767|  1.61k|    effects &= 0xffff ^ (EB_GENERAL_COMPR);
 1768|  1.61k|    numEffects = _crossSum(effects);
 1769|       |
 1770|  1.61k|    if (numEffects == minNumEffects) {
  ------------------
  |  Branch (1770:9): [True: 1.29k, False: 318]
  ------------------
 1771|  1.29k|      if (_drcdec_selection_add(pCandidatesSelected, pCandidate) == NULL)
  ------------------
  |  Branch (1771:11): [True: 0, False: 1.29k]
  ------------------
 1772|      0|        return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1773|  1.29k|    }
 1774|  1.61k|  }
 1775|       |
 1776|    386|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1777|    386|}
drcDec_selectionProcess.cpp:_ZL9_crossSumi:
 1720|  3.23k|static int _crossSum(int value) {
 1721|  3.23k|  int sum = 0;
 1722|       |
 1723|  18.8k|  while (value != 0) {
  ------------------
  |  Branch (1723:10): [True: 15.6k, False: 3.23k]
  ------------------
 1724|  15.6k|    if ((value & 1) == 1) {
  ------------------
  |  Branch (1724:9): [True: 5.55k, False: 10.0k]
  ------------------
 1725|  5.55k|      sum++;
 1726|  5.55k|    }
 1727|       |
 1728|  15.6k|    value >>= 1;
 1729|  15.6k|  }
 1730|       |
 1731|  3.23k|  return sum;
 1732|  3.23k|}
drcDec_selectionProcess.cpp:_ZL36_drcSetFinalSelection_targetLoudnessiP16DRCDEC_SELECTIONS0_:
 1816|    285|    DRCDEC_SELECTION* pCandidatesSelected) {
 1817|    285|  DRCDEC_SELECTION_PROCESS_RETURN retVal = DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1818|    285|  int i;
 1819|    285|  DRCDEC_SELECTION_DATA* pCandidate = NULL;
 1820|       |
 1821|  1.48k|  for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1821:15): [True: 1.19k, False: 285]
  ------------------
 1822|  1.19k|    pCandidate = _drcdec_selection_getAt(pCandidatesPotential, i);
 1823|  1.19k|    if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1823:9): [True: 0, False: 1.19k]
  ------------------
 1824|       |
 1825|  1.19k|    if (pCandidate->selectionFlag == 0) {
  ------------------
  |  Branch (1825:9): [True: 1.10k, False: 89]
  ------------------
 1826|  1.10k|      if (_drcdec_selection_add(pCandidatesSelected, pCandidate) == NULL)
  ------------------
  |  Branch (1826:11): [True: 0, False: 1.10k]
  ------------------
 1827|      0|        return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1828|  1.10k|    }
 1829|  1.19k|  }
 1830|       |
 1831|    285|  if (_drcdec_selection_getNumber(pCandidatesSelected) == 0) {
  ------------------
  |  Branch (1831:7): [True: 24, False: 261]
  ------------------
 1832|     24|    retVal = _selectSmallestTargetLoudnessValueUpper(pCandidatesPotential,
 1833|     24|                                                     pCandidatesSelected);
 1834|     24|    if (retVal) return (retVal);
  ------------------
  |  Branch (1834:9): [True: 0, False: 24]
  ------------------
 1835|     24|  }
 1836|       |
 1837|    285|  if (_drcdec_selection_getNumber(pCandidatesSelected) > 1) {
  ------------------
  |  Branch (1837:7): [True: 270, False: 15]
  ------------------
 1838|    270|    DRC_INSTRUCTIONS_UNI_DRC* pDrcInstructionUniDrc = NULL;
 1839|       |
 1840|    270|    _swapSelectionAndClear(&pCandidatesPotential, &pCandidatesSelected);
 1841|       |
 1842|  1.42k|    for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1842:17): [True: 1.15k, False: 270]
  ------------------
 1843|  1.15k|      pCandidate = _drcdec_selection_getAt(pCandidatesPotential, i);
 1844|  1.15k|      if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1844:11): [True: 0, False: 1.15k]
  ------------------
 1845|       |
 1846|  1.15k|      pDrcInstructionUniDrc = pCandidate->pInst;
 1847|       |
 1848|  1.15k|      if (_targetLoudnessInRange(pDrcInstructionUniDrc, targetLoudness)) {
  ------------------
  |  Branch (1848:11): [True: 92, False: 1.05k]
  ------------------
 1849|     92|        if (_drcdec_selection_add(pCandidatesSelected, pCandidate) == NULL)
  ------------------
  |  Branch (1849:13): [True: 0, False: 92]
  ------------------
 1850|      0|          return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1851|     92|      }
 1852|  1.15k|    }
 1853|       |
 1854|    270|    if (_drcdec_selection_getNumber(pCandidatesSelected) > 1) {
  ------------------
  |  Branch (1854:9): [True: 24, False: 246]
  ------------------
 1855|     24|      _swapSelectionAndClear(&pCandidatesPotential, &pCandidatesSelected);
 1856|       |
 1857|     24|      retVal = _selectSmallestTargetLoudnessValueUpper(pCandidatesPotential,
 1858|     24|                                                       pCandidatesSelected);
 1859|     24|      if (retVal) return (retVal);
  ------------------
  |  Branch (1859:11): [True: 0, False: 24]
  ------------------
 1860|     24|    }
 1861|    270|  }
 1862|       |
 1863|    285|  return retVal;
 1864|    285|}
drcDec_selectionProcess.cpp:_ZL39_selectSmallestTargetLoudnessValueUpperP16DRCDEC_SELECTIONS0_:
 1781|     48|    DRCDEC_SELECTION* pCandidatesSelected) {
 1782|     48|  int i;
 1783|     48|  SCHAR minVal = 0x7F;
 1784|     48|  SCHAR val = 0;
 1785|     48|  DRCDEC_SELECTION_DATA* pCandidate = NULL;
 1786|       |
 1787|    216|  for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1787:15): [True: 168, False: 48]
  ------------------
 1788|    168|    pCandidate = _drcdec_selection_getAt(pCandidatesPotential, i);
 1789|    168|    if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1789:9): [True: 0, False: 168]
  ------------------
 1790|       |
 1791|    168|    val = pCandidate->pInst->drcSetTargetLoudnessValueUpper;
 1792|       |
 1793|    168|    if (val < minVal) {
  ------------------
  |  Branch (1793:9): [True: 67, False: 101]
  ------------------
 1794|     67|      minVal = val;
 1795|     67|    }
 1796|    168|  }
 1797|       |
 1798|       |  /* add all with same smallest drcSetTargetLoudnessValueUpper */
 1799|    216|  for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1799:15): [True: 168, False: 48]
  ------------------
 1800|    168|    pCandidate = _drcdec_selection_getAt(pCandidatesPotential, i);
 1801|    168|    if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1801:9): [True: 0, False: 168]
  ------------------
 1802|       |
 1803|    168|    val = pCandidate->pInst->drcSetTargetLoudnessValueUpper;
 1804|       |
 1805|    168|    if (val == minVal) {
  ------------------
  |  Branch (1805:9): [True: 116, False: 52]
  ------------------
 1806|    116|      if (_drcdec_selection_add(pCandidatesSelected, pCandidate) == NULL)
  ------------------
  |  Branch (1806:11): [True: 0, False: 116]
  ------------------
 1807|      0|        return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1808|    116|    }
 1809|    168|  }
 1810|       |
 1811|     48|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1812|     48|}
drcDec_selectionProcess.cpp:_ZL22_targetLoudnessInRangeP24DRC_INSTRUCTIONS_UNI_DRCi:
 1086|  2.48k|    DRC_INSTRUCTIONS_UNI_DRC* pDrcInstructionUniDrc, FIXP_DBL targetLoudness) {
 1087|  2.48k|  int retVal = 0;
 1088|       |
 1089|  2.48k|  FIXP_DBL drcSetTargetLoudnessValueUpper =
 1090|  2.48k|      ((FIXP_DBL)pDrcInstructionUniDrc->drcSetTargetLoudnessValueUpper)
 1091|  2.48k|      << (DFRACT_BITS - 1 - 7);
  ------------------
  |  |  113|  2.48k|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1092|  2.48k|  FIXP_DBL drcSetTargetLoudnessValueLower =
 1093|  2.48k|      ((FIXP_DBL)pDrcInstructionUniDrc->drcSetTargetLoudnessValueLower)
 1094|  2.48k|      << (DFRACT_BITS - 1 - 7);
  ------------------
  |  |  113|  2.48k|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1095|       |
 1096|  2.48k|  if (pDrcInstructionUniDrc->drcSetTargetLoudnessPresent &&
  ------------------
  |  Branch (1096:7): [True: 621, False: 1.86k]
  ------------------
 1097|    621|      drcSetTargetLoudnessValueUpper >= targetLoudness &&
  ------------------
  |  Branch (1097:7): [True: 484, False: 137]
  ------------------
 1098|    484|      drcSetTargetLoudnessValueLower < targetLoudness) {
  ------------------
  |  Branch (1098:7): [True: 341, False: 143]
  ------------------
 1099|    341|    retVal = 1;
 1100|    341|  }
 1101|       |
 1102|  2.48k|  return retVal;
 1103|  2.48k|}
drcDec_selectionProcess.cpp:_ZL38_drcSetFinalSelection_peakValueLargestP16DRCDEC_SELECTIONS0_:
 1868|    259|    DRCDEC_SELECTION* pCandidatesSelected) {
 1869|    259|  int i;
 1870|    259|  FIXP_DBL largestPeakLevel = MINVAL_DBL;
  ------------------
  |  |  158|    259|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  ------------------
 1871|    259|  FIXP_DBL peakLevel = 0;
 1872|    259|  DRCDEC_SELECTION_DATA* pCandidate = NULL;
 1873|       |
 1874|  1.37k|  for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1874:15): [True: 1.11k, False: 259]
  ------------------
 1875|  1.11k|    pCandidate = _drcdec_selection_getAt(pCandidatesPotential, i);
 1876|  1.11k|    if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1876:9): [True: 0, False: 1.11k]
  ------------------
 1877|       |
 1878|  1.11k|    peakLevel = pCandidate->outputPeakLevel;
 1879|       |
 1880|  1.11k|    if (peakLevel > largestPeakLevel) {
  ------------------
  |  Branch (1880:9): [True: 275, False: 839]
  ------------------
 1881|    275|      largestPeakLevel = peakLevel;
 1882|    275|    }
 1883|  1.11k|  }
 1884|       |
 1885|       |  /* add all with same largest peak level */
 1886|  1.37k|  for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1886:15): [True: 1.11k, False: 259]
  ------------------
 1887|  1.11k|    pCandidate = _drcdec_selection_getAt(pCandidatesPotential, i);
 1888|  1.11k|    if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1888:9): [True: 0, False: 1.11k]
  ------------------
 1889|       |
 1890|  1.11k|    peakLevel = pCandidate->outputPeakLevel;
 1891|       |
 1892|  1.11k|    if (peakLevel == largestPeakLevel) {
  ------------------
  |  Branch (1892:9): [True: 1.07k, False: 36]
  ------------------
 1893|  1.07k|      if (_drcdec_selection_add(pCandidatesSelected, pCandidate) == NULL)
  ------------------
  |  Branch (1893:11): [True: 0, False: 1.07k]
  ------------------
 1894|      0|        return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1895|  1.07k|    }
 1896|  1.11k|  }
 1897|       |
 1898|    259|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1899|    259|}
drcDec_selectionProcess.cpp:_ZL30_drcSetFinalSelection_drcSetIdP16DRCDEC_SELECTIONS0_:
 1903|    237|    DRCDEC_SELECTION* pCandidatesSelected) {
 1904|    237|  int i;
 1905|    237|  int largestId = -1000;
 1906|    237|  int id = 0;
 1907|    237|  DRCDEC_SELECTION_DATA* pCandidate = NULL;
 1908|    237|  DRCDEC_SELECTION_DATA* pCandidateSelected = NULL;
 1909|       |
 1910|  1.29k|  for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1910:15): [True: 1.05k, False: 237]
  ------------------
 1911|  1.05k|    pCandidate = _drcdec_selection_getAt(pCandidatesPotential, i);
 1912|  1.05k|    if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1912:9): [True: 0, False: 1.05k]
  ------------------
 1913|       |
 1914|  1.05k|    id = pCandidate->pInst->drcSetId;
 1915|       |
 1916|  1.05k|    if (id > largestId) {
  ------------------
  |  Branch (1916:9): [True: 259, False: 797]
  ------------------
 1917|    259|      largestId = id;
 1918|    259|      pCandidateSelected = pCandidate;
 1919|    259|    }
 1920|  1.05k|  }
 1921|       |
 1922|    237|  if (pCandidateSelected != NULL) {
  ------------------
  |  Branch (1922:7): [True: 237, False: 0]
  ------------------
 1923|    237|    if (_drcdec_selection_add(pCandidatesSelected, pCandidateSelected) == NULL)
  ------------------
  |  Branch (1923:9): [True: 0, False: 237]
  ------------------
 1924|      0|      return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1925|    237|  } else {
 1926|      0|    return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1927|      0|  }
 1928|       |
 1929|    237|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1930|    237|}
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.03k|  for (i = 1; i < nMixes; i++) {
  ------------------
  |  Branch (2025:15): [True: 1.18k, False: 2.84k]
  ------------------
 2026|  1.18k|    pDrcInstruction = &(hUniDrcConfig->drcInstructionsUniDrc[index]);
 2027|  1.18k|    FDKmemset(pDrcInstruction, 0, sizeof(DRC_INSTRUCTIONS_UNI_DRC));
 2028|  1.18k|    pDrcInstruction->drcSetId = indexVirtual;
 2029|  1.18k|    pDrcInstruction->downmixId[0] =
 2030|  1.18k|        hUniDrcConfig->downmixInstructions[i - 1].downmixId;
 2031|  1.18k|    pDrcInstruction->downmixIdCount = 1;
 2032|  1.18k|    index++;
 2033|  1.18k|    indexVirtual--;
 2034|  1.18k|  }
 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.73k|    DRCDEC_SELECTION_DATA* pSelectionData, SEL_PROC_CODEC_MODE codecMode) {
 2047|  2.73k|  DRCDEC_SELECTION_PROCESS_RETURN retVal = DRCDEC_SELECTION_PROCESS_NO_ERROR;
 2048|       |
 2049|  2.73k|  int i, j;
 2050|  2.73k|  int hasDependend = 0;
 2051|  2.73k|  int hasFading = 0;
 2052|  2.73k|  int hasDucking = 0;
 2053|  2.73k|  int selectedDrcSetIds;
 2054|  2.73k|  int selectedDownmixIds;
 2055|  2.73k|  FIXP_DBL mixingLevel = 0;
 2056|  2.73k|  int albumMode = hSelProcInput->albumMode;
 2057|  2.73k|  UCHAR* pDownmixIdRequested = hSelProcInput->downmixIdRequested;
 2058|  2.73k|  FIXP_SGL boost = hSelProcInput->boost;
 2059|  2.73k|  FIXP_SGL compress = hSelProcInput->compress;
 2060|       |
 2061|  2.73k|  hSelProcOutput->numSelectedDrcSets = 1;
 2062|  2.73k|  hSelProcOutput->selectedDrcSetIds[0] = pSelectionData->pInst->drcSetId;
 2063|  2.73k|  hSelProcOutput->selectedDownmixIds[0] =
 2064|  2.73k|      pSelectionData->pInst->drcApplyToDownmix == 1
  ------------------
  |  Branch (2064:7): [True: 18, False: 2.71k]
  ------------------
 2065|  2.73k|          ? pSelectionData->pInst->downmixId[0]
 2066|  2.73k|          : 0;
 2067|  2.73k|  hSelProcOutput->loudnessNormalizationGainDb =
 2068|  2.73k|      pSelectionData->loudnessNormalizationGainDbAdjusted +
 2069|  2.73k|      hSelProcInput->loudnessNormalizationGainModificationDb;
 2070|  2.73k|  hSelProcOutput->outputPeakLevelDb = pSelectionData->outputPeakLevel;
 2071|  2.73k|  hSelProcOutput->outputLoudness = pSelectionData->outputLoudness;
 2072|       |
 2073|  2.73k|  hSelProcOutput->boost = boost;
 2074|  2.73k|  hSelProcOutput->compress = compress;
 2075|  2.73k|  hSelProcOutput->baseChannelCount =
 2076|  2.73k|      hUniDrcConfig->channelLayout.baseChannelCount;
 2077|  2.73k|  hSelProcOutput->targetChannelCount =
 2078|  2.73k|      hUniDrcConfig->channelLayout.baseChannelCount;
 2079|  2.73k|  hSelProcOutput->activeDownmixId =
 2080|  2.73k|      pDownmixIdRequested[pSelectionData->downmixIdRequestIndex];
 2081|       |
 2082|  2.73k|  _getMixingLevel(hLoudnessInfoSet, *pDownmixIdRequested,
 2083|  2.73k|                  hSelProcOutput->selectedDrcSetIds[0], albumMode,
 2084|  2.73k|                  &mixingLevel);
 2085|  2.73k|  hSelProcOutput->mixingLevel = mixingLevel;
 2086|       |
 2087|       |  /*dependent*/
 2088|  2.73k|  if (pSelectionData->pInst->dependsOnDrcSetPresent) {
  ------------------
  |  Branch (2088:7): [True: 87, False: 2.64k]
  ------------------
 2089|     87|    int dependsOnDrcSetID = pSelectionData->pInst->dependsOnDrcSet;
 2090|       |
 2091|    382|    for (i = 0; i < hUniDrcConfig->drcInstructionsCountInclVirtual; i++) {
  ------------------
  |  Branch (2091:17): [True: 345, False: 37]
  ------------------
 2092|    345|      DRC_INSTRUCTIONS_UNI_DRC* pInst =
 2093|    345|          &(hUniDrcConfig->drcInstructionsUniDrc[i]);
 2094|    345|      if (!_drcSetIsUsable(hUniDrcConfig, pInst)) continue;
  ------------------
  |  Branch (2094:11): [True: 77, False: 268]
  ------------------
 2095|       |
 2096|    268|      if (pInst->drcSetId == dependsOnDrcSetID) {
  ------------------
  |  Branch (2096:11): [True: 50, False: 218]
  ------------------
 2097|     50|        hSelProcOutput->selectedDrcSetIds[hSelProcOutput->numSelectedDrcSets] =
 2098|     50|            hUniDrcConfig->drcInstructionsUniDrc[i].drcSetId;
 2099|     50|        hSelProcOutput->selectedDownmixIds[hSelProcOutput->numSelectedDrcSets] =
 2100|     50|            hUniDrcConfig->drcInstructionsUniDrc[i].drcApplyToDownmix == 1
  ------------------
  |  Branch (2100:13): [True: 15, False: 35]
  ------------------
 2101|     50|                ? hUniDrcConfig->drcInstructionsUniDrc[i].downmixId[0]
 2102|     50|                : 0;
 2103|     50|        hSelProcOutput->numSelectedDrcSets++;
 2104|     50|        hasDependend = 1;
 2105|     50|        break;
 2106|     50|      }
 2107|    268|    }
 2108|     87|  }
 2109|       |
 2110|       |  /* fading */
 2111|  2.73k|  if (hSelProcInput->albumMode == 0) {
  ------------------
  |  Branch (2111:7): [True: 2.73k, False: 0]
  ------------------
 2112|  5.77k|    for (i = 0; i < hUniDrcConfig->drcInstructionsUniDrcCount; i++) {
  ------------------
  |  Branch (2112:17): [True: 3.22k, False: 2.55k]
  ------------------
 2113|  3.22k|      DRC_INSTRUCTIONS_UNI_DRC* pInst =
 2114|  3.22k|          &(hUniDrcConfig->drcInstructionsUniDrc[i]);
 2115|  3.22k|      if (!_drcSetIsUsable(hUniDrcConfig, pInst)) continue;
  ------------------
  |  Branch (2115:11): [True: 2.04k, False: 1.18k]
  ------------------
 2116|       |
 2117|  1.18k|      if (pInst->drcSetEffect & EB_FADE) {
  ------------------
  |  Branch (2117:11): [True: 331, False: 853]
  ------------------
 2118|    331|        if (pInst->downmixId[0] == DOWNMIX_ID_ANY_DOWNMIX) {
  ------------------
  |  |  123|    331|#define DOWNMIX_ID_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (2118:13): [True: 151, False: 180]
  ------------------
 2119|    151|          hSelProcOutput->numSelectedDrcSets = hasDependend + 1;
 2120|    151|          hSelProcOutput
 2121|    151|              ->selectedDrcSetIds[hSelProcOutput->numSelectedDrcSets] =
 2122|    151|              hUniDrcConfig->drcInstructionsUniDrc[i].drcSetId;
 2123|    151|          hSelProcOutput
 2124|    151|              ->selectedDownmixIds[hSelProcOutput->numSelectedDrcSets] =
 2125|    151|              hUniDrcConfig->drcInstructionsUniDrc[i].drcApplyToDownmix == 1
  ------------------
  |  Branch (2125:15): [True: 141, False: 10]
  ------------------
 2126|    151|                  ? hUniDrcConfig->drcInstructionsUniDrc[i].downmixId[0]
 2127|    151|                  : 0;
 2128|    151|          hSelProcOutput->numSelectedDrcSets++;
 2129|    151|          hasFading = 1;
 2130|       |
 2131|    180|        } else {
 2132|    180|          retVal = DRCDEC_SELECTION_PROCESS_NOT_OK;
 2133|    180|          if (retVal) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (2133:15): [True: 180, False: 0]
  ------------------
 2134|    180|        }
 2135|    331|      }
 2136|  1.18k|    }
 2137|  2.73k|  }
 2138|       |
 2139|       |  /* ducking */
 2140|  5.44k|  for (i = 0; i < hUniDrcConfig->drcInstructionsUniDrcCount; i++) {
  ------------------
  |  Branch (2140:15): [True: 2.88k, False: 2.55k]
  ------------------
 2141|  2.88k|    DRC_INSTRUCTIONS_UNI_DRC* pInst =
 2142|  2.88k|        &(hUniDrcConfig->drcInstructionsUniDrc[i]);
 2143|  2.88k|    if (!_drcSetIsUsable(hUniDrcConfig, pInst)) continue;
  ------------------
  |  Branch (2143:9): [True: 2.01k, False: 879]
  ------------------
 2144|       |
 2145|    879|    if (pInst->drcSetEffect & (EB_DUCK_OTHER | EB_DUCK_SELF)) {
  ------------------
  |  Branch (2145:9): [True: 437, False: 442]
  ------------------
 2146|  1.17k|      for (j = 0; j < pInst->downmixIdCount; j++) {
  ------------------
  |  Branch (2146:19): [True: 742, False: 437]
  ------------------
 2147|    742|        if (pInst->downmixId[j] == hSelProcOutput->activeDownmixId) {
  ------------------
  |  Branch (2147:13): [True: 310, False: 432]
  ------------------
 2148|    310|          hSelProcOutput->numSelectedDrcSets =
 2149|    310|              hasDependend + 1; /* ducking overrides fading */
 2150|       |
 2151|    310|          hSelProcOutput
 2152|    310|              ->selectedDrcSetIds[hSelProcOutput->numSelectedDrcSets] =
 2153|    310|              hUniDrcConfig->drcInstructionsUniDrc[i].drcSetId;
 2154|       |          /* force ducking DRC set to be processed on base layout */
 2155|    310|          hSelProcOutput
 2156|    310|              ->selectedDownmixIds[hSelProcOutput->numSelectedDrcSets] = 0;
 2157|    310|          hSelProcOutput->numSelectedDrcSets++;
 2158|    310|          hasDucking = 1;
 2159|    310|        }
 2160|    742|      }
 2161|    437|    }
 2162|    879|  }
 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: 158]
  ------------------
 2167|  4.67k|    for (i = 0; i < hUniDrcConfig->drcInstructionsUniDrcCount; i++) {
  ------------------
  |  Branch (2167:17): [True: 2.27k, False: 2.39k]
  ------------------
 2168|  2.27k|      DRC_INSTRUCTIONS_UNI_DRC* pInst =
 2169|  2.27k|          &(hUniDrcConfig->drcInstructionsUniDrc[i]);
 2170|  2.27k|      if (!_drcSetIsUsable(hUniDrcConfig, pInst)) continue;
  ------------------
  |  Branch (2170:11): [True: 1.74k, False: 538]
  ------------------
 2171|       |
 2172|    538|      if (pInst->drcSetEffect & (EB_DUCK_OTHER | EB_DUCK_SELF)) {
  ------------------
  |  Branch (2172:11): [True: 184, False: 354]
  ------------------
 2173|    560|        for (j = 0; j < pInst->downmixIdCount; j++) {
  ------------------
  |  Branch (2173:21): [True: 376, False: 184]
  ------------------
 2174|    376|          if (pInst->downmixId[j] == DOWNMIX_ID_BASE_LAYOUT) {
  ------------------
  |  |  122|    376|#define DOWNMIX_ID_BASE_LAYOUT 0x0
  ------------------
  |  Branch (2174:15): [True: 0, False: 376]
  ------------------
 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|    376|        }
 2185|    184|      }
 2186|    538|    }
 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: 15, False: 2.53k]
  ------------------
 2198|     15|    selectedDrcSetIds = hSelProcOutput->selectedDrcSetIds[0];
 2199|     15|    selectedDownmixIds = hSelProcOutput->selectedDownmixIds[0];
 2200|     15|    hSelProcOutput->selectedDrcSetIds[0] = hSelProcOutput->selectedDrcSetIds[2];
 2201|     15|    hSelProcOutput->selectedDownmixIds[0] =
 2202|     15|        hSelProcOutput->selectedDownmixIds[2];
 2203|     15|    hSelProcOutput->selectedDrcSetIds[2] = selectedDrcSetIds;
 2204|     15|    hSelProcOutput->selectedDownmixIds[2] = selectedDownmixIds;
 2205|  2.53k|  } else if (hSelProcOutput->numSelectedDrcSets == 2) {
  ------------------
  |  Branch (2205:14): [True: 230, False: 2.30k]
  ------------------
 2206|    230|    selectedDrcSetIds = hSelProcOutput->selectedDrcSetIds[0];
 2207|    230|    selectedDownmixIds = hSelProcOutput->selectedDownmixIds[0];
 2208|    230|    hSelProcOutput->selectedDrcSetIds[0] = hSelProcOutput->selectedDrcSetIds[1];
 2209|    230|    hSelProcOutput->selectedDownmixIds[0] =
 2210|    230|        hSelProcOutput->selectedDownmixIds[1];
 2211|    230|    hSelProcOutput->selectedDrcSetIds[1] = selectedDrcSetIds;
 2212|    230|    hSelProcOutput->selectedDownmixIds[1] = selectedDownmixIds;
 2213|    230|  }
 2214|       |
 2215|  2.55k|  return retVal;
 2216|  2.55k|}
drcDec_selectionProcess.cpp:_ZL15_getMixingLevelP17LOUDNESS_INFO_SETiiiPi:
 3127|  2.73k|    int drcSetIdRequested, int albumMode, FIXP_DBL* pMixingLevel) {
 3128|  2.73k|  const FIXP_DBL mixingLevelDefault = FL2FXCONST_DBL(85.0f / (float)(1 << 7));
  ------------------
  |  |  192|  2.73k|  (FIXP_DBL)(                                                                \
  |  |  193|  2.73k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 0, Folded]
  |  |  ------------------
  |  |  194|  2.73k|          ? ((((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.73k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|  2.73k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  2.73k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 2.73k]
  |  |  ------------------
  |  |  199|  2.73k|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|  2.73k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|  2.73k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|  2.73k|                 ? (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.73k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|  2.73k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  2.73k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3129|       |
 3130|  2.73k|  int i;
 3131|  2.73k|  int count;
 3132|       |
 3133|  2.73k|  LOUDNESS_INFO* pLoudnessInfo = NULL;
 3134|       |
 3135|  2.73k|  *pMixingLevel = mixingLevelDefault;
 3136|       |
 3137|  2.73k|  if (drcSetIdRequested < 0) {
  ------------------
  |  Branch (3137:7): [True: 2.53k, False: 202]
  ------------------
 3138|  2.53k|    drcSetIdRequested = 0;
 3139|  2.53k|  }
 3140|       |
 3141|  2.73k|  if (albumMode) {
  ------------------
  |  Branch (3141:7): [True: 0, False: 2.73k]
  ------------------
 3142|      0|    count = hLoudnessInfoSet->loudnessInfoAlbumCount;
 3143|      0|    pLoudnessInfo = hLoudnessInfoSet->loudnessInfoAlbum;
 3144|  2.73k|  } else {
 3145|  2.73k|    count = hLoudnessInfoSet->loudnessInfoCount;
 3146|  2.73k|    pLoudnessInfo = hLoudnessInfoSet->loudnessInfo;
 3147|  2.73k|  }
 3148|       |
 3149|  4.16k|  for (i = 0; i < count; i++) {
  ------------------
  |  Branch (3149:15): [True: 1.45k, False: 2.71k]
  ------------------
 3150|  1.45k|    if ((drcSetIdRequested == pLoudnessInfo[i].drcSetId) &&
  ------------------
  |  Branch (3150:9): [True: 713, False: 739]
  ------------------
 3151|    713|        ((downmixIdRequested == pLoudnessInfo[i].downmixId) ||
  ------------------
  |  Branch (3151:10): [True: 446, False: 267]
  ------------------
 3152|    555|         (DOWNMIX_ID_ANY_DOWNMIX == pLoudnessInfo[i].downmixId))) {
  ------------------
  |  |  123|    267|#define DOWNMIX_ID_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (3152:10): [True: 109, False: 158]
  ------------------
 3153|    555|      int index = _findMethodDefinition(&pLoudnessInfo[i], MD_MIXING_LEVEL, 0);
 3154|       |
 3155|    555|      if (index >= 0) {
  ------------------
  |  Branch (3155:11): [True: 18, False: 537]
  ------------------
 3156|     18|        *pMixingLevel = pLoudnessInfo[i].loudnessMeasurement[index].methodValue;
 3157|     18|        break;
 3158|     18|      }
 3159|    555|    }
 3160|  1.45k|  }
 3161|       |
 3162|  2.73k|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 3163|  2.73k|}
drcDec_selectionProcess.cpp:_ZL21_findMethodDefinitionP13LOUDNESS_INFOii:
 3108|  3.55k|                                 int methodDefinition, int startIndex) {
 3109|  3.55k|  int i;
 3110|  3.55k|  int index = -1;
 3111|       |
 3112|  6.02k|  for (i = startIndex; i < pLoudnessInfo->measurementCount; i++) {
  ------------------
  |  Branch (3112:24): [True: 4.08k, False: 1.94k]
  ------------------
 3113|  4.08k|    if (pLoudnessInfo->loudnessMeasurement[i].methodDefinition ==
  ------------------
  |  Branch (3113:9): [True: 1.61k, False: 2.46k]
  ------------------
 3114|  4.08k|        methodDefinition) {
 3115|  1.61k|      index = i;
 3116|  1.61k|      break;
 3117|  1.61k|    }
 3118|  4.08k|  }
 3119|       |
 3120|  3.55k|  return index;
 3121|  3.55k|}
drcDec_selectionProcess.cpp:_ZL15_drcSetIsUsableP14UNI_DRC_CONFIGP24DRC_INSTRUCTIONS_UNI_DRC:
 1106|  8.74k|                           DRC_INSTRUCTIONS_UNI_DRC* pInst) {
 1107|  8.74k|  int usable = 0;
 1108|  8.74k|  DRC_COEFFICIENTS_UNI_DRC* pCoef =
 1109|  8.74k|      selectDrcCoefficients(hUniDrcConfig, LOCATION_SELECTED);
  ------------------
  |  |  131|  8.74k|  LOCATION_MP4_INSTREAM_UNIDRC /* set to location selected by system */
  |  |  ------------------
  |  |  |  |  127|  8.74k|#define LOCATION_MP4_INSTREAM_UNIDRC 0x1
  |  |  ------------------
  ------------------
 1110|       |
 1111|       |  /* check if ID is unique */
 1112|  8.74k|  if (selectDrcInstructions(hUniDrcConfig, pInst->drcSetId) != pInst) return 0;
  ------------------
  |  Branch (1112:7): [True: 4.19k, False: 4.54k]
  ------------------
 1113|       |  /* sanity check on drcInstructions */
 1114|  4.54k|  _preSelectionRequirement5(pInst, pCoef, &usable);
 1115|  4.54k|  return usable;
 1116|  8.74k|}
drcDec_selectionProcess.cpp:_ZL25_preSelectionRequirement5P24DRC_INSTRUCTIONS_UNI_DRCP24DRC_COEFFICIENTS_UNI_DRCPi:
  961|  10.2k|    DRC_COEFFICIENTS_UNI_DRC* pCoef, int* pMatchFound) {
  962|  10.2k|  int b, i;
  963|       |
  964|  10.2k|  *pMatchFound = 1;
  965|       |
  966|  10.2k|  if (pDrcInstructionUniDrc->drcSetId < 0) /* virtual DRC sets are okay */
  ------------------
  |  Branch (966:7): [True: 4.00k, False: 6.28k]
  ------------------
  967|  4.00k|  {
  968|  4.00k|    return DRCDEC_SELECTION_PROCESS_NO_ERROR;
  969|  4.00k|  }
  970|       |
  971|  6.28k|  if (pCoef == NULL) /* check for parametricDRC */
  ------------------
  |  Branch (971:7): [True: 722, False: 5.56k]
  ------------------
  972|    722|  {
  973|    722|    *pMatchFound = 0; /* parametricDRC not supported */
  974|    722|    return DRCDEC_SELECTION_PROCESS_NO_ERROR;
  975|    722|  }
  976|       |
  977|  5.56k|  if (pCoef->drcLocation !=
  ------------------
  |  Branch (977:7): [True: 885, False: 4.68k]
  ------------------
  978|  5.56k|      pDrcInstructionUniDrc
  979|  5.56k|          ->drcLocation) /* drcLocation must be LOCATION_SELECTED */
  980|    885|  {
  981|    885|    *pMatchFound = 0;
  982|    885|    return DRCDEC_SELECTION_PROCESS_NO_ERROR;
  983|    885|  }
  984|       |
  985|  7.62k|  for (i = 0; i < pDrcInstructionUniDrc->nDrcChannelGroups; i++) {
  ------------------
  |  Branch (985:15): [True: 3.22k, False: 4.40k]
  ------------------
  986|  3.22k|    int indexDrcCoeff = pDrcInstructionUniDrc->gainSetIndexForChannelGroup[i];
  987|  3.22k|    int bandCount = 0;
  988|       |
  989|  3.22k|    if (indexDrcCoeff >= 12) {
  ------------------
  |  Branch (989:9): [True: 160, False: 3.06k]
  ------------------
  990|    160|      *pMatchFound = 0;
  991|    160|      return DRCDEC_SELECTION_PROCESS_NO_ERROR;
  992|    160|    }
  993|       |
  994|  3.06k|    if (indexDrcCoeff > pCoef->gainSetCount - 1) /* check for parametricDRC */
  ------------------
  |  Branch (994:9): [True: 1.65k, False: 1.40k]
  ------------------
  995|  1.65k|    {
  996|  1.65k|      continue;
  997|  1.65k|    }
  998|       |
  999|  1.40k|    GAIN_SET* gainSet = &(pCoef->gainSet[indexDrcCoeff]);
 1000|  1.40k|    bandCount = gainSet->bandCount;
 1001|       |
 1002|  1.40k|    if (bandCount > 4) {
  ------------------
  |  Branch (1002:9): [True: 0, False: 1.40k]
  ------------------
 1003|      0|      *pMatchFound = 0;
 1004|      0|    }
 1005|       |
 1006|  2.73k|    for (b = 0; b < bandCount; b++) {
  ------------------
  |  Branch (1006:17): [True: 1.45k, False: 1.28k]
  ------------------
 1007|  1.45k|      if ((gainSet->gainSequenceIndex[b] >= 12) ||
  ------------------
  |  Branch (1007:11): [True: 74, False: 1.37k]
  ------------------
 1008|  1.37k|          (gainSet->gainSequenceIndex[b] >= pCoef->gainSequenceCount)) {
  ------------------
  |  Branch (1008:11): [True: 48, False: 1.33k]
  ------------------
 1009|    122|        *pMatchFound = 0;
 1010|    122|        return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1011|    122|      }
 1012|  1.45k|    }
 1013|  1.40k|  }
 1014|       |
 1015|  4.40k|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1016|  4.68k|}
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.8k|    for (j = 0; j < hUniDrcConfig->drcInstructionsCountInclVirtual; j++) {
  ------------------
  |  Branch (2275:17): [True: 8.05k, False: 2.82k]
  ------------------
 2276|  8.05k|      DRC_INSTRUCTIONS_UNI_DRC* pDrcInstruction =
 2277|  8.05k|          &(hUniDrcConfig->drcInstructionsUniDrc[j]);
 2278|       |      /* check if ID is unique */
 2279|  8.05k|      if (selectDrcInstructions(hUniDrcConfig, pDrcInstruction->drcSetId) !=
  ------------------
  |  Branch (2279:11): [True: 1.63k, False: 6.41k]
  ------------------
 2280|  8.05k|          pDrcInstruction)
 2281|  1.63k|        continue;
 2282|       |
 2283|  6.41k|      retVal = _drcSetPreSelectionSingleInstruction(
 2284|  6.41k|          hSelProcInput, i, hUniDrcConfig, hLoudnessInfoSet, pDrcInstruction,
 2285|  6.41k|          *ppCandidatesPotential, *ppCandidatesSelected, codecMode);
 2286|  6.41k|      if (retVal) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (2286:11): [True: 19, False: 6.39k]
  ------------------
 2287|  6.41k|    }
 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: 204, False: 2.62k]
  ------------------
 2295|    204|    retVal = _drcSetSelectionAddCandidates(
 2296|    204|        hSelProcInput, *ppCandidatesPotential, *ppCandidatesSelected);
 2297|    204|    if (retVal) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (2297:9): [True: 0, False: 204]
  ------------------
 2298|    204|  }
 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.41k|    DRCDEC_SELECTION* pCandidatesSelected, SEL_PROC_CODEC_MODE codecMode) {
 1262|  6.41k|  DRCDEC_SELECTION_PROCESS_RETURN retVal = DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1263|  6.41k|  int matchFound = 0;
 1264|  6.41k|  DRC_COEFFICIENTS_UNI_DRC* pCoef =
 1265|  6.41k|      selectDrcCoefficients(hUniDrcConfig, LOCATION_SELECTED);
  ------------------
  |  |  131|  6.41k|  LOCATION_MP4_INSTREAM_UNIDRC /* set to location selected by system */
  |  |  ------------------
  |  |  |  |  127|  6.41k|#define LOCATION_MP4_INSTREAM_UNIDRC 0x1
  |  |  ------------------
  ------------------
 1266|       |
 1267|  6.41k|  retVal = _preSelectionRequirement123(
 1268|  6.41k|      hSelProcInput->downmixIdRequested[downmixIdIndex], pDrcInstructionUniDrc,
 1269|  6.41k|      &matchFound);
 1270|       |
 1271|  6.41k|  if (!retVal && matchFound)
  ------------------
  |  Branch (1271:7): [True: 6.41k, False: 0]
  |  Branch (1271:18): [True: 6.10k, False: 311]
  ------------------
 1272|  6.10k|    retVal = _preSelectionRequirement4(pDrcInstructionUniDrc,
 1273|  6.10k|                                       hSelProcInput->dynamicRangeControlOn,
 1274|  6.10k|                                       &matchFound);
 1275|       |
 1276|  6.41k|  if (!retVal && matchFound)
  ------------------
  |  Branch (1276:7): [True: 6.41k, False: 0]
  |  Branch (1276:18): [True: 5.74k, False: 664]
  ------------------
 1277|  5.74k|    retVal =
 1278|  5.74k|        _preSelectionRequirement5(pDrcInstructionUniDrc, pCoef, &matchFound);
 1279|       |
 1280|  6.41k|  if (!retVal && matchFound)
  ------------------
  |  Branch (1280:7): [True: 6.41k, False: 0]
  |  Branch (1280:18): [True: 5.53k, False: 879]
  ------------------
 1281|  5.53k|    retVal = _preSelectionRequirement6(pDrcInstructionUniDrc, &matchFound);
 1282|       |
 1283|  6.41k|  if (!retVal && matchFound)
  ------------------
  |  Branch (1283:7): [True: 6.41k, False: 0]
  |  Branch (1283:18): [True: 5.50k, False: 908]
  ------------------
 1284|  5.50k|    retVal = _preSelectionRequirement7(pDrcInstructionUniDrc, &matchFound);
 1285|       |
 1286|  6.41k|  if (!retVal && matchFound)
  ------------------
  |  Branch (1286:7): [True: 6.41k, False: 0]
  |  Branch (1286:18): [True: 5.48k, False: 925]
  ------------------
 1287|  5.48k|    retVal = _preSelectionRequirement8(
 1288|  5.48k|        hSelProcInput, downmixIdIndex, hUniDrcConfig, hLoudnessInfoSet,
 1289|  5.48k|        pDrcInstructionUniDrc, pCandidatesPotential, pCandidatesSelected,
 1290|  5.48k|        codecMode);
 1291|       |
 1292|  6.41k|  return retVal;
 1293|  6.41k|}
drcDec_selectionProcess.cpp:_ZL27_preSelectionRequirement123iP24DRC_INSTRUCTIONS_UNI_DRCPi:
  920|  6.41k|    int* pMatchFound) {
  921|  6.41k|  int i;
  922|  6.41k|  *pMatchFound = 0;
  923|       |
  924|  7.09k|  for (i = 0; i < pDrcInstructionUniDrc->downmixIdCount; i++) {
  ------------------
  |  Branch (924:15): [True: 6.78k, False: 311]
  ------------------
  925|  6.78k|    if ((pDrcInstructionUniDrc->downmixId[i] == nRequestedDownmixId) ||
  ------------------
  |  Branch (925:9): [True: 5.73k, False: 1.05k]
  ------------------
  926|  1.05k|        (pDrcInstructionUniDrc->downmixId[i] == DOWNMIX_ID_ANY_DOWNMIX) ||
  ------------------
  |  |  123|  1.05k|#define DOWNMIX_ID_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (926:9): [True: 371, False: 681]
  ------------------
  927|    681|        ((pDrcInstructionUniDrc->downmixId[i] == DOWNMIX_ID_BASE_LAYOUT) &&
  ------------------
  |  |  122|    681|#define DOWNMIX_ID_BASE_LAYOUT 0x0
  ------------------
  |  Branch (927:10): [True: 0, False: 681]
  ------------------
  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.78k|  }
  933|       |
  934|  6.41k|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
  935|  6.41k|}
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: 11]
  ------------------
  945|  6.09k|        (pDrcInstruction->drcSetEffect != EB_DUCK_OTHER) &&
  ------------------
  |  Branch (945:9): [True: 6.07k, False: 11]
  ------------------
  946|  6.07k|        (pDrcInstruction->drcSetEffect != EB_DUCK_SELF) &&
  ------------------
  |  Branch (946:9): [True: 6.05k, False: 23]
  ------------------
  947|  6.05k|        (pDrcInstruction->drcSetEffect != 0 || pDrcInstruction->drcSetId < 0)) {
  ------------------
  |  Branch (947:10): [True: 1.80k, False: 4.24k]
  |  Branch (947:48): [True: 3.94k, False: 308]
  ------------------
  948|  5.74k|      *pMatchFound = 1;
  949|  5.74k|    }
  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.18k, False: 353]
  ------------------
 1024|  5.18k|       (pDrcInstructionUniDrc->noIndependentUse == 0)) ||
  ------------------
  |  Branch (1024:8): [True: 5.15k, False: 29]
  ------------------
 1025|  5.50k|      (pDrcInstructionUniDrc->dependsOnDrcSetPresent == 1)) {
  ------------------
  |  Branch (1025:7): [True: 353, False: 29]
  ------------------
 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.48k]
  ------------------
 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.48k|    DRCDEC_SELECTION* pCandidatesSelected, SEL_PROC_CODEC_MODE codecMode) {
 1127|  5.48k|  DRCDEC_SELECTION_PROCESS_RETURN retVal = DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1128|  5.48k|  int explicitPeakInformationPresent;
 1129|  5.48k|  FIXP_DBL signalPeakLevel;
 1130|  5.48k|  int addToCandidate = 0;
 1131|       |
 1132|  5.48k|  FIXP_DBL loudnessNormalizationGainDb;
 1133|  5.48k|  FIXP_DBL loudness;
 1134|       |
 1135|  5.48k|  FIXP_DBL loudnessDeviationMax =
 1136|  5.48k|      ((FIXP_DBL)hSelProcInput->loudnessDeviationMax) << (DFRACT_BITS - 1 - 7);
  ------------------
  |  |  113|  5.48k|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1137|       |
 1138|  5.48k|  {
 1139|  5.48k|    retVal = _getLoudness(hLoudnessInfoSet, hSelProcInput->albumMode,
 1140|  5.48k|                          hSelProcInput->loudnessMeasurementMethod,
 1141|  5.48k|                          hSelProcInput->loudnessMeasurementSystem,
 1142|  5.48k|                          hSelProcInput->targetLoudness,
 1143|  5.48k|                          pDrcInstructionUniDrc->drcSetId,
 1144|  5.48k|                          hSelProcInput->downmixIdRequested[downmixIdIndex],
 1145|  5.48k|                          &loudnessNormalizationGainDb, &loudness);
 1146|  5.48k|    if (retVal) return (retVal);
  ------------------
  |  Branch (1146:9): [True: 19, False: 5.46k]
  ------------------
 1147|  5.48k|  }
 1148|       |
 1149|  5.46k|  if (!hSelProcInput->loudnessNormalizationOn) {
  ------------------
  |  Branch (1149:7): [True: 0, False: 5.46k]
  ------------------
 1150|      0|    loudnessNormalizationGainDb = (FIXP_DBL)0;
 1151|      0|  }
 1152|       |
 1153|  5.46k|  retVal = _getSignalPeakLevel(
 1154|  5.46k|      hSelProcInput, hUniDrcConfig, hLoudnessInfoSet, pDrcInstructionUniDrc,
 1155|  5.46k|      hSelProcInput->downmixIdRequested[downmixIdIndex],
 1156|  5.46k|      &explicitPeakInformationPresent, &signalPeakLevel, codecMode
 1157|       |
 1158|  5.46k|  );
 1159|  5.46k|  if (retVal) return (retVal);
  ------------------
  |  Branch (1159:7): [True: 0, False: 5.46k]
  ------------------
 1160|       |
 1161|  5.46k|  if (hSelProcInput->dynamicRangeControlOn) {
  ------------------
  |  Branch (1161:7): [True: 5.46k, False: 0]
  ------------------
 1162|  5.46k|    if (explicitPeakInformationPresent == 0) {
  ------------------
  |  Branch (1162:9): [True: 4.19k, False: 1.27k]
  ------------------
 1163|  4.19k|      if (pDrcInstructionUniDrc->drcSetTargetLoudnessPresent &&
  ------------------
  |  Branch (1163:11): [True: 223, False: 3.97k]
  ------------------
 1164|    223|          ((hSelProcInput->loudnessNormalizationOn &&
  ------------------
  |  Branch (1164:13): [True: 223, False: 0]
  ------------------
 1165|    223|            _targetLoudnessInRange(pDrcInstructionUniDrc,
  ------------------
  |  Branch (1165:13): [True: 155, False: 68]
  ------------------
 1166|    223|                                   hSelProcInput->targetLoudness)) ||
 1167|    155|           !hSelProcInput->loudnessNormalizationOn)) {
  ------------------
  |  Branch (1167:12): [True: 0, False: 68]
  ------------------
 1168|    155|        DRCDEC_SELECTION_DATA* pData =
 1169|    155|            _drcdec_selection_addNew(pCandidatesSelected);
 1170|    155|        if (pData == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1170:13): [True: 0, False: 155]
  ------------------
 1171|       |
 1172|    155|        _setSelectionDataInfo(pData, loudness, loudnessNormalizationGainDb,
 1173|    155|                              hSelProcInput->loudnessNormalizationGainDbMax,
 1174|    155|                              loudnessDeviationMax, signalPeakLevel,
 1175|    155|                              hSelProcInput->outputPeakLevelMax, 0);
 1176|    155|        pData->downmixIdRequestIndex = downmixIdIndex;
 1177|    155|        pData->pInst = pDrcInstructionUniDrc;
 1178|    155|        pData->selectionFlag =
 1179|    155|            1; /* signal pre-selection step dealing with drcSetTargetLoudness */
 1180|       |
 1181|    155|        if (hSelProcInput->loudnessNormalizationOn) {
  ------------------
  |  Branch (1181:13): [True: 155, False: 0]
  ------------------
 1182|    155|          pData->outputPeakLevel =
 1183|    155|              hSelProcInput->targetLoudness -
 1184|    155|              (((FIXP_DBL)pData->pInst->drcSetTargetLoudnessValueUpper)
 1185|    155|               << (DFRACT_BITS - 1 - 7));
  ------------------
  |  |  113|    155|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1186|    155|        } else {
 1187|      0|          pData->outputPeakLevel = (FIXP_DBL)0;
 1188|      0|        }
 1189|  4.04k|      } else {
 1190|  4.04k|        if ((!hSelProcInput->loudnessNormalizationOn) ||
  ------------------
  |  Branch (1190:13): [True: 0, False: 4.04k]
  ------------------
 1191|  4.04k|            (!pDrcInstructionUniDrc->drcSetTargetLoudnessPresent) ||
  ------------------
  |  Branch (1191:13): [True: 3.97k, False: 68]
  ------------------
 1192|     68|            (hSelProcInput->loudnessNormalizationOn &&
  ------------------
  |  Branch (1192:14): [True: 68, False: 0]
  ------------------
 1193|     68|             _targetLoudnessInRange(pDrcInstructionUniDrc,
  ------------------
  |  Branch (1193:14): [True: 0, False: 68]
  ------------------
 1194|  3.97k|                                    hSelProcInput->targetLoudness))) {
 1195|  3.97k|          addToCandidate = 1;
 1196|  3.97k|        }
 1197|  4.04k|      }
 1198|  4.19k|    } else {
 1199|  1.27k|      addToCandidate = 1;
 1200|  1.27k|    }
 1201|       |
 1202|  5.46k|    if (addToCandidate) {
  ------------------
  |  Branch (1202:9): [True: 5.24k, False: 223]
  ------------------
 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.46k|  } 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.46k|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1233|  5.46k|}
drcDec_selectionProcess.cpp:_ZL12_getLoudnessP17LOUDNESS_INFO_SETi25METHOD_DEFINITION_REQUEST26MEASUREMENT_SYSTEM_REQUESTiiiPiS3_:
 2650|  5.48k|{
 2651|  5.48k|  int index;
 2652|       |
 2653|  5.48k|  LOUDNESS_INFO* pLoudnessInfo = NULL;
 2654|  5.48k|  VALUE_ORDER valueOrder;
 2655|       |
 2656|       |  /* map MDR_DEFAULT to MDR_PROGRAM_LOUDNESS */
 2657|  5.48k|  METHOD_DEFINITION_REQUEST requestedMethodDefinition =
 2658|  5.48k|      measurementMethodRequested < MDR_ANCHOR_LOUDNESS ? MDR_PROGRAM_LOUDNESS
  ------------------
  |  Branch (2658:7): [True: 0, False: 5.48k]
  ------------------
 2659|  5.48k|                                                       : MDR_ANCHOR_LOUDNESS;
 2660|       |
 2661|  5.48k|  if (measurementMethodRequested > MDR_ANCHOR_LOUDNESS) {
  ------------------
  |  Branch (2661:7): [True: 0, False: 5.48k]
  ------------------
 2662|      0|    return DRCDEC_SELECTION_PROCESS_NOT_OK;
 2663|      0|  }
 2664|       |
 2665|  5.48k|  _initValueOrder(&valueOrder);
 2666|       |
 2667|  5.48k|  *pLoudness = UNDEFINED_LOUDNESS_VALUE;
  ------------------
  |  |  114|  5.48k|#define UNDEFINED_LOUDNESS_VALUE (FIXP_DBL)(MAXVAL_DBL - 1)
  |  |  ------------------
  |  |  |  |  156|  5.48k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  ------------------
 2668|  5.48k|  *pLoudnessNormalizationGain = (FIXP_DBL)0;
 2669|       |
 2670|  5.48k|  if (drcSetId < 0) {
  ------------------
  |  Branch (2670:7): [True: 3.94k, False: 1.54k]
  ------------------
 2671|  3.94k|    drcSetId = 0;
 2672|  3.94k|  }
 2673|       |
 2674|  5.48k|  pLoudnessInfo = _getApplicableLoudnessInfoStructure(
 2675|  5.48k|      hLoudnessInfoSet, drcSetId, downmixIdRequested, albumMode);
 2676|       |
 2677|  5.48k|  if (albumMode && (pLoudnessInfo == NULL)) {
  ------------------
  |  Branch (2677:7): [True: 0, False: 5.48k]
  |  Branch (2677:20): [True: 0, False: 0]
  ------------------
 2678|      0|    pLoudnessInfo = _getApplicableLoudnessInfoStructure(
 2679|      0|        hLoudnessInfoSet, drcSetId, downmixIdRequested, 0);
 2680|      0|  }
 2681|       |
 2682|  5.48k|  if (pLoudnessInfo == NULL) {
  ------------------
  |  Branch (2682:7): [True: 4.60k, False: 883]
  ------------------
 2683|  4.60k|    return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 2684|  4.60k|  }
 2685|       |
 2686|    883|  index = -1;
 2687|       |
 2688|  1.59k|  do {
 2689|  1.59k|    index = _findMethodDefinition(pLoudnessInfo, requestedMethodDefinition,
 2690|  1.59k|                                  index + 1);
 2691|       |
 2692|  1.59k|    if (index >= 0) {
  ------------------
  |  Branch (2692:9): [True: 707, False: 883]
  ------------------
 2693|    707|      _getMethodValue(
 2694|    707|          &valueOrder, pLoudnessInfo->loudnessMeasurement[index].methodValue,
 2695|    707|          pLoudnessInfo->loudnessMeasurement[index].measurementSystem,
 2696|    707|          measurementSystemRequested);
 2697|    707|    }
 2698|  1.59k|  } while (index >= 0);
  ------------------
  |  Branch (2698:12): [True: 707, False: 883]
  ------------------
 2699|       |
 2700|       |  /* repeat with other method definition */
 2701|    883|  if (valueOrder.order == -1) {
  ------------------
  |  Branch (2701:7): [True: 523, False: 360]
  ------------------
 2702|    523|    index = -1;
 2703|       |
 2704|  1.41k|    do {
 2705|  1.41k|      index = _findMethodDefinition(
 2706|  1.41k|          pLoudnessInfo,
 2707|  1.41k|          requestedMethodDefinition == MDR_PROGRAM_LOUDNESS
  ------------------
  |  Branch (2707:11): [True: 0, False: 1.41k]
  ------------------
 2708|  1.41k|              ? MDR_ANCHOR_LOUDNESS
 2709|  1.41k|              : MDR_PROGRAM_LOUDNESS,
 2710|  1.41k|          index + 1);
 2711|       |
 2712|  1.41k|      if (index >= 0) {
  ------------------
  |  Branch (2712:11): [True: 889, False: 523]
  ------------------
 2713|    889|        _getMethodValue(
 2714|    889|            &valueOrder, pLoudnessInfo->loudnessMeasurement[index].methodValue,
 2715|    889|            pLoudnessInfo->loudnessMeasurement[index].measurementSystem,
 2716|    889|            measurementSystemRequested);
 2717|    889|      }
 2718|  1.41k|    } while (index >= 0);
  ------------------
  |  Branch (2718:14): [True: 889, False: 523]
  ------------------
 2719|    523|  }
 2720|       |
 2721|    883|  if (valueOrder.order == -1) {
  ------------------
  |  Branch (2721:7): [True: 19, False: 864]
  ------------------
 2722|     19|    return DRCDEC_SELECTION_PROCESS_NOT_OK;
 2723|    864|  } else {
 2724|    864|    *pLoudnessNormalizationGain = targetLoudness - valueOrder.value;
 2725|    864|    *pLoudness = valueOrder.value;
 2726|    864|  }
 2727|       |
 2728|    864|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 2729|    883|}
drcDec_selectionProcess.cpp:_ZL35_getApplicableLoudnessInfoStructureP17LOUDNESS_INFO_SETiii:
 2529|  5.48k|    int downmixIdRequested, int albumMode) {
 2530|  5.48k|  LOUDNESS_INFO* pLoudnessInfo = NULL;
 2531|       |
 2532|       |  /* default value */
 2533|  5.48k|  pLoudnessInfo = _getLoudnessInfoStructure(hLoudnessInfoSet, drcSetId,
 2534|  5.48k|                                            downmixIdRequested, albumMode);
 2535|       |
 2536|       |  /* fallback values */
 2537|  5.48k|  if (pLoudnessInfo == NULL) {
  ------------------
  |  Branch (2537:7): [True: 5.26k, False: 227]
  ------------------
 2538|  5.26k|    pLoudnessInfo =
 2539|  5.26k|        _getLoudnessInfoStructure(hLoudnessInfoSet, drcSetId, 0x7F, albumMode);
 2540|  5.26k|  }
 2541|       |
 2542|  5.48k|  if (pLoudnessInfo == NULL) {
  ------------------
  |  Branch (2542:7): [True: 5.11k, False: 371]
  ------------------
 2543|  5.11k|    pLoudnessInfo = _getLoudnessInfoStructure(hLoudnessInfoSet, 0x3F,
 2544|  5.11k|                                              downmixIdRequested, albumMode);
 2545|  5.11k|  }
 2546|       |
 2547|  5.48k|  if (pLoudnessInfo == NULL) {
  ------------------
  |  Branch (2547:7): [True: 4.92k, False: 566]
  ------------------
 2548|  4.92k|    pLoudnessInfo = _getLoudnessInfoStructure(hLoudnessInfoSet, 0,
 2549|  4.92k|                                              downmixIdRequested, albumMode);
 2550|  4.92k|  }
 2551|       |
 2552|  5.48k|  if (pLoudnessInfo == NULL) {
  ------------------
  |  Branch (2552:7): [True: 4.79k, False: 697]
  ------------------
 2553|  4.79k|    pLoudnessInfo =
 2554|  4.79k|        _getLoudnessInfoStructure(hLoudnessInfoSet, 0x3F, 0x7F, albumMode);
 2555|  4.79k|  }
 2556|       |
 2557|  5.48k|  if (pLoudnessInfo == NULL) {
  ------------------
  |  Branch (2557:7): [True: 4.68k, False: 800]
  ------------------
 2558|  4.68k|    pLoudnessInfo =
 2559|  4.68k|        _getLoudnessInfoStructure(hLoudnessInfoSet, 0, 0x7F, albumMode);
 2560|  4.68k|  }
 2561|       |
 2562|  5.48k|  if (pLoudnessInfo == NULL) {
  ------------------
  |  Branch (2562:7): [True: 4.60k, False: 883]
  ------------------
 2563|  4.60k|    pLoudnessInfo =
 2564|  4.60k|        _getLoudnessInfoStructure(hLoudnessInfoSet, drcSetId, 0, albumMode);
 2565|  4.60k|  }
 2566|       |
 2567|  5.48k|  if (pLoudnessInfo == NULL) {
  ------------------
  |  Branch (2567:7): [True: 4.60k, False: 883]
  ------------------
 2568|  4.60k|    pLoudnessInfo =
 2569|  4.60k|        _getLoudnessInfoStructure(hLoudnessInfoSet, 0x3F, 0, albumMode);
 2570|  4.60k|  }
 2571|       |
 2572|  5.48k|  if (pLoudnessInfo == NULL) {
  ------------------
  |  Branch (2572:7): [True: 4.60k, False: 883]
  ------------------
 2573|  4.60k|    pLoudnessInfo =
 2574|  4.60k|        _getLoudnessInfoStructure(hLoudnessInfoSet, 0, 0, albumMode);
 2575|  4.60k|  }
 2576|       |
 2577|  5.48k|  return pLoudnessInfo;
 2578|  5.48k|}
drcDec_selectionProcess.cpp:_ZL25_getLoudnessInfoStructureP17LOUDNESS_INFO_SETiii:
 2498|  44.0k|    int albumMode) {
 2499|  44.0k|  int i, j;
 2500|  44.0k|  int count;
 2501|       |
 2502|  44.0k|  LOUDNESS_INFO* pLoudnessInfo = NULL;
 2503|       |
 2504|  44.0k|  if (albumMode) {
  ------------------
  |  Branch (2504:7): [True: 0, False: 44.0k]
  ------------------
 2505|      0|    count = hLoudnessInfoSet->loudnessInfoAlbumCount;
 2506|      0|    pLoudnessInfo = hLoudnessInfoSet->loudnessInfoAlbum;
 2507|  44.0k|  } else {
 2508|  44.0k|    count = hLoudnessInfoSet->loudnessInfoCount;
 2509|  44.0k|    pLoudnessInfo = hLoudnessInfoSet->loudnessInfo;
 2510|  44.0k|  }
 2511|       |
 2512|  97.6k|  for (i = 0; i < count; i++) {
  ------------------
  |  Branch (2512:15): [True: 54.5k, False: 43.1k]
  ------------------
 2513|  54.5k|    if ((pLoudnessInfo[i].drcSetId == drcSetId) &&
  ------------------
  |  Branch (2513:9): [True: 21.5k, False: 32.9k]
  ------------------
 2514|  21.5k|        (pLoudnessInfo[i].downmixId == downmixId)) {
  ------------------
  |  Branch (2514:9): [True: 10.1k, False: 11.3k]
  ------------------
 2515|  14.7k|      for (j = 0; j < pLoudnessInfo[i].measurementCount; j++) {
  ------------------
  |  Branch (2515:19): [True: 5.42k, False: 9.29k]
  ------------------
 2516|  5.42k|        if ((pLoudnessInfo[i].loudnessMeasurement[j].methodDefinition == 1) ||
  ------------------
  |  Branch (2516:13): [True: 507, False: 4.92k]
  ------------------
 2517|  4.92k|            (pLoudnessInfo[i].loudnessMeasurement[j].methodDefinition == 2)) {
  ------------------
  |  Branch (2517:13): [True: 376, False: 4.54k]
  ------------------
 2518|    883|          return &pLoudnessInfo[i];
 2519|    883|        }
 2520|  5.42k|      }
 2521|  10.1k|    }
 2522|  54.5k|  }
 2523|       |
 2524|  43.1k|  return NULL;
 2525|  44.0k|}
drcDec_selectionProcess.cpp:_ZL15_getMethodValueP11VALUE_ORDERiii:
 2608|  1.59k|    int measurementSystemRequested) {
 2609|  1.59k|  const int rows = 11;
 2610|  1.59k|  const int columns = 12;
 2611|  1.59k|  const int pOrdering[rows][columns] = {
 2612|  1.59k|      {0, 0, 8, 0, 1, 3, 0, 5, 6, 7, 4, 2}, /* default = bonus1770 */
 2613|  1.59k|      {0, 0, 8, 0, 1, 3, 0, 5, 6, 7, 4, 2}, /* bonus1770 */
 2614|  1.59k|      {0, 0, 1, 0, 8, 5, 0, 2, 3, 4, 6, 7}, /* bonusUser */
 2615|  1.59k|      {0, 0, 3, 0, 1, 8, 0, 4, 5, 6, 7, 2}, /* bonusExpert */
 2616|  1.59k|      {0, 0, 5, 0, 1, 3, 0, 8, 6, 7, 4, 2}, /* ResA */
 2617|  1.59k|      {0, 0, 5, 0, 1, 3, 0, 6, 8, 7, 4, 2}, /* ResB */
 2618|  1.59k|      {0, 0, 5, 0, 1, 3, 0, 6, 7, 8, 4, 2}, /* ResC */
 2619|  1.59k|      {0, 0, 3, 0, 1, 7, 0, 4, 5, 6, 8, 2}, /* ResD */
 2620|  1.59k|      {0, 0, 1, 0, 7, 5, 0, 2, 3, 4, 6, 8}, /* ResE */
 2621|  1.59k|      {0, 0, 1, 0, 0, 0, 0, 2, 3, 4, 0, 0}, /* ProgramLoudness */
 2622|  1.59k|      {0, 7, 0, 0, 0, 0, 6, 5, 4, 3, 2, 1}  /* PeakLoudness */
 2623|  1.59k|  };
 2624|       |
 2625|  1.59k|  if (measurementSystemRequested < 0 || measurementSystemRequested >= rows ||
  ------------------
  |  Branch (2625:7): [True: 0, False: 1.59k]
  |  Branch (2625:41): [True: 0, False: 1.59k]
  ------------------
 2626|  1.59k|      measurementSystem < 0 || measurementSystem >= columns) {
  ------------------
  |  Branch (2626:7): [True: 0, False: 1.59k]
  |  Branch (2626:32): [True: 282, False: 1.31k]
  ------------------
 2627|    282|    return DRCDEC_SELECTION_PROCESS_NOT_OK;
 2628|    282|  }
 2629|       |
 2630|  1.31k|  if (pOrdering[measurementSystemRequested][measurementSystem] >
  ------------------
  |  Branch (2630:7): [True: 985, False: 329]
  ------------------
 2631|  1.31k|      pValueOrder->order) {
 2632|    985|    pValueOrder->order =
 2633|    985|        pOrdering[measurementSystemRequested][measurementSystem];
 2634|    985|    pValueOrder->value = value;
 2635|    985|  }
 2636|       |
 2637|  1.31k|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 2638|  1.59k|}
drcDec_selectionProcess.cpp:_ZL19_getSignalPeakLevelP14SEL_PROC_INPUTP14UNI_DRC_CONFIGP17LOUDNESS_INFO_SETP24DRC_INSTRUCTIONS_UNI_DRCiPiS7_19SEL_PROC_CODEC_MODE:
 2910|  5.46k|) {
 2911|  5.46k|  DRCDEC_SELECTION_PROCESS_RETURN retVal = DRCDEC_SELECTION_PROCESS_NO_ERROR;
 2912|       |
 2913|  5.46k|  int albumMode = hSelProcInput->albumMode;
 2914|       |
 2915|  5.46k|  FIXP_DBL signalPeakLevelTmp = (FIXP_DBL)0;
 2916|  5.46k|  FIXP_DBL signalPeakLevel = FIXP_DBL(0);
 2917|       |
 2918|  5.46k|  int dmxId = downmixIdRequested;
 2919|       |
 2920|  5.46k|  int drcSetId = pInst->drcSetId;
 2921|       |
 2922|  5.46k|  if (drcSetId < 0) {
  ------------------
  |  Branch (2922:7): [True: 3.92k, False: 1.54k]
  ------------------
 2923|  3.92k|    drcSetId = 0;
 2924|  3.92k|  }
 2925|       |
 2926|  5.46k|  *explicitPeakInformationPresent = 1;
 2927|       |
 2928|  5.46k|  if (_truePeakLevelIsPresent(hLoudnessInfoSet, drcSetId, dmxId, albumMode)) {
  ------------------
  |  Branch (2928:7): [True: 137, False: 5.33k]
  ------------------
 2929|    137|    retVal = _getTruePeakLevel(hLoudnessInfoSet, drcSetId, dmxId, albumMode,
 2930|    137|                               &signalPeakLevel);
 2931|    137|    if (retVal) return (retVal);
  ------------------
  |  Branch (2931:9): [True: 0, False: 137]
  ------------------
 2932|  5.33k|  } else if (_samplePeakLevelIsPresent(hLoudnessInfoSet, drcSetId, dmxId,
  ------------------
  |  Branch (2932:14): [True: 378, False: 4.95k]
  ------------------
 2933|  5.33k|                                       albumMode)) {
 2934|    378|    retVal = _getSamplePeakLevel(hLoudnessInfoSet, drcSetId, dmxId, albumMode,
 2935|    378|                                 &signalPeakLevel);
 2936|    378|    if (retVal) return (retVal);
  ------------------
  |  Branch (2936:9): [True: 0, False: 378]
  ------------------
 2937|  4.95k|  } else if (_truePeakLevelIsPresent(hLoudnessInfoSet, 0x3F, dmxId,
  ------------------
  |  Branch (2937:14): [True: 183, False: 4.77k]
  ------------------
 2938|  4.95k|                                     albumMode)) {
 2939|    183|    retVal = _getTruePeakLevel(hLoudnessInfoSet, 0x3F, dmxId, albumMode,
 2940|    183|                               &signalPeakLevel);
 2941|    183|    if (retVal) return (retVal);
  ------------------
  |  Branch (2941:9): [True: 0, False: 183]
  ------------------
 2942|  4.77k|  } else if (_samplePeakLevelIsPresent(hLoudnessInfoSet, 0x3F, dmxId,
  ------------------
  |  Branch (2942:14): [True: 407, False: 4.36k]
  ------------------
 2943|  4.77k|                                       albumMode)) {
 2944|    407|    retVal = _getSamplePeakLevel(hLoudnessInfoSet, 0x3F, dmxId, albumMode,
 2945|    407|                                 &signalPeakLevel);
 2946|    407|    if (retVal) return (retVal);
  ------------------
  |  Branch (2946:9): [True: 0, False: 407]
  ------------------
 2947|  4.36k|  } else if (_limiterPeakTargetIsPresent(pInst, drcSetId, dmxId)) {
  ------------------
  |  Branch (2947:14): [True: 166, False: 4.19k]
  ------------------
 2948|    166|    retVal = _getLimiterPeakTarget(pInst, drcSetId, dmxId, &signalPeakLevel);
 2949|    166|    if (retVal) return (retVal);
  ------------------
  |  Branch (2949:9): [True: 0, False: 166]
  ------------------
 2950|  4.19k|  } else if (dmxId != 0) {
  ------------------
  |  Branch (2950:14): [True: 0, False: 4.19k]
  ------------------
 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.19k|  } else {
 3018|  4.19k|    signalPeakLevel = FIXP_DBL(0); /* worst case estimate */
 3019|  4.19k|    *explicitPeakInformationPresent = FIXP_DBL(0);
 3020|  4.19k|  }
 3021|       |
 3022|  5.46k|  *signalPeakLevelOut = signalPeakLevel;
 3023|       |
 3024|  5.46k|  return retVal;
 3025|  5.46k|}
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|  22.0k|  for (i = 0; i < count; i++) {
  ------------------
  |  Branch (2747:15): [True: 11.9k, False: 10.1k]
  ------------------
 2748|  11.9k|    if ((pLoudnessInfo[i].drcSetId == drcSetId) &&
  ------------------
  |  Branch (2748:9): [True: 4.46k, False: 7.46k]
  ------------------
 2749|  4.46k|        (pLoudnessInfo[i].downmixId == downmixId)) {
  ------------------
  |  Branch (2749:9): [True: 2.68k, False: 1.77k]
  ------------------
 2750|  2.68k|      if (pLoudnessInfo[i].truePeakLevelPresent) return 1;
  ------------------
  |  Branch (2750:11): [True: 320, False: 2.36k]
  ------------------
 2751|  2.68k|    }
 2752|  11.9k|  }
 2753|       |
 2754|  10.1k|  return 0;
 2755|  10.4k|}
drcDec_selectionProcess.cpp:_ZL17_getTruePeakLevelP17LOUDNESS_INFO_SETiiiPi:
 2759|    320|    int albumMode, FIXP_DBL* pTruePeakLevel) {
 2760|    320|  int i;
 2761|    320|  int count;
 2762|    320|  LOUDNESS_INFO* pLoudnessInfo = NULL;
 2763|       |
 2764|    320|  if (albumMode) {
  ------------------
  |  Branch (2764:7): [True: 0, False: 320]
  ------------------
 2765|      0|    count = hLoudnessInfoSet->loudnessInfoAlbumCount;
 2766|      0|    pLoudnessInfo = hLoudnessInfoSet->loudnessInfoAlbum;
 2767|    320|  } else {
 2768|    320|    count = hLoudnessInfoSet->loudnessInfoCount;
 2769|    320|    pLoudnessInfo = hLoudnessInfoSet->loudnessInfo;
 2770|    320|  }
 2771|       |
 2772|  1.34k|  for (i = 0; i < count; i++) {
  ------------------
  |  Branch (2772:15): [True: 1.34k, False: 0]
  ------------------
 2773|  1.34k|    if ((pLoudnessInfo[i].drcSetId == drcSetId) &&
  ------------------
  |  Branch (2773:9): [True: 819, False: 526]
  ------------------
 2774|    819|        (pLoudnessInfo[i].downmixId == downmixId)) {
  ------------------
  |  Branch (2774:9): [True: 503, False: 316]
  ------------------
 2775|    503|      if (pLoudnessInfo[i].truePeakLevelPresent) {
  ------------------
  |  Branch (2775:11): [True: 320, False: 183]
  ------------------
 2776|    320|        *pTruePeakLevel = pLoudnessInfo[i].truePeakLevel;
 2777|    320|        return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 2778|    320|      }
 2779|    503|    }
 2780|  1.34k|  }
 2781|       |
 2782|      0|  return DRCDEC_SELECTION_PROCESS_NOT_OK;
 2783|    320|}
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.7k|  for (i = 0; i < count; i++) {
  ------------------
  |  Branch (2800:15): [True: 10.4k, False: 9.31k]
  ------------------
 2801|  10.4k|    if ((pLoudnessInfo[i].drcSetId == drcSetId) &&
  ------------------
  |  Branch (2801:9): [True: 3.55k, False: 6.86k]
  ------------------
 2802|  3.55k|        (pLoudnessInfo[i].downmixId == downmixId)) {
  ------------------
  |  Branch (2802:9): [True: 2.13k, False: 1.42k]
  ------------------
 2803|  2.13k|      if (pLoudnessInfo[i].samplePeakLevelPresent) return 1;
  ------------------
  |  Branch (2803:11): [True: 785, False: 1.34k]
  ------------------
 2804|  2.13k|    }
 2805|  10.4k|  }
 2806|       |
 2807|  9.31k|  return 0;
 2808|  10.1k|}
drcDec_selectionProcess.cpp:_ZL19_getSamplePeakLevelP17LOUDNESS_INFO_SETiiiPi:
 2813|    785|) {
 2814|    785|  int i;
 2815|    785|  int count;
 2816|    785|  LOUDNESS_INFO* pLoudnessInfo = NULL;
 2817|       |
 2818|    785|  if (albumMode) {
  ------------------
  |  Branch (2818:7): [True: 0, False: 785]
  ------------------
 2819|      0|    count = hLoudnessInfoSet->loudnessInfoAlbumCount;
 2820|      0|    pLoudnessInfo = hLoudnessInfoSet->loudnessInfoAlbum;
 2821|    785|  } else {
 2822|    785|    count = hLoudnessInfoSet->loudnessInfoCount;
 2823|    785|    pLoudnessInfo = hLoudnessInfoSet->loudnessInfo;
 2824|    785|  }
 2825|       |
 2826|  1.82k|  for (i = 0; i < count; i++) {
  ------------------
  |  Branch (2826:15): [True: 1.82k, False: 0]
  ------------------
 2827|  1.82k|    if ((pLoudnessInfo[i].drcSetId == drcSetId) &&
  ------------------
  |  Branch (2827:9): [True: 1.39k, False: 429]
  ------------------
 2828|  1.39k|        (pLoudnessInfo[i].downmixId == downmixId)) {
  ------------------
  |  Branch (2828:9): [True: 1.02k, False: 368]
  ------------------
 2829|  1.02k|      if (pLoudnessInfo[i].samplePeakLevelPresent) {
  ------------------
  |  Branch (2829:11): [True: 785, False: 244]
  ------------------
 2830|    785|        *pSamplePeakLevel = pLoudnessInfo[i].samplePeakLevel;
 2831|    785|        return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 2832|    785|      }
 2833|  1.02k|    }
 2834|  1.82k|  }
 2835|       |
 2836|      0|  return DRCDEC_SELECTION_PROCESS_NOT_OK;
 2837|    785|}
drcDec_selectionProcess.cpp:_ZL27_limiterPeakTargetIsPresentP24DRC_INSTRUCTIONS_UNI_DRCii:
 2840|  4.36k|    DRC_INSTRUCTIONS_UNI_DRC* pDrcInstruction, int drcSetId, int downmixId) {
 2841|  4.36k|  int i;
 2842|       |
 2843|  4.36k|  if (pDrcInstruction->limiterPeakTargetPresent) {
  ------------------
  |  Branch (2843:7): [True: 178, False: 4.18k]
  ------------------
 2844|    178|    if ((pDrcInstruction->downmixId[0] == downmixId) ||
  ------------------
  |  Branch (2844:9): [True: 115, False: 63]
  ------------------
 2845|    132|        (pDrcInstruction->downmixId[0] == 0x7F)) {
  ------------------
  |  Branch (2845:9): [True: 17, False: 46]
  ------------------
 2846|    132|      return 1;
 2847|    132|    }
 2848|       |
 2849|    196|    for (i = 0; i < pDrcInstruction->downmixIdCount; i++) {
  ------------------
  |  Branch (2849:17): [True: 184, False: 12]
  ------------------
 2850|    184|      if (pDrcInstruction->downmixId[i] == downmixId) {
  ------------------
  |  Branch (2850:11): [True: 34, False: 150]
  ------------------
 2851|     34|        return 1;
 2852|     34|      }
 2853|    184|    }
 2854|     46|  }
 2855|       |
 2856|  4.19k|  return 0;
 2857|  4.36k|}
drcDec_selectionProcess.cpp:_ZL21_getLimiterPeakTargetP24DRC_INSTRUCTIONS_UNI_DRCiiPi:
 2861|    166|    FIXP_DBL* pLimiterPeakTarget) {
 2862|    166|  int i;
 2863|       |
 2864|    166|  if (pDrcInstruction->limiterPeakTargetPresent) {
  ------------------
  |  Branch (2864:7): [True: 166, False: 0]
  ------------------
 2865|    166|    if ((pDrcInstruction->downmixId[0] == downmixId) ||
  ------------------
  |  Branch (2865:9): [True: 115, False: 51]
  ------------------
 2866|    132|        (pDrcInstruction->downmixId[0] == 0x7F)) {
  ------------------
  |  Branch (2866:9): [True: 17, False: 34]
  ------------------
 2867|    132|      *pLimiterPeakTarget =
 2868|    132|          ((FX_SGL2FX_DBL(pDrcInstruction->limiterPeakTarget) >> 2));
  ------------------
  |  |  219|    132|  ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|    132|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |                 ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|    132|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
 2869|    132|      return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 2870|    132|    }
 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|    166|}
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: 43, False: 5.35k]
  |  |  ------------------
  |  |  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.21k, False: 1.03k]
  ------------------
 1247|  4.21k|      if (_drcdec_selection_add(pCandidatesSelected, pCandidate) == NULL)
  ------------------
  |  Branch (1247:11): [True: 0, False: 4.21k]
  ------------------
 1248|      0|        return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1249|  4.21k|    }
 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|    204|    DRCDEC_SELECTION* pCandidatesSelected) {
 1298|    204|  DRCDEC_SELECTION_PROCESS_RETURN retVal = DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1299|    204|  int nHitCount = 0;
 1300|    204|  int i;
 1301|       |
 1302|    204|  DRCDEC_SELECTION_DATA* pCandidate = NULL;
 1303|    204|  DRC_INSTRUCTIONS_UNI_DRC* pDrcInstructionUniDrc = NULL;
 1304|       |
 1305|  1.04k|  for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1305:15): [True: 844, False: 204]
  ------------------
 1306|    844|    pCandidate = _drcdec_selection_getAt(pCandidatesPotential, i);
 1307|    844|    if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1307:9): [True: 0, False: 844]
  ------------------
 1308|       |
 1309|    844|    pDrcInstructionUniDrc = pCandidate->pInst;
 1310|       |
 1311|    844|    if (_targetLoudnessInRange(pDrcInstructionUniDrc,
  ------------------
  |  Branch (1311:9): [True: 47, False: 797]
  ------------------
 1312|    844|                               hSelProcInput->targetLoudness)) {
 1313|     47|      nHitCount++;
 1314|     47|    }
 1315|    844|  }
 1316|       |
 1317|    204|  if (nHitCount != 0) {
  ------------------
  |  Branch (1317:7): [True: 33, False: 171]
  ------------------
 1318|    236|    for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1318:17): [True: 203, False: 33]
  ------------------
 1319|    203|      pCandidate = _drcdec_selection_getAt(pCandidatesPotential, i);
 1320|    203|      if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1320:11): [True: 0, False: 203]
  ------------------
 1321|       |
 1322|    203|      pDrcInstructionUniDrc = pCandidate->pInst;
 1323|       |
 1324|    203|      if (_targetLoudnessInRange(pDrcInstructionUniDrc,
  ------------------
  |  Branch (1324:11): [True: 47, False: 156]
  ------------------
 1325|    203|                                 hSelProcInput->targetLoudness)) {
 1326|     47|        if (_drcdec_selection_add(pCandidatesSelected, pCandidate) == NULL)
  ------------------
  |  Branch (1326:13): [True: 0, False: 47]
  ------------------
 1327|      0|          return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1328|     47|      }
 1329|    203|    }
 1330|    171|  } else {
 1331|    171|    FIXP_DBL lowestPeakLevel = MAXVAL_DBL; /* e = 7 */
  ------------------
  |  |  156|    171|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
 1332|    171|    FIXP_DBL peakLevel = 0;                /* e = 7 */
 1333|       |
 1334|    812|    for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1334:17): [True: 641, False: 171]
  ------------------
 1335|    641|      pCandidate = _drcdec_selection_getAt(pCandidatesPotential, i);
 1336|    641|      if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1336:11): [True: 0, False: 641]
  ------------------
 1337|       |
 1338|    641|      peakLevel = pCandidate->outputPeakLevel;
 1339|       |
 1340|    641|      if (peakLevel < lowestPeakLevel) {
  ------------------
  |  Branch (1340:11): [True: 190, False: 451]
  ------------------
 1341|    190|        lowestPeakLevel = peakLevel;
 1342|    190|      }
 1343|    641|    }
 1344|       |
 1345|       |    /* add all with lowest peak level or max 1dB above */
 1346|    812|    for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1346:17): [True: 641, False: 171]
  ------------------
 1347|    641|      FIXP_DBL loudnessDeviationMax =
 1348|    641|          ((FIXP_DBL)hSelProcInput->loudnessDeviationMax)
 1349|    641|          << (DFRACT_BITS - 1 - 7); /* e = 7 */
  ------------------
  |  |  113|    641|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1350|       |
 1351|    641|      pCandidate = _drcdec_selection_getAt(pCandidatesPotential, i);
 1352|    641|      if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1352:11): [True: 0, False: 641]
  ------------------
 1353|       |
 1354|    641|      peakLevel = pCandidate->outputPeakLevel;
 1355|       |
 1356|    641|      if (peakLevel == lowestPeakLevel ||
  ------------------
  |  Branch (1356:11): [True: 488, False: 153]
  ------------------
 1357|    153|          peakLevel <=
  ------------------
  |  Branch (1357:11): [True: 48, False: 105]
  ------------------
 1358|    536|              lowestPeakLevel + FL2FXCONST_DBL(1.0f / (float)(1 << 7))) {
  ------------------
  |  |  192|    153|  (FIXP_DBL)(                                                                \
  |  |  193|    153|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 153, Folded]
  |  |  ------------------
  |  |  194|    153|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|    153|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    153|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 153]
  |  |  ------------------
  |  |  195|    153|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|    153|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|    153|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|    153|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|    153|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    153|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|    153|          : ((((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|    536|        FIXP_DBL adjustment =
 1360|    536|            fMax((FIXP_DBL)0, peakLevel - hSelProcInput->outputPeakLevelMax);
 1361|    536|        adjustment = fMin(adjustment, fMax((FIXP_DBL)0, loudnessDeviationMax));
 1362|       |
 1363|    536|        pCandidate->loudnessNormalizationGainDbAdjusted -= adjustment;
 1364|    536|        pCandidate->outputPeakLevel -= adjustment;
 1365|    536|        pCandidate->outputLoudness -= adjustment;
 1366|    536|        if (_drcdec_selection_add(pCandidatesSelected, pCandidate) == NULL)
  ------------------
  |  Branch (1366:13): [True: 0, False: 536]
  ------------------
 1367|      0|          return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1368|    536|      }
 1369|    641|    }
 1370|    171|  }
 1371|       |
 1372|    204|  return retVal;
 1373|    204|}
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: 187, False: 2.64k]
  ------------------
 2323|    187|        DRC_FEATURE_REQUEST fallbackRequest;
 2324|    187|        fallbackRequest.drcEffectType.numRequests = 5;
 2325|    187|        fallbackRequest.drcEffectType.numRequestsDesired = 5;
 2326|    187|        fallbackRequest.drcEffectType.request[0] = DETR_GENERAL_COMPR;
 2327|    187|        fallbackRequest.drcEffectType.request[1] = DETR_NIGHT;
 2328|    187|        fallbackRequest.drcEffectType.request[2] = DETR_NOISY;
 2329|    187|        fallbackRequest.drcEffectType.request[3] = DETR_LIMITED;
 2330|    187|        fallbackRequest.drcEffectType.request[4] = DETR_LOWLEVEL;
 2331|       |
 2332|    187|        retVal = _selectEffectTypeFeature(hUniDrcConfig, fallbackRequest,
 2333|    187|                                          ppCandidatesPotential,
 2334|    187|                                          ppCandidatesSelected);
 2335|    187|        if (retVal) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (2335:13): [True: 20, False: 167]
  ------------------
 2336|    187|      }
 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.77k|  for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1408:15): [True: 4.94k, False: 2.82k]
  ------------------
 1409|  4.94k|    DRCDEC_SELECTION_DATA* pCandidate =
 1410|  4.94k|        _drcdec_selection_getAt(pCandidatesPotential, i);
 1411|  4.94k|    if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1411:9): [True: 0, False: 4.94k]
  ------------------
 1412|       |
 1413|  4.94k|    if ((pCandidate->pInst->drcSetEffect & 0xff) == 0) {
  ------------------
  |  Branch (1413:9): [True: 3.99k, False: 953]
  ------------------
 1414|  3.99k|      if (_drcdec_selection_add(pCandidatesSelected, pCandidate) == NULL)
  ------------------
  |  Branch (1414:11): [True: 0, False: 3.99k]
  ------------------
 1415|      0|        return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1416|  3.99k|    }
 1417|  4.94k|  }
 1418|       |
 1419|  2.82k|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1420|  2.82k|}
drcDec_selectionProcess.cpp:_ZL24_selectEffectTypeFeatureP14UNI_DRC_CONFIG19DRC_FEATURE_REQUESTPP16DRCDEC_SELECTIONS4_:
 1470|    187|    DRCDEC_SELECTION** ppCandidatesSelected) {
 1471|    187|  DRCDEC_SELECTION_PROCESS_RETURN retVal = DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1472|    187|  int i;
 1473|    187|  int desiredEffectTypeFound = 0;
 1474|       |
 1475|  1.02k|  for (i = 0; i < drcFeatureRequest.drcEffectType.numRequestsDesired; i++) {
  ------------------
  |  Branch (1475:15): [True: 855, False: 167]
  ------------------
 1476|    855|    retVal = _selectSingleEffectType(
 1477|    855|        hUniDrcConfig, drcFeatureRequest.drcEffectType.request[i],
 1478|    855|        *ppCandidatesPotential, *ppCandidatesSelected);
 1479|    855|    if (retVal) return (retVal);
  ------------------
  |  Branch (1479:9): [True: 20, False: 835]
  ------------------
 1480|       |
 1481|    835|    if (_drcdec_selection_getNumber(*ppCandidatesSelected)) {
  ------------------
  |  Branch (1481:9): [True: 502, False: 333]
  ------------------
 1482|    502|      desiredEffectTypeFound = 1;
 1483|    502|      _swapSelectionAndClear(ppCandidatesPotential, ppCandidatesSelected);
 1484|    502|    }
 1485|    835|  }
 1486|       |
 1487|    167|  if (!desiredEffectTypeFound) {
  ------------------
  |  Branch (1487:7): [True: 8, False: 159]
  ------------------
 1488|      8|    for (i = drcFeatureRequest.drcEffectType.numRequestsDesired;
 1489|      8|         i < drcFeatureRequest.drcEffectType.numRequests; i++) {
  ------------------
  |  Branch (1489:10): [True: 0, False: 8]
  ------------------
 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|      8|  }
 1501|       |
 1502|    167|  _swapSelection(ppCandidatesPotential, ppCandidatesSelected);
 1503|       |
 1504|    167|  return retVal;
 1505|    167|}
drcDec_selectionProcess.cpp:_ZL23_selectSingleEffectTypeP14UNI_DRC_CONFIG23DRC_EFFECT_TYPE_REQUESTP16DRCDEC_SELECTIONS3_:
 1425|    855|    DRCDEC_SELECTION* pCandidatesSelected) {
 1426|    855|  int i;
 1427|    855|  DRCDEC_SELECTION_PROCESS_RETURN retVal = DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1428|    855|  DRC_INSTRUCTIONS_UNI_DRC* pInst;
 1429|    855|  DRC_INSTRUCTIONS_UNI_DRC* pDrcInstructionsDependent;
 1430|       |
 1431|    855|  if (effectType == DETR_NONE) {
  ------------------
  |  Branch (1431:7): [True: 0, False: 855]
  ------------------
 1432|      0|    retVal = _selectDrcSetEffectNone(hUniDrcConfig, pCandidatesPotential,
 1433|      0|                                     pCandidatesSelected);
 1434|      0|    if (retVal) return (retVal);
  ------------------
  |  Branch (1434:9): [True: 0, False: 0]
  ------------------
 1435|    855|  } else {
 1436|    855|    int effectBitPosition = 1 << (effectType - 1);
 1437|       |
 1438|  2.73k|    for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1438:17): [True: 1.89k, False: 835]
  ------------------
 1439|  1.89k|      DRCDEC_SELECTION_DATA* pCandidate =
 1440|  1.89k|          _drcdec_selection_getAt(pCandidatesPotential, i);
 1441|  1.89k|      if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1441:11): [True: 0, False: 1.89k]
  ------------------
 1442|       |
 1443|  1.89k|      pInst = pCandidate->pInst;
 1444|       |
 1445|  1.89k|      if (!pInst->dependsOnDrcSetPresent) {
  ------------------
  |  Branch (1445:11): [True: 1.21k, False: 683]
  ------------------
 1446|  1.21k|        if ((pInst->drcSetEffect & effectBitPosition)) {
  ------------------
  |  Branch (1446:13): [True: 735, False: 481]
  ------------------
 1447|    735|          if (_drcdec_selection_add(pCandidatesSelected, pCandidate) == NULL)
  ------------------
  |  Branch (1447:15): [True: 0, False: 735]
  ------------------
 1448|      0|            return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1449|    735|        }
 1450|  1.21k|      } else {
 1451|    683|        retVal = _dependentDrcInstruction(hUniDrcConfig, pInst,
 1452|    683|                                          &pDrcInstructionsDependent);
 1453|    683|        if (retVal) return (retVal);
  ------------------
  |  Branch (1453:13): [True: 20, False: 663]
  ------------------
 1454|       |
 1455|    663|        if (((pInst->drcSetEffect & effectBitPosition)) ||
  ------------------
  |  Branch (1455:13): [True: 333, False: 330]
  ------------------
 1456|    521|            ((pDrcInstructionsDependent->drcSetEffect & effectBitPosition))) {
  ------------------
  |  Branch (1456:13): [True: 188, False: 142]
  ------------------
 1457|    521|          if (_drcdec_selection_add(pCandidatesSelected, pCandidate) == NULL)
  ------------------
  |  Branch (1457:15): [True: 0, False: 521]
  ------------------
 1458|      0|            return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1459|    521|        }
 1460|    663|      }
 1461|  1.89k|    }
 1462|    855|  }
 1463|       |
 1464|    835|  return retVal;
 1465|    855|}
drcDec_selectionProcess.cpp:_ZL24_dependentDrcInstructionP14UNI_DRC_CONFIGP24DRC_INSTRUCTIONS_UNI_DRCPS2_:
 1377|    683|    DRC_INSTRUCTIONS_UNI_DRC** ppDrcInstructionsDependent) {
 1378|    683|  int i;
 1379|    683|  DRC_INSTRUCTIONS_UNI_DRC* pDependentDrc = NULL;
 1380|       |
 1381|  2.83k|  for (i = 0; i < hUniDrcConfig->drcInstructionsUniDrcCount; i++) {
  ------------------
  |  Branch (1381:15): [True: 2.81k, False: 17]
  ------------------
 1382|  2.81k|    pDependentDrc =
 1383|  2.81k|        (DRC_INSTRUCTIONS_UNI_DRC*)&(hUniDrcConfig->drcInstructionsUniDrc[i]);
 1384|       |
 1385|  2.81k|    if (pDependentDrc->drcSetId == pInst->dependsOnDrcSet) {
  ------------------
  |  Branch (1385:9): [True: 666, False: 2.15k]
  ------------------
 1386|    666|      break;
 1387|    666|    }
 1388|  2.81k|  }
 1389|       |
 1390|    683|  if (i == hUniDrcConfig->drcInstructionsUniDrcCount) {
  ------------------
  |  Branch (1390:7): [True: 17, False: 666]
  ------------------
 1391|     17|    return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1392|     17|  }
 1393|       |
 1394|    666|  if (pDependentDrc->dependsOnDrcSetPresent == 1) {
  ------------------
  |  Branch (1394:7): [True: 3, False: 663]
  ------------------
 1395|      3|    return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1396|      3|  }
 1397|       |
 1398|    663|  *ppDrcInstructionsDependent = pDependentDrc;
 1399|       |
 1400|    663|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1401|    666|}
drcDec_selectionProcess.cpp:_ZL27_drcdec_selection_getNumberP16DRCDEC_SELECTION:
 2456|  58.7k|static int _drcdec_selection_getNumber(DRCDEC_SELECTION* pSelection) {
 2457|  58.7k|  return pSelection->numData;
 2458|  58.7k|}
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.98k|                                  DRCDEC_SELECTION** ppCandidatesSelected) {
 2479|  7.98k|  DRCDEC_SELECTION* pTmp = *ppCandidatesPotential;
 2480|  7.98k|  *ppCandidatesPotential = *ppCandidatesSelected;
 2481|  7.98k|  *ppCandidatesSelected = pTmp;
 2482|  7.98k|  _drcdec_selection_clear(*ppCandidatesSelected);
 2483|  7.98k|  return 0;
 2484|  7.98k|}
drcDec_selectionProcess.cpp:_ZL23_drcdec_selection_clearP16DRCDEC_SELECTION:
 2452|  7.98k|static int _drcdec_selection_clear(DRCDEC_SELECTION* pSelection) {
 2453|  7.98k|  return pSelection->numData = 0;
 2454|  7.98k|}
drcDec_selectionProcess.cpp:_ZL14_swapSelectionPP16DRCDEC_SELECTIONS1_:
 2487|  2.88k|                          DRCDEC_SELECTION** ppCandidatesSelected) {
 2488|  2.88k|  DRCDEC_SELECTION* pTmp = *ppCandidatesPotential;
 2489|  2.88k|  *ppCandidatesPotential = *ppCandidatesSelected;
 2490|  2.88k|  *ppCandidatesSelected = pTmp;
 2491|  2.88k|  return 0;
 2492|  2.88k|}

_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.9k|  while (deltaTmin <= half_ms) {
  ------------------
  |  Branch (115:10): [True: 12.1k, False: 2.82k]
  ------------------
  116|  12.1k|    deltaTmin = deltaTmin << 1;
  117|  12.1k|  }
  118|  2.82k|  return deltaTmin;
  119|  2.84k|}
_Z21selectDrcCoefficientsP14UNI_DRC_CONFIGi:
  122|   783k|    HANDLE_UNI_DRC_CONFIG hUniDrcConfig, const int location) {
  123|   783k|  int n;
  124|   783k|  int c = -1;
  125|  1.85M|  for (n = 0; n < hUniDrcConfig->drcCoefficientsUniDrcCount; n++) {
  ------------------
  |  Branch (125:15): [True: 1.06M, False: 783k]
  ------------------
  126|  1.06M|    if (hUniDrcConfig->drcCoefficientsUniDrc[n].drcLocation == location) {
  ------------------
  |  Branch (126:9): [True: 1.03M, False: 34.5k]
  ------------------
  127|  1.03M|      c = n;
  128|  1.03M|    }
  129|  1.06M|  }
  130|   783k|  if (c >= 0) {
  ------------------
  |  Branch (130:7): [True: 536k, False: 246k]
  ------------------
  131|   536k|    return &(hUniDrcConfig->drcCoefficientsUniDrc[c]);
  132|   536k|  }
  133|   246k|  return NULL; /* possible during bitstream parsing */
  134|   783k|}
_Z21selectDrcInstructionsP14UNI_DRC_CONFIGi:
  137|  19.7k|    HANDLE_UNI_DRC_CONFIG hUniDrcConfig, const int drcSetId) {
  138|  19.7k|  int i;
  139|  59.7k|  for (i = 0; i < hUniDrcConfig->drcInstructionsCountInclVirtual; i++) {
  ------------------
  |  Branch (139:15): [True: 59.7k, False: 0]
  ------------------
  140|  59.7k|    if (hUniDrcConfig->drcInstructionsUniDrc[i].drcSetId == drcSetId) {
  ------------------
  |  Branch (140:9): [True: 19.7k, False: 39.9k]
  ------------------
  141|  19.7k|      return &(hUniDrcConfig->drcInstructionsUniDrc[i]);
  142|  19.7k|    }
  143|  59.7k|  }
  144|      0|  return NULL;
  145|  19.7k|}
_Z25selectDownmixInstructionsP14UNI_DRC_CONFIGi:
  148|  2.25k|    HANDLE_UNI_DRC_CONFIG hUniDrcConfig, const int downmixId) {
  149|  2.25k|  int i;
  150|  5.78k|  for (i = 0; i < hUniDrcConfig->downmixInstructionsCount; i++) {
  ------------------
  |  Branch (150:15): [True: 4.28k, False: 1.49k]
  ------------------
  151|  4.28k|    if (hUniDrcConfig->downmixInstructions[i].downmixId == downmixId) {
  ------------------
  |  Branch (151:9): [True: 765, False: 3.52k]
  ------------------
  152|    765|      return &(hUniDrcConfig->downmixInstructions[i]);
  153|    765|    }
  154|  4.28k|  }
  155|  1.49k|  return NULL;
  156|  2.25k|}
_Z22deriveDrcChannelGroupsiiPKaPK20DUCKING_MODIFICATIONPhPaS5_PS1_:
  168|   767k|{
  169|   767k|  int duckingSequence = -1;
  170|   767k|  int c, n, g, match, idx;
  171|   767k|  FIXP_SGL factor;
  172|   767k|  FIXP_SGL uniqueScaling[8];
  173|       |
  174|  6.90M|  for (g = 0; g < 8; g++) {
  ------------------
  |  Branch (174:15): [True: 6.13M, False: 767k]
  ------------------
  175|  6.13M|    uniqueIndex[g] = -10;
  176|  6.13M|    uniqueScaling[g] = FIXP_SGL(-1.0f);
  177|  6.13M|  }
  178|       |
  179|   767k|  g = 0;
  180|       |
  181|   767k|  if (drcSetEffect & EB_DUCK_OTHER) {
  ------------------
  |  Branch (181:7): [True: 2.37k, False: 764k]
  ------------------
  182|  11.7k|    for (c = 0; c < channelCount; c++) {
  ------------------
  |  Branch (182:17): [True: 9.63k, False: 2.15k]
  ------------------
  183|  9.63k|      match = 0;
  184|  9.63k|      if (c >= 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (184:11): [True: 0, False: 9.63k]
  ------------------
  185|  9.63k|      idx = gainSetIndex[c];
  186|  9.63k|      factor = duckingModificationForChannel[c].duckingScaling;
  187|  9.63k|      if (idx < 0) {
  ------------------
  |  Branch (187:11): [True: 4.92k, False: 4.70k]
  ------------------
  188|  8.50k|        for (n = 0; n < g; n++) {
  ------------------
  |  Branch (188:21): [True: 6.67k, False: 1.82k]
  ------------------
  189|  6.67k|          if (uniqueScaling[n] == factor) {
  ------------------
  |  Branch (189:15): [True: 3.10k, False: 3.57k]
  ------------------
  190|  3.10k|            match = 1;
  191|  3.10k|            groupForChannel[c] = n;
  192|  3.10k|            break;
  193|  3.10k|          }
  194|  6.67k|        }
  195|  4.92k|        if (match == 0) {
  ------------------
  |  Branch (195:13): [True: 1.82k, False: 3.10k]
  ------------------
  196|  1.82k|          if (g >= 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (196:15): [True: 0, False: 1.82k]
  ------------------
  197|  1.82k|          uniqueIndex[g] = idx;
  198|  1.82k|          uniqueScaling[g] = factor;
  199|  1.82k|          groupForChannel[c] = g;
  200|  1.82k|          g++;
  201|  1.82k|        }
  202|  4.92k|      } else {
  203|  4.70k|        if ((duckingSequence > 0) && (duckingSequence != idx)) {
  ------------------
  |  Branch (203:13): [True: 2.83k, False: 1.87k]
  |  Branch (203:38): [True: 222, False: 2.61k]
  ------------------
  204|    222|          return DE_NOT_OK;
  205|    222|        }
  206|  4.48k|        duckingSequence = idx;
  207|  4.48k|        groupForChannel[c] = -1;
  208|  4.48k|      }
  209|  9.63k|    }
  210|  2.15k|    if (duckingSequence == -1) {
  ------------------
  |  Branch (210:9): [True: 776, False: 1.37k]
  ------------------
  211|    776|      return DE_NOT_OK;
  212|    776|    }
  213|   764k|  } else if (drcSetEffect & EB_DUCK_SELF) {
  ------------------
  |  Branch (213:14): [True: 4.51k, False: 760k]
  ------------------
  214|  11.9k|    for (c = 0; c < channelCount; c++) {
  ------------------
  |  Branch (214:17): [True: 7.46k, False: 4.51k]
  ------------------
  215|  7.46k|      match = 0;
  216|  7.46k|      if (c >= 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (216:11): [True: 0, False: 7.46k]
  ------------------
  217|  7.46k|      idx = gainSetIndex[c];
  218|  7.46k|      factor = duckingModificationForChannel[c].duckingScaling;
  219|  7.46k|      if (idx >= 0) {
  ------------------
  |  Branch (219:11): [True: 4.57k, False: 2.89k]
  ------------------
  220|  9.19k|        for (n = 0; n < g; n++) {
  ------------------
  |  Branch (220:21): [True: 6.45k, False: 2.74k]
  ------------------
  221|  6.45k|          if ((uniqueIndex[n] == idx) && (uniqueScaling[n] == factor)) {
  ------------------
  |  Branch (221:15): [True: 2.38k, False: 4.07k]
  |  Branch (221:42): [True: 1.82k, False: 553]
  ------------------
  222|  1.82k|            match = 1;
  223|  1.82k|            groupForChannel[c] = n;
  224|  1.82k|            break;
  225|  1.82k|          }
  226|  6.45k|        }
  227|  4.57k|        if (match == 0) {
  ------------------
  |  Branch (227:13): [True: 2.74k, False: 1.82k]
  ------------------
  228|  2.74k|          if (g >= 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (228:15): [True: 0, False: 2.74k]
  ------------------
  229|  2.74k|          uniqueIndex[g] = idx;
  230|  2.74k|          uniqueScaling[g] = factor;
  231|  2.74k|          groupForChannel[c] = g;
  232|  2.74k|          g++;
  233|  2.74k|        }
  234|  4.57k|      } else {
  235|  2.89k|        groupForChannel[c] = -1;
  236|  2.89k|      }
  237|  7.46k|    }
  238|   760k|  } else { /* no ducking */
  239|  6.13M|    for (c = 0; c < channelCount; c++) {
  ------------------
  |  Branch (239:17): [True: 5.37M, False: 760k]
  ------------------
  240|  5.37M|      if (c >= 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (240:11): [True: 0, False: 5.37M]
  ------------------
  241|  5.37M|      idx = gainSetIndex[c];
  242|  5.37M|      match = 0;
  243|  5.37M|      if (idx >= 0) {
  ------------------
  |  Branch (243:11): [True: 59.6k, False: 5.31M]
  ------------------
  244|   115k|        for (n = 0; n < g; n++) {
  ------------------
  |  Branch (244:21): [True: 81.3k, False: 33.9k]
  ------------------
  245|  81.3k|          if (uniqueIndex[n] == idx) {
  ------------------
  |  Branch (245:15): [True: 25.7k, False: 55.6k]
  ------------------
  246|  25.7k|            match = 1;
  247|  25.7k|            groupForChannel[c] = n;
  248|  25.7k|            break;
  249|  25.7k|          }
  250|  81.3k|        }
  251|  59.6k|        if (match == 0) {
  ------------------
  |  Branch (251:13): [True: 33.9k, False: 25.7k]
  ------------------
  252|  33.9k|          if (g >= 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (252:15): [True: 0, False: 33.9k]
  ------------------
  253|  33.9k|          uniqueIndex[g] = idx;
  254|  33.9k|          groupForChannel[c] = g;
  255|  33.9k|          g++;
  256|  33.9k|        }
  257|  5.31M|      } else {
  258|  5.31M|        groupForChannel[c] = -1;
  259|  5.31M|      }
  260|  5.37M|    }
  261|   760k|  }
  262|   766k|  *nDrcChannelGroups = g;
  263|       |
  264|   766k|  if (drcSetEffect & (EB_DUCK_OTHER | EB_DUCK_SELF)) {
  ------------------
  |  Branch (264:7): [True: 5.89k, False: 760k]
  ------------------
  265|  9.51k|    for (g = 0; g < *nDrcChannelGroups; g++) {
  ------------------
  |  Branch (265:17): [True: 3.62k, False: 5.89k]
  ------------------
  266|  3.62k|      if (drcSetEffect & EB_DUCK_OTHER) {
  ------------------
  |  Branch (266:11): [True: 876, False: 2.74k]
  ------------------
  267|    876|        uniqueIndex[g] = duckingSequence;
  268|    876|      }
  269|  3.62k|      duckingModificationForChannelGroup[g].duckingScaling = uniqueScaling[g];
  270|  3.62k|      if (uniqueScaling[g] != FL2FXCONST_SGL(1.0f / (float)(1 << 2))) {
  ------------------
  |  |  180|  3.62k|  (FIXP_SGL)(                                                                \
  |  |  181|  3.62k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 3.62k, Folded]
  |  |  ------------------
  |  |  182|  3.62k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  3.62k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  3.62k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 3.62k]
  |  |  ------------------
  |  |  183|  3.62k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  3.62k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  3.62k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  3.62k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  3.62k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  3.62k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  3.62k|          : ((((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.52k, False: 2.09k]
  ------------------
  271|  1.52k|        duckingModificationForChannelGroup[g].duckingScalingPresent = 1;
  272|  2.09k|      } else {
  273|  2.09k|        duckingModificationForChannelGroup[g].duckingScalingPresent = 0;
  274|  2.09k|      }
  275|  3.62k|    }
  276|  5.89k|  }
  277|       |
  278|   766k|  return DE_OK;
  279|   767k|}

_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.54k, False: 2.84k]
  ------------------
  194|  76.8k|    for (j = 0; j < 8; j++) {
  ------------------
  |  Branch (194:17): [True: 68.3k, False: 8.54k]
  ------------------
  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.54k|  }
  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.4k|  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|  37.0k|  for (i = 0; i < 12; i++) {
  ------------------
  |  Branch (219:15): [True: 34.1k, False: 2.84k]
  ------------------
  220|   205k|    for (j = 0; j < NUM_LNB_FRAMES; j++) {
  ------------------
  |  |  111|   205k|  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: 483, False: 2.51k]
  ------------------
  270|    483|    pCoef = selectDrcCoefficients(hUniDrcConfig, pInst->drcLocation);
  271|    483|    if (pCoef == NULL) {
  ------------------
  |  Branch (271:9): [True: 0, False: 483]
  ------------------
  272|      0|      return DE_NOT_OK;
  273|      0|    }
  274|       |
  275|    483|    if (pCoef->drcFrameSizePresent) {
  ------------------
  |  Branch (275:9): [True: 43, False: 440]
  ------------------
  276|     43|      if (pCoef->drcFrameSize != hGainDec->frameSize) {
  ------------------
  |  Branch (276:11): [True: 35, False: 8]
  ------------------
  277|     35|        return DE_NOT_OK;
  278|     35|      }
  279|     43|    }
  280|       |
  281|    448|    err = _generateDrcInstructionsDerivedData(
  282|    448|        hGainDec, hUniDrcConfig, pInst, pCoef,
  283|    448|        &(hGainDec->activeDrc[hGainDec->nActiveDrcs]));
  284|    448|    if (err) return err;
  ------------------
  |  Branch (284:9): [True: 0, False: 448]
  ------------------
  285|    448|  }
  286|       |
  287|  2.96k|  hGainDec->activeDrc[hGainDec->nActiveDrcs].pInst = pInst;
  288|  2.96k|  hGainDec->activeDrc[hGainDec->nActiveDrcs].pCoef = pCoef;
  289|       |
  290|  3.19k|  for (g = 0; g < pInst->nDrcChannelGroups; g++) {
  ------------------
  |  Branch (290:15): [True: 234, False: 2.96k]
  ------------------
  291|    234|    if (hGainDec->activeDrc[hGainDec->nActiveDrcs].bandCountForChannelGroup[g] >
  ------------------
  |  Branch (291:9): [True: 12, False: 222]
  ------------------
  292|    234|        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|    234|  }
  299|       |
  300|  2.96k|  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.96k|  if ((hGainDec->channelGainActiveDrcIndex == -1) &&
  ------------------
  |  Branch (305:7): [True: 2.77k, False: 186]
  ------------------
  306|  2.77k|      (downmixIdSelected == DOWNMIX_ID_BASE_LAYOUT) &&
  ------------------
  |  |  122|  2.77k|#define DOWNMIX_ID_BASE_LAYOUT 0x0
  ------------------
  |  Branch (306:7): [True: 2.68k, False: 92]
  ------------------
  307|  2.68k|      (hUniDrcConfig->drcInstructionsUniDrcCount >
  ------------------
  |  Branch (307:7): [True: 696, False: 1.98k]
  ------------------
  308|  2.68k|       0)) { /* use this activeDrc to apply channelGains */
  309|    696|    hGainDec->channelGainActiveDrcIndex = hGainDec->nActiveDrcs;
  310|    696|  }
  311|       |
  312|  2.96k|  hGainDec->nActiveDrcs++;
  313|  2.96k|  if (hGainDec->nActiveDrcs > MAX_ACTIVE_DRCS) return DE_NOT_OK;
  ------------------
  |  |  108|  2.96k|#define MAX_ACTIVE_DRCS 3
  ------------------
  |  Branch (313:7): [True: 0, False: 2.96k]
  ------------------
  314|       |
  315|  2.96k|  return DE_OK;
  316|  2.96k|}
_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.65k|  for (a = 0; a < hGainDec->nActiveDrcs; a++) {
  ------------------
  |  Branch (323:15): [True: 2.95k, False: 2.69k]
  ------------------
  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: 2, False: 2.95k]
  ------------------
  327|      2|      hGainDec->nActiveDrcs = a;
  328|      2|      return DE_NOT_OK;
  329|      2|    }
  330|  2.95k|  }
  331|       |
  332|  2.69k|  return DE_OK;
  333|  2.69k|}
drcGainDec_init.cpp:_ZL35_generateDrcInstructionsDerivedDataP16DRC_GAIN_DECODERP14UNI_DRC_CONFIGP24DRC_INSTRUCTIONS_UNI_DRCP24DRC_COEFFICIENTS_UNI_DRCP10ACTIVE_DRC:
  111|    448|    ACTIVE_DRC* pActiveDrc) {
  112|    448|  DRC_ERROR err = DE_OK;
  113|    448|  int g;
  114|    448|  int gainElementCount = 0;
  115|    448|  UCHAR nDrcChannelGroups = 0;
  116|    448|  SCHAR gainSetIndexForChannelGroup[8];
  117|       |
  118|    448|  err = deriveDrcChannelGroups(
  119|    448|      pInst->drcSetEffect, pInst->drcChannelCount, pInst->gainSetIndex,
  120|    448|      pInst->drcSetEffect & (EB_DUCK_OTHER | EB_DUCK_SELF)
  ------------------
  |  Branch (120:7): [True: 276, False: 172]
  ------------------
  121|    448|          ? pInst->duckingModificationForChannel
  122|    448|          : NULL,
  123|    448|      &nDrcChannelGroups, gainSetIndexForChannelGroup,
  124|    448|      pActiveDrc->channelGroupForChannel,
  125|    448|      pInst->drcSetEffect & (EB_DUCK_OTHER | EB_DUCK_SELF)
  ------------------
  |  Branch (125:7): [True: 276, False: 172]
  ------------------
  126|    448|          ? pActiveDrc->duckingModificationForChannelGroup
  127|    448|          : NULL);
  128|    448|  if (err) return (err);
  ------------------
  |  Branch (128:7): [True: 0, False: 448]
  ------------------
  129|       |
  130|       |  /* sanity check */
  131|    448|  if (nDrcChannelGroups != pInst->nDrcChannelGroups) return DE_NOT_OK;
  ------------------
  |  Branch (131:7): [True: 0, False: 448]
  ------------------
  132|    684|  for (g = 0; g < pInst->nDrcChannelGroups; g++) {
  ------------------
  |  Branch (132:15): [True: 236, False: 448]
  ------------------
  133|    236|    if (gainSetIndexForChannelGroup[g] != pInst->gainSetIndexForChannelGroup[g])
  ------------------
  |  Branch (133:9): [True: 0, False: 236]
  ------------------
  134|      0|      return DE_NOT_OK;
  135|    236|  }
  136|       |
  137|    684|  for (g = 0; g < pInst->nDrcChannelGroups; g++) {
  ------------------
  |  Branch (137:15): [True: 236, False: 448]
  ------------------
  138|    236|    int seq = pInst->gainSetIndexForChannelGroup[g];
  139|    236|    if (seq != -1 && (hUniDrcConfig->drcCoefficientsUniDrcCount == 0 ||
  ------------------
  |  Branch (139:9): [True: 236, False: 0]
  |  Branch (139:23): [True: 0, False: 236]
  ------------------
  140|    236|                      seq >= pCoef->gainSetCount)) {
  ------------------
  |  Branch (140:23): [True: 127, False: 109]
  ------------------
  141|    127|      pActiveDrc->channelGroupIsParametricDrc[g] = 1;
  142|    127|    } else {
  143|    109|      pActiveDrc->channelGroupIsParametricDrc[g] = 0;
  144|    109|      if (seq >= pCoef->gainSetCount) {
  ------------------
  |  Branch (144:11): [True: 0, False: 109]
  ------------------
  145|      0|        return DE_NOT_OK;
  146|      0|      }
  147|    109|    }
  148|    236|  }
  149|       |
  150|       |  /* gainElementCount */
  151|    448|  if (pInst->drcSetEffect & (EB_DUCK_OTHER | EB_DUCK_SELF)) {
  ------------------
  |  Branch (151:7): [True: 276, False: 172]
  ------------------
  152|    412|    for (g = 0; g < pInst->nDrcChannelGroups; g++) {
  ------------------
  |  Branch (152:17): [True: 136, False: 276]
  ------------------
  153|    136|      pActiveDrc->bandCountForChannelGroup[g] = 1;
  154|    136|    }
  155|    276|    pActiveDrc->gainElementCount =
  156|    276|        pInst->nDrcChannelGroups; /* one gain element per channel group */
  157|    276|  } else {
  158|    272|    for (g = 0; g < pInst->nDrcChannelGroups; g++) {
  ------------------
  |  Branch (158:17): [True: 100, False: 172]
  ------------------
  159|    100|      if (pActiveDrc->channelGroupIsParametricDrc[g]) {
  ------------------
  |  Branch (159:11): [True: 67, False: 33]
  ------------------
  160|     67|        gainElementCount++;
  161|     67|        pActiveDrc->bandCountForChannelGroup[g] = 1;
  162|     67|      } else {
  163|     33|        int seq, bandCount;
  164|     33|        seq = pInst->gainSetIndexForChannelGroup[g];
  165|     33|        bandCount = pCoef->gainSet[seq].bandCount;
  166|     33|        pActiveDrc->bandCountForChannelGroup[g] = bandCount;
  167|     33|        gainElementCount += bandCount;
  168|     33|      }
  169|    100|    }
  170|    172|    pActiveDrc->gainElementCount = gainElementCount;
  171|    172|  }
  172|       |
  173|       |  /* prepare gainElementForGroup (cumulated sum of bandCountForChannelGroup) */
  174|    448|  pActiveDrc->gainElementForGroup[0] = 0;
  175|    593|  for (g = 1; g < pInst->nDrcChannelGroups; g++) {
  ------------------
  |  Branch (175:15): [True: 145, False: 448]
  ------------------
  176|    145|    pActiveDrc->gainElementForGroup[g] =
  177|    145|        pActiveDrc->gainElementForGroup[g - 1] +
  178|    145|        pActiveDrc->bandCountForChannelGroup[g - 1]; /* index of first gain
  179|       |                                                        sequence in channel
  180|       |                                                        group */
  181|    145|  }
  182|       |
  183|    448|  return DE_OK;
  184|    448|}

FDK_crc.cpp:_ZL15FDKgetValidBitsP13FDK_BITSTREAM:
  577|    717|FDK_INLINE UINT FDKgetValidBits(HANDLE_FDK_BITSTREAM hBitStream) {
  578|    717|  FDKsyncCache(hBitStream);
  579|    717|  return FDK_getValidBits(&hBitStream->hBitBuf);
  580|    717|}
FDK_crc.cpp:_ZL12FDKsyncCacheP13FDK_BITSTREAM:
  452|    824|FDK_INLINE void FDKsyncCache(HANDLE_FDK_BITSTREAM hBitStream) {
  453|    824|  if (hBitStream->ConfigCache == BS_READER)
  ------------------
  |  Branch (453:7): [True: 824, False: 0]
  ------------------
  454|    824|    FDK_pushBack(&hBitStream->hBitBuf, hBitStream->BitsInCache,
  455|    824|                 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|    824|  hBitStream->BitsInCache = 0;
  461|    824|  hBitStream->CacheWord = 0;
  462|    824|}
FDK_crc.cpp:_ZL20FDKpushBiDirectionalP13FDK_BITSTREAMi:
  563|    107|                                     const INT numberOfBits) {
  564|    107|  if (numberOfBits >= 0)
  ------------------
  |  Branch (564:7): [True: 0, False: 107]
  ------------------
  565|      0|    FDKpushFor(hBitStream, numberOfBits);
  566|    107|  else
  567|    107|    FDKpushBack(hBitStream, -numberOfBits);
  568|    107|}
FDK_crc.cpp:_ZL11FDKpushBackP13FDK_BITSTREAMj:
  539|    107|                            const UINT numberOfBits) {
  540|    107|  if ((hBitStream->BitsInCache + numberOfBits) < CACHE_BITS &&
  ------------------
  |  |  111|    214|#define CACHE_BITS 32
  ------------------
  |  Branch (540:7): [True: 98, False: 9]
  ------------------
  541|     98|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (541:7): [True: 98, False: 0]
  ------------------
  542|     98|    hBitStream->BitsInCache += numberOfBits;
  543|     98|    FDKsyncCache(hBitStream); /* sync cache to avoid invalid cache */
  544|     98|  } else {
  545|      9|    FDKsyncCache(hBitStream);
  546|      9|    FDK_pushBack(&hBitStream->hBitBuf, numberOfBits, hBitStream->ConfigCache);
  547|      9|  }
  548|    107|}
FDK_crc.cpp:_ZL10FDKreadBitP13FDK_BITSTREAM:
  228|  2.15k|FDK_INLINE UINT FDKreadBit(HANDLE_FDK_BITSTREAM hBitStream) {
  229|  2.15k|  if (!hBitStream->BitsInCache) {
  ------------------
  |  Branch (229:7): [True: 118, False: 2.03k]
  ------------------
  230|    118|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  231|    118|    hBitStream->BitsInCache = CACHE_BITS - 1;
  ------------------
  |  |  111|    118|#define CACHE_BITS 32
  ------------------
  232|    118|    return hBitStream->CacheWord >> 31;
  233|    118|  }
  234|  2.03k|  hBitStream->BitsInCache--;
  235|       |
  236|  2.03k|  return (hBitStream->CacheWord >> hBitStream->BitsInCache) & 1;
  237|  2.15k|}
aacdecoder_lib.cpp:_ZL16FDKinitBitStreamP13FDK_BITSTREAMPhjj10FDK_BS_CFG:
  166|  4.10k|                      FDK_BS_CFG config = BS_READER) {
  167|  4.10k|  FDK_InitBitBuffer(&hBitStream->hBitBuf, pBuffer, bufSize, validBits);
  168|       |
  169|       |  /* init cache */
  170|  4.10k|  hBitStream->CacheWord = hBitStream->BitsInCache = 0;
  171|  4.10k|  hBitStream->ConfigCache = config;
  172|  4.10k|}
drcDec_reader.cpp:_ZL11FDKreadBitsP13FDK_BITSTREAMj:
  211|  25.2M|                            const UINT numberOfBits) {
  212|  25.2M|  UINT bits = 0;
  213|  25.2M|  INT missingBits = (INT)numberOfBits - (INT)hBitStream->BitsInCache;
  214|       |
  215|  25.2M|  FDK_ASSERT(numberOfBits <= 32);
  ------------------
  |  |  221|  25.2M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 25.2M, False: 0]
  ------------------
  216|  25.2M|  if (missingBits > 0) {
  ------------------
  |  Branch (216:7): [True: 3.31M, False: 21.9M]
  ------------------
  217|  3.31M|    if (missingBits != 32) bits = hBitStream->CacheWord << missingBits;
  ------------------
  |  Branch (217:9): [True: 3.31M, False: 0]
  ------------------
  218|  3.31M|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  219|  3.31M|    hBitStream->BitsInCache += CACHE_BITS;
  ------------------
  |  |  111|  3.31M|#define CACHE_BITS 32
  ------------------
  220|  3.31M|  }
  221|       |
  222|  25.2M|  hBitStream->BitsInCache -= numberOfBits;
  223|       |
  224|  25.2M|  return (bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) &
  225|  25.2M|         BitMask[numberOfBits];
  226|  25.2M|}
drcDec_reader.cpp:_ZL10FDKpushForP13FDK_BITSTREAMj:
  551|   798k|                           const UINT numberOfBits) {
  552|   798k|  if ((hBitStream->BitsInCache > numberOfBits) &&
  ------------------
  |  Branch (552:7): [True: 497k, False: 301k]
  ------------------
  553|   497k|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (553:7): [True: 497k, False: 0]
  ------------------
  554|   497k|    hBitStream->BitsInCache -= numberOfBits;
  555|   497k|  } else {
  556|   301k|    FDKsyncCache(hBitStream);
  557|   301k|    FDK_pushForward(&hBitStream->hBitBuf, numberOfBits,
  558|   301k|                    hBitStream->ConfigCache);
  559|   301k|  }
  560|   798k|}
drcDec_reader.cpp:_ZL12FDKsyncCacheP13FDK_BITSTREAM:
  452|   361k|FDK_INLINE void FDKsyncCache(HANDLE_FDK_BITSTREAM hBitStream) {
  453|   361k|  if (hBitStream->ConfigCache == BS_READER)
  ------------------
  |  Branch (453:7): [True: 361k, False: 0]
  ------------------
  454|   361k|    FDK_pushBack(&hBitStream->hBitBuf, hBitStream->BitsInCache,
  455|   361k|                 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|   361k|  hBitStream->BitsInCache = 0;
  461|   361k|  hBitStream->CacheWord = 0;
  462|   361k|}
drcDec_reader.cpp:_ZL15FDKgetValidBitsP13FDK_BITSTREAM:
  577|  60.5k|FDK_INLINE UINT FDKgetValidBits(HANDLE_FDK_BITSTREAM hBitStream) {
  578|  60.5k|  FDKsyncCache(hBitStream);
  579|  60.5k|  return FDK_getValidBits(&hBitStream->hBitBuf);
  580|  60.5k|}
env_extr.cpp:_ZL11FDKreadBitsP13FDK_BITSTREAMj:
  211|  10.0k|                            const UINT numberOfBits) {
  212|  10.0k|  UINT bits = 0;
  213|  10.0k|  INT missingBits = (INT)numberOfBits - (INT)hBitStream->BitsInCache;
  214|       |
  215|  10.0k|  FDK_ASSERT(numberOfBits <= 32);
  ------------------
  |  |  221|  10.0k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 10.0k, False: 0]
  ------------------
  216|  10.0k|  if (missingBits > 0) {
  ------------------
  |  Branch (216:7): [True: 1.16k, False: 8.86k]
  ------------------
  217|  1.16k|    if (missingBits != 32) bits = hBitStream->CacheWord << missingBits;
  ------------------
  |  Branch (217:9): [True: 1.16k, False: 0]
  ------------------
  218|  1.16k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  219|  1.16k|    hBitStream->BitsInCache += CACHE_BITS;
  ------------------
  |  |  111|  1.16k|#define CACHE_BITS 32
  ------------------
  220|  1.16k|  }
  221|       |
  222|  10.0k|  hBitStream->BitsInCache -= numberOfBits;
  223|       |
  224|  10.0k|  return (bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) &
  225|  10.0k|         BitMask[numberOfBits];
  226|  10.0k|}
env_extr.cpp:_ZL10FDKpushForP13FDK_BITSTREAMj:
  551|  2.85k|                           const UINT numberOfBits) {
  552|  2.85k|  if ((hBitStream->BitsInCache > numberOfBits) &&
  ------------------
  |  Branch (552:7): [True: 2.48k, False: 362]
  ------------------
  553|  2.48k|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (553:7): [True: 2.48k, False: 0]
  ------------------
  554|  2.48k|    hBitStream->BitsInCache -= numberOfBits;
  555|  2.48k|  } else {
  556|    362|    FDKsyncCache(hBitStream);
  557|    362|    FDK_pushForward(&hBitStream->hBitBuf, numberOfBits,
  558|    362|                    hBitStream->ConfigCache);
  559|    362|  }
  560|  2.85k|}
env_extr.cpp:_ZL12FDKsyncCacheP13FDK_BITSTREAM:
  452|    362|FDK_INLINE void FDKsyncCache(HANDLE_FDK_BITSTREAM hBitStream) {
  453|    362|  if (hBitStream->ConfigCache == BS_READER)
  ------------------
  |  Branch (453:7): [True: 362, False: 0]
  ------------------
  454|    362|    FDK_pushBack(&hBitStream->hBitBuf, hBitStream->BitsInCache,
  455|    362|                 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|    362|  hBitStream->BitsInCache = 0;
  461|    362|  hBitStream->CacheWord = 0;
  462|    362|}
env_extr.cpp:_ZL10FDKreadBitP13FDK_BITSTREAM:
  228|  2.85k|FDK_INLINE UINT FDKreadBit(HANDLE_FDK_BITSTREAM hBitStream) {
  229|  2.85k|  if (!hBitStream->BitsInCache) {
  ------------------
  |  Branch (229:7): [True: 190, False: 2.66k]
  ------------------
  230|    190|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  231|    190|    hBitStream->BitsInCache = CACHE_BITS - 1;
  ------------------
  |  |  111|    190|#define CACHE_BITS 32
  ------------------
  232|    190|    return hBitStream->CacheWord >> 31;
  233|    190|  }
  234|  2.66k|  hBitStream->BitsInCache--;
  235|       |
  236|  2.66k|  return (hBitStream->CacheWord >> hBitStream->BitsInCache) & 1;
  237|  2.85k|}
sac_bitdec.cpp:_ZL11FDKreadBitsP13FDK_BITSTREAMj:
  211|  8.32k|                            const UINT numberOfBits) {
  212|  8.32k|  UINT bits = 0;
  213|  8.32k|  INT missingBits = (INT)numberOfBits - (INT)hBitStream->BitsInCache;
  214|       |
  215|  8.32k|  FDK_ASSERT(numberOfBits <= 32);
  ------------------
  |  |  221|  8.32k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 8.32k, False: 0]
  ------------------
  216|  8.32k|  if (missingBits > 0) {
  ------------------
  |  Branch (216:7): [True: 1.39k, False: 6.93k]
  ------------------
  217|  1.39k|    if (missingBits != 32) bits = hBitStream->CacheWord << missingBits;
  ------------------
  |  Branch (217:9): [True: 1.39k, False: 0]
  ------------------
  218|  1.39k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  219|  1.39k|    hBitStream->BitsInCache += CACHE_BITS;
  ------------------
  |  |  111|  1.39k|#define CACHE_BITS 32
  ------------------
  220|  1.39k|  }
  221|       |
  222|  8.32k|  hBitStream->BitsInCache -= numberOfBits;
  223|       |
  224|  8.32k|  return (bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) &
  225|  8.32k|         BitMask[numberOfBits];
  226|  8.32k|}
sac_bitdec.cpp:_ZL15FDKgetValidBitsP13FDK_BITSTREAM:
  577|  3.50k|FDK_INLINE UINT FDKgetValidBits(HANDLE_FDK_BITSTREAM hBitStream) {
  578|  3.50k|  FDKsyncCache(hBitStream);
  579|  3.50k|  return FDK_getValidBits(&hBitStream->hBitBuf);
  580|  3.50k|}
sac_bitdec.cpp:_ZL12FDKsyncCacheP13FDK_BITSTREAM:
  452|  5.67k|FDK_INLINE void FDKsyncCache(HANDLE_FDK_BITSTREAM hBitStream) {
  453|  5.67k|  if (hBitStream->ConfigCache == BS_READER)
  ------------------
  |  Branch (453:7): [True: 5.67k, False: 0]
  ------------------
  454|  5.67k|    FDK_pushBack(&hBitStream->hBitBuf, hBitStream->BitsInCache,
  455|  5.67k|                 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|  5.67k|  hBitStream->BitsInCache = 0;
  461|  5.67k|  hBitStream->CacheWord = 0;
  462|  5.67k|}
sac_bitdec.cpp:_ZL20FDKpushBiDirectionalP13FDK_BITSTREAMi:
  563|    667|                                     const INT numberOfBits) {
  564|    667|  if (numberOfBits >= 0)
  ------------------
  |  Branch (564:7): [True: 506, False: 161]
  ------------------
  565|    506|    FDKpushFor(hBitStream, numberOfBits);
  566|    161|  else
  567|    161|    FDKpushBack(hBitStream, -numberOfBits);
  568|    667|}
sac_bitdec.cpp:_ZL11FDKpushBackP13FDK_BITSTREAMj:
  539|    161|                            const UINT numberOfBits) {
  540|    161|  if ((hBitStream->BitsInCache + numberOfBits) < CACHE_BITS &&
  ------------------
  |  |  111|    322|#define CACHE_BITS 32
  ------------------
  |  Branch (540:7): [True: 102, False: 59]
  ------------------
  541|    102|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (541:7): [True: 102, False: 0]
  ------------------
  542|    102|    hBitStream->BitsInCache += numberOfBits;
  543|    102|    FDKsyncCache(hBitStream); /* sync cache to avoid invalid cache */
  544|    102|  } else {
  545|     59|    FDKsyncCache(hBitStream);
  546|     59|    FDK_pushBack(&hBitStream->hBitBuf, numberOfBits, hBitStream->ConfigCache);
  547|     59|  }
  548|    161|}
sac_bitdec.cpp:_ZL10FDKpushForP13FDK_BITSTREAMj:
  551|    932|                           const UINT numberOfBits) {
  552|    932|  if ((hBitStream->BitsInCache > numberOfBits) &&
  ------------------
  |  Branch (552:7): [True: 0, False: 932]
  ------------------
  553|      0|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (553:7): [True: 0, False: 0]
  ------------------
  554|      0|    hBitStream->BitsInCache -= numberOfBits;
  555|    932|  } else {
  556|    932|    FDKsyncCache(hBitStream);
  557|    932|    FDK_pushForward(&hBitStream->hBitBuf, numberOfBits,
  558|    932|                    hBitStream->ConfigCache);
  559|    932|  }
  560|    932|}
sac_bitdec.cpp:_ZL12FDKbyteAlignP13FDK_BITSTREAMj:
  496|  1.08k|                             UINT alignmentAnchor) {
  497|  1.08k|  FDKsyncCache(hBitStream);
  498|  1.08k|  if (hBitStream->ConfigCache == BS_READER) {
  ------------------
  |  Branch (498:7): [True: 1.08k, False: 0]
  ------------------
  499|  1.08k|    FDK_pushForward(
  500|  1.08k|        &hBitStream->hBitBuf,
  501|  1.08k|        (UINT)((INT)8 - (((INT)alignmentAnchor -
  502|  1.08k|                          (INT)FDK_getValidBits(&hBitStream->hBitBuf)) &
  503|  1.08k|                         0x07)) &
  504|  1.08k|            0x07,
  505|  1.08k|        hBitStream->ConfigCache);
  506|  1.08k|  } 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.08k|}
tpdec_asc.cpp:_ZL11FDKreadBitsP13FDK_BITSTREAMj:
  211|  2.10M|                            const UINT numberOfBits) {
  212|  2.10M|  UINT bits = 0;
  213|  2.10M|  INT missingBits = (INT)numberOfBits - (INT)hBitStream->BitsInCache;
  214|       |
  215|  2.10M|  FDK_ASSERT(numberOfBits <= 32);
  ------------------
  |  |  221|  2.10M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 2.10M, False: 0]
  ------------------
  216|  2.10M|  if (missingBits > 0) {
  ------------------
  |  Branch (216:7): [True: 634k, False: 1.47M]
  ------------------
  217|   634k|    if (missingBits != 32) bits = hBitStream->CacheWord << missingBits;
  ------------------
  |  Branch (217:9): [True: 523k, False: 110k]
  ------------------
  218|   634k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  219|   634k|    hBitStream->BitsInCache += CACHE_BITS;
  ------------------
  |  |  111|   634k|#define CACHE_BITS 32
  ------------------
  220|   634k|  }
  221|       |
  222|  2.10M|  hBitStream->BitsInCache -= numberOfBits;
  223|       |
  224|  2.10M|  return (bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) &
  225|  2.10M|         BitMask[numberOfBits];
  226|  2.10M|}
tpdec_asc.cpp:_ZL12FDKbyteAlignP13FDK_BITSTREAMj:
  496|    610|                             UINT alignmentAnchor) {
  497|    610|  FDKsyncCache(hBitStream);
  498|    610|  if (hBitStream->ConfigCache == BS_READER) {
  ------------------
  |  Branch (498:7): [True: 610, False: 0]
  ------------------
  499|    610|    FDK_pushForward(
  500|    610|        &hBitStream->hBitBuf,
  501|    610|        (UINT)((INT)8 - (((INT)alignmentAnchor -
  502|    610|                          (INT)FDK_getValidBits(&hBitStream->hBitBuf)) &
  503|    610|                         0x07)) &
  504|    610|            0x07,
  505|    610|        hBitStream->ConfigCache);
  506|    610|  } 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|    610|}
tpdec_asc.cpp:_ZL12FDKsyncCacheP13FDK_BITSTREAM:
  452|   222k|FDK_INLINE void FDKsyncCache(HANDLE_FDK_BITSTREAM hBitStream) {
  453|   222k|  if (hBitStream->ConfigCache == BS_READER)
  ------------------
  |  Branch (453:7): [True: 214k, False: 7.84k]
  ------------------
  454|   214k|    FDK_pushBack(&hBitStream->hBitBuf, hBitStream->BitsInCache,
  455|   214k|                 hBitStream->ConfigCache);
  456|  7.84k|  else if (hBitStream->BitsInCache) /* BS_WRITER */
  ------------------
  |  Branch (456:12): [True: 7.51k, False: 328]
  ------------------
  457|  7.51k|    FDK_put(&hBitStream->hBitBuf, hBitStream->CacheWord,
  458|  7.51k|            hBitStream->BitsInCache);
  459|       |
  460|   222k|  hBitStream->BitsInCache = 0;
  461|   222k|  hBitStream->CacheWord = 0;
  462|   222k|}
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: 801, False: 8.36k]
  ------------------
  541|    801|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (541:7): [True: 801, False: 0]
  ------------------
  542|    801|    hBitStream->BitsInCache += numberOfBits;
  543|    801|    FDKsyncCache(hBitStream); /* sync cache to avoid invalid cache */
  544|  8.36k|  } else {
  545|  8.36k|    FDKsyncCache(hBitStream);
  546|  8.36k|    FDK_pushBack(&hBitStream->hBitBuf, numberOfBits, hBitStream->ConfigCache);
  547|  8.36k|  }
  548|  9.16k|}
tpdec_asc.cpp:_ZL15FDKgetValidBitsP13FDK_BITSTREAM:
  577|   149k|FDK_INLINE UINT FDKgetValidBits(HANDLE_FDK_BITSTREAM hBitStream) {
  578|   149k|  FDKsyncCache(hBitStream);
  579|   149k|  return FDK_getValidBits(&hBitStream->hBitBuf);
  580|   149k|}
tpdec_asc.cpp:_ZL10FDKreadBitP13FDK_BITSTREAM:
  228|   107k|FDK_INLINE UINT FDKreadBit(HANDLE_FDK_BITSTREAM hBitStream) {
  229|   107k|  if (!hBitStream->BitsInCache) {
  ------------------
  |  Branch (229:7): [True: 1.11k, False: 106k]
  ------------------
  230|  1.11k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  231|  1.11k|    hBitStream->BitsInCache = CACHE_BITS - 1;
  ------------------
  |  |  111|  1.11k|#define CACHE_BITS 32
  ------------------
  232|  1.11k|    return hBitStream->CacheWord >> 31;
  233|  1.11k|  }
  234|   106k|  hBitStream->BitsInCache--;
  235|       |
  236|   106k|  return (hBitStream->CacheWord >> hBitStream->BitsInCache) & 1;
  237|   107k|}
tpdec_asc.cpp:_ZL10FDKpushForP13FDK_BITSTREAMj:
  551|  60.3k|                           const UINT numberOfBits) {
  552|  60.3k|  if ((hBitStream->BitsInCache > numberOfBits) &&
  ------------------
  |  Branch (552:7): [True: 5.13k, False: 55.1k]
  ------------------
  553|  5.13k|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (553:7): [True: 5.13k, False: 0]
  ------------------
  554|  5.13k|    hBitStream->BitsInCache -= numberOfBits;
  555|  55.1k|  } else {
  556|  55.1k|    FDKsyncCache(hBitStream);
  557|  55.1k|    FDK_pushForward(&hBitStream->hBitBuf, numberOfBits,
  558|  55.1k|                    hBitStream->ConfigCache);
  559|  55.1k|  }
  560|  60.3k|}
tpdec_asc.cpp:_ZL12escapedValueP13FDK_BITSTREAMiii:
  306|   129k|                             int nBits2, int nBits3) {
  307|   129k|  UINT value = FDKreadBits(hBitStream, nBits1);
  308|       |
  309|   129k|  if (value == (UINT)(1 << nBits1) - 1) {
  ------------------
  |  Branch (309:7): [True: 34.6k, False: 94.4k]
  ------------------
  310|  34.6k|    UINT valueAdd = FDKreadBits(hBitStream, nBits2);
  311|  34.6k|    value += valueAdd;
  312|  34.6k|    if (valueAdd == (UINT)(1 << nBits2) - 1) {
  ------------------
  |  Branch (312:9): [True: 28.3k, False: 6.31k]
  ------------------
  313|  28.3k|      value += FDKreadBits(hBitStream, nBits3);
  314|  28.3k|    }
  315|  34.6k|  }
  316|       |
  317|   129k|  return value;
  318|   129k|}
tpdec_asc.cpp:_ZL16FDKinitBitStreamP13FDK_BITSTREAMPhjj10FDK_BS_CFG:
  166|  7.84k|                      FDK_BS_CFG config = BS_READER) {
  167|  7.84k|  FDK_InitBitBuffer(&hBitStream->hBitBuf, pBuffer, bufSize, validBits);
  168|       |
  169|       |  /* init cache */
  170|  7.84k|  hBitStream->CacheWord = hBitStream->BitsInCache = 0;
  171|  7.84k|  hBitStream->ConfigCache = config;
  172|  7.84k|}
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: 110k]
  ------------------
  351|  7.51k|    hBitStream->BitsInCache += numberOfBits;
  352|  7.51k|    hBitStream->CacheWord =
  353|  7.51k|        (hBitStream->CacheWord << numberOfBits) | (value & validMask);
  354|   110k|  } 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|   110k|    int missing_bits = CACHE_BITS - hBitStream->BitsInCache;
  ------------------
  |  |  111|   110k|#define CACHE_BITS 32
  ------------------
  363|   110k|    int remaining_bits = numberOfBits - missing_bits;
  364|   110k|    value = value & validMask;
  365|       |    /* Avoid shift left by 32 positions */
  366|   110k|    UINT CacheWord =
  367|   110k|        (missing_bits == 32) ? 0 : (hBitStream->CacheWord << missing_bits);
  ------------------
  |  Branch (367:9): [True: 110k, False: 0]
  ------------------
  368|   110k|    CacheWord |= (value >> (remaining_bits));
  369|   110k|    FDK_put(&hBitStream->hBitBuf, CacheWord, 32);
  370|       |
  371|   110k|    hBitStream->CacheWord = value;
  372|   110k|    hBitStream->BitsInCache = remaining_bits;
  373|   110k|  }
  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.05k|                            const UINT numberOfBits) {
  540|  3.05k|  if ((hBitStream->BitsInCache + numberOfBits) < CACHE_BITS &&
  ------------------
  |  |  111|  6.11k|#define CACHE_BITS 32
  ------------------
  |  Branch (540:7): [True: 74, False: 2.98k]
  ------------------
  541|     74|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (541:7): [True: 74, False: 0]
  ------------------
  542|     74|    hBitStream->BitsInCache += numberOfBits;
  543|     74|    FDKsyncCache(hBitStream); /* sync cache to avoid invalid cache */
  544|  2.98k|  } else {
  545|  2.98k|    FDKsyncCache(hBitStream);
  546|  2.98k|    FDK_pushBack(&hBitStream->hBitBuf, numberOfBits, hBitStream->ConfigCache);
  547|  2.98k|  }
  548|  3.05k|}
tpdec_lib.cpp:_ZL12FDKsyncCacheP13FDK_BITSTREAM:
  452|  6.11k|FDK_INLINE void FDKsyncCache(HANDLE_FDK_BITSTREAM hBitStream) {
  453|  6.11k|  if (hBitStream->ConfigCache == BS_READER)
  ------------------
  |  Branch (453:7): [True: 6.11k, False: 0]
  ------------------
  454|  6.11k|    FDK_pushBack(&hBitStream->hBitBuf, hBitStream->BitsInCache,
  455|  6.11k|                 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.11k|  hBitStream->BitsInCache = 0;
  461|  6.11k|  hBitStream->CacheWord = 0;
  462|  6.11k|}
tpdec_lib.cpp:_ZL15FDKgetValidBitsP13FDK_BITSTREAM:
  577|  3.05k|FDK_INLINE UINT FDKgetValidBits(HANDLE_FDK_BITSTREAM hBitStream) {
  578|  3.05k|  FDKsyncCache(hBitStream);
  579|  3.05k|  return FDK_getValidBits(&hBitStream->hBitBuf);
  580|  3.05k|}

_Z4fMinjj:
  416|  7.35k|inline UINT fMin(UINT a, UINT b) { return fixmin_UI(a, b); }
  ------------------
  |  |  129|  7.35k|#define fixmin_UI(a, b) fixmin(a, b)
  ------------------
_Z4fMaxjj:
  415|     93|inline UINT fMax(UINT a, UINT b) { return fixmax_UI(a, b); }
  ------------------
  |  |  128|     93|#define fixmax_UI(a, b) fixmax(a, b)
  ------------------
_Z4fMaxhh:
  418|  1.89k|inline UCHAR fMax(UCHAR a, UCHAR b) {
  419|  1.89k|  return (UCHAR)fixmax_UI((UINT)a, (UINT)b);
  ------------------
  |  |  128|  1.89k|#define fixmax_UI(a, b) fixmax(a, b)
  ------------------
  420|  1.89k|}
_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.85k|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|  2.85k|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
aacdecoder.cpp:_ZL4fMinii:
  400|  7.84k|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|  7.84k|#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|   228k|FDK_INLINE LONG fMult(SHORT a, SHORT b) { return fixmul_SS(a, b); }
drcDec_reader.cpp:_ZL4fMinii:
  400|  94.6k|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|  94.6k|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
drcDec_selectionProcess.cpp:_ZL4fMaxii:
  401|  1.07k|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|  1.07k|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
drcDec_selectionProcess.cpp:_ZL4fMinii:
  400|  5.93k|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|  5.93k|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
fixpoint_math.cpp:_ZL5fMultii:
  241|   266k|FDK_INLINE LONG fMult(LONG a, LONG b) { return fixmul_DD(a, b); }
fixpoint_math.cpp:_ZL4fAbsi:
  275|  16.6k|FDK_INLINE FIXP_DBL fAbs(FIXP_DBL x) { return fixabs_D(x); }
fixpoint_math.cpp:_ZL12fMultAddDiv2isi:
  317|   249k|FDK_INLINE FIXP_DBL fMultAddDiv2(FIXP_DBL x, FIXP_SGL a, FIXP_DBL b) {
  318|   249k|  return fixmadddiv2_SD(x, a, b);
  319|   249k|}
fixpoint_math.cpp:_ZL9fMultDiv2ii:
  248|   266k|FDK_INLINE LONG fMultDiv2(LONG a, LONG b) { return fixmuldiv2_DD(a, b); }
fixpoint_math.cpp:_ZL6fNormzi:
  292|  16.6k|FDK_INLINE INT fNormz(FIXP_DBL x) { return fixnormz_D(x); }
fixpoint_math.cpp:_ZL12fMultAddDiv2iii:
  314|  16.6k|FDK_INLINE FIXP_DBL fMultAddDiv2(FIXP_DBL x, FIXP_DBL a, FIXP_DBL b) {
  315|  16.6k|  return fixmadddiv2_DD(x, a, b);
  316|  16.6k|}
fixpoint_math.cpp:_ZL5fNormi:
  294|  16.6k|FDK_INLINE INT fNorm(FIXP_DBL x) { return fixnorm_D(x); }
sac_bitdec.cpp:_ZL4fMaxii:
  401|     87|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|     87|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
sac_bitdec.cpp:_ZL4fMinii:
  400|    536|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|    536|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
sac_dec_lib.cpp:_ZL4fMinii:
  400|     48|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|     48|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
sbrdec_freq_sca.cpp:_ZL4fMinii:
  400|  1.86k|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|  1.86k|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
sbrdec_freq_sca.cpp:_ZL5fMultss:
  238|  32.1k|FDK_INLINE LONG fMult(SHORT a, SHORT b) { return fixmul_SS(a, b); }
sbrdec_freq_sca.cpp:_ZL9fMultDiv2ii:
  248|  1.38M|FDK_INLINE LONG fMultDiv2(LONG a, LONG b) { return fixmuldiv2_DD(a, b); }
sbrdecoder.cpp:_ZL4fMaxii:
  401|  1.32k|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|  1.32k|#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|   266k|inline FIXP_DBL fixmadddiv2_DD(FIXP_DBL x, const FIXP_DBL a, const FIXP_DBL b) {
  125|   266k|  return (x + fMultDiv2(a, b));
  126|   266k|}
_Z14fixmadddiv2_SDisi:
  130|   249k|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|   249k|  return fixmadddiv2_DD(x, FX_SGL2FX_DBL(a), b);
  ------------------
  |  |  219|   249k|  ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|   249k|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |                 ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|   249k|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  135|   249k|#endif
  136|   249k|}

_Z6fixminIjET_S0_S0_:
  113|   145k|inline T fixmin(T a, T b) {
  114|   145k|  return (a < b ? a : b);
  ------------------
  |  Branch (114:11): [True: 86.9k, False: 58.5k]
  ------------------
  115|   145k|}
_Z6fixmaxIiET_S0_S0_:
  118|  9.25k|inline T fixmax(T a, T b) {
  119|  9.25k|  return (a > b ? a : b);
  ------------------
  |  Branch (119:11): [True: 1.33k, False: 7.91k]
  ------------------
  120|  9.25k|}
_Z6fixminIiET_S0_S0_:
  113|   110k|inline T fixmin(T a, T b) {
  114|   110k|  return (a < b ? a : b);
  ------------------
  |  Branch (114:11): [True: 106k, False: 4.07k]
  ------------------
  115|   110k|}
_Z6fixmaxIjET_S0_S0_:
  118|  1.98k|inline T fixmax(T a, T b) {
  119|  1.98k|  return (a > b ? a : b);
  ------------------
  |  Branch (119:11): [True: 116, False: 1.87k]
  ------------------
  120|  1.98k|}

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

fixpoint_math.cpp:_ZL5fLog2iiPi:
  807|  16.6k|FDK_INLINE FIXP_DBL fLog2(FIXP_DBL x_m, INT x_e, INT *result_e) {
  808|  16.6k|  FIXP_DBL result_m;
  809|       |
  810|       |  /* Short cut for zero and negative numbers. */
  811|  16.6k|  if (x_m <= FL2FXCONST_DBL(0.0f)) {
  ------------------
  |  |  192|  16.6k|  (FIXP_DBL)(                                                                \
  |  |  193|  16.6k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 16.6k, Folded]
  |  |  ------------------
  |  |  194|  16.6k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  16.6k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  16.6k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 16.6k]
  |  |  ------------------
  |  |  195|  16.6k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  16.6k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  16.6k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  16.6k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  16.6k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  16.6k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  16.6k|          : ((((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.6k]
  ------------------
  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.6k|  {
  818|  16.6k|    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.6k|    {
  823|  16.6k|      INT b_norm;
  824|       |
  825|  16.6k|      b_norm = fNormz(x_m) - 1;
  826|  16.6k|      x2_m = x_m << b_norm;
  827|  16.6k|      x_e = x_e - b_norm;
  828|  16.6k|    }
  829|       |
  830|       |    /* map x from log(x) domain to log(1-x) domain. */
  831|  16.6k|    x2_m = -(x2_m + FL2FXCONST_DBL(-1.0));
  ------------------
  |  |  192|  16.6k|  (FIXP_DBL)(                                                                \
  |  |  193|  16.6k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 16.6k]
  |  |  ------------------
  |  |  194|  16.6k|          ? ((((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.6k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|  16.6k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  16.6k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [True: 16.6k, Folded]
  |  |  ------------------
  |  |  199|  16.6k|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|  16.6k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|  16.6k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|  16.6k|                 ? (LONG)(MINVAL_DBL_CONST)                                  \
  |  |  ------------------
  |  |  |  |  176|  16.6k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|  16.6k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  201|  16.6k|                 : (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.6k|    {
  835|  16.6k|      FIXP_DBL px2_m;
  836|  16.6k|      result_m = FL2FXCONST_DBL(0.0);
  ------------------
  |  |  192|  16.6k|  (FIXP_DBL)(                                                                \
  |  |  193|  16.6k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 16.6k, Folded]
  |  |  ------------------
  |  |  194|  16.6k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  16.6k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  16.6k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 16.6k]
  |  |  ------------------
  |  |  195|  16.6k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  16.6k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  16.6k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  16.6k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  16.6k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  16.6k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  16.6k|          : ((((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.6k|      px2_m = x2_m;
  838|   183k|      for (int i = 0; i < LD_PRECISION; i++) {
  ------------------
  |  |  117|   183k|#define LD_PRECISION 10
  ------------------
  |  Branch (838:23): [True: 166k, False: 16.6k]
  ------------------
  839|   166k|        result_m = fMultAddDiv2(result_m, ldCoeff[i], px2_m);
  840|   166k|        px2_m = fMult(px2_m, x2_m);
  841|   166k|      }
  842|  16.6k|    }
  843|       |    /* Multiply result with 1/ln(2) = 1.0 + 0.442695040888 (get log2(x) from
  844|       |     * ln(x) result). */
  845|  16.6k|    result_m =
  846|  16.6k|        fMultAddDiv2(result_m, result_m,
  847|  16.6k|                     FL2FXCONST_DBL(2.0 * 0.4426950408889634073599246810019));
  ------------------
  |  |  192|  16.6k|  (FIXP_DBL)(                                                                \
  |  |  193|  16.6k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 16.6k, Folded]
  |  |  ------------------
  |  |  194|  16.6k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  16.6k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  16.6k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 16.6k]
  |  |  ------------------
  |  |  195|  16.6k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  16.6k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  16.6k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  16.6k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  16.6k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  16.6k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  16.6k|          : ((((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.6k|    if (x_e != 0) {
  ------------------
  |  Branch (850:9): [True: 16.6k, False: 0]
  ------------------
  851|  16.6k|      int enorm;
  852|       |
  853|  16.6k|      enorm = DFRACT_BITS - fNorm((FIXP_DBL)x_e);
  ------------------
  |  |  113|  16.6k|#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.6k|      result_m = (result_m >> (enorm - 1)) +
  857|  16.6k|                 ((FIXP_DBL)x_e << (DFRACT_BITS - 1 - enorm));
  ------------------
  |  |  113|  16.6k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  858|       |
  859|  16.6k|      *result_e = enorm;
  860|  16.6k|    } else {
  861|       |      /* 1 compensates the fMultDiv2() above in the taylor polynomial evaluation
  862|       |       * loop.*/
  863|      0|      *result_e = 1;
  864|      0|    }
  865|  16.6k|  }
  866|       |
  867|  16.6k|  return result_m;
  868|  16.6k|}

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

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

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

_Z9fixmul_DDii:
  164|   266k|inline INT fixmul_DD(INT a, const INT b) {
  165|   266k|  INT result;
  166|       |
  167|   266k|  asm("imul %2;\n"
  168|   266k|      "shl $1, %0;\n"
  169|   266k|      : "=d"(result), "+a"(a)
  170|   266k|      : "r"(b));
  171|       |
  172|   266k|  return result;
  173|   266k|}
_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.6k|inline FIXP_DBL invFixp(FIXP_DBL op) {
  155|  16.6k|  float result;
  156|  16.6k|  INT result_e;
  157|  16.6k|  if ((op == (FIXP_DBL)0) || (op == (FIXP_DBL)1)) {
  ------------------
  |  Branch (157:7): [True: 0, False: 16.6k]
  |  Branch (157:30): [True: 0, False: 16.6k]
  ------------------
  158|      0|    return ((LONG)0x7fffffff);
  159|      0|  }
  160|  16.6k|  result = (float)(1.0 / (float)(INT)op);
  161|  16.6k|  result = frexpf(result, &result_e);
  162|  16.6k|  result = ldexpf(result, 31 + result_e);
  163|       |
  164|  16.6k|  return (FIXP_DBL)(INT)result;
  165|  16.6k|}

FDK_InitBitBuffer:
  127|  26.6k|                       UINT validBits) {
  128|  26.6k|  hBitBuf->ValidBits = validBits;
  129|  26.6k|  hBitBuf->ReadOffset = 0;
  130|  26.6k|  hBitBuf->WriteOffset = 0;
  131|  26.6k|  hBitBuf->BitNdx = 0;
  132|       |
  133|  26.6k|  hBitBuf->Buffer = pBuffer;
  134|  26.6k|  hBitBuf->bufSize = bufSize;
  135|  26.6k|  hBitBuf->bufBits = (bufSize << 3);
  136|       |  /*assure bufsize (2^n) */
  137|  26.6k|  FDK_ASSERT(hBitBuf->ValidBits <= hBitBuf->bufBits);
  ------------------
  |  |  221|  26.6k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (137:3): [True: 26.6k, False: 0]
  ------------------
  138|  26.6k|  FDK_ASSERT((bufSize > 0) && (bufSize <= MAX_BUFSIZE_BYTES));
  ------------------
  |  |  221|  26.6k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (138:3): [True: 26.6k, False: 0]
  |  Branch (138:3): [True: 26.6k, False: 0]
  |  Branch (138:3): [True: 26.6k, False: 0]
  ------------------
  139|  26.6k|  {
  140|  26.6k|    UINT x = 0, n = bufSize;
  141|   315k|    for (x = 0; n > 0; x++, n >>= 1) {
  ------------------
  |  Branch (141:17): [True: 289k, False: 26.6k]
  ------------------
  142|   289k|    }
  143|  26.6k|    if (bufSize != ((UINT)1 << (x - 1))) {
  ------------------
  |  Branch (143:9): [True: 0, False: 26.6k]
  ------------------
  144|       |      FDK_ASSERT(0);
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (144:7): [Folded, False: 0]
  ------------------
  145|      0|    }
  146|  26.6k|  }
  147|  26.6k|}
FDK_get32:
  181|  3.95M|INT FDK_get32(HANDLE_FDK_BITBUF hBitBuf) {
  182|  3.95M|  UINT BitNdx = hBitBuf->BitNdx + 32;
  183|  3.95M|  hBitBuf->BitNdx = BitNdx & (hBitBuf->bufBits - 1);
  184|  3.95M|  hBitBuf->ValidBits = (UINT)((INT)hBitBuf->ValidBits - (INT)32);
  185|       |
  186|  3.95M|  UINT byteOffset = (BitNdx - 1) >> 3;
  187|  3.95M|  if (BitNdx <= hBitBuf->bufBits) {
  ------------------
  |  Branch (187:7): [True: 3.94M, False: 11.9k]
  ------------------
  188|  3.94M|    UINT cache = (hBitBuf->Buffer[(byteOffset - 3)] << 24) |
  189|  3.94M|                 (hBitBuf->Buffer[(byteOffset - 2)] << 16) |
  190|  3.94M|                 (hBitBuf->Buffer[(byteOffset - 1)] << 8) |
  191|  3.94M|                 hBitBuf->Buffer[(byteOffset - 0)];
  192|       |
  193|  3.94M|    if ((BitNdx = (BitNdx & 7)) != 0) {
  ------------------
  |  Branch (193:9): [True: 962k, False: 2.97M]
  ------------------
  194|   962k|      cache = (cache >> (8 - BitNdx)) |
  195|   962k|              ((UINT)hBitBuf->Buffer[byteOffset - 4] << (24 + BitNdx));
  196|   962k|    }
  197|  3.94M|    return (cache);
  198|  3.94M|  } else {
  199|  11.9k|    UINT byte_mask = hBitBuf->bufSize - 1;
  200|  11.9k|    UINT cache = (hBitBuf->Buffer[(byteOffset - 3) & byte_mask] << 24) |
  201|  11.9k|                 (hBitBuf->Buffer[(byteOffset - 2) & byte_mask] << 16) |
  202|  11.9k|                 (hBitBuf->Buffer[(byteOffset - 1) & byte_mask] << 8) |
  203|  11.9k|                 hBitBuf->Buffer[(byteOffset - 0) & byte_mask];
  204|       |
  205|  11.9k|    if ((BitNdx = (BitNdx & 7)) != 0) {
  ------------------
  |  Branch (205:9): [True: 1.88k, False: 10.0k]
  ------------------
  206|  1.88k|      cache = (cache >> (8 - BitNdx)) |
  207|  1.88k|              ((UINT)hBitBuf->Buffer[(byteOffset - 4) & byte_mask]
  208|  1.88k|               << (24 + BitNdx));
  209|  1.88k|    }
  210|  11.9k|    return (cache);
  211|  11.9k|  }
  212|  3.95M|}
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|   601k|                  UCHAR config) {
  340|   601k|  hBitBuf->ValidBits =
  341|   601k|      (config == 0) ? (UINT)((INT)hBitBuf->ValidBits + (INT)numberOfBits)
  ------------------
  |  Branch (341:7): [True: 601k, False: 0]
  ------------------
  342|   601k|                    : ((UINT)((INT)hBitBuf->ValidBits - (INT)numberOfBits));
  343|   601k|  hBitBuf->BitNdx = ((UINT)((INT)hBitBuf->BitNdx - (INT)numberOfBits)) &
  344|   601k|                    (hBitBuf->bufBits - 1);
  345|   601k|}
FDK_pushForward:
  349|   359k|                     UCHAR config) {
  350|   359k|  hBitBuf->ValidBits =
  351|   359k|      (config == 0) ? ((UINT)((INT)hBitBuf->ValidBits - (INT)numberOfBits))
  ------------------
  |  Branch (351:7): [True: 359k, False: 0]
  ------------------
  352|   359k|                    : (UINT)((INT)hBitBuf->ValidBits + (INT)numberOfBits);
  353|   359k|  hBitBuf->BitNdx =
  354|   359k|      (UINT)((INT)hBitBuf->BitNdx + (INT)numberOfBits) & (hBitBuf->bufBits - 1);
  355|   359k|}
FDK_getValidBits:
  358|   219k|UINT FDK_getValidBits(HANDLE_FDK_BITBUF hBitBuf) { return hBitBuf->ValidBits; }

_Z10FDKcrcInitP11FDK_CRCINFOjjj:
  229|    503|                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|    503|  hCrcInfo->crcLen = crcLen;
  237|    503|  hCrcInfo->crcPoly = crcPoly;
  238|    503|  hCrcInfo->startValue = crcStartValue;
  239|    503|  hCrcInfo->crcMask = (crcLen) ? (1 << (crcLen - 1)) : 0;
  ------------------
  |  Branch (239:23): [True: 503, False: 0]
  ------------------
  240|       |
  241|    503|  FDKcrcReset(hCrcInfo);
  242|       |
  243|    503|  hCrcInfo->pCrcLookup =
  244|    503|      0; /* Preset 0 for "crcLen" != 16 or unknown 16-bit polynoms "crcPoly" */
  245|       |
  246|    503|  if (hCrcInfo->crcLen == 16) {
  ------------------
  |  Branch (246:7): [True: 0, False: 503]
  ------------------
  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|    503|}
_Z11FDKcrcResetP11FDK_CRCINFO:
  265|    503|void FDKcrcReset(HANDLE_FDK_CRCINFO hCrcInfo) {
  266|    503|  int i;
  267|       |
  268|    503|  hCrcInfo->crcValue = hCrcInfo->startValue;
  269|       |
  270|  2.01k|  for (i = 0; i < MAX_CRC_REGS; i++) {
  ------------------
  |  |  109|  2.01k|  3 /*!< Maximal number of overlapping crc region in ADTS channel pair element \
  ------------------
  |  Branch (270:15): [True: 1.50k, False: 503]
  ------------------
  271|  1.50k|    hCrcInfo->crcRegData[i].isActive = 0;
  272|  1.50k|  }
  273|    503|  hCrcInfo->regStart = 0;
  274|    503|  hCrcInfo->regStop = 0;
  275|    503|}
_Z14FDKcrcStartRegP11FDK_CRCINFOP13FDK_BITSTREAMi:
  278|    503|                   const INT mBits) {
  279|    503|  int reg = hCrcInfo->regStart;
  280|       |
  281|    503|  FDK_ASSERT(hCrcInfo->crcRegData[reg].isActive == 0);
  ------------------
  |  |  221|    503|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (281:3): [True: 503, False: 0]
  ------------------
  282|    503|  hCrcInfo->crcRegData[reg].isActive = 1;
  283|    503|  hCrcInfo->crcRegData[reg].maxBits = mBits;
  284|    503|  hCrcInfo->crcRegData[reg].validBits = (INT)FDKgetValidBits(hBs);
  285|    503|  hCrcInfo->crcRegData[reg].bitBufCntBits = 0;
  286|       |
  287|    503|  hCrcInfo->regStart = (hCrcInfo->regStart + 1) % MAX_CRC_REGS;
  ------------------
  |  |  109|    503|  3 /*!< Maximal number of overlapping crc region in ADTS channel pair element \
  ------------------
  288|       |
  289|    503|  return (reg);
  290|    503|}
_Z12FDKcrcEndRegP11FDK_CRCINFOP13FDK_BITSTREAMi:
  293|    107|                 const INT reg) {
  294|    107|  FDK_ASSERT((reg == (INT)hCrcInfo->regStop) &&
  ------------------
  |  |  221|    107|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (294:3): [True: 107, False: 0]
  |  Branch (294:3): [True: 107, False: 0]
  |  Branch (294:3): [True: 107, False: 0]
  ------------------
  295|    107|             (hCrcInfo->crcRegData[reg].isActive == 1));
  296|       |
  297|    107|  if (hBs->ConfigCache == BS_WRITER) {
  ------------------
  |  Branch (297:7): [True: 0, False: 107]
  ------------------
  298|      0|    hCrcInfo->crcRegData[reg].bitBufCntBits =
  299|      0|        (INT)FDKgetValidBits(hBs) - hCrcInfo->crcRegData[reg].validBits;
  300|    107|  } else {
  301|    107|    hCrcInfo->crcRegData[reg].bitBufCntBits =
  302|    107|        hCrcInfo->crcRegData[reg].validBits - (INT)FDKgetValidBits(hBs);
  303|    107|  }
  304|       |
  305|    107|  if (hCrcInfo->crcRegData[reg].maxBits == 0) {
  ------------------
  |  Branch (305:7): [True: 107, False: 0]
  ------------------
  306|    107|    hCrcInfo->crcRegData[reg].maxBits = hCrcInfo->crcRegData[reg].bitBufCntBits;
  307|    107|  }
  308|       |
  309|    107|  crcCalc(hCrcInfo, hBs, reg);
  310|       |
  311|    107|  hCrcInfo->crcRegData[reg].isActive = 0;
  312|    107|  hCrcInfo->regStop = (hCrcInfo->regStop + 1) % MAX_CRC_REGS;
  ------------------
  |  |  109|    107|  3 /*!< Maximal number of overlapping crc region in ADTS channel pair element \
  ------------------
  313|       |
  314|    107|  return 0;
  315|    107|}
_Z12FDKcrcGetCRCP11FDK_CRCINFO:
  317|    107|USHORT FDKcrcGetCRC(const HANDLE_FDK_CRCINFO hCrcInfo) {
  318|    107|  return (hCrcInfo->crcValue & (((hCrcInfo->crcMask - 1) << 1) + 1));
  319|    107|}
FDK_crc.cpp:_ZL7crcCalcP11FDK_CRCINFOP13FDK_BITSTREAMi:
  427|    107|                    const INT reg) {
  428|    107|  USHORT crc = hCrcInfo->crcValue;
  429|    107|  CCrcRegData *rD = &hCrcInfo->crcRegData[reg];
  430|    107|  FDK_BITSTREAM bsReader;
  431|       |
  432|    107|  if (hBs->ConfigCache == BS_READER) {
  ------------------
  |  Branch (432:7): [True: 107, False: 0]
  ------------------
  433|    107|    bsReader = *hBs;
  434|    107|    FDKpushBiDirectional(&bsReader,
  435|    107|                         -(rD->validBits - (INT)FDKgetValidBits(&bsReader)));
  436|    107|  } 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|    107|  int bits, rBits;
  443|    107|  rBits = (rD->maxBits >= 0) ? rD->maxBits : -rD->maxBits; /* ramaining bits */
  ------------------
  |  Branch (443:11): [True: 107, False: 0]
  ------------------
  444|    107|  if ((rD->maxBits > 0) && ((rD->bitBufCntBits >> 3 << 3) < rBits)) {
  ------------------
  |  Branch (444:7): [True: 107, False: 0]
  |  Branch (444:28): [True: 0, False: 107]
  ------------------
  445|      0|    bits = rD->bitBufCntBits;
  446|    107|  } else {
  447|    107|    bits = rBits;
  448|    107|  }
  449|       |
  450|    107|  int words = bits >> 3;  /* processing bytes */
  451|    107|  int mBits = bits & 0x7; /* modulo bits */
  452|       |
  453|    107|  if (hCrcInfo->pCrcLookup) {
  ------------------
  |  Branch (453:7): [True: 0, False: 107]
  ------------------
  454|      0|    rBits -= (calcCrc_Bytes(&crc, hCrcInfo->pCrcLookup, &bsReader, words) << 3);
  455|    107|  } else {
  456|    107|    rBits -= calcCrc_Bits(&crc, hCrcInfo->crcMask, hCrcInfo->crcPoly, &bsReader,
  457|    107|                          words << 3);
  458|    107|  }
  459|       |
  460|       |  /* remaining valid bits*/
  461|    107|  if (mBits != 0) {
  ------------------
  |  Branch (461:7): [True: 0, False: 107]
  ------------------
  462|      0|    rBits -= calcCrc_Bits(&crc, hCrcInfo->crcMask, hCrcInfo->crcPoly, &bsReader,
  463|      0|                          mBits);
  464|      0|  }
  465|       |
  466|    107|  if (rBits != 0) {
  ------------------
  |  Branch (466:7): [True: 0, False: 107]
  ------------------
  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|    107|  hCrcInfo->crcValue = crc;
  479|    107|}
FDK_crc.cpp:_ZL12calcCrc_BitsPtttP13FDK_BITSTREAMi:
  337|    107|                               INT nBits) {
  338|    107|  int i;
  339|    107|  USHORT crc = *pCrc; /* get crc value */
  340|       |
  341|    107|  if (hBs != NULL) {
  ------------------
  |  Branch (341:7): [True: 107, False: 0]
  ------------------
  342|  2.25k|    for (i = 0; (i < nBits); i++) {
  ------------------
  |  Branch (342:17): [True: 2.15k, False: 107]
  ------------------
  343|  2.15k|      USHORT tmp = FDKreadBit(hBs);  // process single bit
  344|  2.15k|      tmp ^= ((crc & crcMask) ? 1 : 0);
  ------------------
  |  Branch (344:15): [True: 1.58k, False: 572]
  ------------------
  345|  2.15k|      if (tmp != 0) tmp = crcPoly;
  ------------------
  |  Branch (345:11): [True: 870, False: 1.28k]
  ------------------
  346|  2.15k|      crc <<= 1;
  347|  2.15k|      crc ^= tmp;
  348|  2.15k|    }
  349|    107|  } 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|    107|  *pCrc = crc; /* update crc value */
  357|       |
  358|    107|  return nBits;
  359|    107|}

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

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

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

_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.05k|void FDK_QmfDomain_FreeMem(HANDLE_FDK_QMF_DOMAIN hqd) {
  998|  3.05k|  FDK_QmfDomain_FreeWorkBuffer(hqd);
  999|       |
 1000|  3.05k|  FDK_QmfDomain_FreePersistentMemory(hqd);
 1001|       |
 1002|  3.05k|  FDK_QmfDomain_ClearFilterBank(hqd);
 1003|       |
 1004|  3.05k|  FDK_QmfDomain_ClearConfigured(&hqd->globalConf);
 1005|       |
 1006|  3.05k|  FDK_QmfDomain_ClearRequested(&hqd->globalConf);
 1007|  3.05k|}
_Z19FDK_QmfDomain_CloseP14FDK_QMF_DOMAIN:
 1009|  7.35k|void FDK_QmfDomain_Close(HANDLE_FDK_QMF_DOMAIN hqd) {
 1010|  7.35k|  FDK_QmfDomain_FreeWorkBuffer(hqd);
 1011|       |
 1012|  7.35k|  FDK_QmfDomain_FreePersistentMemory(hqd);
 1013|  7.35k|}
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: 93.7k, False: 10.4k]
  ------------------
  204|  93.7k|    if (qd->QmfDomainIn[ch].pAnaQmfStates) {
  ------------------
  |  Branch (204:9): [True: 0, False: 93.7k]
  ------------------
  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|  93.7k|    if (qd->QmfDomainIn[ch].pOverlapBuffer) {
  ------------------
  |  Branch (218:9): [True: 0, False: 93.7k]
  ------------------
  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|  93.7k|    if (qd->QmfDomainIn[ch].hQmfSlotsReal) {
  ------------------
  |  Branch (228:9): [True: 0, False: 93.7k]
  ------------------
  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|  93.7k|    if (qd->QmfDomainIn[ch].hQmfSlotsImag) {
  ------------------
  |  Branch (238:9): [True: 0, False: 93.7k]
  ------------------
  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|  93.7k|  }
  249|       |
  250|   104k|  for (ch = 0; ch < ((8) + (1)); ch++) {
  ------------------
  |  Branch (250:16): [True: 93.7k, False: 10.4k]
  ------------------
  251|  93.7k|    if (qd->QmfDomainOut[ch].pSynQmfStates) {
  ------------------
  |  Branch (251:9): [True: 0, False: 93.7k]
  ------------------
  252|      0|      FreeSynQmfStates(&qd->QmfDomainOut[ch].pSynQmfStates);
  253|      0|    }
  254|  93.7k|  }
  255|       |
  256|  10.4k|  return err;
  257|  10.4k|}
FDK_qmf_domain.cpp:_ZL29FDK_QmfDomain_ClearFilterBankP14FDK_QMF_DOMAIN:
  806|  3.05k|static void FDK_QmfDomain_ClearFilterBank(HANDLE_FDK_QMF_DOMAIN hqd) {
  807|  3.05k|  int ch;
  808|       |
  809|  30.5k|  for (ch = 0; ch < ((8) + (1)); ch++) {
  ------------------
  |  Branch (809:16): [True: 27.5k, False: 3.05k]
  ------------------
  810|  27.5k|    FDKmemclear(&hqd->QmfDomainIn[ch].fb, sizeof(hqd->QmfDomainIn[ch].fb));
  811|  27.5k|  }
  812|       |
  813|  30.5k|  for (ch = 0; ch < ((8) + (1)); ch++) {
  ------------------
  |  Branch (813:16): [True: 27.5k, False: 3.05k]
  ------------------
  814|  27.5k|    FDKmemclear(&hqd->QmfDomainOut[ch].fb, sizeof(hqd->QmfDomainIn[ch].fb));
  815|  27.5k|  }
  816|  3.05k|}
FDK_qmf_domain.cpp:_ZL29FDK_QmfDomain_ClearConfiguredP17FDK_QMF_DOMAIN_GC:
  793|  3.05k|static void FDK_QmfDomain_ClearConfigured(HANDLE_FDK_QMF_DOMAIN_GC hgc) {
  794|  3.05k|  hgc->flags = 0;
  795|  3.05k|  hgc->nInputChannels = 0;
  796|  3.05k|  hgc->nOutputChannels = 0;
  797|  3.05k|  hgc->parkChannel = 0;
  798|  3.05k|  hgc->nBandsAnalysis = 0;
  799|  3.05k|  hgc->nBandsSynthesis = 0;
  800|  3.05k|  hgc->nQmfTimeSlots = 0;
  801|  3.05k|  hgc->nQmfOvTimeSlots = 0;
  802|  3.05k|  hgc->nQmfProcBands = 0;
  803|  3.05k|  hgc->nQmfProcChannels = 0;
  804|  3.05k|}

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

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

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.0k|  for (sf_index = 0; sf_index < tableSize; sf_index++) {
  ------------------
  |  Branch (423:22): [True: 35.9k, False: 2.00k]
  ------------------
  424|  35.9k|    if (SamplingRateTable[sf_index] == samplingRate) break;
  ------------------
  |  Branch (424:9): [True: 630, False: 35.3k]
  ------------------
  425|  35.9k|  }
  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.03k|int CProgramConfig_IsValid(const CProgramConfig *pPce) {
  192|  7.03k|  return ((pPce->isValid) ? 1 : 0);
  ------------------
  |  Branch (192:11): [True: 805, False: 6.23k]
  ------------------
  193|  7.03k|}
_Z19CProgramConfig_ReadP14CProgramConfigP13FDK_BITSTREAMj:
  374|    503|                         UINT alignmentAnchor) {
  375|    503|  int i;
  376|    503|  int commentBytes;
  377|    503|  UCHAR tag, isCpe;
  378|    503|  UCHAR checkElementTagSelect[3][PC_FSB_CHANNELS_MAX] = {{0}};
  379|       |
  380|    503|  pPce->isValid = 1;
  381|    503|  pPce->NumEffectiveChannels = 0;
  382|    503|  pPce->NumChannels = 0;
  383|    503|  pPce->ElementInstanceTag = (UCHAR)FDKreadBits(bs, 4);
  384|    503|  pPce->Profile = (UCHAR)FDKreadBits(bs, 2);
  385|    503|  pPce->SamplingFrequencyIndex = (UCHAR)FDKreadBits(bs, 4);
  386|    503|  pPce->NumFrontChannelElements = (UCHAR)FDKreadBits(bs, 4);
  387|    503|  pPce->NumSideChannelElements = (UCHAR)FDKreadBits(bs, 4);
  388|    503|  pPce->NumBackChannelElements = (UCHAR)FDKreadBits(bs, 4);
  389|    503|  pPce->NumLfeChannelElements = (UCHAR)FDKreadBits(bs, 2);
  390|    503|  pPce->NumAssocDataElements = (UCHAR)FDKreadBits(bs, 3);
  391|    503|  pPce->NumValidCcElements = (UCHAR)FDKreadBits(bs, 4);
  392|       |
  393|    503|  if ((pPce->MonoMixdownPresent = (UCHAR)FDKreadBits(bs, 1)) != 0) {
  ------------------
  |  Branch (393:7): [True: 50, False: 453]
  ------------------
  394|     50|    pPce->MonoMixdownElementNumber = (UCHAR)FDKreadBits(bs, 4);
  395|     50|  }
  396|       |
  397|    503|  if ((pPce->StereoMixdownPresent = (UCHAR)FDKreadBits(bs, 1)) != 0) {
  ------------------
  |  Branch (397:7): [True: 50, False: 453]
  ------------------
  398|     50|    pPce->StereoMixdownElementNumber = (UCHAR)FDKreadBits(bs, 4);
  399|     50|  }
  400|       |
  401|    503|  if ((pPce->MatrixMixdownIndexPresent = (UCHAR)FDKreadBits(bs, 1)) != 0) {
  ------------------
  |  Branch (401:7): [True: 52, False: 451]
  ------------------
  402|     52|    pPce->MatrixMixdownIndex = (UCHAR)FDKreadBits(bs, 2);
  403|     52|    pPce->PseudoSurroundEnable = (UCHAR)FDKreadBits(bs, 1);
  404|     52|  }
  405|       |
  406|  1.48k|  for (i = 0; i < pPce->NumFrontChannelElements; i++) {
  ------------------
  |  Branch (406:15): [True: 978, False: 503]
  ------------------
  407|    978|    pPce->FrontElementIsCpe[i] = isCpe = (UCHAR)FDKreadBits(bs, 1);
  408|    978|    pPce->FrontElementTagSelect[i] = tag = (UCHAR)FDKreadBits(bs, 4);
  409|    978|    pPce->NumChannels += pPce->FrontElementIsCpe[i] ? 2 : 1;
  ------------------
  |  Branch (409:26): [True: 221, False: 757]
  ------------------
  410|       |
  411|       |    /* Check element instance tag according to ISO/IEC 13818-7:2003(E),
  412|       |     * chapter 8.2.1.1 */
  413|    978|    if (checkElementTagSelect[isCpe][tag] == 0) {
  ------------------
  |  Branch (413:9): [True: 576, False: 402]
  ------------------
  414|    576|      checkElementTagSelect[isCpe][tag] = 1;
  415|    576|    } else {
  416|    402|      pPce->isValid = 0;
  417|    402|    }
  418|    978|  }
  419|       |
  420|  1.29k|  for (i = 0; i < pPce->NumSideChannelElements; i++) {
  ------------------
  |  Branch (420:15): [True: 788, False: 503]
  ------------------
  421|    788|    pPce->SideElementIsCpe[i] = isCpe = (UCHAR)FDKreadBits(bs, 1);
  422|    788|    pPce->SideElementTagSelect[i] = tag = (UCHAR)FDKreadBits(bs, 4);
  423|    788|    pPce->NumChannels += pPce->SideElementIsCpe[i] ? 2 : 1;
  ------------------
  |  Branch (423:26): [True: 140, False: 648]
  ------------------
  424|       |
  425|       |    /* Check element instance tag according to ISO/IEC 13818-7:2003(E),
  426|       |     * chapter 8.2.1.1 */
  427|    788|    if (checkElementTagSelect[isCpe][tag] == 0) {
  ------------------
  |  Branch (427:9): [True: 292, False: 496]
  ------------------
  428|    292|      checkElementTagSelect[isCpe][tag] = 1;
  429|    496|    } else {
  430|    496|      pPce->isValid = 0;
  431|    496|    }
  432|    788|  }
  433|       |
  434|  1.35k|  for (i = 0; i < pPce->NumBackChannelElements; i++) {
  ------------------
  |  Branch (434:15): [True: 851, False: 503]
  ------------------
  435|    851|    pPce->BackElementIsCpe[i] = isCpe = (UCHAR)FDKreadBits(bs, 1);
  436|    851|    pPce->BackElementTagSelect[i] = tag = (UCHAR)FDKreadBits(bs, 4);
  437|    851|    pPce->NumChannels += pPce->BackElementIsCpe[i] ? 2 : 1;
  ------------------
  |  Branch (437:26): [True: 151, False: 700]
  ------------------
  438|       |
  439|       |    /* Check element instance tag according to ISO/IEC 13818-7:2003(E),
  440|       |     * chapter 8.2.1.1 */
  441|    851|    if (checkElementTagSelect[isCpe][tag] == 0) {
  ------------------
  |  Branch (441:9): [True: 361, False: 490]
  ------------------
  442|    361|      checkElementTagSelect[isCpe][tag] = 1;
  443|    490|    } else {
  444|    490|      pPce->isValid = 0;
  445|    490|    }
  446|    851|  }
  447|       |
  448|    503|  pPce->NumEffectiveChannels = pPce->NumChannels;
  449|       |
  450|    736|  for (i = 0; i < pPce->NumLfeChannelElements; i++) {
  ------------------
  |  Branch (450:15): [True: 233, False: 503]
  ------------------
  451|    233|    pPce->LfeElementTagSelect[i] = tag = (UCHAR)FDKreadBits(bs, 4);
  452|    233|    pPce->NumChannels += 1;
  453|       |
  454|       |    /* Check element instance tag according to ISO/IEC 13818-7:2003(E),
  455|       |     * chapter 8.2.1.1 */
  456|    233|    if (checkElementTagSelect[2][tag] == 0) {
  ------------------
  |  Branch (456:9): [True: 178, False: 55]
  ------------------
  457|    178|      checkElementTagSelect[2][tag] = 1;
  458|    178|    } else {
  459|     55|      pPce->isValid = 0;
  460|     55|    }
  461|    233|  }
  462|       |
  463|  1.06k|  for (i = 0; i < pPce->NumAssocDataElements; i++) {
  ------------------
  |  Branch (463:15): [True: 557, False: 503]
  ------------------
  464|    557|    pPce->AssocDataElementTagSelect[i] = (UCHAR)FDKreadBits(bs, 4);
  465|    557|  }
  466|       |
  467|  1.66k|  for (i = 0; i < pPce->NumValidCcElements; i++) {
  ------------------
  |  Branch (467:15): [True: 1.16k, False: 503]
  ------------------
  468|  1.16k|    pPce->CcElementIsIndSw[i] = (UCHAR)FDKreadBits(bs, 1);
  469|  1.16k|    pPce->ValidCcElementTagSelect[i] = (UCHAR)FDKreadBits(bs, 4);
  470|  1.16k|  }
  471|       |
  472|    503|  FDKbyteAlign(bs, alignmentAnchor);
  473|       |
  474|    503|  pPce->CommentFieldBytes = (UCHAR)FDKreadBits(bs, 8);
  475|    503|  commentBytes = pPce->CommentFieldBytes;
  476|       |
  477|       |  /* Search for height info extension and read it if available */
  478|    503|  if (CProgramConfig_ReadHeightExt(pPce, bs, &commentBytes, alignmentAnchor)) {
  ------------------
  |  Branch (478:7): [True: 46, False: 457]
  ------------------
  479|     46|    pPce->isValid = 0;
  480|     46|  }
  481|       |
  482|       |  /* Check order of elements according to ISO / IEC 13818 - 7:2003(E),
  483|       |   * chapter 8.5.1 */
  484|    503|  if (CProgramConfig_Check(pPce)) {
  ------------------
  |  Branch (484:7): [True: 38, False: 465]
  ------------------
  485|     38|    pPce->isValid = 0;
  486|     38|  }
  487|       |
  488|  15.0k|  for (i = 0; i < commentBytes; i++) {
  ------------------
  |  Branch (488:15): [True: 14.5k, False: 503]
  ------------------
  489|  14.5k|    UCHAR text;
  490|       |
  491|  14.5k|    text = (UCHAR)FDKreadBits(bs, 8);
  492|       |
  493|  14.5k|    if (i < PC_COMMENTLENGTH) {
  ------------------
  |  |  151|  14.5k|#define PC_COMMENTLENGTH 256
  ------------------
  |  Branch (493:9): [True: 14.5k, False: 0]
  ------------------
  494|  14.5k|      pPce->Comment[i] = text;
  495|  14.5k|    }
  496|  14.5k|  }
  497|    503|}
_Z22CProgramConfig_ComparePK14CProgramConfigS1_:
  508|    447|                           const CProgramConfig *const pPce2) {
  509|    447|  int result = 0; /* Innocent until proven false. */
  510|       |
  511|    447|  if (FDKmemcmp(pPce1, pPce2, sizeof(CProgramConfig)) !=
  ------------------
  |  Branch (511:7): [True: 444, False: 3]
  ------------------
  512|    447|      0) { /* Configurations are not completely equal.
  513|       |              So look into details and analyse the channel configurations: */
  514|    444|    result = -1;
  515|       |
  516|    444|    if (pPce1->NumChannels ==
  ------------------
  |  Branch (516:9): [True: 444, False: 0]
  ------------------
  517|    444|        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|    444|      result = 1;
  521|       |
  522|       |      /* Front channels */
  523|    444|      if (pPce1->NumFrontChannelElements != pPce2->NumFrontChannelElements) {
  ------------------
  |  Branch (523:11): [True: 330, False: 114]
  ------------------
  524|    330|        result = 2; /* different number of front channel elements */
  525|    330|      } else {
  526|    114|        int el, numCh1 = 0, numCh2 = 0;
  527|    317|        for (el = 0; el < pPce1->NumFrontChannelElements; el += 1) {
  ------------------
  |  Branch (527:22): [True: 228, False: 89]
  ------------------
  528|    228|          if (pPce1->FrontElementHeightInfo[el] !=
  ------------------
  |  Branch (528:15): [True: 25, False: 203]
  ------------------
  529|    228|              pPce2->FrontElementHeightInfo[el]) {
  530|     25|            result = 2; /* different height info */
  531|     25|            break;
  532|     25|          }
  533|    203|          numCh1 += pPce1->FrontElementIsCpe[el] ? 2 : 1;
  ------------------
  |  Branch (533:21): [True: 121, False: 82]
  ------------------
  534|    203|          numCh2 += pPce2->FrontElementIsCpe[el] ? 2 : 1;
  ------------------
  |  Branch (534:21): [True: 99, False: 104]
  ------------------
  535|    203|        }
  536|    114|        if (numCh1 != numCh2) {
  ------------------
  |  Branch (536:13): [True: 44, False: 70]
  ------------------
  537|     44|          result = 2; /* different number of front channels */
  538|     44|        }
  539|    114|      }
  540|       |      /* Side channels */
  541|    444|      if (pPce1->NumSideChannelElements != pPce2->NumSideChannelElements) {
  ------------------
  |  Branch (541:11): [True: 191, False: 253]
  ------------------
  542|    191|        result = 2; /* different number of side channel elements */
  543|    253|      } else {
  544|    253|        int el, numCh1 = 0, numCh2 = 0;
  545|    259|        for (el = 0; el < pPce1->NumSideChannelElements; el += 1) {
  ------------------
  |  Branch (545:22): [True: 11, False: 248]
  ------------------
  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|    253|        if (numCh1 != numCh2) {
  ------------------
  |  Branch (554:13): [True: 0, False: 253]
  ------------------
  555|      0|          result = 2; /* different number of side channels */
  556|      0|        }
  557|    253|      }
  558|       |      /* Back channels */
  559|    444|      if (pPce1->NumBackChannelElements != pPce2->NumBackChannelElements) {
  ------------------
  |  Branch (559:11): [True: 331, False: 113]
  ------------------
  560|    331|        result = 2; /* different number of back channel elements */
  561|    331|      } else {
  562|    113|        int el, numCh1 = 0, numCh2 = 0;
  563|    189|        for (el = 0; el < pPce1->NumBackChannelElements; el += 1) {
  ------------------
  |  Branch (563:22): [True: 88, False: 101]
  ------------------
  564|     88|          if (pPce1->BackElementHeightInfo[el] !=
  ------------------
  |  Branch (564:15): [True: 12, False: 76]
  ------------------
  565|     88|              pPce2->BackElementHeightInfo[el]) {
  566|     12|            result = 2; /* different height info */
  567|     12|            break;
  568|     12|          }
  569|     76|          numCh1 += pPce1->BackElementIsCpe[el] ? 2 : 1;
  ------------------
  |  Branch (569:21): [True: 32, False: 44]
  ------------------
  570|     76|          numCh2 += pPce2->BackElementIsCpe[el] ? 2 : 1;
  ------------------
  |  Branch (570:21): [True: 64, False: 12]
  ------------------
  571|     76|        }
  572|    113|        if (numCh1 != numCh2) {
  ------------------
  |  Branch (572:13): [True: 36, False: 77]
  ------------------
  573|     36|          result = 2; /* different number of back channels */
  574|     36|        }
  575|    113|      }
  576|       |      /* LFE channels */
  577|    444|      if (pPce1->NumLfeChannelElements != pPce2->NumLfeChannelElements) {
  ------------------
  |  Branch (577:11): [True: 251, False: 193]
  ------------------
  578|    251|        result = 2; /* different number of lfe channels */
  579|    251|      }
  580|       |      /* LFEs are always SCEs so we don't need to count the channels. */
  581|    444|    }
  582|    444|  }
  583|       |
  584|    447|  return result;
  585|    447|}
_Z25CProgramConfig_GetDefaultP14CProgramConfigj:
  587|    447|void CProgramConfig_GetDefault(CProgramConfig *pPce, const UINT channelConfig) {
  588|    447|  FDK_ASSERT(pPce != NULL);
  ------------------
  |  |  221|    447|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (588:3): [True: 447, False: 0]
  ------------------
  589|       |
  590|       |  /* Init PCE */
  591|    447|  CProgramConfig_Init(pPce);
  592|    447|  pPce->Profile =
  593|    447|      1; /* Set AAC LC because it is the only supported object type. */
  594|       |
  595|    447|  switch (channelConfig) {
  596|       |    /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  597|     77|    case 32: /* 7.1 side channel configuration as defined in FDK_audio.h */
  ------------------
  |  Branch (597:5): [True: 77, False: 370]
  ------------------
  598|     77|      pPce->NumFrontChannelElements = 2;
  599|     77|      pPce->FrontElementIsCpe[0] = 0;
  600|     77|      pPce->FrontElementIsCpe[1] = 1;
  601|     77|      pPce->NumSideChannelElements = 1;
  602|     77|      pPce->SideElementIsCpe[0] = 1;
  603|     77|      pPce->NumBackChannelElements = 1;
  604|     77|      pPce->BackElementIsCpe[0] = 1;
  605|     77|      pPce->NumLfeChannelElements = 1;
  606|     77|      pPce->NumChannels = 8;
  607|     77|      pPce->NumEffectiveChannels = 7;
  608|     77|      pPce->isValid = 1;
  609|     77|      break;
  610|       |    /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  611|     77|    case 12: /* 3/0/4.1ch surround back */
  ------------------
  |  Branch (611:5): [True: 77, False: 370]
  ------------------
  612|     77|      pPce->BackElementIsCpe[1] = 1;
  613|     77|      pPce->NumChannels += 1;
  614|     77|      pPce->NumEffectiveChannels += 1;
  615|     77|      FDK_FALLTHROUGH;
  ------------------
  |  |  386|     77|#define FDK_FALLTHROUGH [[clang::fallthrough]]
  ------------------
  616|     86|    case 11: /* 3/0/3.1ch */
  ------------------
  |  Branch (616:5): [True: 9, False: 438]
  ------------------
  617|     86|      pPce->NumFrontChannelElements += 2;
  618|     86|      pPce->FrontElementIsCpe[0] = 0;
  619|     86|      pPce->FrontElementIsCpe[1] = 1;
  620|     86|      pPce->NumBackChannelElements += 2;
  621|     86|      pPce->BackElementIsCpe[0] = 1;
  622|     86|      pPce->BackElementIsCpe[1] += 0;
  623|     86|      pPce->NumLfeChannelElements += 1;
  624|     86|      pPce->NumChannels += 7;
  625|     86|      pPce->NumEffectiveChannels += 6;
  626|     86|      pPce->isValid = 1;
  627|     86|      break;
  628|       |    /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  629|     77|    case 14:                               /* 2/0/0-3/0/2-0.1ch front height */
  ------------------
  |  Branch (629:5): [True: 77, False: 370]
  ------------------
  630|     77|      pPce->FrontElementHeightInfo[2] = 1; /* Top speaker */
  631|     77|      FDK_FALLTHROUGH;
  ------------------
  |  |  386|     77|#define FDK_FALLTHROUGH [[clang::fallthrough]]
  ------------------
  632|    154|    case 7: /* 5/0/2.1ch front */
  ------------------
  |  Branch (632:5): [True: 77, False: 370]
  ------------------
  633|    154|      pPce->NumFrontChannelElements += 1;
  634|    154|      pPce->FrontElementIsCpe[2] = 1;
  635|    154|      pPce->NumChannels += 2;
  636|    154|      pPce->NumEffectiveChannels += 2;
  637|    154|      FDK_FALLTHROUGH;
  ------------------
  |  |  386|    154|#define FDK_FALLTHROUGH [[clang::fallthrough]]
  ------------------
  638|    177|    case 6: /* 3/0/2.1ch */
  ------------------
  |  Branch (638:5): [True: 23, False: 424]
  ------------------
  639|    177|      pPce->NumLfeChannelElements += 1;
  640|    177|      pPce->NumChannels += 1;
  641|    177|      FDK_FALLTHROUGH;
  ------------------
  |  |  386|    177|#define FDK_FALLTHROUGH [[clang::fallthrough]]
  ------------------
  642|    197|    case 5: /* 3/0/2.0ch */
  ------------------
  |  Branch (642:5): [True: 20, False: 427]
  ------------------
  643|    230|    case 4: /* 3/0/1.0ch */
  ------------------
  |  Branch (643:5): [True: 33, False: 414]
  ------------------
  644|    230|      pPce->NumBackChannelElements += 1;
  645|    230|      pPce->BackElementIsCpe[0] = (channelConfig > 4) ? 1 : 0;
  ------------------
  |  Branch (645:35): [True: 197, False: 33]
  ------------------
  646|    230|      pPce->NumChannels += (channelConfig > 4) ? 2 : 1;
  ------------------
  |  Branch (646:28): [True: 197, False: 33]
  ------------------
  647|    230|      pPce->NumEffectiveChannels += (channelConfig > 4) ? 2 : 1;
  ------------------
  |  Branch (647:37): [True: 197, False: 33]
  ------------------
  648|    230|      FDK_FALLTHROUGH;
  ------------------
  |  |  386|    230|#define FDK_FALLTHROUGH [[clang::fallthrough]]
  ------------------
  649|    284|    case 3: /* 3/0/0.0ch */
  ------------------
  |  Branch (649:5): [True: 54, False: 393]
  ------------------
  650|    284|      pPce->NumFrontChannelElements += 1;
  651|    284|      pPce->FrontElementIsCpe[1] = 1;
  652|    284|      pPce->NumChannels += 2;
  653|    284|      pPce->NumEffectiveChannels += 2;
  654|    284|      FDK_FALLTHROUGH;
  ------------------
  |  |  386|    284|#define FDK_FALLTHROUGH [[clang::fallthrough]]
  ------------------
  655|    284|    case 1: /* 1/0/0.0ch */
  ------------------
  |  Branch (655:5): [True: 0, False: 447]
  ------------------
  656|    284|      pPce->NumFrontChannelElements += 1;
  657|    284|      pPce->FrontElementIsCpe[0] = 0;
  658|    284|      pPce->NumChannels += 1;
  659|    284|      pPce->NumEffectiveChannels += 1;
  660|    284|      pPce->isValid = 1;
  661|    284|      break;
  662|       |    /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  663|      0|    case 2: /* 2/0/0.ch */
  ------------------
  |  Branch (663:5): [True: 0, False: 447]
  ------------------
  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: 447]
  ------------------
  672|      0|      pPce->isValid = 0; /* To be explicit! */
  673|      0|      break;
  674|    447|  }
  675|       |
  676|    447|  if (pPce->isValid) {
  ------------------
  |  Branch (676:7): [True: 447, False: 0]
  ------------------
  677|       |    /* Create valid element instance tags */
  678|    447|    int el, elTagSce = 0, elTagCpe = 0;
  679|       |
  680|  1.49k|    for (el = 0; el < pPce->NumFrontChannelElements; el += 1) {
  ------------------
  |  Branch (680:18): [True: 1.04k, False: 447]
  ------------------
  681|  1.04k|      pPce->FrontElementTagSelect[el] =
  682|  1.04k|          (pPce->FrontElementIsCpe[el]) ? elTagCpe++ : elTagSce++;
  ------------------
  |  Branch (682:11): [True: 601, False: 447]
  ------------------
  683|  1.04k|    }
  684|    524|    for (el = 0; el < pPce->NumSideChannelElements; el += 1) {
  ------------------
  |  Branch (684:18): [True: 77, False: 447]
  ------------------
  685|     77|      pPce->SideElementTagSelect[el] =
  686|     77|          (pPce->SideElementIsCpe[el]) ? elTagCpe++ : elTagSce++;
  ------------------
  |  Branch (686:11): [True: 77, False: 0]
  ------------------
  687|     77|    }
  688|    926|    for (el = 0; el < pPce->NumBackChannelElements; el += 1) {
  ------------------
  |  Branch (688:18): [True: 479, False: 447]
  ------------------
  689|    479|      pPce->BackElementTagSelect[el] =
  690|    479|          (pPce->BackElementIsCpe[el]) ? elTagCpe++ : elTagSce++;
  ------------------
  |  Branch (690:11): [True: 437, False: 42]
  ------------------
  691|    479|    }
  692|    447|    elTagSce = 0;
  693|    787|    for (el = 0; el < pPce->NumLfeChannelElements; el += 1) {
  ------------------
  |  Branch (693:18): [True: 340, False: 447]
  ------------------
  694|    340|      pPce->LfeElementTagSelect[el] = elTagSce++;
  695|    340|    }
  696|    447|  }
  697|    447|}
_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|    745|  for (i = 0; i < pPce->NumFrontChannelElements; i += 1) {
  ------------------
  |  Branch (1262:15): [True: 425, False: 320]
  ------------------
 1263|    425|    elList[el++] = (pPce->FrontElementIsCpe[i]) ? ID_CPE : ID_SCE;
  ------------------
  |  Branch (1263:20): [True: 158, False: 267]
  ------------------
 1264|    425|  }
 1265|       |
 1266|    533|  for (i = 0; i < pPce->NumSideChannelElements; i += 1) {
  ------------------
  |  Branch (1266:15): [True: 213, False: 320]
  ------------------
 1267|    213|    elList[el++] = (pPce->SideElementIsCpe[i]) ? ID_CPE : ID_SCE;
  ------------------
  |  Branch (1267:20): [True: 81, False: 132]
  ------------------
 1268|    213|  }
 1269|       |
 1270|    602|  for (i = 0; i < pPce->NumBackChannelElements; i += 1) {
  ------------------
  |  Branch (1270:15): [True: 282, False: 320]
  ------------------
 1271|    282|    elList[el++] = (pPce->BackElementIsCpe[i]) ? ID_CPE : ID_SCE;
  ------------------
  |  Branch (1271:20): [True: 95, False: 187]
  ------------------
 1272|    282|  }
 1273|       |
 1274|    444|  for (i = 0; i < pPce->NumLfeChannelElements; i += 1) {
  ------------------
  |  Branch (1274:15): [True: 124, False: 320]
  ------------------
 1275|    124|    elList[el++] = ID_LFE;
 1276|    124|  }
 1277|       |
 1278|       |  /* Find an corresponding channel configuration if possible */
 1279|    320|  switch (pPce->NumChannels) {
 1280|     79|    case 1:
  ------------------
  |  Branch (1280:5): [True: 79, False: 241]
  ------------------
 1281|    100|    case 2:
  ------------------
  |  Branch (1281:5): [True: 21, False: 299]
  ------------------
 1282|       |      /* One and two channels have no alternatives. */
 1283|    100|      *pChMapIdx = pPce->NumChannels;
 1284|    100|      break;
 1285|     54|    case 3:
  ------------------
  |  Branch (1285:5): [True: 54, False: 266]
  ------------------
 1286|     87|    case 4:
  ------------------
  |  Branch (1286:5): [True: 33, False: 287]
  ------------------
 1287|    107|    case 5:
  ------------------
  |  Branch (1287:5): [True: 20, False: 300]
  ------------------
 1288|    130|    case 6: { /* Test if the number of channels can be used as channel config:
  ------------------
  |  Branch (1288:5): [True: 23, False: 297]
  ------------------
 1289|       |               */
 1290|    130|      C_ALLOC_SCRATCH_START(tmpPce, CProgramConfig, 1);
  ------------------
  |  |  324|    130|#define C_ALLOC_SCRATCH_START(name, type, n) type name[n];
  ------------------
 1291|       |      /* Create a PCE for the config to test ... */
 1292|    130|      CProgramConfig_GetDefault(tmpPce, pPce->NumChannels);
 1293|       |      /* ... and compare it with the given one. */
 1294|    130|      *pChMapIdx = (!(CProgramConfig_Compare(pPce, tmpPce) & 0xE))
  ------------------
  |  Branch (1294:20): [True: 36, False: 94]
  ------------------
 1295|    130|                       ? pPce->NumChannels
 1296|    130|                       : 0;
 1297|       |      /* If compare result is 0 or 1 we can be sure that it is channel
 1298|       |       * config 11. */
 1299|    130|      C_ALLOC_SCRATCH_END(tmpPce, CProgramConfig, 1);
 1300|    130|    } break;
 1301|      9|    case 7: {
  ------------------
  |  Branch (1301:5): [True: 9, False: 311]
  ------------------
 1302|      9|      C_ALLOC_SCRATCH_START(tmpPce, CProgramConfig, 1);
  ------------------
  |  |  324|      9|#define C_ALLOC_SCRATCH_START(name, type, n) type name[n];
  ------------------
 1303|       |      /* Create a PCE for the config to test ... */
 1304|      9|      CProgramConfig_GetDefault(tmpPce, 11);
 1305|       |      /* ... and compare it with the given one. */
 1306|      9|      *pChMapIdx = (!(CProgramConfig_Compare(pPce, tmpPce) & 0xE)) ? 11 : 0;
  ------------------
  |  Branch (1306:20): [True: 3, False: 6]
  ------------------
 1307|       |      /* If compare result is 0 or 1 we can be sure that it is channel
 1308|       |       * config 11. */
 1309|      9|      C_ALLOC_SCRATCH_END(tmpPce, CProgramConfig, 1);
 1310|      9|    } break;
 1311|     77|    case 8: { /* Try the four possible 7.1ch configurations. One after the
  ------------------
  |  Branch (1311:5): [True: 77, False: 243]
  ------------------
 1312|       |                 other. */
 1313|     77|      UCHAR testCfg[4] = {32, 14, 12, 7};
 1314|     77|      C_ALLOC_SCRATCH_START(tmpPce, CProgramConfig, 1);
  ------------------
  |  |  324|     77|#define C_ALLOC_SCRATCH_START(name, type, n) type name[n];
  ------------------
 1315|    385|      for (i = 0; i < 4; i += 1) {
  ------------------
  |  Branch (1315:19): [True: 308, False: 77]
  ------------------
 1316|       |        /* Create a PCE for the config to test ... */
 1317|    308|        CProgramConfig_GetDefault(tmpPce, testCfg[i]);
 1318|       |        /* ... and compare it with the given one. */
 1319|    308|        if (!(CProgramConfig_Compare(pPce, tmpPce) & 0xE)) {
  ------------------
  |  Branch (1319:13): [True: 6, False: 302]
  ------------------
 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|    308|      }
 1327|     77|      C_ALLOC_SCRATCH_END(tmpPce, CProgramConfig, 1);
 1328|     77|    } 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: 6, False: 10.4k]
  ------------------
 2334|  10.4k|        (self->m_samplingFrequency > 96000 && self->m_aot != 39) ||
  ------------------
  |  Branch (2334:10): [True: 150, False: 10.2k]
  |  Branch (2334:47): [True: 15, False: 135]
  ------------------
 2335|  10.3k|        self->m_samplingFrequency > 4 * 96000) {
  ------------------
  |  Branch (2335:9): [True: 13, False: 10.3k]
  ------------------
 2336|     34|      return TRANSPORTDEC_PARSE_ERROR;
 2337|     34|    }
 2338|       |
 2339|  10.3k|    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.3k|    if ((self->m_channelConfiguration == 0) &&
  ------------------
  |  Branch (2346:9): [True: 890, False: 9.49k]
  ------------------
 2347|    890|        ((self->m_aot == AOT_ER_AAC_LC) || (self->m_aot == AOT_ER_AAC_LTP) ||
  ------------------
  |  Branch (2347:10): [True: 2, False: 888]
  |  Branch (2347:44): [True: 1, False: 887]
  ------------------
 2348|    887|         (self->m_aot == AOT_ER_AAC_LD) || (self->m_aot == AOT_ER_AAC_SCAL) ||
  ------------------
  |  Branch (2348:10): [True: 1, False: 886]
  |  Branch (2348:44): [True: 1, False: 885]
  ------------------
 2349|    885|         (self->m_aot == AOT_ER_AAC_ELD))) {
  ------------------
  |  Branch (2349:10): [True: 13, False: 872]
  ------------------
 2350|     18|      return TRANSPORTDEC_UNSUPPORTED_FORMAT;
 2351|     18|    }
 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.38k, False: 2.97k]
  ------------------
 2355|  7.38k|        ((self->m_aot == AOT_AAC_SCAL) || (self->m_aot == AOT_ER_AAC_SCAL))) {
  ------------------
  |  Branch (2355:10): [True: 1, False: 7.38k]
  |  Branch (2355:43): [True: 1, False: 7.38k]
  ------------------
 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: 166, False: 10.1k]
  |  Branch (2363:35): [True: 86, False: 10.1k]
  ------------------
 2364|    252|      self->m_extensionAudioObjectType = AOT_SBR;
 2365|       |
 2366|    252|      self->m_sbrPresentFlag = 1;
 2367|    252|      if (self->m_aot == AOT_PS) {
  ------------------
  |  Branch (2367:11): [True: 86, False: 166]
  ------------------
 2368|     86|        self->m_psPresentFlag = 1;
 2369|     86|      }
 2370|       |
 2371|    252|      self->m_extensionSamplingFrequency =
 2372|    252|          getSampleRate(bs, &self->m_extensionSamplingFrequencyIndex, 4);
 2373|    252|      if (self->m_extensionSamplingFrequency == 0 ||
  ------------------
  |  Branch (2373:11): [True: 4, False: 248]
  ------------------
 2374|    248|          self->m_extensionSamplingFrequency > 96000) {
  ------------------
  |  Branch (2374:11): [True: 17, False: 231]
  ------------------
 2375|     21|        return TRANSPORTDEC_PARSE_ERROR;
 2376|     21|      }
 2377|    231|      self->m_aot = getAOT(bs);
 2378|       |
 2379|    231|      switch (self->m_aot) {
 2380|    197|        case AOT_AAC_LC:
  ------------------
  |  Branch (2380:9): [True: 197, False: 34]
  ------------------
 2381|    197|          break;
 2382|     15|        case AOT_ER_BSAC:
  ------------------
  |  Branch (2382:9): [True: 15, False: 216]
  ------------------
 2383|     15|          break;
 2384|     19|        default:
  ------------------
  |  Branch (2384:9): [True: 19, False: 212]
  ------------------
 2385|     19|          return TRANSPORTDEC_UNSUPPORTED_FORMAT;
 2386|    231|      }
 2387|       |
 2388|    212|      if (self->m_aot == AOT_ER_BSAC) {
  ------------------
  |  Branch (2388:11): [True: 15, False: 197]
  ------------------
 2389|     15|        self->m_extensionChannelConfiguration = FDKreadBits(bs, 4);
 2390|     15|      }
 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.30k|    case AOT_AAC_LC:
  ------------------
  |  Branch (2398:5): [True: 1.30k, False: 9.01k]
  ------------------
 2399|  1.32k|    case AOT_AAC_SCAL:
  ------------------
  |  Branch (2399:5): [True: 22, False: 10.2k]
  ------------------
 2400|  1.35k|    case AOT_ER_AAC_LC:
  ------------------
  |  Branch (2400:5): [True: 24, False: 10.2k]
  ------------------
 2401|  1.50k|    case AOT_ER_AAC_LD:
  ------------------
  |  Branch (2401:5): [True: 152, False: 10.1k]
  ------------------
 2402|  1.52k|    case AOT_ER_AAC_SCAL:
  ------------------
  |  Branch (2402:5): [True: 16, False: 10.3k]
  ------------------
 2403|  1.55k|    case AOT_ER_BSAC:
  ------------------
  |  Branch (2403:5): [True: 35, False: 10.2k]
  ------------------
 2404|  1.55k|      if ((ErrorStatus = GaSpecificConfig_Parse(&self->m_sc.m_gaSpecificConfig,
  ------------------
  |  Branch (2404:11): [True: 0, False: 1.55k]
  ------------------
 2405|  1.55k|                                                self, bs, ascStartAnchor)) !=
 2406|  1.55k|          TRANSPORTDEC_OK) {
 2407|      0|        return (ErrorStatus);
 2408|      0|      }
 2409|  1.55k|      frameLengthFlag = self->m_sc.m_gaSpecificConfig.m_frameLengthFlag;
 2410|  1.55k|      break;
 2411|      1|    case AOT_MPEGS:
  ------------------
  |  Branch (2411:5): [True: 1, False: 10.3k]
  ------------------
 2412|      1|      if (cb->cbSsc != NULL) {
  ------------------
  |  Branch (2412:11): [True: 1, False: 0]
  ------------------
 2413|      1|        if (cb->cbSsc(cb->cbSscData, bs, self->m_aot, self->m_samplingFrequency,
  ------------------
  |  Branch (2413:13): [True: 1, False: 0]
  ------------------
 2414|      1|                      self->m_samplesPerFrame, self->m_channelConfiguration, 1,
 2415|      1|                      -1, /* nTimeSlots: read from bitstream */
 2416|      1|                      0,  /* don't know the length */
 2417|      1|                      self->configMode, &self->SacConfigChanged)) {
 2418|      1|          return TRANSPORTDEC_UNSUPPORTED_FORMAT;
 2419|      1|        }
 2420|      1|      } else {
 2421|      0|        return TRANSPORTDEC_UNSUPPORTED_FORMAT;
 2422|      0|      }
 2423|      0|      break;
 2424|  1.45k|    case AOT_ER_AAC_ELD:
  ------------------
  |  Branch (2424:5): [True: 1.45k, False: 8.86k]
  ------------------
 2425|  1.45k|      if ((ErrorStatus = EldSpecificConfig_Parse(self, bs, cb)) !=
  ------------------
  |  Branch (2425:11): [True: 584, False: 873]
  ------------------
 2426|  1.45k|          TRANSPORTDEC_OK) {
 2427|    584|        return (ErrorStatus);
 2428|    584|      }
 2429|    873|      frameLengthFlag = self->m_sc.m_eldSpecificConfig.m_frameLengthFlag;
 2430|    873|      self->m_sbrPresentFlag = self->m_sc.m_eldSpecificConfig.m_sbrPresentFlag;
 2431|    873|      self->m_extensionSamplingFrequency =
 2432|    873|          (self->m_sc.m_eldSpecificConfig.m_sbrSamplingRate + 1) *
 2433|    873|          self->m_samplingFrequency;
 2434|    873|      break;
 2435|  7.27k|    case AOT_USAC:
  ------------------
  |  Branch (2435:5): [True: 7.27k, False: 3.04k]
  ------------------
 2436|  7.27k|      if ((ErrorStatus = UsacConfig_Parse(self, bs, cb)) != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (2436:11): [True: 3.35k, False: 3.92k]
  ------------------
 2437|  3.35k|        return (ErrorStatus);
 2438|  3.35k|      }
 2439|  3.92k|      break;
 2440|       |
 2441|  3.92k|    default:
  ------------------
  |  Branch (2441:5): [True: 33, False: 10.2k]
  ------------------
 2442|     33|      return TRANSPORTDEC_UNSUPPORTED_FORMAT;
 2443|  10.3k|  }
 2444|       |
 2445|       |  /* Frame length */
 2446|  6.35k|  switch (self->m_aot) {
 2447|  1.30k|    case AOT_AAC_LC:
  ------------------
  |  Branch (2447:5): [True: 1.30k, False: 5.04k]
  ------------------
 2448|  1.32k|    case AOT_AAC_SCAL:
  ------------------
  |  Branch (2448:5): [True: 22, False: 6.33k]
  ------------------
 2449|  1.35k|    case AOT_ER_AAC_LC:
  ------------------
  |  Branch (2449:5): [True: 24, False: 6.32k]
  ------------------
 2450|  1.36k|    case AOT_ER_AAC_SCAL:
  ------------------
  |  Branch (2450:5): [True: 16, False: 6.33k]
  ------------------
 2451|  1.40k|    case AOT_ER_BSAC:
  ------------------
  |  Branch (2451:5): [True: 35, False: 6.31k]
  ------------------
 2452|       |      /*case AOT_USAC:*/
 2453|  1.40k|      if (!frameLengthFlag)
  ------------------
  |  Branch (2453:11): [True: 837, False: 567]
  ------------------
 2454|    837|        self->m_samplesPerFrame = 1024;
 2455|    567|      else
 2456|    567|        self->m_samplesPerFrame = 960;
 2457|  1.40k|      break;
 2458|    152|    case AOT_ER_AAC_LD:
  ------------------
  |  Branch (2458:5): [True: 152, False: 6.20k]
  ------------------
 2459|    152|      if (!frameLengthFlag)
  ------------------
  |  Branch (2459:11): [True: 82, False: 70]
  ------------------
 2460|     82|        self->m_samplesPerFrame = 512;
 2461|     70|      else
 2462|     70|        self->m_samplesPerFrame = 480;
 2463|    152|      break;
 2464|  4.79k|    default:
  ------------------
  |  Branch (2464:5): [True: 4.79k, False: 1.55k]
  ------------------
 2465|  4.79k|      break;
 2466|  6.35k|  }
 2467|       |
 2468|  6.35k|  switch (self->m_aot) {
 2469|     24|    case AOT_ER_AAC_LC:
  ------------------
  |  Branch (2469:5): [True: 24, False: 6.32k]
  ------------------
 2470|    176|    case AOT_ER_AAC_LD:
  ------------------
  |  Branch (2470:5): [True: 152, False: 6.20k]
  ------------------
 2471|  1.04k|    case AOT_ER_AAC_ELD:
  ------------------
  |  Branch (2471:5): [True: 873, False: 5.47k]
  ------------------
 2472|  1.06k|    case AOT_ER_AAC_SCAL:
  ------------------
  |  Branch (2472:5): [True: 16, False: 6.33k]
  ------------------
 2473|  1.06k|    case AOT_ER_CELP:
  ------------------
  |  Branch (2473:5): [True: 0, False: 6.35k]
  ------------------
 2474|  1.06k|    case AOT_ER_HVXC:
  ------------------
  |  Branch (2474:5): [True: 0, False: 6.35k]
  ------------------
 2475|  1.10k|    case AOT_ER_BSAC:
  ------------------
  |  Branch (2475:5): [True: 35, False: 6.31k]
  ------------------
 2476|  1.10k|      self->m_epConfig = FDKreadBits(bs, 2);
 2477|       |
 2478|  1.10k|      if (self->m_epConfig > 1) {
  ------------------
  |  Branch (2478:11): [True: 7, False: 1.09k]
  ------------------
 2479|      7|        return TRANSPORTDEC_UNSUPPORTED_FORMAT;  // EPCONFIG;
 2480|      7|      }
 2481|  1.09k|      break;
 2482|  5.25k|    default:
  ------------------
  |  Branch (2482:5): [True: 5.25k, False: 1.10k]
  ------------------
 2483|  5.25k|      break;
 2484|  6.35k|  }
 2485|       |
 2486|  6.34k|  if (fExplicitBackwardCompatible &&
  ------------------
  |  Branch (2486:7): [True: 6.34k, False: 0]
  ------------------
 2487|  6.34k|      (self->m_aot == AOT_AAC_LC || self->m_aot == AOT_ER_AAC_LD ||
  ------------------
  |  Branch (2487:8): [True: 1.30k, False: 5.03k]
  |  Branch (2487:37): [True: 152, False: 4.88k]
  ------------------
 2488|  4.88k|       self->m_aot == AOT_ER_BSAC)) {
  ------------------
  |  Branch (2488:8): [True: 35, False: 4.85k]
  ------------------
 2489|  1.49k|    ErrorStatus = AudioSpecificConfig_ExtensionParse(self, bs, cb);
 2490|  1.49k|  }
 2491|       |
 2492|       |  /* Copy config() to asc->config[] buffer. */
 2493|  6.34k|  if ((ErrorStatus == TRANSPORTDEC_OK) && (self->m_aot == AOT_USAC)) {
  ------------------
  |  Branch (2493:7): [True: 6.32k, False: 23]
  |  Branch (2493:43): [True: 3.92k, False: 2.39k]
  ------------------
 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.34k|  return (ErrorStatus);
 2503|  6.34k|}
tpdec_asc.cpp:_ZL28CProgramConfig_ReadHeightExtP14CProgramConfigP13FDK_BITSTREAMPij:
  206|    503|                                        const UINT alignmentAnchor) {
  207|    503|  int err = 0;
  208|    503|  FDK_CRCINFO crcInfo; /* CRC state info */
  209|    503|  INT crcReg;
  210|    503|  FDKcrcInit(&crcInfo, 0x07, 0xFF, 8);
  211|    503|  crcReg = FDKcrcStartReg(&crcInfo, bs, 0);
  212|    503|  UINT startAnchor = FDKgetValidBits(bs);
  213|       |
  214|    503|  FDK_ASSERT(pPce != NULL);
  ------------------
  |  |  221|    503|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (214:3): [True: 503, False: 0]
  ------------------
  215|    503|  FDK_ASSERT(bs != NULL);
  ------------------
  |  |  221|    503|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 503, False: 0]
  ------------------
  216|    503|  FDK_ASSERT(bytesAvailable != NULL);
  ------------------
  |  |  221|    503|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (216:3): [True: 503, False: 0]
  ------------------
  217|       |
  218|    503|  if ((startAnchor >= 24) && (*bytesAvailable >= 3) &&
  ------------------
  |  Branch (218:7): [True: 473, False: 30]
  |  Branch (218:30): [True: 116, False: 357]
  ------------------
  219|    116|      (FDKreadBits(bs, 8) == PCE_HEIGHT_EXT_SYNC)) {
  ------------------
  |  |  195|    116|#define PCE_HEIGHT_EXT_SYNC (0xAC)
  ------------------
  |  Branch (219:7): [True: 107, False: 9]
  ------------------
  220|    107|    int i;
  221|       |
  222|    325|    for (i = 0; i < pPce->NumFrontChannelElements; i++) {
  ------------------
  |  Branch (222:17): [True: 218, False: 107]
  ------------------
  223|    218|      if ((pPce->FrontElementHeightInfo[i] = (UCHAR)FDKreadBits(bs, 2)) >=
  ------------------
  |  Branch (223:11): [True: 37, False: 181]
  ------------------
  224|    218|          PC_NUM_HEIGHT_LAYER) {
  ------------------
  |  |  152|    218|#define PC_NUM_HEIGHT_LAYER 3
  ------------------
  225|     37|        err = -2; /* height information is out of the valid range */
  226|     37|      }
  227|    218|    }
  228|    265|    for (i = 0; i < pPce->NumSideChannelElements; i++) {
  ------------------
  |  Branch (228:17): [True: 158, False: 107]
  ------------------
  229|    158|      if ((pPce->SideElementHeightInfo[i] = (UCHAR)FDKreadBits(bs, 2)) >=
  ------------------
  |  Branch (229:11): [True: 23, False: 135]
  ------------------
  230|    158|          PC_NUM_HEIGHT_LAYER) {
  ------------------
  |  |  152|    158|#define PC_NUM_HEIGHT_LAYER 3
  ------------------
  231|     23|        err = -2; /* height information is out of the valid range */
  232|     23|      }
  233|    158|    }
  234|    232|    for (i = 0; i < pPce->NumBackChannelElements; i++) {
  ------------------
  |  Branch (234:17): [True: 125, False: 107]
  ------------------
  235|    125|      if ((pPce->BackElementHeightInfo[i] = (UCHAR)FDKreadBits(bs, 2)) >=
  ------------------
  |  Branch (235:11): [True: 19, False: 106]
  ------------------
  236|    125|          PC_NUM_HEIGHT_LAYER) {
  ------------------
  |  |  152|    125|#define PC_NUM_HEIGHT_LAYER 3
  ------------------
  237|     19|        err = -2; /* height information is out of the valid range */
  238|     19|      }
  239|    125|    }
  240|    107|    FDKbyteAlign(bs, alignmentAnchor);
  241|       |
  242|    107|    FDKcrcEndReg(&crcInfo, bs, crcReg);
  243|    107|    if ((USHORT)FDKreadBits(bs, 8) != FDKcrcGetCRC(&crcInfo)) {
  ------------------
  |  Branch (243:9): [True: 44, False: 63]
  ------------------
  244|       |      /* CRC failed */
  245|     44|      err = -1;
  246|     44|    }
  247|    107|    if (err != 0) {
  ------------------
  |  Branch (247:9): [True: 46, False: 61]
  ------------------
  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|     46|      FDKmemclear(pPce->FrontElementHeightInfo,
  252|     46|                  sizeof(pPce->FrontElementHeightInfo));
  253|     46|      FDKmemclear(pPce->SideElementHeightInfo,
  254|     46|                  sizeof(pPce->SideElementHeightInfo));
  255|     46|      FDKmemclear(pPce->BackElementHeightInfo,
  256|     46|                  sizeof(pPce->BackElementHeightInfo));
  257|     46|    }
  258|    396|  } else {
  259|       |    /* No valid extension data found -> restore the initial bitbuffer state */
  260|    396|    FDKpushBack(bs, (INT)startAnchor - (INT)FDKgetValidBits(bs));
  261|    396|  }
  262|       |
  263|       |  /* Always report the bytes read. */
  264|    503|  *bytesAvailable -= ((INT)startAnchor - (INT)FDKgetValidBits(bs)) >> 3;
  265|       |
  266|    503|  return (err);
  267|    503|}
tpdec_asc.cpp:_ZL20CProgramConfig_CheckP14CProgramConfig:
  278|    503|static int CProgramConfig_Check(CProgramConfig *pPce) {
  279|    503|  INT i;
  280|    503|  INT err = 0;
  281|    503|  INT numBackChannels[3] = {0};
  282|    503|  INT numSideChannels[3] = {0};
  283|    503|  INT numFrontChannels[3] = {0};
  284|    503|  UCHAR *pCpeFront = pPce->FrontElementIsCpe;
  285|    503|  UCHAR *pCpeSide = pPce->SideElementIsCpe;
  286|    503|  UCHAR *pCpeBack = pPce->BackElementIsCpe;
  287|    503|  UCHAR *pHeight;
  288|       |
  289|    503|  pHeight = pPce->BackElementHeightInfo;
  290|  1.35k|  for (i = 0; i < pPce->NumBackChannelElements; i++) {
  ------------------
  |  Branch (290:15): [True: 851, False: 503]
  ------------------
  291|    851|    numBackChannels[*pHeight] += pPce->BackElementIsCpe[i] ? 2 : 1;
  ------------------
  |  Branch (291:34): [True: 151, False: 700]
  ------------------
  292|    851|    pHeight++;
  293|    851|  }
  294|    503|  pHeight = pPce->SideElementHeightInfo;
  295|  1.29k|  for (i = 0; i < pPce->NumSideChannelElements; i++) {
  ------------------
  |  Branch (295:15): [True: 788, False: 503]
  ------------------
  296|    788|    numSideChannels[*pHeight] += pPce->SideElementIsCpe[i] ? 2 : 1;
  ------------------
  |  Branch (296:34): [True: 140, False: 648]
  ------------------
  297|    788|    pHeight++;
  298|    788|  }
  299|    503|  pHeight = pPce->FrontElementHeightInfo;
  300|  1.48k|  for (i = 0; i < pPce->NumFrontChannelElements; i++) {
  ------------------
  |  Branch (300:15): [True: 978, False: 503]
  ------------------
  301|    978|    numFrontChannels[*pHeight] += pPce->FrontElementIsCpe[i] ? 2 : 1;
  ------------------
  |  Branch (301:35): [True: 221, False: 757]
  ------------------
  302|    978|    pHeight++;
  303|    978|  }
  304|       |
  305|       |  /* 0 = normal height channels, 1 = top height channels, 2 = bottom height
  306|       |   * channels */
  307|  1.90k|  for (i = 0; i < 3; i++) {
  ------------------
  |  Branch (307:15): [True: 1.43k, False: 465]
  ------------------
  308|       |    /* if number of channels is odd => first element must be a SCE (front center
  309|       |     * channel) */
  310|  1.43k|    if (numFrontChannels[i] & 1) {
  ------------------
  |  Branch (310:9): [True: 189, False: 1.24k]
  ------------------
  311|    189|      if (*pCpeFront++ == ID_CPE) {
  ------------------
  |  Branch (311:11): [True: 4, False: 185]
  ------------------
  312|      4|        err = 1;
  313|      4|        goto bail;
  314|      4|      }
  315|    185|      numFrontChannels[i]--;
  316|    185|    }
  317|  1.91k|    while (numFrontChannels[i] > 0) {
  ------------------
  |  Branch (317:12): [True: 485, False: 1.42k]
  ------------------
  318|       |      /* must be CPE or paired SCE */
  319|    485|      if (*pCpeFront++ == ID_SCE) {
  ------------------
  |  Branch (319:11): [True: 278, False: 207]
  ------------------
  320|    278|        if (*pCpeFront++ == ID_CPE) {
  ------------------
  |  Branch (320:13): [True: 5, False: 273]
  ------------------
  321|      5|          err = 1;
  322|      5|          goto bail;
  323|      5|        }
  324|    278|      }
  325|    480|      numFrontChannels[i] -= 2;
  326|  1.42k|    };
  327|       |
  328|       |    /* in case that a top center surround channel (Ts) is transmitted the number
  329|       |     * of channels can be odd */
  330|  1.42k|    if (i != 1) {
  ------------------
  |  Branch (330:9): [True: 960, False: 466]
  ------------------
  331|       |      /* number of channels must be even */
  332|    960|      if (numSideChannels[i] & 1) {
  ------------------
  |  Branch (332:11): [True: 23, False: 937]
  ------------------
  333|     23|        err = 1;
  334|     23|        goto bail;
  335|     23|      }
  336|  1.25k|      while (numSideChannels[i] > 0) {
  ------------------
  |  Branch (336:14): [True: 320, False: 934]
  ------------------
  337|       |        /* must be CPE or paired SCE */
  338|    320|        if (*pCpeSide++ == ID_SCE) {
  ------------------
  |  Branch (338:13): [True: 223, False: 97]
  ------------------
  339|    223|          if (*pCpeSide++ == ID_CPE) {
  ------------------
  |  Branch (339:15): [True: 3, False: 220]
  ------------------
  340|      3|            err = 1;
  341|      3|            goto bail;
  342|      3|          }
  343|    223|        }
  344|    317|        numSideChannels[i] -= 2;
  345|    934|      };
  346|    934|    }
  347|       |
  348|  1.70k|    while (numBackChannels[i] > 1) {
  ------------------
  |  Branch (348:12): [True: 310, False: 1.39k]
  ------------------
  349|       |      /* must be CPE or paired SCE */
  350|    310|      if (*pCpeBack++ == ID_SCE) {
  ------------------
  |  Branch (350:11): [True: 173, False: 137]
  ------------------
  351|    173|        if (*pCpeBack++ == ID_CPE) {
  ------------------
  |  Branch (351:13): [True: 2, False: 171]
  ------------------
  352|      2|          err = 1;
  353|      2|          goto bail;
  354|      2|        }
  355|    173|      }
  356|    308|      numBackChannels[i] -= 2;
  357|  1.39k|    };
  358|       |    /* if number of channels is odd => last element must be a SCE (back center
  359|       |     * channel) */
  360|  1.39k|    if (numBackChannels[i]) {
  ------------------
  |  Branch (360:9): [True: 116, False: 1.28k]
  ------------------
  361|    116|      if (*pCpeBack++ == ID_CPE) {
  ------------------
  |  Branch (361:11): [True: 1, False: 115]
  ------------------
  362|      1|        err = 1;
  363|      1|        goto bail;
  364|      1|      }
  365|    116|    }
  366|  1.39k|  }
  367|       |
  368|    503|bail:
  369|       |
  370|    503|  return err;
  371|    503|}
tpdec_asc.cpp:_ZL6getAOTP13FDK_BITSTREAM:
 1338|  12.0k|static AUDIO_OBJECT_TYPE getAOT(HANDLE_FDK_BITSTREAM bs) {
 1339|  12.0k|  int tmp = 0;
 1340|       |
 1341|  12.0k|  tmp = FDKreadBits(bs, 5);
 1342|  12.0k|  if (tmp == AOT_ESCAPE) {
  ------------------
  |  Branch (1342:7): [True: 9.20k, False: 2.84k]
  ------------------
 1343|  9.20k|    int tmp2 = FDKreadBits(bs, 6);
 1344|  9.20k|    tmp = 32 + tmp2;
 1345|  9.20k|  }
 1346|       |
 1347|  12.0k|  return (AUDIO_OBJECT_TYPE)tmp;
 1348|  12.0k|}
tpdec_asc.cpp:_ZL13getSampleRateP13FDK_BITSTREAMPhi:
 1350|  18.6k|static INT getSampleRate(HANDLE_FDK_BITSTREAM bs, UCHAR *index, int nBits) {
 1351|  18.6k|  INT sampleRate;
 1352|  18.6k|  int idx;
 1353|       |
 1354|  18.6k|  idx = FDKreadBits(bs, nBits);
 1355|  18.6k|  if (idx == (1 << nBits) - 1) {
  ------------------
  |  Branch (1355:7): [True: 1.12k, False: 17.4k]
  ------------------
 1356|  1.12k|    if (FDKgetValidBits(bs) < 24) {
  ------------------
  |  Branch (1356:9): [True: 8, False: 1.11k]
  ------------------
 1357|      8|      return 0;
 1358|      8|    }
 1359|  1.11k|    sampleRate = FDKreadBits(bs, 24);
 1360|  17.4k|  } else {
 1361|  17.4k|    sampleRate = SamplingRateTable[idx];
 1362|  17.4k|  }
 1363|       |
 1364|  18.6k|  *index = idx;
 1365|       |
 1366|  18.6k|  return sampleRate;
 1367|  18.6k|}
tpdec_asc.cpp:_ZL22GaSpecificConfig_ParseP18CSGaSpecificConfigP21CSAudioSpecificConfigP13FDK_BITSTREAMj:
 1372|  1.55k|                                                 UINT ascStartAnchor) {
 1373|  1.55k|  TRANSPORTDEC_ERROR ErrorStatus = TRANSPORTDEC_OK;
 1374|       |
 1375|  1.55k|  self->m_frameLengthFlag = FDKreadBits(bs, 1);
 1376|       |
 1377|  1.55k|  self->m_dependsOnCoreCoder = FDKreadBits(bs, 1);
 1378|       |
 1379|  1.55k|  if (self->m_dependsOnCoreCoder) self->m_coreCoderDelay = FDKreadBits(bs, 14);
  ------------------
  |  Branch (1379:7): [True: 183, False: 1.37k]
  ------------------
 1380|       |
 1381|  1.55k|  self->m_extensionFlag = FDKreadBits(bs, 1);
 1382|       |
 1383|  1.55k|  if (asc->m_channelConfiguration == 0) {
  ------------------
  |  Branch (1383:7): [True: 503, False: 1.05k]
  ------------------
 1384|    503|    CProgramConfig_Read(&asc->m_progrConfigElement, bs, ascStartAnchor);
 1385|    503|  }
 1386|       |
 1387|  1.55k|  if ((asc->m_aot == AOT_AAC_SCAL) || (asc->m_aot == AOT_ER_AAC_SCAL)) {
  ------------------
  |  Branch (1387:7): [True: 22, False: 1.53k]
  |  Branch (1387:39): [True: 16, False: 1.51k]
  ------------------
 1388|     38|    self->m_layer = FDKreadBits(bs, 3);
 1389|     38|  }
 1390|       |
 1391|  1.55k|  if (self->m_extensionFlag) {
  ------------------
  |  Branch (1391:7): [True: 338, False: 1.21k]
  ------------------
 1392|    338|    if (asc->m_aot == AOT_ER_BSAC) {
  ------------------
  |  Branch (1392:9): [True: 14, False: 324]
  ------------------
 1393|     14|      self->m_numOfSubFrame = FDKreadBits(bs, 5);
 1394|     14|      self->m_layerLength = FDKreadBits(bs, 11);
 1395|     14|    }
 1396|       |
 1397|    338|    if ((asc->m_aot == AOT_ER_AAC_LC) || (asc->m_aot == AOT_ER_AAC_LTP) ||
  ------------------
  |  Branch (1397:9): [True: 14, False: 324]
  |  Branch (1397:42): [True: 0, False: 324]
  ------------------
 1398|    324|        (asc->m_aot == AOT_ER_AAC_SCAL) || (asc->m_aot == AOT_ER_AAC_LD)) {
  ------------------
  |  Branch (1398:9): [True: 10, False: 314]
  |  Branch (1398:44): [True: 67, False: 247]
  ------------------
 1399|     91|      asc->m_vcb11Flag = FDKreadBits(bs, 1); /* aacSectionDataResilienceFlag */
 1400|     91|      asc->m_rvlcFlag =
 1401|     91|          FDKreadBits(bs, 1); /* aacScalefactorDataResilienceFlag */
 1402|     91|      asc->m_hcrFlag = FDKreadBits(bs, 1); /* aacSpectralDataResilienceFlag */
 1403|     91|    }
 1404|       |
 1405|    338|    self->m_extensionFlag3 = FDKreadBits(bs, 1);
 1406|    338|  }
 1407|  1.55k|  return (ErrorStatus);
 1408|  1.55k|}
tpdec_asc.cpp:_ZL23EldSpecificConfig_ParseP21CSAudioSpecificConfigP13FDK_BITSTREAMP13CSTpCallBacks:
 1470|  1.45k|                                                  CSTpCallBacks *cb) {
 1471|  1.45k|  TRANSPORTDEC_ERROR ErrorStatus = TRANSPORTDEC_OK;
 1472|  1.45k|  CSEldSpecificConfig *esc = &asc->m_sc.m_eldSpecificConfig;
 1473|  1.45k|  UINT eldExtType;
 1474|  1.45k|  int eldExtLen, len, cnt, ldSbrLen = 0, eldExtLenSum, numSbrHeader = 0,
 1475|  1.45k|                           sbrIndex, eldExtCnt = 0;
 1476|       |
 1477|  1.45k|  unsigned char downscale_fill_nibble;
 1478|       |
 1479|  1.45k|  FDKmemclear(esc, sizeof(CSEldSpecificConfig));
 1480|       |
 1481|  1.45k|  esc->m_frameLengthFlag = FDKreadBits(hBs, 1);
 1482|  1.45k|  if (esc->m_frameLengthFlag) {
  ------------------
  |  Branch (1482:7): [True: 734, False: 723]
  ------------------
 1483|    734|    asc->m_samplesPerFrame = 480;
 1484|    734|  } else {
 1485|    723|    asc->m_samplesPerFrame = 512;
 1486|    723|  }
 1487|       |
 1488|  1.45k|  asc->m_vcb11Flag = FDKreadBits(hBs, 1);
 1489|  1.45k|  asc->m_rvlcFlag = FDKreadBits(hBs, 1);
 1490|  1.45k|  asc->m_hcrFlag = FDKreadBits(hBs, 1);
 1491|       |
 1492|  1.45k|  esc->m_sbrPresentFlag = FDKreadBits(hBs, 1);
 1493|       |
 1494|  1.45k|  if (esc->m_sbrPresentFlag == 1) {
  ------------------
  |  Branch (1494:7): [True: 888, False: 569]
  ------------------
 1495|    888|    esc->m_sbrSamplingRate =
 1496|    888|        FDKreadBits(hBs, 1); /* 0: single rate, 1: dual rate */
 1497|    888|    esc->m_sbrCrcFlag = FDKreadBits(hBs, 1);
 1498|       |
 1499|    888|    asc->m_extensionSamplingFrequency = asc->m_samplingFrequency
 1500|    888|                                        << esc->m_sbrSamplingRate;
 1501|       |
 1502|    888|    if (cb->cbSbr != NULL) {
  ------------------
  |  Branch (1502:9): [True: 888, 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|    888|      switch (asc->m_channelConfiguration) {
 1507|    349|        case 1:
  ------------------
  |  Branch (1507:9): [True: 349, False: 539]
  ------------------
 1508|    453|        case 2:
  ------------------
  |  Branch (1508:9): [True: 104, False: 784]
  ------------------
 1509|    453|          numSbrHeader = 1;
 1510|    453|          break;
 1511|    149|        case 3:
  ------------------
  |  Branch (1511:9): [True: 149, False: 739]
  ------------------
 1512|    149|          numSbrHeader = 2;
 1513|    149|          break;
 1514|     24|        case 4:
  ------------------
  |  Branch (1514:9): [True: 24, False: 864]
  ------------------
 1515|     59|        case 5:
  ------------------
  |  Branch (1515:9): [True: 35, False: 853]
  ------------------
 1516|    100|        case 6:
  ------------------
  |  Branch (1516:9): [True: 41, False: 847]
  ------------------
 1517|    100|          numSbrHeader = 3;
 1518|    100|          break;
 1519|     76|        case 7:
  ------------------
  |  Branch (1519:9): [True: 76, False: 812]
  ------------------
 1520|     88|        case 11:
  ------------------
  |  Branch (1520:9): [True: 12, False: 876]
  ------------------
 1521|    112|        case 12:
  ------------------
  |  Branch (1521:9): [True: 24, False: 864]
  ------------------
 1522|    125|        case 14:
  ------------------
  |  Branch (1522:9): [True: 13, False: 875]
  ------------------
 1523|    125|          numSbrHeader = 4;
 1524|    125|          break;
 1525|     61|        default:
  ------------------
  |  Branch (1525:9): [True: 61, False: 827]
  ------------------
 1526|     61|          numSbrHeader = 0;
 1527|     61|          break;
 1528|    888|      }
 1529|  2.43k|      for (sbrIndex = 0; sbrIndex < numSbrHeader; sbrIndex++) {
  ------------------
  |  Branch (1529:26): [True: 1.55k, False: 888]
  ------------------
 1530|  1.55k|        ldSbrLen += skipSbrHeader(hBs, 0);
 1531|  1.55k|      }
 1532|    888|    } else {
 1533|      0|      return TRANSPORTDEC_UNSUPPORTED_FORMAT;
 1534|      0|    }
 1535|    888|  }
 1536|  1.45k|  esc->m_useLdQmfTimeAlign = 0;
 1537|       |
 1538|       |  /* new ELD syntax */
 1539|  1.45k|  eldExtLenSum = FDKgetValidBits(hBs);
 1540|  1.45k|  esc->m_downscaledSamplingFrequency = asc->m_samplingFrequency;
 1541|       |  /* parse ExtTypeConfigData */
 1542|  2.64k|  while (((eldExtType = FDKreadBits(hBs, 4)) != ELDEXT_TERM) &&
  ------------------
  |  Branch (1542:10): [True: 1.45k, False: 1.18k]
  ------------------
 1543|  1.45k|         ((INT)FDKgetValidBits(hBs) >= 0) && (eldExtCnt++ < 15)) {
  ------------------
  |  Branch (1543:10): [True: 1.44k, False: 17]
  |  Branch (1543:46): [True: 1.43k, False: 1]
  ------------------
 1544|  1.43k|    eldExtLen = len = FDKreadBits(hBs, 4);
 1545|  1.43k|    if (len == 0xf) {
  ------------------
  |  Branch (1545:9): [True: 159, False: 1.28k]
  ------------------
 1546|    159|      len = FDKreadBits(hBs, 8);
 1547|    159|      eldExtLen += len;
 1548|       |
 1549|    159|      if (len == 0xff) {
  ------------------
  |  Branch (1549:11): [True: 98, False: 61]
  ------------------
 1550|     98|        len = FDKreadBits(hBs, 16);
 1551|     98|        eldExtLen += len;
 1552|     98|      }
 1553|    159|    }
 1554|       |
 1555|  1.43k|    switch (eldExtType) {
 1556|    849|      case ELDEXT_LDSAC:
  ------------------
  |  Branch (1556:7): [True: 849, False: 590]
  ------------------
 1557|    849|        esc->m_useLdQmfTimeAlign = 1;
 1558|    849|        if (cb->cbSsc != NULL) {
  ------------------
  |  Branch (1558:13): [True: 849, False: 0]
  ------------------
 1559|    849|          ErrorStatus = (TRANSPORTDEC_ERROR)cb->cbSsc(
 1560|    849|              cb->cbSscData, hBs, asc->m_aot,
 1561|    849|              asc->m_samplingFrequency << esc->m_sbrSamplingRate,
 1562|    849|              asc->m_samplesPerFrame << esc->m_sbrSamplingRate,
 1563|    849|              asc->m_channelConfiguration, 1, /* stereoConfigIndex */
 1564|    849|              -1, /* nTimeSlots: read from bitstream */
 1565|    849|              eldExtLen, asc->configMode, &asc->SacConfigChanged);
 1566|    849|          if (ErrorStatus != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (1566:15): [True: 191, False: 658]
  ------------------
 1567|    191|            return TRANSPORTDEC_PARSE_ERROR;
 1568|    191|          }
 1569|    658|          if (esc->m_downscaledSamplingFrequency != asc->m_samplingFrequency) {
  ------------------
  |  Branch (1569:15): [True: 30, False: 628]
  ------------------
 1570|     30|            return TRANSPORTDEC_UNSUPPORTED_FORMAT; /* ELDv2 w/ ELD downscaled
 1571|       |                                                       mode not allowed */
 1572|     30|          }
 1573|    628|          break;
 1574|    658|        }
 1575|       |
 1576|      0|        FDK_FALLTHROUGH;
  ------------------
  |  |  386|      0|#define FDK_FALLTHROUGH [[clang::fallthrough]]
  ------------------
 1577|    210|      default:
  ------------------
  |  Branch (1577:7): [True: 210, False: 1.22k]
  ------------------
 1578|  1.60M|        for (cnt = 0; cnt < eldExtLen; cnt++) {
  ------------------
  |  Branch (1578:23): [True: 1.60M, False: 210]
  ------------------
 1579|  1.60M|          FDKreadBits(hBs, 8);
 1580|  1.60M|        }
 1581|    210|        break;
 1582|       |
 1583|    380|      case ELDEXT_DOWNSCALEINFO:
  ------------------
  |  Branch (1583:7): [True: 380, False: 1.05k]
  ------------------
 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: 22, False: 356]
  ------------------
 1589|     24|          return TRANSPORTDEC_PARSE_ERROR;
 1590|     24|        }
 1591|    356|        downscale_fill_nibble = FDKreadBits(hBs, 4);
 1592|    356|        if (downscale_fill_nibble != 0x0) {
  ------------------
  |  Branch (1592:13): [True: 5, False: 351]
  ------------------
 1593|      5|          return TRANSPORTDEC_PARSE_ERROR;
 1594|      5|        }
 1595|    351|        if (esc->m_useLdQmfTimeAlign == 1) {
  ------------------
  |  Branch (1595:13): [True: 1, False: 350]
  ------------------
 1596|      1|          return TRANSPORTDEC_UNSUPPORTED_FORMAT; /* ELDv2 w/ ELD downscaled
 1597|       |                                                     mode not allowed */
 1598|      1|        }
 1599|    350|        break;
 1600|  1.43k|    }
 1601|  1.43k|  }
 1602|  1.20k|  if (eldExtType != ELDEXT_TERM) {
  ------------------
  |  Branch (1602:7): [True: 18, False: 1.18k]
  ------------------
 1603|     18|    return TRANSPORTDEC_PARSE_ERROR;
 1604|     18|  }
 1605|       |
 1606|  1.18k|  if ((INT)FDKgetValidBits(hBs) < 0) {
  ------------------
  |  Branch (1606:7): [True: 133, False: 1.05k]
  ------------------
 1607|    133|    return TRANSPORTDEC_PARSE_ERROR;
 1608|    133|  }
 1609|       |
 1610|  1.05k|  if (esc->m_sbrPresentFlag == 1 && numSbrHeader != 0) {
  ------------------
  |  Branch (1610:7): [True: 774, False: 281]
  |  Branch (1610:37): [True: 773, False: 1]
  ------------------
 1611|    773|    INT dsFactor = 1; /* Downscale factor must be 1 or even for SBR */
 1612|    773|    if (esc->m_downscaledSamplingFrequency != 0) {
  ------------------
  |  Branch (1612:9): [True: 773, False: 0]
  ------------------
 1613|    773|      if (asc->m_samplingFrequency % esc->m_downscaledSamplingFrequency != 0) {
  ------------------
  |  Branch (1613:11): [True: 10, False: 763]
  ------------------
 1614|     10|        return TRANSPORTDEC_UNSUPPORTED_FORMAT;
 1615|     10|      }
 1616|    763|      dsFactor = asc->m_samplingFrequency / esc->m_downscaledSamplingFrequency;
 1617|    763|      if (dsFactor != 1 && (dsFactor)&1) {
  ------------------
  |  Branch (1617:11): [True: 50, False: 713]
  |  Branch (1617:28): [True: 1, False: 49]
  ------------------
 1618|      1|        return TRANSPORTDEC_UNSUPPORTED_FORMAT; /* SBR needs an even downscale
 1619|       |                                                   factor */
 1620|      1|      }
 1621|    762|      if (dsFactor != 1 && dsFactor != 2 && dsFactor != 4) {
  ------------------
  |  Branch (1621:11): [True: 49, False: 713]
  |  Branch (1621:28): [True: 42, False: 7]
  |  Branch (1621:45): [True: 31, False: 11]
  ------------------
 1622|     31|        dsFactor = 1; /* don't apply dsf for not yet supported even dsfs */
 1623|     31|      }
 1624|    762|      if ((INT)asc->m_samplesPerFrame % dsFactor != 0) {
  ------------------
  |  Branch (1624:11): [True: 0, False: 762]
  ------------------
 1625|      0|        return TRANSPORTDEC_UNSUPPORTED_FORMAT; /* frameSize/dsf must be an
 1626|       |                                                   integer number */
 1627|      0|      }
 1628|    762|    }
 1629|    762|    eldExtLenSum = eldExtLenSum - FDKgetValidBits(hBs);
 1630|    762|    FDKpushBack(hBs, eldExtLenSum + ldSbrLen);
 1631|    762|    if (0 != ld_sbr_header(asc, dsFactor, hBs, cb)) {
  ------------------
  |  Branch (1631:9): [True: 171, False: 591]
  ------------------
 1632|    171|      return TRANSPORTDEC_PARSE_ERROR;
 1633|    171|    }
 1634|    591|    FDKpushFor(hBs, eldExtLenSum);
 1635|    591|  }
 1636|    873|  return (ErrorStatus);
 1637|  1.05k|}
tpdec_asc.cpp:_ZL13skipSbrHeaderP13FDK_BITSTREAMi:
 1410|  1.71k|static INT skipSbrHeader(HANDLE_FDK_BITSTREAM hBs, int isUsac) {
 1411|       |  /* Dummy parse SbrDfltHeader() */
 1412|  1.71k|  INT dflt_header_extra1, dflt_header_extra2, bitsToSkip = 0;
 1413|       |
 1414|  1.71k|  if (!isUsac) {
  ------------------
  |  Branch (1414:7): [True: 1.55k, False: 162]
  ------------------
 1415|  1.55k|    bitsToSkip = 6;
 1416|  1.55k|    FDKpushFor(hBs, 6); /* amp res 1, xover freq 3, reserved 2 */
 1417|  1.55k|  }
 1418|  1.71k|  bitsToSkip += 8;
 1419|  1.71k|  FDKpushFor(hBs, 8); /* start / stop freq */
 1420|  1.71k|  bitsToSkip += 2;
 1421|  1.71k|  dflt_header_extra1 = FDKreadBit(hBs);
 1422|  1.71k|  dflt_header_extra2 = FDKreadBit(hBs);
 1423|  1.71k|  bitsToSkip += 5 * dflt_header_extra1 + 6 * dflt_header_extra2;
 1424|  1.71k|  FDKpushFor(hBs, 5 * dflt_header_extra1 + 6 * dflt_header_extra2);
 1425|       |
 1426|  1.71k|  return bitsToSkip;
 1427|  1.71k|}
tpdec_asc.cpp:_ZL13ld_sbr_headerP21CSAudioSpecificConfigiP13FDK_BITSTREAMP13CSTpCallBacks:
 1430|    762|                         HANDLE_FDK_BITSTREAM hBs, CSTpCallBacks *cb) {
 1431|    762|  const int channelConfiguration = asc->m_channelConfiguration;
 1432|    762|  int i = 0, j = 0;
 1433|    762|  INT error = 0;
 1434|    762|  MP4_ELEMENT_ID element = ID_NONE;
 1435|       |
 1436|       |  /* check whether the channelConfiguration is defined in
 1437|       |   * channel_configuration_array */
 1438|    762|  if (channelConfiguration < 0 ||
  ------------------
  |  Branch (1438:7): [True: 0, False: 762]
  ------------------
 1439|    762|      channelConfiguration > (INT)(sizeof(channel_configuration_array) /
  ------------------
  |  Branch (1439:7): [True: 0, False: 762]
  ------------------
 1440|    762|                                       sizeof(MP4_ELEMENT_ID **) -
 1441|    762|                                   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.14k|  while ((element = channel_configuration_array[channelConfiguration][j]) !=
  ------------------
  |  Branch (1446:10): [True: 1.55k, False: 591]
  ------------------
 1447|  2.14k|         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.55k|    if (element == ID_SCE || element == ID_CPE || element == ID_LFE) {
  ------------------
  |  Branch (1452:9): [True: 692, False: 861]
  |  Branch (1452:30): [True: 725, False: 136]
  |  Branch (1452:51): [True: 136, False: 0]
  ------------------
 1453|  1.55k|      error |= cb->cbSbr(
 1454|  1.55k|          cb->cbSbrData, hBs, asc->m_samplingFrequency / dsFactor,
 1455|  1.55k|          asc->m_extensionSamplingFrequency / dsFactor,
 1456|  1.55k|          asc->m_samplesPerFrame / dsFactor, AOT_ER_AAC_ELD, element, i++, 0, 0,
 1457|  1.55k|          asc->configMode, &asc->SbrConfigChanged, dsFactor);
 1458|  1.55k|      if (error != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (1458:11): [True: 171, False: 1.38k]
  ------------------
 1459|    171|        goto bail;
 1460|    171|      }
 1461|  1.55k|    }
 1462|  1.38k|    j++;
 1463|  1.38k|  }
 1464|    762|bail:
 1465|    762|  return error;
 1466|    762|}
tpdec_asc.cpp:_ZL16UsacConfig_ParseP21CSAudioSpecificConfigP13FDK_BITSTREAMP13CSTpCallBacks:
 2128|  7.27k|                                           CSTpCallBacks *cb) {
 2129|  7.27k|  int usacSamplingFrequency, channelConfigurationIndex, coreSbrFrameLengthIndex;
 2130|  7.27k|  TRANSPORTDEC_ERROR err = TRANSPORTDEC_OK;
 2131|       |
 2132|       |  /* Start bit position of usacConfig */
 2133|  7.27k|  INT nbits = (INT)FDKgetValidBits(hBs);
 2134|       |
 2135|  7.27k|  usacSamplingFrequency = getSampleRate(hBs, &asc->m_samplingFrequencyIndex, 5);
 2136|  7.27k|  if (usacSamplingFrequency == 0 || usacSamplingFrequency > 96000) {
  ------------------
  |  Branch (2136:7): [True: 2, False: 7.27k]
  |  Branch (2136:37): [True: 20, False: 7.25k]
  ------------------
 2137|     22|    return TRANSPORTDEC_PARSE_ERROR;
 2138|     22|  }
 2139|  7.25k|  asc->m_samplingFrequency = (UINT)usacSamplingFrequency;
 2140|       |
 2141|  7.25k|  coreSbrFrameLengthIndex = FDKreadBits(hBs, 3);
 2142|  7.25k|  if (UsacConfig_SetCoreSbrFrameLengthIndex(asc, coreSbrFrameLengthIndex) !=
  ------------------
  |  Branch (2142:7): [True: 1, False: 7.25k]
  ------------------
 2143|  7.25k|      TRANSPORTDEC_OK) {
 2144|      1|    return TRANSPORTDEC_PARSE_ERROR;
 2145|      1|  }
 2146|       |
 2147|  7.25k|  channelConfigurationIndex = FDKreadBits(hBs, 5);
 2148|  7.25k|  if (channelConfigurationIndex > 2) {
  ------------------
  |  Branch (2148:7): [True: 8, False: 7.24k]
  ------------------
 2149|      8|    return TRANSPORTDEC_PARSE_ERROR; /* only channelConfigurationIndex = [1,2]
 2150|       |                                        are supported */
 2151|      8|  }
 2152|       |
 2153|  7.24k|  if (channelConfigurationIndex == 0) {
  ------------------
  |  Branch (2153:7): [True: 29, False: 7.21k]
  ------------------
 2154|     29|    return TRANSPORTDEC_PARSE_ERROR; /* only channelConfigurationIndex = [1,2]
 2155|       |                                        are supported */
 2156|     29|  }
 2157|  7.21k|  asc->m_channelConfiguration = channelConfigurationIndex;
 2158|       |
 2159|  7.21k|  err = UsacRsv60DecoderConfig_Parse(asc, hBs, cb);
 2160|  7.21k|  if (err != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (2160:7): [True: 2.80k, False: 4.40k]
  ------------------
 2161|  2.80k|    return err;
 2162|  2.80k|  }
 2163|       |
 2164|  4.40k|  if (FDKreadBits(hBs, 1)) { /* usacConfigExtensionPresent */
  ------------------
  |  Branch (2164:7): [True: 2.49k, False: 1.91k]
  ------------------
 2165|  2.49k|    err = configExtension(&asc->m_sc.m_usacConfig, hBs, cb);
 2166|  2.49k|    if (err != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (2166:9): [True: 458, False: 2.03k]
  ------------------
 2167|    458|      return err;
 2168|    458|    }
 2169|  2.49k|  } else if (cb->cbUniDrc != NULL) {
  ------------------
  |  Branch (2169:14): [True: 1.91k, False: 0]
  ------------------
 2170|       |    /* no loudnessInfoSet contained. Clear the loudnessInfoSet struct by feeding
 2171|       |     * an empty config extension */
 2172|  1.91k|    err = (TRANSPORTDEC_ERROR)cb->cbUniDrc(
 2173|  1.91k|        cb->cbUniDrcData, NULL, 0, 1 /* loudnessInfoSet */, 0, 0, asc->m_aot);
 2174|  1.91k|    if (err != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (2174:9): [True: 0, False: 1.91k]
  ------------------
 2175|      0|      return err;
 2176|      0|    }
 2177|  1.91k|  }
 2178|       |
 2179|       |  /* sanity check whether number of channels signaled in UsacDecoderConfig()
 2180|       |     matches the number of channels required by channelConfigurationIndex */
 2181|  3.94k|  if ((channelConfigurationIndex > 0) &&
  ------------------
  |  Branch (2181:7): [True: 3.94k, False: 0]
  ------------------
 2182|  3.94k|      (sc_chan_config_tab[channelConfigurationIndex].nCh !=
  ------------------
  |  Branch (2182:7): [True: 0, False: 3.94k]
  ------------------
 2183|  3.94k|       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.94k|  INT configSize_bits = (INT)FDKgetValidBits(hBs) - nbits;
 2189|  3.94k|  if (StoreConfigAsBitstream(hBs, configSize_bits,
  ------------------
  |  Branch (2189:7): [True: 25, False: 3.92k]
  ------------------
 2190|  3.94k|                             asc->m_sc.m_usacConfig.UsacConfig,
 2191|  3.94k|                             TP_USAC_MAX_CONFIG_LEN)) {
  ------------------
  |  |  121|  3.94k|  512 /* next power of two of maximum of escapedValue(hBs, 4, 4, 8) in \
  ------------------
 2192|     25|    return TRANSPORTDEC_PARSE_ERROR;
 2193|     25|  }
 2194|  3.92k|  asc->m_sc.m_usacConfig.UsacConfigBits = fAbs(configSize_bits);
 2195|       |
 2196|  3.92k|  return err;
 2197|  3.94k|}
tpdec_asc.cpp:_ZL28UsacRsv60DecoderConfig_ParseP21CSAudioSpecificConfigP13FDK_BITSTREAMPK13CSTpCallBacks:
 1855|  7.21k|    const CSTpCallBacks *cb) {
 1856|  7.21k|  TRANSPORTDEC_ERROR ErrorStatus = TRANSPORTDEC_OK;
 1857|  7.21k|  CSUsacConfig *usc = &asc->m_sc.m_usacConfig;
 1858|  7.21k|  int i, numberOfElements;
 1859|  7.21k|  int channelElementIdx =
 1860|  7.21k|      0; /* index for elements which contain audio channels (sce, cpe, lfe) */
 1861|  7.21k|  SC_CHANNEL_CONFIG sc_chan_config = {0, 0, 0, 0};
 1862|  7.21k|  int uniDrcElement =
 1863|  7.21k|      -1; /* index of uniDrc extension element. -1 if not contained. */
 1864|       |
 1865|  7.21k|  numberOfElements = (int)escapedValue(hBs, 4, 8, 16) + 1;
 1866|  7.21k|  usc->m_usacNumElements = numberOfElements;
 1867|  7.21k|  if (numberOfElements > TP_USAC_MAX_ELEMENTS) {
  ------------------
  |  |  118|  7.21k|#define TP_USAC_MAX_ELEMENTS ((24) + TP_USAC_MAX_EXT_ELEMENTS)
  |  |  ------------------
  |  |  |  |  116|  7.21k|#define TP_USAC_MAX_EXT_ELEMENTS ((24))
  |  |  ------------------
  ------------------
  |  Branch (1867:7): [True: 6, False: 7.20k]
  ------------------
 1868|      6|    return TRANSPORTDEC_UNSUPPORTED_FORMAT;
 1869|      6|  }
 1870|  7.20k|  usc->m_nUsacChannels = 0;
 1871|  7.20k|  usc->m_channelConfigurationIndex = asc->m_channelConfiguration;
 1872|       |
 1873|  7.20k|  if (asc->m_aot == AOT_USAC) {
  ------------------
  |  Branch (1873:7): [True: 7.20k, False: 0]
  ------------------
 1874|  7.20k|    sc_chan_config = sc_chan_config_tab[usc->m_channelConfigurationIndex];
 1875|       |
 1876|  7.20k|    if (sc_chan_config.nCh > (SCHAR)TP_USAC_MAX_SPEAKERS) {
  ------------------
  |  |  114|  7.20k|#define TP_USAC_MAX_SPEAKERS (24)
  ------------------
  |  Branch (1876:9): [True: 0, False: 7.20k]
  ------------------
 1877|      0|      return TRANSPORTDEC_PARSE_ERROR;
 1878|      0|    }
 1879|  7.20k|  }
 1880|       |
 1881|  58.7k|  for (i = 0; i < numberOfElements; i++) {
  ------------------
  |  Branch (1881:15): [True: 52.7k, False: 5.95k]
  ------------------
 1882|  52.7k|    MP4_ELEMENT_ID usacElementType = (MP4_ELEMENT_ID)(
 1883|  52.7k|        FDKreadBits(hBs, 2) | USAC_ID_BIT); /* set USAC_ID_BIT to map
  ------------------
  |  |  417|  52.7k|#define USAC_ID_BIT 16 /** USAC element IDs start at USAC_ID_BIT */
  ------------------
 1884|       |                                               usacElementType to
 1885|       |                                               MP4_ELEMENT_ID enum */
 1886|  52.7k|    usc->element[i].usacElementType = usacElementType;
 1887|       |
 1888|       |    /* sanity check: update element counter */
 1889|  52.7k|    if (asc->m_aot == AOT_USAC) {
  ------------------
  |  Branch (1889:9): [True: 52.7k, False: 0]
  ------------------
 1890|  52.7k|      switch (usacElementType) {
 1891|  4.53k|        case ID_USAC_SCE:
  ------------------
  |  Branch (1891:9): [True: 4.53k, False: 48.2k]
  ------------------
 1892|  4.53k|          sc_chan_config.nSCE--;
 1893|  4.53k|          break;
 1894|    199|        case ID_USAC_CPE:
  ------------------
  |  Branch (1894:9): [True: 199, False: 52.5k]
  ------------------
 1895|    199|          sc_chan_config.nCPE--;
 1896|    199|          break;
 1897|      3|        case ID_USAC_LFE:
  ------------------
  |  Branch (1897:9): [True: 3, False: 52.7k]
  ------------------
 1898|      3|          sc_chan_config.nLFE--;
 1899|      3|          break;
 1900|  48.0k|        default:
  ------------------
  |  Branch (1900:9): [True: 48.0k, False: 4.73k]
  ------------------
 1901|  48.0k|          break;
 1902|  52.7k|      }
 1903|  52.7k|      if (usc->m_channelConfigurationIndex) {
  ------------------
  |  Branch (1903:11): [True: 52.7k, False: 0]
  ------------------
 1904|       |        /* sanity check: no element counter may be smaller zero */
 1905|  52.7k|        if (sc_chan_config.nCPE < 0 || sc_chan_config.nSCE < 0 ||
  ------------------
  |  Branch (1905:13): [True: 6, False: 52.7k]
  |  Branch (1905:40): [True: 130, False: 52.6k]
  ------------------
 1906|  52.6k|            sc_chan_config.nLFE < 0) {
  ------------------
  |  Branch (1906:13): [True: 3, False: 52.6k]
  ------------------
 1907|    139|          return TRANSPORTDEC_PARSE_ERROR;
 1908|    139|        }
 1909|  52.7k|      }
 1910|  52.7k|    }
 1911|       |
 1912|  52.6k|    switch (usacElementType) {
 1913|  4.40k|      case ID_USAC_SCE:
  ------------------
  |  Branch (1913:7): [True: 4.40k, False: 48.2k]
  ------------------
 1914|       |        /* UsacCoreConfig() ISO/IEC FDIS 23003-3  Table 10 */
 1915|  4.40k|        if (FDKreadBit(hBs)) { /* tw_mdct */
  ------------------
  |  Branch (1915:13): [True: 1, False: 4.40k]
  ------------------
 1916|      1|          return TRANSPORTDEC_UNSUPPORTED_FORMAT;
 1917|      1|        }
 1918|  4.40k|        usc->element[i].m_noiseFilling = FDKreadBits(hBs, 1);
 1919|       |        /* end of UsacCoreConfig() */
 1920|  4.40k|        if (usc->m_sbrRatioIndex > 0) {
  ------------------
  |  Branch (1920:13): [True: 1.11k, False: 3.29k]
  ------------------
 1921|  1.11k|          if (cb->cbSbr == NULL) {
  ------------------
  |  Branch (1921:15): [True: 0, False: 1.11k]
  ------------------
 1922|      0|            return TRANSPORTDEC_UNKOWN_ERROR;
 1923|      0|          }
 1924|       |          /* SbrConfig() ISO/IEC FDIS 23003-3  Table 11 */
 1925|  1.11k|          usc->element[i].m_harmonicSBR = FDKreadBit(hBs);
 1926|  1.11k|          usc->element[i].m_interTes = FDKreadBit(hBs);
 1927|  1.11k|          usc->element[i].m_pvc = FDKreadBit(hBs);
 1928|  1.11k|          if (cb->cbSbr(cb->cbSbrData, hBs, asc->m_samplingFrequency,
  ------------------
  |  Branch (1928:15): [True: 29, False: 1.08k]
  ------------------
 1929|  1.11k|                        asc->m_extensionSamplingFrequency,
 1930|  1.11k|                        asc->m_samplesPerFrame, asc->m_aot, ID_SCE,
 1931|  1.11k|                        channelElementIdx, usc->element[i].m_harmonicSBR,
 1932|  1.11k|                        usc->element[i].m_stereoConfigIndex, asc->configMode,
 1933|  1.11k|                        &asc->SbrConfigChanged, 1)) {
 1934|     29|            return TRANSPORTDEC_PARSE_ERROR;
 1935|     29|          }
 1936|       |          /* end of SbrConfig() */
 1937|  1.11k|        }
 1938|  4.37k|        usc->m_nUsacChannels += 1;
 1939|  4.37k|        channelElementIdx++;
 1940|  4.37k|        break;
 1941|       |
 1942|    193|      case ID_USAC_CPE:
  ------------------
  |  Branch (1942:7): [True: 193, False: 52.4k]
  ------------------
 1943|       |        /* UsacCoreConfig() ISO/IEC FDIS 23003-3  Table 10 */
 1944|    193|        if (FDKreadBit(hBs)) { /* tw_mdct */
  ------------------
  |  Branch (1944:13): [True: 1, False: 192]
  ------------------
 1945|      1|          return TRANSPORTDEC_UNSUPPORTED_FORMAT;
 1946|      1|        }
 1947|    192|        usc->element[i].m_noiseFilling = FDKreadBits(hBs, 1);
 1948|       |        /* end of UsacCoreConfig() */
 1949|    192|        if (usc->m_sbrRatioIndex > 0) {
  ------------------
  |  Branch (1949:13): [True: 162, False: 30]
  ------------------
 1950|    162|          if (cb->cbSbr == NULL) return TRANSPORTDEC_UNKOWN_ERROR;
  ------------------
  |  Branch (1950:15): [True: 0, False: 162]
  ------------------
 1951|       |          /* SbrConfig() ISO/IEC FDIS 23003-3 */
 1952|    162|          usc->element[i].m_harmonicSBR = FDKreadBit(hBs);
 1953|    162|          usc->element[i].m_interTes = FDKreadBit(hBs);
 1954|    162|          usc->element[i].m_pvc = FDKreadBit(hBs);
 1955|    162|          {
 1956|    162|            INT bitsToSkip = skipSbrHeader(hBs, 1);
 1957|       |            /* read stereoConfigIndex */
 1958|    162|            usc->element[i].m_stereoConfigIndex = FDKreadBits(hBs, 2);
 1959|       |            /* rewind */
 1960|    162|            FDKpushBack(hBs, bitsToSkip + 2);
 1961|    162|          }
 1962|    162|          {
 1963|    162|            MP4_ELEMENT_ID el_type =
 1964|    162|                (usc->element[i].m_stereoConfigIndex == 1 ||
  ------------------
  |  Branch (1964:18): [True: 29, False: 133]
  ------------------
 1965|    133|                 usc->element[i].m_stereoConfigIndex == 2)
  ------------------
  |  Branch (1965:18): [True: 58, False: 75]
  ------------------
 1966|    162|                    ? ID_SCE
 1967|    162|                    : ID_CPE;
 1968|    162|            if (cb->cbSbr(cb->cbSbrData, hBs, asc->m_samplingFrequency,
  ------------------
  |  Branch (1968:17): [True: 7, False: 155]
  ------------------
 1969|    162|                          asc->m_extensionSamplingFrequency,
 1970|    162|                          asc->m_samplesPerFrame, asc->m_aot, el_type,
 1971|    162|                          channelElementIdx, usc->element[i].m_harmonicSBR,
 1972|    162|                          usc->element[i].m_stereoConfigIndex, asc->configMode,
 1973|    162|                          &asc->SbrConfigChanged, 1)) {
 1974|      7|              return TRANSPORTDEC_PARSE_ERROR;
 1975|      7|            }
 1976|    162|          }
 1977|       |          /* end of SbrConfig() */
 1978|       |
 1979|    155|          usc->element[i].m_stereoConfigIndex =
 1980|    155|              FDKreadBits(hBs, 2); /* Needed in RM5 syntax */
 1981|       |
 1982|    155|          if (usc->element[i].m_stereoConfigIndex > 0) {
  ------------------
  |  Branch (1982:15): [True: 119, False: 36]
  ------------------
 1983|    119|            if (cb->cbSsc != NULL) {
  ------------------
  |  Branch (1983:17): [True: 119, False: 0]
  ------------------
 1984|    119|              int samplesPerFrame = asc->m_samplesPerFrame;
 1985|       |
 1986|    119|              if (usc->m_sbrRatioIndex == 1) samplesPerFrame <<= 2;
  ------------------
  |  Branch (1986:19): [True: 57, False: 62]
  ------------------
 1987|    119|              if (usc->m_sbrRatioIndex == 2)
  ------------------
  |  Branch (1987:19): [True: 32, False: 87]
  ------------------
 1988|     32|                samplesPerFrame = (samplesPerFrame * 8) / 3;
 1989|    119|              if (usc->m_sbrRatioIndex == 3) samplesPerFrame <<= 1;
  ------------------
  |  Branch (1989:19): [True: 30, False: 89]
  ------------------
 1990|       |
 1991|       |              /* Mps212Config() ISO/IEC FDIS 23003-3 */
 1992|    119|              if (cb->cbSsc(cb->cbSscData, hBs, asc->m_aot,
  ------------------
  |  Branch (1992:19): [True: 24, False: 95]
  ------------------
 1993|    119|                            asc->m_extensionSamplingFrequency, samplesPerFrame,
 1994|    119|                            1, /* only downmix channels (residual channels are
 1995|       |                                  not counted) */
 1996|    119|                            usc->element[i].m_stereoConfigIndex,
 1997|    119|                            usc->m_coreSbrFrameLengthIndex,
 1998|    119|                            0, /* don't know the length */
 1999|    119|                            asc->configMode, &asc->SacConfigChanged)) {
 2000|     24|                return TRANSPORTDEC_PARSE_ERROR;
 2001|     24|              }
 2002|       |              /* end of Mps212Config() */
 2003|    119|            } else {
 2004|      0|              return TRANSPORTDEC_UNKOWN_ERROR;
 2005|      0|            }
 2006|    119|          }
 2007|    155|        } else {
 2008|     30|          usc->element[i].m_stereoConfigIndex = 0;
 2009|     30|        }
 2010|    161|        usc->m_nUsacChannels += 2;
 2011|       |
 2012|    161|        channelElementIdx++;
 2013|    161|        break;
 2014|       |
 2015|      0|      case ID_USAC_LFE:
  ------------------
  |  Branch (2015:7): [True: 0, False: 52.6k]
  ------------------
 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.0k|      case ID_USAC_EXT:
  ------------------
  |  Branch (2036:7): [True: 48.0k, False: 4.59k]
  ------------------
 2037|  48.0k|        ErrorStatus = extElementConfig(&usc->element[i].extElement, hBs, cb, 0,
 2038|  48.0k|                                       asc->m_samplesPerFrame, 0, asc->m_aot);
 2039|  48.0k|        if (usc->element[i].extElement.usacExtElementType ==
  ------------------
  |  Branch (2039:13): [True: 31.1k, False: 16.8k]
  ------------------
 2040|  48.0k|            ID_EXT_ELE_UNI_DRC) {
 2041|  31.1k|          uniDrcElement = i;
 2042|  31.1k|        }
 2043|       |
 2044|  48.0k|        if (ErrorStatus) {
  ------------------
  |  Branch (2044:13): [True: 1.05k, False: 46.9k]
  ------------------
 2045|  1.05k|          return ErrorStatus;
 2046|  1.05k|        }
 2047|  46.9k|        break;
 2048|       |
 2049|  46.9k|      default:
  ------------------
  |  Branch (2049:7): [True: 0, False: 52.6k]
  ------------------
 2050|       |        /* non USAC-element encountered */
 2051|      0|        return TRANSPORTDEC_PARSE_ERROR;
 2052|  52.6k|    }
 2053|  52.6k|  }
 2054|       |
 2055|  5.95k|  if (asc->m_aot == AOT_USAC) {
  ------------------
  |  Branch (2055:7): [True: 5.95k, False: 0]
  ------------------
 2056|  5.95k|    if (usc->m_channelConfigurationIndex) {
  ------------------
  |  Branch (2056:9): [True: 5.95k, False: 0]
  ------------------
 2057|       |      /* sanity check: all element counter must be zero */
 2058|  5.95k|      if (sc_chan_config.nCPE | sc_chan_config.nSCE | sc_chan_config.nLFE) {
  ------------------
  |  Branch (2058:11): [True: 1.54k, False: 4.40k]
  ------------------
 2059|  1.54k|        return TRANSPORTDEC_PARSE_ERROR;
 2060|  1.54k|      }
 2061|  5.95k|    } 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.95k|  }
 2070|       |
 2071|  4.40k|  if (uniDrcElement == -1 && cb->cbUniDrc != NULL) {
  ------------------
  |  Branch (2071:7): [True: 2.10k, False: 2.29k]
  |  Branch (2071:30): [True: 2.10k, False: 0]
  ------------------
 2072|       |    /* no uniDrcConfig contained. Clear the uniDrcConfig struct by feeding an
 2073|       |     * empty extension element */
 2074|  2.10k|    int subStreamIndex = 0;
 2075|  2.10k|    ErrorStatus = (TRANSPORTDEC_ERROR)cb->cbUniDrc(
 2076|  2.10k|        cb->cbUniDrcData, NULL, 0, 0 /* uniDrcConfig */, subStreamIndex, 0,
 2077|  2.10k|        asc->m_aot);
 2078|  2.10k|    if (ErrorStatus != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (2078:9): [True: 0, False: 2.10k]
  ------------------
 2079|      0|      return ErrorStatus;
 2080|      0|    }
 2081|  2.10k|  }
 2082|       |
 2083|  4.40k|  return ErrorStatus;
 2084|  4.40k|}
tpdec_asc.cpp:_ZL16extElementConfigP22CSUsacExtElementConfigP13FDK_BITSTREAMPK13CSTpCallBackshji17AUDIO_OBJECT_TYPE:
 1694|  48.0k|                                           const AUDIO_OBJECT_TYPE aot) {
 1695|  48.0k|  TRANSPORTDEC_ERROR ErrorStatus = TRANSPORTDEC_OK;
 1696|       |
 1697|  48.0k|  UINT usacExtElementType = escapedValue(hBs, 4, 8, 16);
 1698|       |
 1699|       |  /* recurve extension elements which are invalid for USAC */
 1700|  48.0k|  if (aot == AOT_USAC) {
  ------------------
  |  Branch (1700:7): [True: 48.0k, False: 0]
  ------------------
 1701|  48.0k|    switch (usacExtElementType) {
 1702|  1.21k|      case ID_EXT_ELE_FILL:
  ------------------
  |  Branch (1702:7): [True: 1.21k, False: 46.8k]
  ------------------
 1703|  4.48k|      case ID_EXT_ELE_MPEGS:
  ------------------
  |  Branch (1703:7): [True: 3.27k, False: 44.7k]
  ------------------
 1704|  4.71k|      case ID_EXT_ELE_SAOC:
  ------------------
  |  Branch (1704:7): [True: 229, False: 47.8k]
  ------------------
 1705|  7.28k|      case ID_EXT_ELE_AUDIOPREROLL:
  ------------------
  |  Branch (1705:7): [True: 2.56k, False: 45.4k]
  ------------------
 1706|  38.4k|      case ID_EXT_ELE_UNI_DRC:
  ------------------
  |  Branch (1706:7): [True: 31.1k, False: 16.8k]
  ------------------
 1707|  38.4k|        break;
 1708|  9.55k|      default:
  ------------------
  |  Branch (1708:7): [True: 9.55k, False: 38.4k]
  ------------------
 1709|  9.55k|        usacExtElementType = ID_EXT_ELE_UNKNOWN;
 1710|  9.55k|        break;
 1711|  48.0k|    }
 1712|  48.0k|  }
 1713|       |
 1714|  48.0k|  int usacExtElementConfigLength = escapedValue(hBs, 4, 8, 16);
 1715|  48.0k|  extElement->usacExtElementConfigLength = (USHORT)usacExtElementConfigLength;
 1716|  48.0k|  INT bsAnchor;
 1717|       |
 1718|  48.0k|  if (FDKreadBit(hBs)) /* usacExtElementDefaultLengthPresent */
  ------------------
  |  Branch (1718:7): [True: 11.1k, False: 36.8k]
  ------------------
 1719|  11.1k|    extElement->usacExtElementDefaultLength = escapedValue(hBs, 8, 16, 0) + 1;
 1720|  36.8k|  else
 1721|  36.8k|    extElement->usacExtElementDefaultLength = 0;
 1722|       |
 1723|  48.0k|  extElement->usacExtElementPayloadFrag = FDKreadBit(hBs);
 1724|       |
 1725|  48.0k|  bsAnchor = (INT)FDKgetValidBits(hBs);
 1726|       |
 1727|  48.0k|  switch (usacExtElementType) {
 1728|  9.55k|    case ID_EXT_ELE_UNKNOWN:
  ------------------
  |  Branch (1728:5): [True: 9.55k, False: 38.4k]
  ------------------
 1729|  10.7k|    case ID_EXT_ELE_FILL:
  ------------------
  |  Branch (1729:5): [True: 1.21k, False: 46.8k]
  ------------------
 1730|  10.7k|      break;
 1731|  2.56k|    case ID_EXT_ELE_AUDIOPREROLL:
  ------------------
  |  Branch (1731:5): [True: 2.56k, False: 45.4k]
  ------------------
 1732|       |      /* No configuration element */
 1733|  2.56k|      extElement->usacExtElementHasAudioPreRoll = 1;
 1734|  2.56k|      break;
 1735|  31.1k|    case ID_EXT_ELE_UNI_DRC: {
  ------------------
  |  Branch (1735:5): [True: 31.1k, False: 16.8k]
  ------------------
 1736|  31.1k|      if (cb->cbUniDrc != NULL) {
  ------------------
  |  Branch (1736:11): [True: 31.1k, False: 0]
  ------------------
 1737|  31.1k|        ErrorStatus = (TRANSPORTDEC_ERROR)cb->cbUniDrc(
 1738|  31.1k|            cb->cbUniDrcData, hBs, usacExtElementConfigLength,
 1739|  31.1k|            0, /* uniDrcConfig */
 1740|  31.1k|            subStreamIndex, 0, aot);
 1741|  31.1k|        if (ErrorStatus != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (1741:13): [True: 0, False: 31.1k]
  ------------------
 1742|      0|          return ErrorStatus;
 1743|      0|        }
 1744|  31.1k|      }
 1745|  31.1k|    } break;
 1746|  31.1k|    default:
  ------------------
  |  Branch (1746:5): [True: 3.50k, False: 44.5k]
  ------------------
 1747|  3.50k|      usacExtElementType = ID_EXT_ELE_UNKNOWN;
 1748|  3.50k|      break;
 1749|  48.0k|  }
 1750|  48.0k|  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.0k|  {
 1755|  48.0k|    INT left_bits = (usacExtElementConfigLength << 3) -
 1756|  48.0k|                    (bsAnchor - (INT)FDKgetValidBits(hBs));
 1757|  48.0k|    if (left_bits >= 0) {
  ------------------
  |  Branch (1757:9): [True: 46.9k, False: 1.05k]
  ------------------
 1758|  46.9k|      FDKpushFor(hBs, left_bits);
 1759|  46.9k|    } else {
 1760|       |      /* parsed too many bits */
 1761|  1.05k|      ErrorStatus = TRANSPORTDEC_PARSE_ERROR;
 1762|  1.05k|    }
 1763|  48.0k|  }
 1764|       |
 1765|  48.0k|  return ErrorStatus;
 1766|  48.0k|}
tpdec_asc.cpp:_ZL15configExtensionP12CSUsacConfigP13FDK_BITSTREAMPK13CSTpCallBacks:
 1775|  2.49k|                                          const CSTpCallBacks *cb) {
 1776|  2.49k|  TRANSPORTDEC_ERROR ErrorStatus = TRANSPORTDEC_OK;
 1777|       |
 1778|  2.49k|  int numConfigExtensions;
 1779|  2.49k|  UINT usacConfigExtType;
 1780|  2.49k|  int usacConfigExtLength;
 1781|  2.49k|  int loudnessInfoSetIndex =
 1782|  2.49k|      -1; /* index of loudnessInfoSet config extension. -1 if not contained. */
 1783|  2.49k|  int tmp_subStreamIndex = 0;
 1784|  2.49k|  AUDIO_OBJECT_TYPE tmp_aot = AOT_USAC;
 1785|       |
 1786|  2.49k|  numConfigExtensions = (int)escapedValue(hBs, 2, 4, 8) + 1;
 1787|  8.09k|  for (int confExtIdx = 0; confExtIdx < numConfigExtensions; confExtIdx++) {
  ------------------
  |  Branch (1787:28): [True: 6.06k, False: 2.03k]
  ------------------
 1788|  6.06k|    INT nbits;
 1789|  6.06k|    int loudnessInfoSetConfigExtensionPosition = FDKgetValidBits(hBs);
 1790|  6.06k|    usacConfigExtType = escapedValue(hBs, 4, 8, 16);
 1791|  6.06k|    usacConfigExtLength = (int)escapedValue(hBs, 4, 8, 16);
 1792|       |
 1793|       |    /* Start bit position of config extension */
 1794|  6.06k|    nbits = (INT)FDKgetValidBits(hBs);
 1795|       |
 1796|       |    /* Return an error in case the bitbuffer fill level is too low. */
 1797|  6.06k|    if (nbits < usacConfigExtLength * 8) {
  ------------------
  |  Branch (1797:9): [True: 66, False: 5.99k]
  ------------------
 1798|     66|      return TRANSPORTDEC_PARSE_ERROR;
 1799|     66|    }
 1800|       |
 1801|  5.99k|    switch (usacConfigExtType) {
 1802|  1.53k|      case ID_CONFIG_EXT_FILL:
  ------------------
  |  Branch (1802:7): [True: 1.53k, False: 4.45k]
  ------------------
 1803|  2.20k|        for (int i = 0; i < usacConfigExtLength; i++) {
  ------------------
  |  Branch (1803:25): [True: 675, False: 1.52k]
  ------------------
 1804|    675|          if (FDKreadBits(hBs, 8) != 0xa5) {
  ------------------
  |  Branch (1804:15): [True: 12, False: 663]
  ------------------
 1805|     12|            return TRANSPORTDEC_PARSE_ERROR;
 1806|     12|          }
 1807|    675|        }
 1808|  1.52k|        break;
 1809|  3.54k|      case ID_CONFIG_EXT_LOUDNESS_INFO: {
  ------------------
  |  Branch (1809:7): [True: 3.54k, False: 2.44k]
  ------------------
 1810|  3.54k|        if (cb->cbUniDrc != NULL) {
  ------------------
  |  Branch (1810:13): [True: 3.54k, False: 0]
  ------------------
 1811|  3.54k|          ErrorStatus = (TRANSPORTDEC_ERROR)cb->cbUniDrc(
 1812|  3.54k|              cb->cbUniDrcData, hBs, usacConfigExtLength,
 1813|  3.54k|              1, /* loudnessInfoSet */
 1814|  3.54k|              tmp_subStreamIndex, loudnessInfoSetConfigExtensionPosition,
 1815|  3.54k|              tmp_aot);
 1816|  3.54k|          if (ErrorStatus != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (1816:15): [True: 0, False: 3.54k]
  ------------------
 1817|      0|            return ErrorStatus;
 1818|      0|          }
 1819|  3.54k|          loudnessInfoSetIndex = confExtIdx;
 1820|  3.54k|        }
 1821|  3.54k|      } break;
 1822|  3.54k|      default:
  ------------------
  |  Branch (1822:7): [True: 911, False: 5.08k]
  ------------------
 1823|    911|        break;
 1824|  5.99k|    }
 1825|       |
 1826|       |    /* Skip remaining bits. If too many bits were parsed, assume error. */
 1827|  5.98k|    usacConfigExtLength =
 1828|  5.98k|        8 * usacConfigExtLength - (nbits - (INT)FDKgetValidBits(hBs));
 1829|  5.98k|    if (usacConfigExtLength < 0) {
  ------------------
  |  Branch (1829:9): [True: 380, False: 5.60k]
  ------------------
 1830|    380|      return TRANSPORTDEC_PARSE_ERROR;
 1831|    380|    }
 1832|  5.60k|    FDKpushFor(hBs, usacConfigExtLength);
 1833|  5.60k|  }
 1834|       |
 1835|  2.03k|  if (loudnessInfoSetIndex == -1 && cb->cbUniDrc != NULL) {
  ------------------
  |  Branch (1835:7): [True: 76, False: 1.95k]
  |  Branch (1835:37): [True: 76, False: 0]
  ------------------
 1836|       |    /* no loudnessInfoSet contained. Clear the loudnessInfoSet struct by feeding
 1837|       |     * an empty config extension */
 1838|     76|    ErrorStatus = (TRANSPORTDEC_ERROR)cb->cbUniDrc(
 1839|     76|        cb->cbUniDrcData, NULL, 0, 1 /* loudnessInfoSet */, tmp_subStreamIndex,
 1840|     76|        0, tmp_aot);
 1841|     76|    if (ErrorStatus != TRANSPORTDEC_OK) {
  ------------------
  |  Branch (1841:9): [True: 0, False: 76]
  ------------------
 1842|      0|      return ErrorStatus;
 1843|      0|    }
 1844|     76|  }
 1845|       |
 1846|  2.03k|  return ErrorStatus;
 1847|  2.03k|}
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.51k|  while (bitsAvailable >= 11) {
  ------------------
  |  Branch (2204:10): [True: 7.17k, False: 1.33k]
  ------------------
 2205|  7.17k|    lastAscExt = ascExtId;
 2206|  7.17k|    ascExtId = (TP_ASC_EXTENSION_ID)FDKreadBits(bs, 11);
 2207|  7.17k|    bitsAvailable -= 11;
 2208|       |
 2209|  7.17k|    switch (ascExtId) {
 2210|  1.54k|      case ASCEXT_SBR: /* 0x2b7 */
  ------------------
  |  Branch (2210:7): [True: 1.54k, False: 5.63k]
  ------------------
 2211|  1.54k|        if ((self->m_extensionAudioObjectType != AOT_SBR) &&
  ------------------
  |  Branch (2211:13): [True: 1.40k, False: 143]
  ------------------
 2212|  1.40k|            (bitsAvailable >= 5)) {
  ------------------
  |  Branch (2212:13): [True: 1.39k, False: 4]
  ------------------
 2213|  1.39k|          self->m_extensionAudioObjectType = getAOT(bs);
 2214|       |
 2215|  1.39k|          if ((self->m_extensionAudioObjectType == AOT_SBR) ||
  ------------------
  |  Branch (2215:15): [True: 54, False: 1.34k]
  ------------------
 2216|  1.34k|              (self->m_extensionAudioObjectType ==
  ------------------
  |  Branch (2216:15): [True: 427, False: 916]
  ------------------
 2217|  1.34k|               AOT_ER_BSAC)) { /* Get SBR extension configuration */
 2218|    481|            self->m_sbrPresentFlag = FDKreadBits(bs, 1);
 2219|    481|            if (self->m_aot == AOT_USAC && self->m_sbrPresentFlag > 0 &&
  ------------------
  |  Branch (2219:17): [True: 0, False: 481]
  |  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|    481|            if (self->m_sbrPresentFlag == 1) {
  ------------------
  |  Branch (2224:17): [True: 297, False: 184]
  ------------------
 2225|    297|              self->m_extensionSamplingFrequency = getSampleRate(
 2226|    297|                  bs, &self->m_extensionSamplingFrequencyIndex, 4);
 2227|       |
 2228|    297|              if (self->m_extensionSamplingFrequency == 0 ||
  ------------------
  |  Branch (2228:19): [True: 5, False: 292]
  ------------------
 2229|    292|                  self->m_extensionSamplingFrequency > 96000) {
  ------------------
  |  Branch (2229:19): [True: 18, False: 274]
  ------------------
 2230|     23|                return TRANSPORTDEC_PARSE_ERROR;
 2231|     23|              }
 2232|    297|            }
 2233|    458|            if (self->m_extensionAudioObjectType == AOT_ER_BSAC) {
  ------------------
  |  Branch (2233:17): [True: 414, False: 44]
  ------------------
 2234|    414|              self->m_extensionChannelConfiguration = FDKreadBits(bs, 4);
 2235|    414|            }
 2236|    458|          }
 2237|       |          /* Update counter because of variable length fields (AOT and sampling
 2238|       |           * rate) */
 2239|  1.37k|          bitsAvailable = (INT)FDKgetValidBits(bs);
 2240|  1.37k|        }
 2241|  1.52k|        break;
 2242|  1.52k|      case ASCEXT_PS: /* 0x548 */
  ------------------
  |  Branch (2242:7): [True: 798, False: 6.38k]
  ------------------
 2243|    798|        if ((lastAscExt == ASCEXT_SBR) &&
  ------------------
  |  Branch (2243:13): [True: 446, False: 352]
  ------------------
 2244|    446|            (self->m_extensionAudioObjectType == AOT_SBR) &&
  ------------------
  |  Branch (2244:13): [True: 114, False: 332]
  ------------------
 2245|    114|            (bitsAvailable > 0)) { /* Get PS extension configuration */
  ------------------
  |  Branch (2245:13): [True: 111, False: 3]
  ------------------
 2246|    111|          self->m_psPresentFlag = FDKreadBits(bs, 1);
 2247|    111|          bitsAvailable -= 1;
 2248|    111|        }
 2249|    798|        break;
 2250|    432|      case ASCEXT_MPS: /* 0x76a */
  ------------------
  |  Branch (2250:7): [True: 432, False: 6.74k]
  ------------------
 2251|    432|        if (self->m_extensionAudioObjectType == AOT_MPEGS) break;
  ------------------
  |  Branch (2251:13): [True: 68, False: 364]
  ------------------
 2252|    364|        FDK_FALLTHROUGH;
  ------------------
  |  |  386|    364|#define FDK_FALLTHROUGH [[clang::fallthrough]]
  ------------------
 2253|  2.45k|      case ASCEXT_LDMPS: /* 0x7cc */
  ------------------
  |  Branch (2253:7): [True: 2.08k, False: 5.09k]
  ------------------
 2254|  2.45k|        if ((ascExtId == ASCEXT_LDMPS) &&
  ------------------
  |  Branch (2254:13): [True: 2.08k, False: 364]
  ------------------
 2255|  2.08k|            (self->m_extensionAudioObjectType == AOT_LD_MPEGS))
  ------------------
  |  Branch (2255:13): [True: 194, False: 1.89k]
  ------------------
 2256|    194|          break;
 2257|  2.25k|        if (bitsAvailable >= 1) {
  ------------------
  |  Branch (2257:13): [True: 2.25k, False: 3]
  ------------------
 2258|  2.25k|          bitsAvailable -= 1;
 2259|  2.25k|          if (FDKreadBits(bs, 1)) { /* self->m_mpsPresentFlag */
  ------------------
  |  Branch (2259:15): [True: 1.03k, False: 1.22k]
  ------------------
 2260|  1.03k|            int sscLen = FDKreadBits(bs, 8);
 2261|  1.03k|            bitsAvailable -= 8;
 2262|  1.03k|            if (sscLen == 0xFF) {
  ------------------
  |  Branch (2262:17): [True: 44, False: 989]
  ------------------
 2263|     44|              sscLen += FDKreadBits(bs, 16);
 2264|     44|              bitsAvailable -= 16;
 2265|     44|            }
 2266|  1.03k|            FDKpushFor(bs, sscLen); /* Skip SSC to be able to read the next
 2267|       |                                       extension if there is one. */
 2268|       |
 2269|  1.03k|            bitsAvailable -= sscLen * 8;
 2270|  1.03k|          }
 2271|  2.25k|        }
 2272|  2.25k|        break;
 2273|  2.18k|      case ASCEXT_SAOC:
  ------------------
  |  Branch (2273:7): [True: 2.18k, False: 4.99k]
  ------------------
 2274|  2.18k|        if ((ascExtId == ASCEXT_SAOC) &&
  ------------------
  |  Branch (2274:13): [True: 2.18k, False: 0]
  ------------------
 2275|  2.18k|            (self->m_extensionAudioObjectType == AOT_SAOC))
  ------------------
  |  Branch (2275:13): [True: 194, False: 1.98k]
  ------------------
 2276|    194|          break;
 2277|  1.98k|        if (FDKreadBits(bs, 1)) { /* saocPresent */
  ------------------
  |  Branch (2277:13): [True: 1.11k, False: 877]
  ------------------
 2278|  1.11k|          int saocscLen = FDKreadBits(bs, 8);
 2279|  1.11k|          bitsAvailable -= 8;
 2280|  1.11k|          if (saocscLen == 0xFF) {
  ------------------
  |  Branch (2280:15): [True: 33, False: 1.07k]
  ------------------
 2281|     33|            saocscLen += FDKreadBits(bs, 16);
 2282|     33|            bitsAvailable -= 16;
 2283|     33|          }
 2284|  1.11k|          FDKpushFor(bs, saocscLen);
 2285|  1.11k|          bitsAvailable -= saocscLen * 8;
 2286|  1.11k|        }
 2287|  1.98k|        break;
 2288|    133|      default:
  ------------------
  |  Branch (2288:7): [True: 133, False: 7.04k]
  ------------------
 2289|       |        /* Just ignore anything. */
 2290|    133|        return TRANSPORTDEC_OK;
 2291|  7.17k|    }
 2292|  7.17k|  }
 2293|       |
 2294|  1.33k|  return TRANSPORTDEC_OK;
 2295|  1.49k|}
tpdec_asc.cpp:_ZL22StoreConfigAsBitstreamP13FDK_BITSTREAMiPht:
 1647|  7.87k|    UCHAR *configTargetBuffer, const USHORT configTargetBufferSize_bytes) {
 1648|  7.87k|  FDK_BITSTREAM usacConf;
 1649|  7.87k|  UINT const nBits = fAbs(configSize_bits);
 1650|  7.87k|  UINT j, tmp;
 1651|       |
 1652|  7.87k|  if (nBits > 8 * (UINT)configTargetBufferSize_bytes) {
  ------------------
  |  Branch (1652:7): [True: 28, False: 7.84k]
  ------------------
 1653|     28|    return 1;
 1654|     28|  }
 1655|  7.84k|  FDKmemclear(configTargetBuffer, configTargetBufferSize_bytes);
 1656|       |
 1657|  7.84k|  FDKinitBitStream(&usacConf, configTargetBuffer, configTargetBufferSize_bytes,
 1658|  7.84k|                   nBits, BS_WRITER);
 1659|  7.84k|  if (configSize_bits < 0) {
  ------------------
  |  Branch (1659:7): [True: 7.84k, False: 0]
  ------------------
 1660|  7.84k|    FDKpushBack(hBs, nBits);
 1661|  7.84k|  }
 1662|   118k|  for (j = nBits; j > 31; j -= 32) {
  ------------------
  |  Branch (1662:19): [True: 110k, False: 7.84k]
  ------------------
 1663|   110k|    tmp = FDKreadBits(hBs, 32);
 1664|   110k|    FDKwriteBits(&usacConf, tmp, 32);
 1665|   110k|  }
 1666|  7.84k|  if (j > 0) {
  ------------------
  |  Branch (1666:7): [True: 7.51k, False: 328]
  ------------------
 1667|  7.51k|    tmp = FDKreadBits(hBs, j);
 1668|  7.51k|    FDKwriteBits(&usacConf, tmp, j);
 1669|  7.51k|  }
 1670|  7.84k|  FDKsyncCache(&usacConf);
 1671|  7.84k|  if (configSize_bits > 0) {
  ------------------
  |  Branch (1671:7): [True: 0, False: 7.84k]
  ------------------
 1672|      0|    FDKpushBack(hBs, nBits);
 1673|      0|  }
 1674|       |
 1675|  7.84k|  return 0;
 1676|  7.87k|}
tpdec_asc.cpp:_ZL37UsacConfig_SetCoreSbrFrameLengthIndexP21CSAudioSpecificConfigi:
 2088|  7.25k|    CSAudioSpecificConfig *asc, int coreSbrFrameLengthIndex) {
 2089|  7.25k|  int sbrRatioIndex_val;
 2090|       |
 2091|  7.25k|  if (coreSbrFrameLengthIndex > 4) {
  ------------------
  |  Branch (2091:7): [True: 1, False: 7.25k]
  ------------------
 2092|      1|    return TRANSPORTDEC_PARSE_ERROR; /* reserved values */
 2093|      1|  }
 2094|  7.25k|  asc->m_sc.m_usacConfig.m_coreSbrFrameLengthIndex = coreSbrFrameLengthIndex;
 2095|  7.25k|  asc->m_samplesPerFrame = usacFrameLength[coreSbrFrameLengthIndex];
 2096|  7.25k|  sbrRatioIndex_val = sbrRatioIndex[coreSbrFrameLengthIndex];
 2097|  7.25k|  asc->m_sc.m_usacConfig.m_sbrRatioIndex = sbrRatioIndex_val;
 2098|       |
 2099|  7.25k|  if (sbrRatioIndex_val > 0) {
  ------------------
  |  Branch (2099:7): [True: 2.63k, False: 4.61k]
  ------------------
 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|  1.05k|      case 1: /* sbrRatio = 4:1 */
  ------------------
  |  Branch (2104:7): [True: 1.05k, False: 1.58k]
  ------------------
 2105|  1.05k|        asc->m_samplingFrequency >>= 2;
 2106|  1.05k|        asc->m_samplesPerFrame >>= 2;
 2107|  1.05k|        break;
 2108|    942|      case 2: /* sbrRatio = 8:3 */
  ------------------
  |  Branch (2108:7): [True: 942, False: 1.69k]
  ------------------
 2109|    942|        asc->m_samplingFrequency = (asc->m_samplingFrequency * 3) / 8;
 2110|    942|        asc->m_samplesPerFrame = (asc->m_samplesPerFrame * 3) / 8;
 2111|    942|        break;
 2112|    644|      case 3: /* sbrRatio = 2:1 */
  ------------------
  |  Branch (2112:7): [True: 644, False: 1.99k]
  ------------------
 2113|    644|        asc->m_samplingFrequency >>= 1;
 2114|    644|        asc->m_samplesPerFrame >>= 1;
 2115|    644|        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.25k|  return TRANSPORTDEC_OK;
 2124|  7.25k|}

_Z17transportDec_Open14TRANSPORT_TYPEjj:
  192|  7.35k|                                      const UINT flags, const UINT nrOfLayers) {
  193|  7.35k|  HANDLE_TRANSPORTDEC hInput;
  194|       |
  195|  7.35k|  hInput = GetRam_TransportDecoder(0);
  196|  7.35k|  if (hInput == NULL) {
  ------------------
  |  Branch (196:7): [True: 0, False: 7.35k]
  ------------------
  197|      0|    return NULL;
  198|      0|  }
  199|       |
  200|       |  /* Init transportDec struct. */
  201|  7.35k|  hInput->transportFmt = transportFmt;
  202|       |
  203|  7.35k|  switch (transportFmt) {
  204|  7.35k|    case TT_MP4_ADIF:
  ------------------
  |  Branch (204:5): [True: 7.35k, False: 0]
  ------------------
  205|  7.35k|      break;
  206|       |
  207|      0|    case TT_MP4_ADTS:
  ------------------
  |  Branch (207:5): [True: 0, False: 7.35k]
  ------------------
  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.35k]
  ------------------
  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.35k]
  ------------------
  222|      0|    case TT_MP4_LATM_MCP1:
  ------------------
  |  Branch (222:5): [True: 0, False: 7.35k]
  ------------------
  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.35k]
  ------------------
  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.35k]
  ------------------
  231|      0|      break;
  232|       |
  233|      0|    default:
  ------------------
  |  Branch (233:5): [True: 0, False: 7.35k]
  ------------------
  234|      0|      FreeRam_TransportDecoder(&hInput);
  235|      0|      hInput = NULL;
  236|      0|      break;
  237|  7.35k|  }
  238|       |
  239|  7.35k|  if (hInput != NULL) {
  ------------------
  |  Branch (239:7): [True: 7.35k, False: 0]
  ------------------
  240|       |    /* Create bitstream */
  241|  7.35k|    {
  242|  7.35k|      hInput->bsBuffer = GetRam_TransportDecoderBuffer(0);
  243|  7.35k|      if (hInput->bsBuffer == NULL) {
  ------------------
  |  Branch (243:11): [True: 0, False: 7.35k]
  ------------------
  244|      0|        transportDec_Close(&hInput);
  245|      0|        return NULL;
  246|      0|      }
  247|  7.35k|      if (nrOfLayers > 1) {
  ------------------
  |  Branch (247:11): [True: 0, False: 7.35k]
  ------------------
  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.35k, False: 7.35k]
  ------------------
  252|  7.35k|        FDKinitBitStream(&hInput->bitStream[i], hInput->bsBuffer, (8192 * 4), 0,
  253|  7.35k|                         BS_READER);
  254|  7.35k|      }
  255|  7.35k|    }
  256|      0|    hInput->burstPeriod = 0;
  257|  7.35k|  }
  258|       |
  259|  7.35k|  return hInput;
  260|  7.35k|}
_Z28transportDec_OutOfBandConfigP12TRANSPORTDECPhjj:
  264|  7.35k|                                                UINT layer) {
  265|  7.35k|  int i;
  266|       |
  267|  7.35k|  TRANSPORTDEC_ERROR err = TRANSPORTDEC_OK;
  268|       |
  269|  7.35k|  FDK_BITSTREAM bs;
  270|  7.35k|  HANDLE_FDK_BITSTREAM hBs = &bs;
  271|       |
  272|  7.35k|  int fConfigFound = 0;
  273|       |
  274|  7.35k|  UCHAR configChanged = 0;
  275|  7.35k|  UCHAR configMode = AC_CM_DET_CFG_CHANGE;
  ------------------
  |  |  334|  7.35k|  0x000001 /*!< Config mode signalizes the callback to work in config change \
  ------------------
  276|       |
  277|  7.35k|  UCHAR tmpConf[1024] = {0};
  278|  7.35k|  if (length > 1024) {
  ------------------
  |  Branch (278:7): [True: 0, False: 7.35k]
  ------------------
  279|      0|    return TRANSPORTDEC_UNSUPPORTED_FORMAT;
  280|      0|  }
  281|  7.35k|  FDKmemcpy(tmpConf, conf, length);
  282|  7.35k|  FDKinitBitStream(hBs, tmpConf, 1024, length << 3, BS_READER);
  283|       |
  284|  13.2k|  for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (284:15): [True: 10.4k, False: 2.85k]
  ------------------
  285|  10.4k|    if (i > 0) {
  ------------------
  |  Branch (285:9): [True: 3.05k, False: 7.35k]
  ------------------
  286|  3.05k|      FDKpushBack(hBs, (INT)length * 8 - (INT)FDKgetValidBits(hBs));
  287|  3.05k|      configMode = AC_CM_ALLOC_MEM;
  ------------------
  |  |  337|  3.05k|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
  288|  3.05k|    }
  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.09k]
  ------------------
  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: 410, False: 5.90k]
  ------------------
  319|    410|            err = TRANSPORTDEC_PARSE_ERROR;
  320|    410|          }
  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.90k, False: 4.50k]
  ------------------
  341|  5.90k|      if ((i == 0) && (hTp->asc[layer].AacConfigChanged ||
  ------------------
  |  Branch (341:11): [True: 3.05k, False: 2.85k]
  |  Branch (341:24): [True: 3.05k, False: 0]
  ------------------
  342|      0|                       hTp->asc[layer].SbrConfigChanged ||
  ------------------
  |  Branch (342:24): [True: 0, False: 0]
  ------------------
  343|  3.05k|                       hTp->asc[layer].SacConfigChanged)) {
  ------------------
  |  Branch (343:24): [True: 0, False: 0]
  ------------------
  344|  3.05k|        int errC;
  345|       |
  346|  3.05k|        configChanged = 1;
  347|  3.05k|        errC = hTp->callbacks.cbFreeMem(hTp->callbacks.cbFreeMemData,
  348|  3.05k|                                        &hTp->asc[layer]);
  349|  3.05k|        if (errC != 0) {
  ------------------
  |  Branch (349:13): [True: 0, False: 3.05k]
  ------------------
  350|      0|          err = TRANSPORTDEC_PARSE_ERROR;
  351|      0|        }
  352|  3.05k|      }
  353|  5.90k|    }
  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.50k, False: 5.90k]
  ------------------
  358|  4.50k|      break;
  359|  4.50k|    }
  360|  10.4k|  }
  361|       |
  362|  7.35k|  if (err == TRANSPORTDEC_OK && fConfigFound) {
  ------------------
  |  Branch (362:7): [True: 2.85k, False: 4.50k]
  |  Branch (362:33): [True: 2.85k, False: 0]
  ------------------
  363|  2.85k|    hTp->flags |= TPDEC_CONFIG_FOUND;
  ------------------
  |  |  178|  2.85k|#define TPDEC_CONFIG_FOUND 32
  ------------------
  364|  2.85k|  }
  365|       |
  366|  7.35k|  return err;
  367|  7.35k|}
_Z32transportDec_RegisterAscCallbackP12TRANSPORTDECPFiPvPK21CSAudioSpecificConfighPhES1_:
  571|  7.35k|                                     void *user_data) {
  572|  7.35k|  if (hTpDec == NULL) {
  ------------------
  |  Branch (572:7): [True: 0, False: 7.35k]
  ------------------
  573|      0|    return -1;
  574|      0|  }
  575|  7.35k|  hTpDec->callbacks.cbUpdateConfig = cbUpdateConfig;
  576|  7.35k|  hTpDec->callbacks.cbUpdateConfigData = user_data;
  577|  7.35k|  return 0;
  578|  7.35k|}
_Z36transportDec_RegisterFreeMemCallbackP12TRANSPORTDECPFiPvPK21CSAudioSpecificConfigES1_:
  582|  7.35k|                                         void *user_data) {
  583|  7.35k|  if (hTpDec == NULL) {
  ------------------
  |  Branch (583:7): [True: 0, False: 7.35k]
  ------------------
  584|      0|    return -1;
  585|      0|  }
  586|  7.35k|  hTpDec->callbacks.cbFreeMem = cbFreeMem;
  587|  7.35k|  hTpDec->callbacks.cbFreeMemData = user_data;
  588|  7.35k|  return 0;
  589|  7.35k|}
_Z42transportDec_RegisterCtrlCFGChangeCallbackP12TRANSPORTDECPFiPvPK14CCtrlCFGChangeES1_:
  593|  7.35k|    void *user_data) {
  594|  7.35k|  if (hTpDec == NULL) {
  ------------------
  |  Branch (594:7): [True: 0, False: 7.35k]
  ------------------
  595|      0|    return -1;
  596|      0|  }
  597|  7.35k|  hTpDec->callbacks.cbCtrlCFGChange = cbCtrlCFGChange;
  598|  7.35k|  hTpDec->callbacks.cbCtrlCFGChangeData = user_data;
  599|  7.35k|  return 0;
  600|  7.35k|}
_Z32transportDec_RegisterSscCallbackP12TRANSPORTDECPFiPvP13FDK_BITSTREAM17AUDIO_OBJECT_TYPEiiiiiihPhES1_:
  603|  7.35k|                                     const cbSsc_t cbSsc, void *user_data) {
  604|  7.35k|  if (hTpDec == NULL) {
  ------------------
  |  Branch (604:7): [True: 0, False: 7.35k]
  ------------------
  605|      0|    return -1;
  606|      0|  }
  607|  7.35k|  hTpDec->callbacks.cbSsc = cbSsc;
  608|  7.35k|  hTpDec->callbacks.cbSscData = user_data;
  609|  7.35k|  return 0;
  610|  7.35k|}
_Z32transportDec_RegisterSbrCallbackP12TRANSPORTDECPFiPvP13FDK_BITSTREAMiii17AUDIO_OBJECT_TYPE14MP4_ELEMENT_IDihhhPhiES1_:
  613|  7.35k|                                     const cbSbr_t cbSbr, void *user_data) {
  614|  7.35k|  if (hTpDec == NULL) {
  ------------------
  |  Branch (614:7): [True: 0, False: 7.35k]
  ------------------
  615|      0|    return -1;
  616|      0|  }
  617|  7.35k|  hTpDec->callbacks.cbSbr = cbSbr;
  618|  7.35k|  hTpDec->callbacks.cbSbrData = user_data;
  619|  7.35k|  return 0;
  620|  7.35k|}
_Z41transportDec_RegisterUniDrcConfigCallbackP12TRANSPORTDECPFiPvP13FDK_BITSTREAMiiii17AUDIO_OBJECT_TYPEES1_Pj:
  635|  7.35k|                                              UINT *pLoudnessInfoSetPosition) {
  636|  7.35k|  if (hTpDec == NULL) {
  ------------------
  |  Branch (636:7): [True: 0, False: 7.35k]
  ------------------
  637|      0|    return -1;
  638|      0|  }
  639|       |
  640|  7.35k|  hTpDec->callbacks.cbUniDrc = cbUniDrc;
  641|  7.35k|  hTpDec->callbacks.cbUniDrcData = user_data;
  642|       |
  643|  7.35k|  hTpDec->pLoudnessInfoSetPosition = pLoudnessInfoSetPosition;
  644|  7.35k|  return 0;
  645|  7.35k|}
_Z18transportDec_ClosePP12TRANSPORTDEC:
 1754|  7.35k|void transportDec_Close(HANDLE_TRANSPORTDEC *phTp) {
 1755|  7.35k|  if (phTp != NULL) {
  ------------------
  |  Branch (1755:7): [True: 7.35k, False: 0]
  ------------------
 1756|  7.35k|    if (*phTp != NULL) {
  ------------------
  |  Branch (1756:9): [True: 7.35k, False: 0]
  ------------------
 1757|  7.35k|      FreeRam_TransportDecoderBuffer(&(*phTp)->bsBuffer);
 1758|  7.35k|      FreeRam_TransportDecoder(phTp);
 1759|  7.35k|    }
 1760|  7.35k|  }
 1761|  7.35k|}

_Z17pcmLimiter_Createjjijj:
  114|  7.35k|                               UINT maxSampleRate) {
  115|  7.35k|  TDLimiterPtr limiter = NULL;
  116|  7.35k|  unsigned int attack, release;
  117|  7.35k|  FIXP_DBL attackConst, releaseConst, exponent;
  118|  7.35k|  INT e_ans;
  119|       |
  120|       |  /* calc attack and release time in samples */
  121|  7.35k|  attack = (unsigned int)(maxAttackMs * maxSampleRate / 1000);
  122|  7.35k|  release = (unsigned int)(releaseMs * maxSampleRate / 1000);
  123|       |
  124|       |  /* alloc limiter struct */
  125|  7.35k|  limiter = (TDLimiterPtr)FDKcalloc(1, sizeof(struct TDLimiter));
  126|  7.35k|  if (!limiter) return NULL;
  ------------------
  |  Branch (126:7): [True: 0, False: 7.35k]
  ------------------
  127|       |
  128|       |  /* alloc max and delay buffers */
  129|  7.35k|  limiter->maxBuf = (FIXP_DBL*)FDKcalloc(attack + 1, sizeof(FIXP_DBL));
  130|  7.35k|  limiter->delayBuf =
  131|  7.35k|      (FIXP_DBL*)FDKcalloc(attack * maxChannels, sizeof(FIXP_DBL));
  132|       |
  133|  7.35k|  if (!limiter->maxBuf || !limiter->delayBuf) {
  ------------------
  |  Branch (133:7): [True: 0, False: 7.35k]
  |  Branch (133:27): [True: 0, False: 7.35k]
  ------------------
  134|      0|    pcmLimiter_Destroy(limiter);
  135|      0|    return NULL;
  136|      0|  }
  137|       |
  138|       |  /* attackConst = pow(0.1, 1.0 / (attack + 1)) */
  139|  7.35k|  exponent = invFixp(attack + 1);
  140|  7.35k|  attackConst = fPow(FL2FXCONST_DBL(0.1f), 0, exponent, 0, &e_ans);
  ------------------
  |  |  192|  7.35k|  (FIXP_DBL)(                                                                \
  |  |  193|  7.35k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 7.35k, Folded]
  |  |  ------------------
  |  |  194|  7.35k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  7.35k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  7.35k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 7.35k]
  |  |  ------------------
  |  |  195|  7.35k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  7.35k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  7.35k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  7.35k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  7.35k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  7.35k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  7.35k|          : ((((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.35k|  attackConst = scaleValue(attackConst, e_ans);
  142|       |
  143|       |  /* releaseConst  = (float)pow(0.1, 1.0 / (release + 1)) */
  144|  7.35k|  exponent = invFixp(release + 1);
  145|  7.35k|  releaseConst = fPow(FL2FXCONST_DBL(0.1f), 0, exponent, 0, &e_ans);
  ------------------
  |  |  192|  7.35k|  (FIXP_DBL)(                                                                \
  |  |  193|  7.35k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 7.35k, Folded]
  |  |  ------------------
  |  |  194|  7.35k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  7.35k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  7.35k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 7.35k]
  |  |  ------------------
  |  |  195|  7.35k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  7.35k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  7.35k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  7.35k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  7.35k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  7.35k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  7.35k|          : ((((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.35k|  releaseConst = scaleValue(releaseConst, e_ans);
  147|       |
  148|       |  /* init parameters */
  149|  7.35k|  limiter->attackMs = maxAttackMs;
  150|  7.35k|  limiter->maxAttackMs = maxAttackMs;
  151|  7.35k|  limiter->releaseMs = releaseMs;
  152|  7.35k|  limiter->attack = attack;
  153|  7.35k|  limiter->attackConst = attackConst;
  154|  7.35k|  limiter->releaseConst = releaseConst;
  155|  7.35k|  limiter->threshold = threshold;
  156|  7.35k|  limiter->channels = maxChannels;
  157|  7.35k|  limiter->maxChannels = maxChannels;
  158|  7.35k|  limiter->sampleRate = maxSampleRate;
  159|  7.35k|  limiter->maxSampleRate = maxSampleRate;
  160|       |
  161|  7.35k|  pcmLimiter_Reset(limiter);
  162|       |
  163|  7.35k|  return limiter;
  164|  7.35k|}
_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.35k|TDLIMITER_ERROR pcmLimiter_Reset(TDLimiterPtr limiter) {
  371|  7.35k|  if (limiter != NULL) {
  ------------------
  |  Branch (371:7): [True: 7.35k, False: 0]
  ------------------
  372|  7.35k|    limiter->maxBufIdx = 0;
  373|  7.35k|    limiter->delayBufIdx = 0;
  374|  7.35k|    limiter->max = (FIXP_DBL)0;
  375|  7.35k|    limiter->cor = FL2FXCONST_DBL(1.0f / (1 << 1));
  ------------------
  |  |  192|  7.35k|  (FIXP_DBL)(                                                                \
  |  |  193|  7.35k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 7.35k, Folded]
  |  |  ------------------
  |  |  194|  7.35k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  7.35k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  7.35k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 7.35k]
  |  |  ------------------
  |  |  195|  7.35k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  7.35k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  7.35k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  7.35k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  7.35k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  7.35k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  7.35k|          : ((((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.35k|    limiter->smoothState0 = FL2FXCONST_DBL(1.0f / (1 << 1));
  ------------------
  |  |  192|  7.35k|  (FIXP_DBL)(                                                                \
  |  |  193|  7.35k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 7.35k, Folded]
  |  |  ------------------
  |  |  194|  7.35k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  7.35k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  7.35k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 7.35k]
  |  |  ------------------
  |  |  195|  7.35k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  7.35k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  7.35k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  7.35k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  7.35k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  7.35k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  7.35k|          : ((((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.35k|    limiter->minGain = FL2FXCONST_DBL(1.0f / (1 << 1));
  ------------------
  |  |  192|  7.35k|  (FIXP_DBL)(                                                                \
  |  |  193|  7.35k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 7.35k, Folded]
  |  |  ------------------
  |  |  194|  7.35k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  7.35k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  7.35k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 7.35k]
  |  |  ------------------
  |  |  195|  7.35k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  7.35k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  7.35k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  7.35k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  7.35k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  7.35k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  7.35k|          : ((((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.35k|    limiter->scaling = 0;
  379|       |
  380|  7.35k|    FDKmemset(limiter->maxBuf, 0, (limiter->attack + 1) * sizeof(FIXP_DBL));
  381|  7.35k|    FDKmemset(limiter->delayBuf, 0,
  382|  7.35k|              limiter->attack * limiter->channels * sizeof(FIXP_DBL));
  383|  7.35k|  } else {
  384|      0|    return TDLIMIT_INVALID_HANDLE;
  385|      0|  }
  386|       |
  387|  7.35k|  return TDLIMIT_OK;
  388|  7.35k|}
pcmLimiter_Destroy:
  391|  7.35k|TDLIMITER_ERROR pcmLimiter_Destroy(TDLimiterPtr limiter) {
  392|  7.35k|  if (limiter != NULL) {
  ------------------
  |  Branch (392:7): [True: 7.35k, False: 0]
  ------------------
  393|  7.35k|    FDKfree(limiter->maxBuf);
  394|  7.35k|    FDKfree(limiter->delayBuf);
  395|       |
  396|  7.35k|    FDKfree(limiter);
  397|  7.35k|  } else {
  398|      0|    return TDLIMIT_INVALID_HANDLE;
  399|      0|  }
  400|  7.35k|  return TDLIMIT_OK;
  401|  7.35k|}
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.35k|PCMDMX_ERROR pcmDmx_Open(HANDLE_PCM_DOWNMIX *pSelf) {
 1623|  7.35k|  HANDLE_PCM_DOWNMIX self;
 1624|       |
 1625|  7.35k|  if (pSelf == NULL) {
  ------------------
  |  Branch (1625:7): [True: 0, False: 7.35k]
  ------------------
 1626|      0|    return (PCMDMX_INVALID_HANDLE);
 1627|      0|  }
 1628|       |
 1629|  7.35k|  *pSelf = NULL;
 1630|       |
 1631|  7.35k|  self = (HANDLE_PCM_DOWNMIX)GetPcmDmxInstance(0);
 1632|  7.35k|  if (self == NULL) {
  ------------------
  |  Branch (1632:7): [True: 0, False: 7.35k]
  ------------------
 1633|      0|    return (PCMDMX_OUT_OF_MEMORY);
 1634|      0|  }
 1635|       |
 1636|       |  /* Reset the full instance */
 1637|  7.35k|  pcmDmx_Reset(self, PCMDMX_RESET_FULL);
  ------------------
  |  |  325|  7.35k|#define PCMDMX_RESET_FULL (PCMDMX_RESET_PARAMS | PCMDMX_RESET_BS_DATA)
  |  |  ------------------
  |  |  |  |  323|  7.35k|#define PCMDMX_RESET_PARAMS (1)
  |  |  ------------------
  |  |               #define PCMDMX_RESET_FULL (PCMDMX_RESET_PARAMS | PCMDMX_RESET_BS_DATA)
  |  |  ------------------
  |  |  |  |  324|  7.35k|#define PCMDMX_RESET_BS_DATA (2)
  |  |  ------------------
  ------------------
 1638|       |
 1639|  7.35k|  *pSelf = self;
 1640|       |
 1641|  7.35k|  return (PCMDMX_OK);
 1642|  7.35k|}
pcmDmx_Reset:
 1649|  13.2k|PCMDMX_ERROR pcmDmx_Reset(HANDLE_PCM_DOWNMIX self, UINT flags) {
 1650|  13.2k|  if (self == NULL) {
  ------------------
  |  Branch (1650:7): [True: 0, False: 13.2k]
  ------------------
 1651|      0|    return (PCMDMX_INVALID_HANDLE);
 1652|      0|  }
 1653|       |
 1654|  13.2k|  if (flags & PCMDMX_RESET_PARAMS) {
  ------------------
  |  |  323|  13.2k|#define PCMDMX_RESET_PARAMS (1)
  ------------------
  |  Branch (1654:7): [True: 7.35k, False: 5.90k]
  ------------------
 1655|  7.35k|    PCM_DMX_USER_PARAMS *pParams = &self->userParams;
 1656|       |
 1657|  7.35k|    pParams->dualChannelMode = STEREO_MODE;
 1658|  7.35k|    pParams->pseudoSurrMode = NEVER_DO_PS_DMX;
 1659|  7.35k|    pParams->numOutChannelsMax = (6);
 1660|  7.35k|    pParams->numOutChannelsMin = (0);
 1661|  7.35k|    pParams->frameDelay = 0;
 1662|  7.35k|    pParams->expiryFrame = (0);
 1663|       |
 1664|  7.35k|    self->applyProcessing = 0;
 1665|  7.35k|  }
 1666|       |
 1667|  13.2k|  if (flags & PCMDMX_RESET_BS_DATA) {
  ------------------
  |  |  324|  13.2k|#define PCMDMX_RESET_BS_DATA (2)
  ------------------
  |  Branch (1667:7): [True: 13.2k, False: 0]
  ------------------
 1668|  13.2k|    int slot;
 1669|       |    /* Init all slots with a default set */
 1670|  39.7k|    for (slot = 0; slot <= (1); slot += 1) {
  ------------------
  |  Branch (1670:20): [True: 26.5k, False: 13.2k]
  ------------------
 1671|  26.5k|      FDKmemcpy(&self->bsMetaData[slot], &dfltMetaData,
 1672|  26.5k|                sizeof(DMX_BS_META_DATA));
 1673|  26.5k|    }
 1674|  13.2k|  }
 1675|       |
 1676|  13.2k|  return (PCMDMX_OK);
 1677|  13.2k|}
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.90k|    case DMX_BS_DATA_EXPIRY_FRAME:
  ------------------
  |  Branch (1702:5): [True: 5.90k, False: 9.92k]
  ------------------
 1703|  5.90k|      if (self == NULL) return (PCMDMX_INVALID_HANDLE);
  ------------------
  |  Branch (1703:11): [True: 0, False: 5.90k]
  ------------------
 1704|  5.90k|      self->userParams.expiryFrame = (value > 0) ? (UINT)value : 0;
  ------------------
  |  Branch (1704:38): [True: 0, False: 5.90k]
  ------------------
 1705|  5.90k|      break;
 1706|       |
 1707|  9.92k|    case DMX_BS_DATA_DELAY:
  ------------------
  |  Branch (1707:5): [True: 9.92k, False: 5.90k]
  ------------------
 1708|  9.92k|      if ((value > (1)) || (value < 0)) {
  ------------------
  |  Branch (1708:11): [True: 0, False: 9.92k]
  |  Branch (1708:28): [True: 0, False: 9.92k]
  ------------------
 1709|      0|        return (PCMDMX_UNABLE_TO_SET_PARAM);
 1710|      0|      }
 1711|  9.92k|      if (self == NULL) {
  ------------------
  |  Branch (1711:11): [True: 0, False: 9.92k]
  ------------------
 1712|      0|        return (PCMDMX_INVALID_HANDLE);
 1713|      0|      }
 1714|  9.92k|      self->userParams.frameDelay = (UCHAR)value;
 1715|  9.92k|      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: 37, False: 279]
  ------------------
 2031|     37|      pBsMetaData->pseudoSurround = (pseudoSurroundEnable) ? 1 : 0;
  ------------------
  |  Branch (2031:37): [True: 24, False: 13]
  ------------------
 2032|     37|      pBsMetaData->matrixMixdownIdx = matrixMixdownIdx & 0x03;
 2033|     37|      pBsMetaData->typeFlags |= TYPE_PCE_DATA;
  ------------------
  |  |  327|     37|#define TYPE_PCE_DATA (0x01)
  ------------------
 2034|       |      /* Reset expiry counter */
 2035|     37|      pBsMetaData->expiryCount = 0;
 2036|     37|    }
 2037|    316|  }
 2038|       |
 2039|    316|  return (PCMDMX_OK);
 2040|    316|}
pcmDmx_Close:
 2635|  7.35k|PCMDMX_ERROR pcmDmx_Close(HANDLE_PCM_DOWNMIX *pSelf) {
 2636|  7.35k|  if (pSelf == NULL) {
  ------------------
  |  Branch (2636:7): [True: 0, False: 7.35k]
  ------------------
 2637|      0|    return (PCMDMX_INVALID_HANDLE);
 2638|      0|  }
 2639|       |
 2640|  7.35k|  FreePcmDmxInstance(pSelf);
 2641|  7.35k|  *pSelf = NULL;
 2642|       |
 2643|  7.35k|  return (PCMDMX_OK);
 2644|  7.35k|}

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

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

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

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

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

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

_Z21createSbrEnvelopeCalcP22SBR_CALCULATE_ENVELOPEP15SBR_HEADER_DATAij:
 1745|  1.66k|    const UINT flags) {
 1746|  1.66k|  SBR_ERROR err = SBRDEC_OK;
 1747|  1.66k|  int i;
 1748|       |
 1749|       |  /* Clear previous missing harmonics flags */
 1750|  5.00k|  for (i = 0; i < ADD_HARMONICS_FLAGS_SIZE; i++) {
  ------------------
  |  |  159|  5.00k|#define ADD_HARMONICS_FLAGS_SIZE 2 /* ceil(MAX_FREQ_COEFFS/32) */
  ------------------
  |  Branch (1750:15): [True: 3.33k, False: 1.66k]
  ------------------
 1751|  3.33k|    hs->harmFlagsPrev[i] = 0;
 1752|  3.33k|    hs->harmFlagsPrevActive[i] = 0;
 1753|  3.33k|  }
 1754|  1.66k|  hs->harmIndex = 0;
 1755|       |
 1756|  1.66k|  FDKmemclear(hs->prevSbrNoiseFloorLevel, sizeof(hs->prevSbrNoiseFloorLevel));
 1757|  1.66k|  hs->prevNNfb = 0;
 1758|  1.66k|  FDKmemclear(hs->prevFreqBandTableNoise, sizeof(hs->prevFreqBandTableNoise));
 1759|  1.66k|  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.66k|  hs->prevTranEnv = -1;
 1766|       |
 1767|       |  /* initialization */
 1768|  1.66k|  resetSbrEnvelopeCalc(hs);
 1769|       |
 1770|  1.66k|  if (chan == 0) { /* do this only once */
  ------------------
  |  Branch (1770:7): [True: 1.28k, False: 379]
  ------------------
 1771|  1.28k|    err = resetFreqBandTables(hHeaderData, flags);
 1772|  1.28k|  }
 1773|       |
 1774|  1.66k|  return err;
 1775|  1.66k|}
_Z21deleteSbrEnvelopeCalcP22SBR_CALCULATE_ENVELOPE:
 1785|  1.70k|int deleteSbrEnvelopeCalc(HANDLE_SBR_CALCULATE_ENVELOPE hs) { return 0; }
_Z20resetSbrEnvelopeCalcP22SBR_CALCULATE_ENVELOPE:
 1797|  1.66k|{
 1798|  1.66k|  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.66k|  hCalEnv->filtBufferNoise_e = 0;
 1803|       |
 1804|  1.66k|  hCalEnv->startUp = 1;
 1805|  1.66k|}

_Z25sbrdec_mapToStdSampleRatejj:
  219|  2.02k|{
  220|  2.02k|  UINT fsMapped = fs, tableSize = 0;
  221|  2.02k|  const SR_MAPPING *mappingTable;
  222|  2.02k|  int i;
  223|       |
  224|  2.02k|  if (!isUsac) {
  ------------------
  |  Branch (224:7): [True: 1.46k, False: 555]
  ------------------
  225|  1.46k|    mappingTable = stdSampleRatesMapping;
  226|  1.46k|    tableSize = sizeof(stdSampleRatesMapping) / sizeof(SR_MAPPING);
  227|  1.46k|  } else {
  228|    555|    mappingTable = stdSampleRatesMappingUsac;
  229|    555|    tableSize = sizeof(stdSampleRatesMappingUsac) / sizeof(SR_MAPPING);
  230|    555|  }
  231|       |
  232|  14.7k|  for (i = tableSize - 1; i >= 0; i--) {
  ------------------
  |  Branch (232:27): [True: 14.7k, False: 0]
  ------------------
  233|  14.7k|    if (fs >= mappingTable[i].fsRangeLo) {
  ------------------
  |  Branch (233:9): [True: 2.02k, False: 12.7k]
  ------------------
  234|  2.02k|      fsMapped = mappingTable[i].fsMapped;
  235|  2.02k|      break;
  236|  2.02k|    }
  237|  14.7k|  }
  238|       |
  239|  2.02k|  return (fsMapped);
  240|  2.02k|}
_Z14initHeaderDataP15SBR_HEADER_DATAiiiiji:
  246|  2.57k|               const int setDefaultHdr) {
  247|  2.57k|  HANDLE_FREQ_BAND_DATA hFreq = &hHeaderData->freqBandData;
  248|  2.57k|  SBR_ERROR sbrError = SBRDEC_OK;
  249|  2.57k|  int numAnalysisBands;
  250|  2.57k|  int sampleRateProc;
  251|       |
  252|  2.57k|  if (!(flags & (SBRDEC_SYNTAX_USAC | SBRDEC_SYNTAX_RSVD50))) {
  ------------------
  |  |  206|  2.57k|#define SBRDEC_SYNTAX_USAC 4
  ------------------
                if (!(flags & (SBRDEC_SYNTAX_USAC | SBRDEC_SYNTAX_RSVD50))) {
  ------------------
  |  |  207|  2.57k|#define SBRDEC_SYNTAX_RSVD50 8
  ------------------
  |  Branch (252:7): [True: 1.46k, False: 1.11k]
  ------------------
  253|  1.46k|    sampleRateProc =
  254|  1.46k|        sbrdec_mapToStdSampleRate(sampleRateOut * downscaleFactor, 0);
  255|  1.46k|  } else {
  256|  1.11k|    sampleRateProc = sampleRateOut * downscaleFactor;
  257|  1.11k|  }
  258|       |
  259|  2.57k|  if (sampleRateIn == sampleRateOut) {
  ------------------
  |  Branch (259:7): [True: 1.03k, False: 1.54k]
  ------------------
  260|  1.03k|    hHeaderData->sbrProcSmplRate = sampleRateProc << 1;
  261|  1.03k|    numAnalysisBands = 32;
  262|  1.54k|  } else {
  263|  1.54k|    hHeaderData->sbrProcSmplRate = sampleRateProc;
  264|  1.54k|    if ((sampleRateOut >> 1) == sampleRateIn) {
  ------------------
  |  Branch (264:9): [True: 618, False: 924]
  ------------------
  265|       |      /* 1:2 */
  266|    618|      numAnalysisBands = 32;
  267|    924|    } else if ((sampleRateOut >> 2) == sampleRateIn) {
  ------------------
  |  Branch (267:16): [True: 354, False: 570]
  ------------------
  268|       |      /* 1:4 */
  269|    354|      numAnalysisBands = 16;
  270|    570|    } else if ((sampleRateOut * 3) >> 3 == (sampleRateIn * 8) >> 3) {
  ------------------
  |  Branch (270:16): [True: 570, False: 0]
  ------------------
  271|       |      /* 3:8, 3/4 core frame length */
  272|    570|      numAnalysisBands = 24;
  273|    570|    } else {
  274|      0|      sbrError = SBRDEC_UNSUPPORTED_CONFIG;
  275|      0|      goto bail;
  276|      0|    }
  277|  1.54k|  }
  278|  2.57k|  numAnalysisBands /= downscaleFactor;
  279|       |
  280|  2.57k|  if (setDefaultHdr) {
  ------------------
  |  Branch (280:7): [True: 2.57k, False: 0]
  ------------------
  281|       |    /* Fill in default values first */
  282|  2.57k|    hHeaderData->syncState = SBR_NOT_INITIALIZED;
  283|  2.57k|    hHeaderData->status = 0;
  284|  2.57k|    hHeaderData->frameErrorFlag = 0;
  285|       |
  286|  2.57k|    hHeaderData->bs_info.ampResolution = 1;
  287|  2.57k|    hHeaderData->bs_info.xover_band = 0;
  288|  2.57k|    hHeaderData->bs_info.sbr_preprocessing = 0;
  289|  2.57k|    hHeaderData->bs_info.pvc_mode = 0;
  290|       |
  291|  2.57k|    hHeaderData->bs_data.startFreq = 5;
  292|  2.57k|    hHeaderData->bs_data.stopFreq = 0;
  293|  2.57k|    hHeaderData->bs_data.freqScale =
  294|  2.57k|        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.57k|    hHeaderData->bs_data.alterScale = 1;
  300|  2.57k|    hHeaderData->bs_data.noise_bands = 2;
  301|  2.57k|    hHeaderData->bs_data.limiterBands = 2;
  302|  2.57k|    hHeaderData->bs_data.limiterGains = 2;
  303|  2.57k|    hHeaderData->bs_data.interpolFreq = 1;
  304|  2.57k|    hHeaderData->bs_data.smoothingLength = 1;
  305|       |
  306|       |    /* Patch some entries */
  307|  2.57k|    if (sampleRateOut * downscaleFactor >= 96000) {
  ------------------
  |  Branch (307:9): [True: 154, False: 2.42k]
  ------------------
  308|    154|      hHeaderData->bs_data.startFreq =
  309|    154|          4; /*   having read these frequency values from bit stream before. */
  310|    154|      hHeaderData->bs_data.stopFreq = 3;
  311|  2.42k|    } else if (sampleRateOut * downscaleFactor >
  ------------------
  |  Branch (311:16): [True: 1.03k, False: 1.38k]
  ------------------
  312|  2.42k|               24000) { /* Trigger an error if SBR is going to be processed
  313|       |                           without     */
  314|  1.03k|      hHeaderData->bs_data.startFreq =
  315|  1.03k|          7; /*   having read these frequency values from bit stream before. */
  316|  1.03k|      hHeaderData->bs_data.stopFreq = 3;
  317|  1.03k|    }
  318|  2.57k|  }
  319|       |
  320|  2.57k|  if ((sampleRateOut >> 2) == sampleRateIn) {
  ------------------
  |  Branch (320:7): [True: 354, False: 2.22k]
  ------------------
  321|    354|    hHeaderData->timeStep = 4;
  322|  2.22k|  } else {
  323|  2.22k|    hHeaderData->timeStep = (flags & SBRDEC_ELD_GRID) ? 1 : 2;
  ------------------
  |  |  204|  2.22k|#define SBRDEC_ELD_GRID 1
  ------------------
  |  Branch (323:29): [True: 1.46k, False: 756]
  ------------------
  324|  2.22k|  }
  325|       |
  326|       |  /* Setup pointers to frequency band tables */
  327|  2.57k|  hFreq->freqBandTable[0] = hFreq->freqBandTableLo;
  328|  2.57k|  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.57k|  hHeaderData->numberTimeSlots =
  333|  2.57k|      (samplesPerFrame / numAnalysisBands) >> (hHeaderData->timeStep - 1);
  334|  2.57k|  if (hHeaderData->numberTimeSlots > (16)) {
  ------------------
  |  Branch (334:7): [True: 0, False: 2.57k]
  ------------------
  335|      0|    sbrError = SBRDEC_UNSUPPORTED_CONFIG;
  336|      0|  }
  337|       |
  338|  2.57k|  hHeaderData->numberOfAnalysisBands = numAnalysisBands;
  339|  2.57k|  if ((sampleRateOut >> 2) == sampleRateIn) {
  ------------------
  |  Branch (339:7): [True: 354, False: 2.22k]
  ------------------
  340|    354|    hHeaderData->numberTimeSlots <<= 1;
  341|    354|  }
  342|       |
  343|  2.57k|bail:
  344|  2.57k|  return sbrError;
  345|  2.57k|}
_Z20initSbrPrevFrameDataP19SBR_PREV_FRAME_DATAi:
  354|  1.65k|{
  355|  1.65k|  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|  94.0k|  for (i = 0; i < MAX_FREQ_COEFFS; i++)
  ------------------
  |  |  140|  94.0k|#define MAX_FREQ_COEFFS MAX_FREQ_COEFFS_QUAD_RATE
  |  |  ------------------
  |  |  |  |  139|  94.0k|#define MAX_FREQ_COEFFS_QUAD_RATE 56
  |  |  ------------------
  ------------------
  |  Branch (359:15): [True: 92.4k, False: 1.65k]
  ------------------
  360|  92.4k|    h_prev_data->sfb_nrg_prev[i] = (FIXP_DBL)0;
  361|  9.90k|  for (i = 0; i < MAX_NOISE_COEFFS; i++)
  ------------------
  |  |  128|  9.90k|#define MAX_NOISE_COEFFS 5
  ------------------
  |  Branch (361:15): [True: 8.25k, False: 1.65k]
  ------------------
  362|  8.25k|    h_prev_data->prevNoiseLevel[i] = (FIXP_DBL)0;
  363|  9.90k|  for (i = 0; i < MAX_INVF_BANDS; i++) h_prev_data->sbr_invf_mode[i] = INVF_OFF;
  ------------------
  |  |  159|  9.90k|#define MAX_INVF_BANDS MAX_NOISE_COEFFS
  |  |  ------------------
  |  |  |  |  128|  9.90k|#define MAX_NOISE_COEFFS 5
  |  |  ------------------
  ------------------
  |  Branch (363:15): [True: 8.25k, False: 1.65k]
  ------------------
  364|       |
  365|  1.65k|  h_prev_data->stopPos = timeSlots;
  366|  1.65k|  h_prev_data->coupling = COUPLING_OFF;
  367|  1.65k|  h_prev_data->ampRes = 0;
  368|       |
  369|  1.65k|  FDKmemclear(&h_prev_data->prevFrameInfo, sizeof(h_prev_data->prevFrameInfo));
  370|  1.65k|}
_Z16sbrGetHeaderDataP15SBR_HEADER_DATAP13FDK_BITSTREAMjih:
  380|  2.63k|                 const UCHAR configMode) {
  381|  2.63k|  SBR_HEADER_DATA_BS *pBsData;
  382|  2.63k|  SBR_HEADER_DATA_BS lastHeader;
  383|  2.63k|  SBR_HEADER_DATA_BS_INFO lastInfo;
  384|  2.63k|  int headerExtra1 = 0, headerExtra2 = 0;
  385|       |
  386|       |  /* Read and discard new header in config change detection mode */
  387|  2.63k|  if (configMode & AC_CM_DET_CFG_CHANGE) {
  ------------------
  |  |  334|  2.63k|  0x000001 /*!< Config mode signalizes the callback to work in config change \
  ------------------
  |  Branch (387:7): [True: 1.42k, False: 1.20k]
  ------------------
  388|  1.42k|    if (!(flags & (SBRDEC_SYNTAX_RSVD50 | SBRDEC_SYNTAX_USAC))) {
  ------------------
  |  |  207|  1.42k|#define SBRDEC_SYNTAX_RSVD50 8
  ------------------
                  if (!(flags & (SBRDEC_SYNTAX_RSVD50 | SBRDEC_SYNTAX_USAC))) {
  ------------------
  |  |  206|  1.42k|#define SBRDEC_SYNTAX_USAC 4
  ------------------
  |  Branch (388:9): [True: 719, False: 706]
  ------------------
  389|       |      /* ampResolution */
  390|    719|      FDKreadBits(hBs, 1);
  391|    719|    }
  392|       |    /* startFreq, stopFreq */
  393|  1.42k|    FDKpushFor(hBs, 8);
  394|  1.42k|    if (!(flags & (SBRDEC_SYNTAX_RSVD50 | SBRDEC_SYNTAX_USAC))) {
  ------------------
  |  |  207|  1.42k|#define SBRDEC_SYNTAX_RSVD50 8
  ------------------
                  if (!(flags & (SBRDEC_SYNTAX_RSVD50 | SBRDEC_SYNTAX_USAC))) {
  ------------------
  |  |  206|  1.42k|#define SBRDEC_SYNTAX_USAC 4
  ------------------
  |  Branch (394:9): [True: 719, False: 706]
  ------------------
  395|       |      /* xover_band */
  396|    719|      FDKreadBits(hBs, 3);
  397|       |      /* reserved bits */
  398|    719|      FDKreadBits(hBs, 2);
  399|    719|    }
  400|  1.42k|    headerExtra1 = FDKreadBit(hBs);
  401|  1.42k|    headerExtra2 = FDKreadBit(hBs);
  402|  1.42k|    FDKpushFor(hBs, 5 * headerExtra1 + 6 * headerExtra2);
  403|       |
  404|  1.42k|    return HEADER_OK;
  405|  1.42k|  }
  406|       |
  407|       |  /* Copy SBR bit stream header to temporary header */
  408|  1.20k|  lastHeader = hHeaderData->bs_data;
  409|  1.20k|  lastInfo = hHeaderData->bs_info;
  410|       |
  411|       |  /* Read new header from bitstream */
  412|  1.20k|  if ((flags & (SBRDEC_SYNTAX_RSVD50 | SBRDEC_SYNTAX_USAC)) && !fIsSbrData) {
  ------------------
  |  |  207|  1.20k|#define SBRDEC_SYNTAX_RSVD50 8
  ------------------
                if ((flags & (SBRDEC_SYNTAX_RSVD50 | SBRDEC_SYNTAX_USAC)) && !fIsSbrData) {
  ------------------
  |  |  206|  1.20k|#define SBRDEC_SYNTAX_USAC 4
  ------------------
  |  Branch (412:7): [True: 530, False: 675]
  |  Branch (412:64): [True: 530, False: 0]
  ------------------
  413|    530|    pBsData = &hHeaderData->bs_dflt;
  414|    675|  } else {
  415|    675|    pBsData = &hHeaderData->bs_data;
  416|    675|  }
  417|       |
  418|  1.20k|  if (!(flags & (SBRDEC_SYNTAX_RSVD50 | SBRDEC_SYNTAX_USAC))) {
  ------------------
  |  |  207|  1.20k|#define SBRDEC_SYNTAX_RSVD50 8
  ------------------
                if (!(flags & (SBRDEC_SYNTAX_RSVD50 | SBRDEC_SYNTAX_USAC))) {
  ------------------
  |  |  206|  1.20k|#define SBRDEC_SYNTAX_USAC 4
  ------------------
  |  Branch (418:7): [True: 675, False: 530]
  ------------------
  419|    675|    hHeaderData->bs_info.ampResolution = FDKreadBits(hBs, 1);
  420|    675|  }
  421|       |
  422|  1.20k|  pBsData->startFreq = FDKreadBits(hBs, 4);
  423|  1.20k|  pBsData->stopFreq = FDKreadBits(hBs, 4);
  424|       |
  425|  1.20k|  if (!(flags & (SBRDEC_SYNTAX_RSVD50 | SBRDEC_SYNTAX_USAC))) {
  ------------------
  |  |  207|  1.20k|#define SBRDEC_SYNTAX_RSVD50 8
  ------------------
                if (!(flags & (SBRDEC_SYNTAX_RSVD50 | SBRDEC_SYNTAX_USAC))) {
  ------------------
  |  |  206|  1.20k|#define SBRDEC_SYNTAX_USAC 4
  ------------------
  |  Branch (425:7): [True: 675, False: 530]
  ------------------
  426|    675|    hHeaderData->bs_info.xover_band = FDKreadBits(hBs, 3);
  427|    675|    FDKreadBits(hBs, 2);
  428|    675|  }
  429|       |
  430|  1.20k|  headerExtra1 = FDKreadBits(hBs, 1);
  431|  1.20k|  headerExtra2 = FDKreadBits(hBs, 1);
  432|       |
  433|       |  /* Handle extra header information */
  434|  1.20k|  if (headerExtra1) {
  ------------------
  |  Branch (434:7): [True: 221, False: 984]
  ------------------
  435|    221|    pBsData->freqScale = FDKreadBits(hBs, 2);
  436|    221|    pBsData->alterScale = FDKreadBits(hBs, 1);
  437|    221|    pBsData->noise_bands = FDKreadBits(hBs, 2);
  438|    984|  } else {
  439|    984|    pBsData->freqScale = 2;
  440|    984|    pBsData->alterScale = 1;
  441|    984|    pBsData->noise_bands = 2;
  442|    984|  }
  443|       |
  444|  1.20k|  if (headerExtra2) {
  ------------------
  |  Branch (444:7): [True: 91, False: 1.11k]
  ------------------
  445|     91|    pBsData->limiterBands = FDKreadBits(hBs, 2);
  446|     91|    pBsData->limiterGains = FDKreadBits(hBs, 2);
  447|     91|    pBsData->interpolFreq = FDKreadBits(hBs, 1);
  448|     91|    pBsData->smoothingLength = FDKreadBits(hBs, 1);
  449|  1.11k|  } else {
  450|  1.11k|    pBsData->limiterBands = 2;
  451|  1.11k|    pBsData->limiterGains = 2;
  452|  1.11k|    pBsData->interpolFreq = 1;
  453|  1.11k|    pBsData->smoothingLength = 1;
  454|  1.11k|  }
  455|       |
  456|       |  /* Look for new settings. IEC 14496-3, 4.6.18.3.1 */
  457|  1.20k|  if (hHeaderData->syncState < SBR_HEADER ||
  ------------------
  |  Branch (457:7): [True: 1.20k, 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.20k|      lastInfo.xover_band != hHeaderData->bs_info.xover_band) {
  ------------------
  |  Branch (463:7): [True: 0, False: 0]
  ------------------
  464|  1.20k|    return HEADER_RESET; /* New settings */
  465|  1.20k|  }
  466|       |
  467|      0|  return HEADER_OK;
  468|  1.20k|}

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

_Z19createLppTransposerP13SBR_LPP_TRANSP19TRANSPOSER_SETTINGSiPhiiiiS3_ijii:
 1259|  1.65k|    const int overlap) {
 1260|       |  /* FB inverse filtering settings */
 1261|  1.65k|  hs->pSettings = pSettings;
 1262|       |
 1263|  1.65k|  pSettings->nCols = nCols;
 1264|  1.65k|  pSettings->overlap = overlap;
 1265|       |
 1266|  1.65k|  switch (timeSlots) {
 1267|    704|    case 15:
  ------------------
  |  Branch (1267:5): [True: 704, False: 946]
  ------------------
 1268|  1.65k|    case 16:
  ------------------
  |  Branch (1268:5): [True: 946, False: 704]
  ------------------
 1269|  1.65k|      break;
 1270|       |
 1271|      0|    default:
  ------------------
  |  Branch (1271:5): [True: 0, False: 1.65k]
  ------------------
 1272|      0|      return SBRDEC_UNSUPPORTED_CONFIG; /* Unimplemented */
 1273|  1.65k|  }
 1274|       |
 1275|  1.65k|  if (chan == 0) {
  ------------------
  |  Branch (1275:7): [True: 1.27k, False: 379]
  ------------------
 1276|       |    /* Init common data only once */
 1277|  1.27k|    hs->pSettings->nCols = nCols;
 1278|       |
 1279|  1.27k|    return resetLppTransposer(hs, highBandStartSb, v_k_master, numMaster,
 1280|  1.27k|                              noiseBandTable, noNoiseBands, usb, fs);
 1281|  1.27k|  }
 1282|    379|  return SBRDEC_OK;
 1283|  1.65k|}
_Z18resetLppTransposerP13SBR_LPP_TRANShPhhS1_hhj:
 1324|  1.27k|) {
 1325|  1.27k|  TRANSPOSER_SETTINGS *pSettings = hLppTrans->pSettings;
 1326|  1.27k|  PATCH_PARAM *patchParam = pSettings->patchParam;
 1327|       |
 1328|  1.27k|  int i, patch;
 1329|  1.27k|  int targetStopBand;
 1330|  1.27k|  int sourceStartBand;
 1331|  1.27k|  int patchDistance;
 1332|  1.27k|  int numBandsInPatch;
 1333|       |
 1334|  1.27k|  int lsb = v_k_master[0]; /* Start subband expressed in "non-critical" sampling
 1335|       |                              terms*/
 1336|  1.27k|  int xoverOffset = highBandStartSb -
 1337|  1.27k|                    lsb; /* Calculate distance in QMF bands between k0 and kx */
 1338|  1.27k|  int startFreqHz;
 1339|       |
 1340|  1.27k|  int desiredBorder;
 1341|       |
 1342|  1.27k|  usb = fixMin(usb, v_k_master[numMaster]); /* Avoid endless loops (compare with
  ------------------
  |  |  306|  1.27k|#define fixMin(a, b) fMin(a, b)
  ------------------
 1343|       |                                               float code). */
 1344|       |
 1345|       |  /*
 1346|       |   * Plausibility check
 1347|       |   */
 1348|       |
 1349|  1.27k|  if (pSettings->nCols == 64) {
  ------------------
  |  Branch (1349:7): [True: 160, False: 1.11k]
  ------------------
 1350|    160|    if (lsb < 4) {
  ------------------
  |  Branch (1350:9): [True: 0, False: 160]
  ------------------
 1351|       |      /* 4:1 SBR Requirement k0 >= 4 missed! */
 1352|      0|      return SBRDEC_UNSUPPORTED_CONFIG;
 1353|      0|    }
 1354|  1.11k|  } else if (lsb - SHIFT_START_SB < 4) {
  ------------------
  |  |  162|  1.11k|#define SHIFT_START_SB 1 /*!< lowest subband of source range */
  ------------------
  |  Branch (1354:14): [True: 0, False: 1.11k]
  ------------------
 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.27k|  desiredBorder = (((2048000 * 2) / fs) + 1) >> 1;
 1363|       |
 1364|  1.27k|  desiredBorder = findClosestEntry(desiredBorder, v_k_master, numMaster,
 1365|  1.27k|                                   1); /* Adapt region to master-table */
 1366|       |
 1367|       |  /* First patch */
 1368|  1.27k|  sourceStartBand = SHIFT_START_SB + xoverOffset;
  ------------------
  |  |  162|  1.27k|#define SHIFT_START_SB 1 /*!< lowest subband of source range */
  ------------------
 1369|  1.27k|  targetStopBand = lsb + xoverOffset; /* upperBand */
 1370|       |
 1371|       |  /* Even (odd) numbered channel must be patched to even (odd) numbered channel
 1372|       |   */
 1373|  1.27k|  patch = 0;
 1374|  3.52k|  while (targetStopBand < usb) {
  ------------------
  |  Branch (1374:10): [True: 2.25k, False: 1.26k]
  ------------------
 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.25k|    if (patch > MAX_NUM_PATCHES) {
  ------------------
  |  |  161|  2.25k|#define MAX_NUM_PATCHES 6
  ------------------
  |  Branch (1381:9): [True: 6, False: 2.25k]
  ------------------
 1382|      6|      return SBRDEC_UNSUPPORTED_CONFIG;
 1383|      6|    }
 1384|       |
 1385|  2.25k|    patchParam[patch].guardStartBand = targetStopBand;
 1386|  2.25k|    patchParam[patch].targetStartBand = targetStopBand;
 1387|       |
 1388|  2.25k|    numBandsInPatch =
 1389|  2.25k|        desiredBorder - targetStopBand; /* Get the desired range of the patch */
 1390|       |
 1391|  2.25k|    if (numBandsInPatch >= lsb - sourceStartBand) {
  ------------------
  |  Branch (1391:9): [True: 996, False: 1.25k]
  ------------------
 1392|       |      /* Desired number bands are not available -> patch whole source range */
 1393|    996|      patchDistance =
 1394|    996|          targetStopBand - sourceStartBand; /* Get the targetOffset */
 1395|    996|      patchDistance =
 1396|    996|          patchDistance & ~1; /* Rounding off odd numbers and make all even */
 1397|    996|      numBandsInPatch =
 1398|    996|          lsb - (targetStopBand -
 1399|    996|                 patchDistance); /* Update number of bands to be patched */
 1400|    996|      numBandsInPatch = findClosestEntry(targetStopBand + numBandsInPatch,
 1401|    996|                                         v_k_master, numMaster, 0) -
 1402|    996|                        targetStopBand; /* Adapt region to master-table */
 1403|    996|    }
 1404|       |
 1405|  2.25k|    if (pSettings->nCols == 64) {
  ------------------
  |  Branch (1405:9): [True: 479, False: 1.77k]
  ------------------
 1406|    479|      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: 479]
  |  Branch (1406:35): [True: 0, False: 0]
  ------------------
 1407|      0|        return SBRDEC_UNSUPPORTED_CONFIG;
 1408|      0|      }
 1409|    479|    }
 1410|       |
 1411|       |    /* Desired number bands are available -> get the minimal even patching
 1412|       |     * distance */
 1413|  2.25k|    patchDistance =
 1414|  2.25k|        numBandsInPatch + targetStopBand - lsb; /* Get minimal distance */
 1415|  2.25k|    patchDistance = (patchDistance + 1) &
 1416|  2.25k|                    ~1; /* Rounding up odd numbers and make all even */
 1417|       |
 1418|  2.25k|    if (numBandsInPatch > 0) {
  ------------------
  |  Branch (1418:9): [True: 2.24k, False: 9]
  ------------------
 1419|  2.24k|      patchParam[patch].sourceStartBand = targetStopBand - patchDistance;
 1420|  2.24k|      patchParam[patch].targetBandOffs = patchDistance;
 1421|  2.24k|      patchParam[patch].numBandsInPatch = numBandsInPatch;
 1422|  2.24k|      patchParam[patch].sourceStopBand =
 1423|  2.24k|          patchParam[patch].sourceStartBand + numBandsInPatch;
 1424|       |
 1425|  2.24k|      targetStopBand += patchParam[patch].numBandsInPatch;
 1426|  2.24k|      patch++;
 1427|  2.24k|    }
 1428|       |
 1429|       |    /* All patches but first */
 1430|  2.25k|    sourceStartBand = SHIFT_START_SB;
  ------------------
  |  |  162|  2.25k|#define SHIFT_START_SB 1 /*!< lowest subband of source range */
  ------------------
 1431|       |
 1432|       |    /* Check if we are close to desiredBorder */
 1433|  2.25k|    if (desiredBorder - targetStopBand < 3) /* MPEG doc */
  ------------------
  |  Branch (1433:9): [True: 1.57k, False: 675]
  ------------------
 1434|  1.57k|    {
 1435|  1.57k|      desiredBorder = usb;
 1436|  1.57k|    }
 1437|  2.25k|  }
 1438|       |
 1439|  1.26k|  patch--;
 1440|       |
 1441|       |  /* If highest patch contains less than three subband: skip it */
 1442|  1.26k|  if ((patch > 0) && (patchParam[patch].numBandsInPatch < 3)) {
  ------------------
  |  Branch (1442:7): [True: 593, False: 672]
  |  Branch (1442:22): [True: 293, False: 300]
  ------------------
 1443|    293|    patch--;
 1444|    293|    targetStopBand =
 1445|    293|        patchParam[patch].targetStartBand + patchParam[patch].numBandsInPatch;
 1446|    293|  }
 1447|       |
 1448|       |  /* now check if we don't have one too many */
 1449|  1.26k|  if (patch >= MAX_NUM_PATCHES) {
  ------------------
  |  |  161|  1.26k|#define MAX_NUM_PATCHES 6
  ------------------
  |  Branch (1449:7): [True: 2, False: 1.26k]
  ------------------
 1450|      2|    return SBRDEC_UNSUPPORTED_CONFIG;
 1451|      2|  }
 1452|       |
 1453|  1.26k|  pSettings->noOfPatches = patch + 1;
 1454|       |
 1455|       |  /* Check lowest and highest source subband */
 1456|  1.26k|  pSettings->lbStartPatching = targetStopBand;
 1457|  1.26k|  pSettings->lbStopPatching = 0;
 1458|  3.15k|  for (patch = 0; patch < pSettings->noOfPatches; patch++) {
  ------------------
  |  Branch (1458:19): [True: 1.89k, False: 1.26k]
  ------------------
 1459|  1.89k|    pSettings->lbStartPatching =
 1460|  1.89k|        fixMin(pSettings->lbStartPatching, patchParam[patch].sourceStartBand);
  ------------------
  |  |  306|  1.89k|#define fixMin(a, b) fMin(a, b)
  ------------------
 1461|  1.89k|    pSettings->lbStopPatching =
 1462|  1.89k|        fixMax(pSettings->lbStopPatching, patchParam[patch].sourceStopBand);
  ------------------
  |  |  307|  1.89k|#define fixMax(a, b) fMax(a, b)
  ------------------
 1463|  1.89k|  }
 1464|       |
 1465|  3.91k|  for (i = 0; i < noNoiseBands; i++) {
  ------------------
  |  Branch (1465:15): [True: 2.65k, False: 1.26k]
  ------------------
 1466|  2.65k|    pSettings->bwBorders[i] = noiseBandTable[i + 1];
 1467|  2.65k|  }
 1468|  11.2k|  for (; i < MAX_NUM_NOISE_VALUES; i++) {
  ------------------
  |  |  129|  11.2k|#define MAX_NUM_NOISE_VALUES (MAX_NOISE_ENVELOPES * MAX_NOISE_COEFFS)
  |  |  ------------------
  |  |  |  |  127|  11.2k|#define MAX_NOISE_ENVELOPES 2
  |  |  ------------------
  |  |               #define MAX_NUM_NOISE_VALUES (MAX_NOISE_ENVELOPES * MAX_NOISE_COEFFS)
  |  |  ------------------
  |  |  |  |  128|  11.2k|#define MAX_NOISE_COEFFS 5
  |  |  ------------------
  ------------------
  |  Branch (1468:10): [True: 9.97k, False: 1.26k]
  ------------------
 1469|  9.97k|    pSettings->bwBorders[i] = 255;
 1470|  9.97k|  }
 1471|       |
 1472|       |  /*
 1473|       |   * Choose whitening factors
 1474|       |   */
 1475|       |
 1476|  1.26k|  startFreqHz =
 1477|  1.26k|      ((lsb + xoverOffset) * fs) >> 7; /* Shift does a division by 2*(64) */
 1478|       |
 1479|  3.11k|  for (i = 1; i < NUM_WHFACTOR_TABLE_ENTRIES; i++) {
  ------------------
  |  |  139|  3.11k|#define NUM_WHFACTOR_TABLE_ENTRIES 9
  ------------------
  |  Branch (1479:15): [True: 3.06k, False: 45]
  ------------------
 1480|  3.06k|    if (startFreqHz < FDK_sbrDecoder_sbr_whFactorsIndex[i]) break;
  ------------------
  |  Branch (1480:9): [True: 1.21k, False: 1.84k]
  ------------------
 1481|  3.06k|  }
 1482|  1.26k|  i--;
 1483|       |
 1484|  1.26k|  pSettings->whFactors.off = FDK_sbrDecoder_sbr_whFactorsTable[i][0];
 1485|  1.26k|  pSettings->whFactors.transitionLevel =
 1486|  1.26k|      FDK_sbrDecoder_sbr_whFactorsTable[i][1];
 1487|  1.26k|  pSettings->whFactors.lowLevel = FDK_sbrDecoder_sbr_whFactorsTable[i][2];
 1488|  1.26k|  pSettings->whFactors.midLevel = FDK_sbrDecoder_sbr_whFactorsTable[i][3];
 1489|  1.26k|  pSettings->whFactors.highLevel = FDK_sbrDecoder_sbr_whFactorsTable[i][4];
 1490|       |
 1491|  1.26k|  return SBRDEC_OK;
 1492|  1.26k|}
lpp_tran.cpp:_ZL16findClosestEntryhPhhh:
 1286|  2.26k|                            UCHAR direction) {
 1287|  2.26k|  int index;
 1288|       |
 1289|  2.26k|  if (goalSb <= v_k_master[0]) return v_k_master[0];
  ------------------
  |  Branch (1289:7): [True: 9, False: 2.25k]
  ------------------
 1290|       |
 1291|  2.25k|  if (goalSb >= v_k_master[numMaster]) return v_k_master[numMaster];
  ------------------
  |  Branch (1291:7): [True: 1.23k, False: 1.02k]
  ------------------
 1292|       |
 1293|  1.02k|  if (direction) {
  ------------------
  |  Branch (1293:7): [True: 57, False: 968]
  ------------------
 1294|     57|    index = 0;
 1295|    317|    while (v_k_master[index] < goalSb) {
  ------------------
  |  Branch (1295:12): [True: 260, False: 57]
  ------------------
 1296|    260|      index++;
 1297|    260|    }
 1298|    968|  } else {
 1299|    968|    index = numMaster;
 1300|  6.00k|    while (v_k_master[index] > goalSb) {
  ------------------
  |  Branch (1300:12): [True: 5.03k, False: 968]
  ------------------
 1301|  5.03k|      index--;
 1302|  5.03k|    }
 1303|    968|  }
 1304|       |
 1305|  1.02k|  return v_k_master[index];
 1306|  2.25k|}

_Z12createSbrDecP11SBR_CHANNELP15SBR_HEADER_DATAP19TRANSPOSER_SETTINGSijjiii:
  896|  1.66k|{
  897|  1.66k|  SBR_ERROR err = SBRDEC_OK;
  898|  1.66k|  int timeSlots =
  899|  1.66k|      hHeaderData->numberTimeSlots; /* Number of SBR slots per frame */
  900|  1.66k|  int noCols =
  901|  1.66k|      timeSlots * hHeaderData->timeStep; /* Number of QMF slots per frame */
  902|  1.66k|  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.66k|  hs->scale_hbe = 15;
  909|  1.66k|  hs->scale_lb = 15;
  910|  1.66k|  hs->scale_ov = 15;
  911|       |
  912|  1.66k|  hs->prev_frame_lSbr = 0;
  913|  1.66k|  hs->prev_frame_hbeSbr = 0;
  914|       |
  915|  1.66k|  hs->codecFrameSize = codecFrameSize;
  916|       |
  917|       |  /*
  918|       |    create envelope calculator
  919|       |  */
  920|  1.66k|  err = createSbrEnvelopeCalc(&hs->SbrCalculateEnvelope, hHeaderData, chan,
  921|  1.66k|                              flags);
  922|  1.66k|  if (err != SBRDEC_OK) {
  ------------------
  |  Branch (922:7): [True: 18, False: 1.65k]
  ------------------
  923|     18|    return err;
  924|     18|  }
  925|       |
  926|  1.65k|  initSbrPrevFrameData(&hSbrChannel->prevFrameData, timeSlots);
  927|       |
  928|       |  /*
  929|       |    create transposer
  930|       |  */
  931|  1.65k|  err = createLppTransposer(
  932|  1.65k|      &hs->LppTrans, pSettings, hHeaderData->freqBandData.lowSubband,
  933|  1.65k|      hHeaderData->freqBandData.v_k_master, hHeaderData->freqBandData.numMaster,
  934|  1.65k|      hHeaderData->freqBandData.highSubband, timeSlots, noCols,
  935|  1.65k|      hHeaderData->freqBandData.freqBandTableNoise,
  936|  1.65k|      hHeaderData->freqBandData.nNfb, hHeaderData->sbrProcSmplRate, chan,
  937|  1.65k|      overlap);
  938|  1.65k|  if (err != SBRDEC_OK) {
  ------------------
  |  Branch (938:7): [True: 8, False: 1.64k]
  ------------------
  939|      8|    return err;
  940|      8|  }
  941|       |
  942|  1.64k|  if (flags & SBRDEC_USAC_HARMONICSBR) {
  ------------------
  |  |  218|  1.64k|  256 /* Flag indicating that USAC HBE tool is active. */
  ------------------
  |  Branch (942:7): [True: 46, False: 1.59k]
  ------------------
  943|     46|    int noChannels, bSbr41 = flags & SBRDEC_QUAD_RATE ? 1 : 0;
  ------------------
  |  |  215|     46|  128 /* Flag indicating that USAC SBR 4:1 is active. \
  ------------------
  |  Branch (943:30): [True: 21, False: 25]
  ------------------
  944|       |
  945|     46|    noChannels =
  946|     46|        QMF_SYNTH_CHANNELS /
  ------------------
  |  |  109|     46|#define QMF_SYNTH_CHANNELS (64)
  ------------------
  947|     46|        ((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|     46|    hSbrChannel->SbrDec.tmp_memory = (FIXP_DBL **)fdkCallocMatrix2D_aligned(
  952|     46|        noCols, noChannels, sizeof(FIXP_DBL));
  953|     46|    if (hSbrChannel->SbrDec.tmp_memory == NULL) {
  ------------------
  |  Branch (953:9): [True: 0, False: 46]
  ------------------
  954|      0|      return SBRDEC_MEM_ALLOC_FAILED;
  955|      0|    }
  956|       |
  957|     46|    hSbrChannel->SbrDec.hQmfHBESlotsReal = hSbrChannel->SbrDec.tmp_memory;
  958|     46|    hSbrChannel->SbrDec.hQmfHBESlotsImag =
  959|     46|        (FIXP_DBL **)fdkCallocMatrix2D_aligned(noCols, noChannels,
  960|     46|                                               sizeof(FIXP_DBL));
  961|     46|    if (hSbrChannel->SbrDec.hQmfHBESlotsImag == NULL) {
  ------------------
  |  Branch (961:9): [True: 0, False: 46]
  ------------------
  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|     46|    hSbrChannel->SbrDec.codecQMFBufferReal =
  970|     46|        (FIXP_DBL **)fdkCallocMatrix2D_aligned(noCols, noChannels,
  971|     46|                                               sizeof(FIXP_DBL));
  972|     46|    if (hSbrChannel->SbrDec.codecQMFBufferReal == NULL) {
  ------------------
  |  Branch (972:9): [True: 0, False: 46]
  ------------------
  973|      0|      return SBRDEC_MEM_ALLOC_FAILED;
  974|      0|    }
  975|       |
  976|     46|    hSbrChannel->SbrDec.codecQMFBufferImag =
  977|     46|        (FIXP_DBL **)fdkCallocMatrix2D_aligned(noCols, noChannels,
  978|     46|                                               sizeof(FIXP_DBL));
  979|     46|    if (hSbrChannel->SbrDec.codecQMFBufferImag == NULL) {
  ------------------
  |  Branch (979:9): [True: 0, False: 46]
  ------------------
  980|      0|      return SBRDEC_MEM_ALLOC_FAILED;
  981|      0|    }
  982|       |
  983|     46|    err = QmfTransposerCreate(&hs->hHBE, codecFrameSize, 0, bSbr41);
  984|     46|    if (err != SBRDEC_OK) {
  ------------------
  |  Branch (984:9): [True: 0, False: 46]
  ------------------
  985|      0|      return err;
  986|      0|    }
  987|     46|  }
  988|       |
  989|  1.64k|  return err;
  990|  1.64k|}
_Z12deleteSbrDecP11SBR_CHANNEL:
  996|  1.70k|int deleteSbrDec(SBR_CHANNEL *hSbrChannel) {
  997|  1.70k|  HANDLE_SBR_DEC hs = &hSbrChannel->SbrDec;
  998|       |
  999|  1.70k|  deleteSbrEnvelopeCalc(&hs->SbrCalculateEnvelope);
 1000|       |
 1001|  1.70k|  if (hs->tmp_memory != NULL) {
  ------------------
  |  Branch (1001:7): [True: 46, False: 1.66k]
  ------------------
 1002|     46|    FDK_FREE_MEMORY_2D_ALIGNED(hs->tmp_memory);
  ------------------
  |  |  207|     46|  do {                                    \
  |  |  208|     46|    fdkFreeMatrix2D_aligned((void**)(a)); \
  |  |  209|     46|    (a) = NULL;                           \
  |  |  210|     46|  } while (0)
  |  |  ------------------
  |  |  |  Branch (210:12): [Folded, False: 46]
  |  |  ------------------
  ------------------
 1003|     46|  }
 1004|       |
 1005|       |  /* modify here */
 1006|  1.70k|  FDK_FREE_MEMORY_2D_ALIGNED(hs->hQmfHBESlotsImag);
  ------------------
  |  |  207|  1.70k|  do {                                    \
  |  |  208|  1.70k|    fdkFreeMatrix2D_aligned((void**)(a)); \
  |  |  209|  1.70k|    (a) = NULL;                           \
  |  |  210|  1.70k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (210:12): [Folded, False: 1.70k]
  |  |  ------------------
  ------------------
 1007|       |
 1008|  1.70k|  if (hs->hHBE != NULL) QmfTransposerClose(hs->hHBE);
  ------------------
  |  Branch (1008:7): [True: 46, False: 1.66k]
  ------------------
 1009|       |
 1010|  1.70k|  if (hs->codecQMFBufferReal != NULL) {
  ------------------
  |  Branch (1010:7): [True: 46, False: 1.66k]
  ------------------
 1011|     46|    FDK_FREE_MEMORY_2D_ALIGNED(hs->codecQMFBufferReal);
  ------------------
  |  |  207|     46|  do {                                    \
  |  |  208|     46|    fdkFreeMatrix2D_aligned((void**)(a)); \
  |  |  209|     46|    (a) = NULL;                           \
  |  |  210|     46|  } while (0)
  |  |  ------------------
  |  |  |  Branch (210:12): [Folded, False: 46]
  |  |  ------------------
  ------------------
 1012|     46|  }
 1013|       |
 1014|  1.70k|  if (hs->codecQMFBufferImag != NULL) {
  ------------------
  |  Branch (1014:7): [True: 46, False: 1.66k]
  ------------------
 1015|     46|    FDK_FREE_MEMORY_2D_ALIGNED(hs->codecQMFBufferImag);
  ------------------
  |  |  207|     46|  do {                                    \
  |  |  208|     46|    fdkFreeMatrix2D_aligned((void**)(a)); \
  |  |  209|     46|    (a) = NULL;                           \
  |  |  210|     46|  } while (0)
  |  |  ------------------
  |  |  |  Branch (210:12): [Folded, False: 46]
  |  |  ------------------
  ------------------
 1016|     46|  }
 1017|       |
 1018|  1.70k|  return 0;
 1019|  1.70k|}

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

_Z21sbrdecUpdateFreqScalePhS_jP15SBR_HEADER_DATAj:
  305|  1.96k|    UINT flags) {
  306|  1.96k|  FIXP_SGL bpo_div16; /* bands_per_octave divided by 16 */
  307|  1.96k|  INT dk = 0;
  308|       |
  309|       |  /* Internal variables */
  310|  1.96k|  UCHAR k0, k2, i;
  311|  1.96k|  UCHAR num_bands0 = 0;
  312|  1.96k|  UCHAR num_bands1 = 0;
  313|  1.96k|  UCHAR diff_tot[MAX_OCTAVE + MAX_SECOND_REGION];
  314|  1.96k|  UCHAR *diff0 = diff_tot;
  315|  1.96k|  UCHAR *diff1 = diff_tot + MAX_OCTAVE;
  ------------------
  |  |  116|  1.96k|#define MAX_OCTAVE 29
  ------------------
  316|  1.96k|  INT k2_achived;
  317|  1.96k|  INT k2_diff;
  318|  1.96k|  INT incr = 0;
  319|       |
  320|       |  /*
  321|       |    Determine start band
  322|       |  */
  323|  1.96k|  if (flags & SBRDEC_QUAD_RATE) {
  ------------------
  |  |  215|  1.96k|  128 /* Flag indicating that USAC SBR 4:1 is active. \
  ------------------
  |  Branch (323:7): [True: 177, False: 1.78k]
  ------------------
  324|    177|    fs >>= 1;
  325|    177|  }
  326|       |
  327|  1.96k|  k0 = getStartBand(fs, hHeaderData->bs_data.startFreq, flags);
  328|  1.96k|  if (k0 == 255) {
  ------------------
  |  Branch (328:7): [True: 1, False: 1.96k]
  ------------------
  329|      1|    return SBRDEC_UNSUPPORTED_CONFIG;
  330|      1|  }
  331|       |
  332|       |  /*
  333|       |    Determine stop band
  334|       |  */
  335|  1.96k|  k2 = getStopBand(fs, hHeaderData->bs_data.stopFreq, flags, k0);
  336|  1.96k|  if (k2 == 255) {
  ------------------
  |  Branch (336:7): [True: 35, False: 1.92k]
  ------------------
  337|     35|    return SBRDEC_UNSUPPORTED_CONFIG;
  338|     35|  }
  339|       |
  340|  1.92k|  if (hHeaderData->bs_data.freqScale > 0) { /* Bark */
  ------------------
  |  Branch (340:7): [True: 575, False: 1.35k]
  ------------------
  341|    575|    INT k1;
  342|       |
  343|    575|    if (hHeaderData->bs_data.freqScale == 1) {
  ------------------
  |  Branch (343:9): [True: 52, False: 523]
  ------------------
  344|     52|      bpo_div16 = FL2FXCONST_SGL(12.0f / 16.0f);
  ------------------
  |  |  180|     52|  (FIXP_SGL)(                                                                \
  |  |  181|     52|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 52, Folded]
  |  |  ------------------
  |  |  182|     52|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|     52|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|     52|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 52]
  |  |  ------------------
  |  |  183|     52|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|     52|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|     52|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|     52|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|     52|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|     52|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|     52|          : ((((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|    523|    } else if (hHeaderData->bs_data.freqScale == 2) {
  ------------------
  |  Branch (345:16): [True: 484, False: 39]
  ------------------
  346|    484|      bpo_div16 = FL2FXCONST_SGL(10.0f / 16.0f);
  ------------------
  |  |  180|    484|  (FIXP_SGL)(                                                                \
  |  |  181|    484|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 484, Folded]
  |  |  ------------------
  |  |  182|    484|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|    484|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|    484|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 484]
  |  |  ------------------
  |  |  183|    484|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|    484|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|    484|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|    484|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|    484|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|    484|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|    484|          : ((((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|    484|    } else {
  348|     39|      bpo_div16 = FL2FXCONST_SGL(8.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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  349|     39|    }
  350|       |
  351|       |    /* Ref: ISO/IEC 23003-3, Figure 12 - Flowchart calculation of fMaster for
  352|       |     * 4:1 system when bs_freq_scale > 0 */
  353|    575|    if (flags & SBRDEC_QUAD_RATE) {
  ------------------
  |  |  215|    575|  128 /* Flag indicating that USAC SBR 4:1 is active. \
  ------------------
  |  Branch (353:9): [True: 0, False: 575]
  ------------------
  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|    575|    if (1000 * k2 > 2245 * k0) { /* Two or more regions */
  ------------------
  |  Branch (360:9): [True: 334, False: 241]
  ------------------
  361|    334|      k1 = 2 * k0;
  362|       |
  363|    334|      num_bands0 = numberOfBands(bpo_div16, k0, k1, 0);
  364|    334|      num_bands1 =
  365|    334|          numberOfBands(bpo_div16, k1, k2, hHeaderData->bs_data.alterScale);
  366|    334|      if (num_bands0 < 1) {
  ------------------
  |  Branch (366:11): [True: 0, False: 334]
  ------------------
  367|      0|        return SBRDEC_UNSUPPORTED_CONFIG;
  368|      0|      }
  369|    334|      if (num_bands1 < 1) {
  ------------------
  |  Branch (369:11): [True: 0, False: 334]
  ------------------
  370|      0|        return SBRDEC_UNSUPPORTED_CONFIG;
  371|      0|      }
  372|       |
  373|    334|      CalcBands(diff0, k0, k1, num_bands0);
  374|    334|      shellsort(diff0, num_bands0);
  375|    334|      if (diff0[0] == 0) {
  ------------------
  |  Branch (375:11): [True: 46, False: 288]
  ------------------
  376|     46|        return SBRDEC_UNSUPPORTED_CONFIG;
  377|     46|      }
  378|       |
  379|    288|      cumSum(k0, diff0, num_bands0, v_k_master);
  380|       |
  381|    288|      CalcBands(diff1, k1, k2, num_bands1);
  382|    288|      shellsort(diff1, num_bands1);
  383|    288|      if (diff0[num_bands0 - 1] > diff1[0]) {
  ------------------
  |  Branch (383:11): [True: 81, False: 207]
  ------------------
  384|     81|        SBR_ERROR err;
  385|       |
  386|     81|        err = modifyBands(diff0[num_bands0 - 1], diff1, num_bands1);
  387|     81|        if (err) return SBRDEC_UNSUPPORTED_CONFIG;
  ------------------
  |  Branch (387:13): [True: 0, False: 81]
  ------------------
  388|     81|      }
  389|       |
  390|       |      /* Add 2nd region */
  391|    288|      cumSum(k1, diff1, num_bands1, &v_k_master[num_bands0]);
  392|    288|      *numMaster = num_bands0 + num_bands1; /* Output nr of bands */
  393|       |
  394|    288|    } else { /* Only one region */
  395|    241|      k1 = k2;
  396|       |
  397|    241|      num_bands0 = numberOfBands(bpo_div16, k0, k1, 0);
  398|    241|      if (num_bands0 < 1) {
  ------------------
  |  Branch (398:11): [True: 1, False: 240]
  ------------------
  399|      1|        return SBRDEC_UNSUPPORTED_CONFIG;
  400|      1|      }
  401|    240|      CalcBands(diff0, k0, k1, num_bands0);
  402|    240|      shellsort(diff0, num_bands0);
  403|    240|      if (diff0[0] == 0) {
  ------------------
  |  Branch (403:11): [True: 18, False: 222]
  ------------------
  404|     18|        return SBRDEC_UNSUPPORTED_CONFIG;
  405|     18|      }
  406|       |
  407|    222|      cumSum(k0, diff0, num_bands0, v_k_master);
  408|    222|      *numMaster = num_bands0; /* Output nr of bands */
  409|    222|    }
  410|  1.35k|  } else { /* Linear mode */
  411|  1.35k|    if (hHeaderData->bs_data.alterScale == 0) {
  ------------------
  |  Branch (411:9): [True: 43, False: 1.31k]
  ------------------
  412|     43|      dk = 1;
  413|       |      /* FLOOR to get to few number of bands (next lower even number) */
  414|     43|      num_bands0 = (k2 - k0) & 254;
  415|  1.31k|    } else {
  416|  1.31k|      dk = 2;
  417|  1.31k|      num_bands0 = (((k2 - k0) >> 1) + 1) & 254; /* ROUND to the closest fit */
  418|  1.31k|    }
  419|       |
  420|  1.35k|    if (num_bands0 < 1) {
  ------------------
  |  Branch (420:9): [True: 1, False: 1.35k]
  ------------------
  421|      1|      return SBRDEC_UNSUPPORTED_CONFIG;
  422|       |      /* We must return already here because 'i' can become negative below. */
  423|      1|    }
  424|       |
  425|  1.35k|    k2_achived = k0 + num_bands0 * dk;
  426|  1.35k|    k2_diff = k2 - k2_achived;
  427|       |
  428|  15.0k|    for (i = 0; i < num_bands0; i++) diff_tot[i] = dk;
  ------------------
  |  Branch (428:17): [True: 13.7k, False: 1.35k]
  ------------------
  429|       |
  430|       |    /* If linear scale wasn't achieved */
  431|       |    /* and we got too wide SBR area */
  432|  1.35k|    if (k2_diff < 0) {
  ------------------
  |  Branch (432:9): [True: 895, False: 457]
  ------------------
  433|    895|      incr = 1;
  434|    895|      i = 0;
  435|    895|    }
  436|       |
  437|       |    /* If linear scale wasn't achieved */
  438|       |    /* and we got too small SBR area */
  439|  1.35k|    if (k2_diff > 0) {
  ------------------
  |  Branch (439:9): [True: 217, False: 1.13k]
  ------------------
  440|    217|      incr = -1;
  441|    217|      i = num_bands0 - 1;
  442|    217|    }
  443|       |
  444|       |    /* Adjust diff vector to get sepc. SBR range */
  445|  2.67k|    while (k2_diff != 0) {
  ------------------
  |  Branch (445:12): [True: 1.32k, False: 1.35k]
  ------------------
  446|  1.32k|      diff_tot[i] = diff_tot[i] - incr;
  447|  1.32k|      i = i + incr;
  448|  1.32k|      k2_diff = k2_diff + incr;
  449|  1.32k|    }
  450|       |
  451|  1.35k|    cumSum(k0, diff_tot, num_bands0, v_k_master); /* cumsum */
  452|  1.35k|    *numMaster = num_bands0;                      /* Output nr of bands */
  453|  1.35k|  }
  454|       |
  455|  1.86k|  if (*numMaster < 1) {
  ------------------
  |  Branch (455:7): [True: 0, False: 1.86k]
  ------------------
  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.86k|  if (flags & SBRDEC_QUAD_RATE) {
  ------------------
  |  |  215|  1.86k|  128 /* Flag indicating that USAC SBR 4:1 is active. \
  ------------------
  |  Branch (460:7): [True: 177, False: 1.68k]
  ------------------
  461|    177|    int k;
  462|  2.21k|    for (k = 1; k < *numMaster; k++) {
  ------------------
  |  Branch (462:17): [True: 2.03k, False: 177]
  ------------------
  463|  2.03k|      if (!(v_k_master[k] - v_k_master[k - 1] <= k0 - 2)) {
  ------------------
  |  Branch (463:11): [True: 0, False: 2.03k]
  ------------------
  464|      0|        return SBRDEC_UNSUPPORTED_CONFIG;
  465|      0|      }
  466|  2.03k|    }
  467|    177|  }
  468|       |
  469|       |  /*
  470|       |    Print out the calculated table
  471|       |  */
  472|       |
  473|  1.86k|  return SBRDEC_OK;
  474|  1.86k|}
_Z21sbrdecDownSampleLoResPhhS_h:
  688|  1.79k|                           UCHAR *freqBandTableRef, UCHAR num_Ref) {
  689|  1.79k|  int step;
  690|  1.79k|  int i, j;
  691|  1.79k|  int org_length, result_length;
  692|  1.79k|  int v_index[MAX_FREQ_COEFFS >> 1];
  693|       |
  694|       |  /* init */
  695|  1.79k|  org_length = num_Ref;
  696|  1.79k|  result_length = num_result;
  697|       |
  698|  1.79k|  v_index[0] = 0; /* Always use left border */
  699|  1.79k|  i = 0;
  700|  5.53k|  while (org_length > 0) {
  ------------------
  |  Branch (700:10): [True: 3.73k, False: 1.79k]
  ------------------
  701|       |    /* Create downsample vector */
  702|  3.73k|    i++;
  703|  3.73k|    step = org_length / result_length;
  704|  3.73k|    org_length = org_length - step;
  705|  3.73k|    result_length--;
  706|  3.73k|    v_index[i] = v_index[i - 1] + step;
  707|  3.73k|  }
  708|       |
  709|  7.32k|  for (j = 0; j <= i; j++) {
  ------------------
  |  Branch (709:15): [True: 5.53k, False: 1.79k]
  ------------------
  710|       |    /* Use downsample vector to index LoResolution vector */
  711|  5.53k|    v_result[j] = freqBandTableRef[v_index[j]];
  712|  5.53k|  }
  713|  1.79k|}
_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.38k|    inc = 3 * inc + 1;
  724|  7.38k|  while (inc <= n);
  ------------------
  |  Branch (724:10): [True: 4.58k, False: 2.80k]
  ------------------
  725|       |
  726|  7.38k|  do {
  727|  7.38k|    inc = inc / 3;
  728|  56.7k|    for (i = inc; i < n; i++) {
  ------------------
  |  Branch (728:19): [True: 49.3k, False: 7.38k]
  ------------------
  729|  49.3k|      v = in[i];
  730|  49.3k|      j = i;
  731|  53.1k|      while ((w = in[j - inc]) > v) {
  ------------------
  |  Branch (731:14): [True: 4.32k, False: 48.8k]
  ------------------
  732|  4.32k|        in[j] = w;
  733|  4.32k|        j -= inc;
  734|  4.32k|        if (j < inc) break;
  ------------------
  |  Branch (734:13): [True: 518, False: 3.80k]
  ------------------
  735|  4.32k|      }
  736|  49.3k|      in[j] = v;
  737|  49.3k|    }
  738|  7.38k|  } while (inc > 1);
  ------------------
  |  Branch (738:12): [True: 4.58k, False: 2.80k]
  ------------------
  739|  2.80k|}
_Z19resetFreqBandTablesP15SBR_HEADER_DATAj:
  746|  1.96k|resetFreqBandTables(HANDLE_SBR_HEADER_DATA hHeaderData, const UINT flags) {
  747|  1.96k|  SBR_ERROR err = SBRDEC_OK;
  748|  1.96k|  int k2, kx, lsb, usb;
  749|  1.96k|  int intTemp;
  750|  1.96k|  UCHAR nBandsLo, nBandsHi;
  751|  1.96k|  HANDLE_FREQ_BAND_DATA hFreq = &hHeaderData->freqBandData;
  752|       |
  753|       |  /* Calculate master frequency function */
  754|  1.96k|  err = sbrdecUpdateFreqScale(hFreq->v_k_master, &hFreq->numMaster,
  755|  1.96k|                              hHeaderData->sbrProcSmplRate, hHeaderData, flags);
  756|       |
  757|  1.96k|  if (err || (hHeaderData->bs_info.xover_band > hFreq->numMaster)) {
  ------------------
  |  Branch (757:7): [True: 102, False: 1.86k]
  |  Branch (757:14): [True: 7, False: 1.85k]
  ------------------
  758|    109|    return SBRDEC_UNSUPPORTED_CONFIG;
  759|    109|  }
  760|       |
  761|       |  /* Derive Hiresolution from master frequency function */
  762|  1.85k|  sbrdecUpdateHiRes(hFreq->freqBandTable[1], &nBandsHi, hFreq->v_k_master,
  763|  1.85k|                    hFreq->numMaster, hHeaderData->bs_info.xover_band);
  764|       |  /* Derive Loresolution from Hiresolution */
  765|  1.85k|  sbrdecUpdateLoRes(hFreq->freqBandTable[0], &nBandsLo, hFreq->freqBandTable[1],
  766|  1.85k|                    nBandsHi);
  767|       |
  768|       |  /* Check index to freqBandTable[0] */
  769|  1.85k|  if (!(nBandsLo > 0) ||
  ------------------
  |  Branch (769:7): [True: 7, False: 1.84k]
  ------------------
  770|  1.84k|      (nBandsLo > (((hHeaderData->numberOfAnalysisBands == 16)
  ------------------
  |  Branch (770:7): [True: 2, False: 1.84k]
  |  Branch (770:21): [True: 184, False: 1.66k]
  ------------------
  771|  1.84k|                        ? MAX_FREQ_COEFFS_QUAD_RATE
  ------------------
  |  |  139|    184|#define MAX_FREQ_COEFFS_QUAD_RATE 56
  ------------------
  772|  1.84k|                        : MAX_FREQ_COEFFS_DUAL_RATE) >>
  ------------------
  |  |  138|  1.66k|#define MAX_FREQ_COEFFS_DUAL_RATE 48
  ------------------
  773|  1.84k|                   1))) {
  774|      9|    return SBRDEC_UNSUPPORTED_CONFIG;
  775|      9|  }
  776|       |
  777|  1.84k|  hFreq->nSfb[0] = nBandsLo;
  778|  1.84k|  hFreq->nSfb[1] = nBandsHi;
  779|       |
  780|  1.84k|  lsb = hFreq->freqBandTable[0][0];
  781|  1.84k|  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.84k|  if ((lsb > ((flags & SBRDEC_QUAD_RATE) ? 16 : (32))) || (lsb >= usb)) {
  ------------------
  |  |  215|  1.84k|  128 /* Flag indicating that USAC SBR 4:1 is active. \
  ------------------
  |  Branch (790:7): [True: 29, False: 1.81k]
  |  Branch (790:15): [True: 177, False: 1.66k]
  |  Branch (790:59): [True: 0, False: 1.81k]
  ------------------
  791|     29|    return SBRDEC_UNSUPPORTED_CONFIG;
  792|     29|  }
  793|       |
  794|       |  /* Calculate number of noise bands */
  795|       |
  796|  1.81k|  k2 = hFreq->freqBandTable[1][nBandsHi];
  797|  1.81k|  kx = hFreq->freqBandTable[1][0];
  798|       |
  799|  1.81k|  if (hHeaderData->bs_data.noise_bands == 0) {
  ------------------
  |  Branch (799:7): [True: 80, False: 1.73k]
  ------------------
  800|     80|    hFreq->nNfb = 1;
  801|     80|  } else /* Calculate no of noise bands 1,2 or 3 bands/octave */
  802|  1.73k|  {
  803|       |    /* Fetch number of octaves divided by 32 */
  804|  1.73k|    intTemp = (LONG)FDK_getNumOctavesDiv8(kx, k2) >> 2;
  805|       |
  806|       |    /* Integer-Multiplication with number of bands: */
  807|  1.73k|    intTemp = intTemp * hHeaderData->bs_data.noise_bands;
  808|       |
  809|       |    /* Add scaled 0.5 for rounding: */
  810|  1.73k|    intTemp = intTemp + (LONG)FL2FXCONST_SGL(0.5f / 32.0f);
  ------------------
  |  |  180|  1.73k|  (FIXP_SGL)(                                                                \
  |  |  181|  1.73k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 1.73k, Folded]
  |  |  ------------------
  |  |  182|  1.73k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  1.73k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  1.73k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 1.73k]
  |  |  ------------------
  |  |  183|  1.73k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  1.73k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  1.73k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  1.73k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  1.73k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  1.73k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  1.73k|          : ((((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.73k|    intTemp = intTemp >> (FRACT_BITS - 1 /*sign*/ - 5 /* rescale */);
  ------------------
  |  |  112|  1.73k|#define FRACT_BITS 16  /* single precision */
  ------------------
  814|       |
  815|  1.73k|    if (intTemp == 0) intTemp = 1;
  ------------------
  |  Branch (815:9): [True: 51, False: 1.68k]
  ------------------
  816|       |
  817|  1.73k|    if (intTemp > MAX_NOISE_COEFFS) {
  ------------------
  |  |  128|  1.73k|#define MAX_NOISE_COEFFS 5
  ------------------
  |  Branch (817:9): [True: 19, False: 1.71k]
  ------------------
  818|     19|      return SBRDEC_UNSUPPORTED_CONFIG;
  819|     19|    }
  820|       |
  821|  1.71k|    hFreq->nNfb = intTemp;
  822|  1.71k|  }
  823|       |
  824|  1.79k|  hFreq->nInvfBands = hFreq->nNfb;
  825|       |
  826|       |  /* Get noise bands */
  827|  1.79k|  sbrdecDownSampleLoRes(hFreq->freqBandTableNoise, hFreq->nNfb,
  828|  1.79k|                        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.79k|  hFreq->ov_highSubband = hFreq->highSubband;
  833|       |
  834|  1.79k|  hFreq->lowSubband = lsb;
  835|  1.79k|  hFreq->highSubband = usb;
  836|       |
  837|  1.79k|  return SBRDEC_OK;
  838|  1.81k|}
sbrdec_freq_sca.cpp:_ZL12getStartBandjhj:
  137|  1.96k|{
  138|  1.96k|  INT band;
  139|  1.96k|  UINT fsMapped = fs;
  140|  1.96k|  SBR_RATE rate = DUAL;
  141|       |
  142|  1.96k|  if (headerDataFlags & (SBRDEC_SYNTAX_USAC | SBRDEC_SYNTAX_RSVD50)) {
  ------------------
  |  |  206|  1.96k|#define SBRDEC_SYNTAX_USAC 4
  ------------------
                if (headerDataFlags & (SBRDEC_SYNTAX_USAC | SBRDEC_SYNTAX_RSVD50)) {
  ------------------
  |  |  207|  1.96k|#define SBRDEC_SYNTAX_RSVD50 8
  ------------------
  |  Branch (142:7): [True: 555, False: 1.40k]
  ------------------
  143|    555|    if (headerDataFlags & SBRDEC_QUAD_RATE) {
  ------------------
  |  |  215|    555|  128 /* Flag indicating that USAC SBR 4:1 is active. \
  ------------------
  |  Branch (143:9): [True: 177, False: 378]
  ------------------
  144|    177|      rate = QUAD;
  145|    177|    }
  146|    555|    fsMapped = sbrdec_mapToStdSampleRate(fs, 1);
  147|    555|  }
  148|       |
  149|  1.96k|  FDK_ASSERT(2 * (rate + 1) <= (4));
  ------------------
  |  |  221|  1.96k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (149:3): [True: 1.96k, False: 0]
  ------------------
  150|       |
  151|  1.96k|  switch (fsMapped) {
  152|     89|    case 192000:
  ------------------
  |  Branch (152:5): [True: 89, False: 1.87k]
  ------------------
  153|     89|      band = FDK_sbrDecoder_sbr_start_freq_192[startFreq];
  154|     89|      break;
  155|     69|    case 176400:
  ------------------
  |  Branch (155:5): [True: 69, False: 1.89k]
  ------------------
  156|     69|      band = FDK_sbrDecoder_sbr_start_freq_176[startFreq];
  157|     69|      break;
  158|     32|    case 128000:
  ------------------
  |  Branch (158:5): [True: 32, False: 1.93k]
  ------------------
  159|     32|      band = FDK_sbrDecoder_sbr_start_freq_128[startFreq];
  160|     32|      break;
  161|     88|    case 96000:
  ------------------
  |  Branch (161:5): [True: 88, False: 1.87k]
  ------------------
  162|    219|    case 88200:
  ------------------
  |  Branch (162:5): [True: 131, False: 1.83k]
  ------------------
  163|    219|      band = FDK_sbrDecoder_sbr_start_freq_88[rate][startFreq];
  164|    219|      break;
  165|    100|    case 64000:
  ------------------
  |  Branch (165:5): [True: 100, False: 1.86k]
  ------------------
  166|    100|      band = FDK_sbrDecoder_sbr_start_freq_64[rate][startFreq];
  167|    100|      break;
  168|    105|    case 48000:
  ------------------
  |  Branch (168:5): [True: 105, False: 1.85k]
  ------------------
  169|    105|      band = FDK_sbrDecoder_sbr_start_freq_48[rate][startFreq];
  170|    105|      break;
  171|    172|    case 44100:
  ------------------
  |  Branch (171:5): [True: 172, False: 1.79k]
  ------------------
  172|    172|      band = FDK_sbrDecoder_sbr_start_freq_44[rate][startFreq];
  173|    172|      break;
  174|     34|    case 40000:
  ------------------
  |  Branch (174:5): [True: 34, False: 1.93k]
  ------------------
  175|     34|      band = FDK_sbrDecoder_sbr_start_freq_40[rate][startFreq];
  176|     34|      break;
  177|    142|    case 32000:
  ------------------
  |  Branch (177:5): [True: 142, False: 1.82k]
  ------------------
  178|    142|      band = FDK_sbrDecoder_sbr_start_freq_32[rate][startFreq];
  179|    142|      break;
  180|    347|    case 24000:
  ------------------
  |  Branch (180:5): [True: 347, False: 1.61k]
  ------------------
  181|    347|      band = FDK_sbrDecoder_sbr_start_freq_24[rate][startFreq];
  182|    347|      break;
  183|    160|    case 22050:
  ------------------
  |  Branch (183:5): [True: 160, False: 1.80k]
  ------------------
  184|    160|      band = FDK_sbrDecoder_sbr_start_freq_22[rate][startFreq];
  185|    160|      break;
  186|    494|    case 16000:
  ------------------
  |  Branch (186:5): [True: 494, False: 1.47k]
  ------------------
  187|    494|      band = FDK_sbrDecoder_sbr_start_freq_16[rate][startFreq];
  188|    494|      break;
  189|      1|    default:
  ------------------
  |  Branch (189:5): [True: 1, False: 1.96k]
  ------------------
  190|      1|      band = 255;
  191|  1.96k|  }
  192|       |
  193|  1.96k|  return band;
  194|  1.96k|}
sbrdec_freq_sca.cpp:_ZL11getStopBandjhjh:
  209|  1.96k|{
  210|  1.96k|  UCHAR k2;
  211|       |
  212|  1.96k|  if (stopFreq < 14) {
  ------------------
  |  Branch (212:7): [True: 1.86k, False: 101]
  ------------------
  213|  1.86k|    INT stopMin;
  214|  1.86k|    INT num = 2 * (64);
  215|  1.86k|    UCHAR diff_tot[MAX_OCTAVE + MAX_SECOND_REGION];
  216|  1.86k|    UCHAR *diff0 = diff_tot;
  217|  1.86k|    UCHAR *diff1 = diff_tot + MAX_OCTAVE;
  ------------------
  |  |  116|  1.86k|#define MAX_OCTAVE 29
  ------------------
  218|       |
  219|  1.86k|    if (headerDataFlags & SBRDEC_QUAD_RATE) {
  ------------------
  |  |  215|  1.86k|  128 /* Flag indicating that USAC SBR 4:1 is active. \
  ------------------
  |  Branch (219:9): [True: 177, False: 1.68k]
  ------------------
  220|    177|      num >>= 1;
  221|    177|    }
  222|       |
  223|  1.86k|    if (fs < 32000) {
  ------------------
  |  Branch (223:9): [True: 976, False: 886]
  ------------------
  224|    976|      stopMin = (((2 * 6000 * num) / fs) + 1) >> 1;
  225|    976|    } else {
  226|    886|      if (fs < 64000) {
  ------------------
  |  Branch (226:11): [True: 423, False: 463]
  ------------------
  227|    423|        stopMin = (((2 * 8000 * num) / fs) + 1) >> 1;
  228|    463|      } else {
  229|    463|        stopMin = (((2 * 10000 * num) / fs) + 1) >> 1;
  230|    463|      }
  231|    886|    }
  232|       |
  233|  1.86k|    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.86k|    CalcBands(diff0, stopMin, 64, 13);
  241|  1.86k|    shellsort(diff0, 13);
  242|  1.86k|    cumSum(stopMin, diff0, 13, diff1);
  243|  1.86k|    k2 = diff1[stopFreq];
  244|  1.86k|  } else if (stopFreq == 14)
  ------------------
  |  Branch (244:14): [True: 37, False: 64]
  ------------------
  245|     37|    k2 = 2 * k0;
  246|     64|  else
  247|     64|    k2 = 3 * k0;
  248|       |
  249|       |  /* Limit to Nyquist */
  250|  1.96k|  if (k2 > (64)) k2 = (64);
  ------------------
  |  Branch (250:7): [True: 28, False: 1.93k]
  ------------------
  251|       |
  252|       |  /* Range checks */
  253|       |  /* 1 <= difference <= 48; 1 <= fs <= 96000 */
  254|  1.96k|  {
  255|  1.96k|    UCHAR max_freq_coeffs = (headerDataFlags & SBRDEC_QUAD_RATE)
  ------------------
  |  |  215|  1.96k|  128 /* Flag indicating that USAC SBR 4:1 is active. \
  ------------------
  |  Branch (255:29): [True: 177, False: 1.78k]
  ------------------
  256|  1.96k|                                ? MAX_FREQ_COEFFS_QUAD_RATE
  ------------------
  |  |  139|    177|#define MAX_FREQ_COEFFS_QUAD_RATE 56
  ------------------
  257|  1.96k|                                : MAX_FREQ_COEFFS;
  ------------------
  |  |  140|  1.78k|#define MAX_FREQ_COEFFS MAX_FREQ_COEFFS_QUAD_RATE
  |  |  ------------------
  |  |  |  |  139|  3.74k|#define MAX_FREQ_COEFFS_QUAD_RATE 56
  |  |  ------------------
  ------------------
  258|  1.96k|    if (((k2 - k0) > max_freq_coeffs) || (k2 <= k0)) {
  ------------------
  |  Branch (258:9): [True: 2, False: 1.96k]
  |  Branch (258:42): [True: 12, False: 1.94k]
  ------------------
  259|     14|      return 255;
  260|     14|    }
  261|  1.96k|  }
  262|       |
  263|  1.94k|  if (headerDataFlags & SBRDEC_QUAD_RATE) {
  ------------------
  |  |  215|  1.94k|  128 /* Flag indicating that USAC SBR 4:1 is active. \
  ------------------
  |  Branch (263:7): [True: 177, False: 1.77k]
  ------------------
  264|    177|    return k2; /* skip other checks: (k2 - k0) must be <=
  265|       |                  MAX_FREQ_COEFFS_QUAD_RATE for all fs */
  266|    177|  }
  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: 378, False: 1.39k]
  ------------------
  268|       |    /* 1 <= difference <= 35; 42000 <= fs <= 96000 */
  269|    378|    if ((fs >= 42000) && ((k2 - k0) > MAX_FREQ_COEFFS_FS44100)) {
  ------------------
  |  |  142|    126|#define MAX_FREQ_COEFFS_FS44100 35
  ------------------
  |  Branch (269:9): [True: 126, False: 252]
  |  Branch (269:26): [True: 0, False: 126]
  ------------------
  270|      0|      return 255;
  271|      0|    }
  272|       |    /* 1 <= difference <= 32; 46009 <= fs <= 96000 */
  273|    378|    if ((fs >= 46009) && ((k2 - k0) > MAX_FREQ_COEFFS_FS48000)) {
  ------------------
  |  |  143|    100|#define MAX_FREQ_COEFFS_FS48000 32
  ------------------
  |  Branch (273:9): [True: 100, False: 278]
  |  Branch (273:26): [True: 0, False: 100]
  ------------------
  274|      0|      return 255;
  275|      0|    }
  276|  1.39k|  } else {
  277|       |    /* 1 <= difference <= 35; fs == 44100 */
  278|  1.39k|    if ((fs == 44100) && ((k2 - k0) > MAX_FREQ_COEFFS_FS44100)) {
  ------------------
  |  |  142|    131|#define MAX_FREQ_COEFFS_FS44100 35
  ------------------
  |  Branch (278:9): [True: 131, False: 1.26k]
  |  Branch (278:26): [True: 8, False: 123]
  ------------------
  279|      8|      return 255;
  280|      8|    }
  281|       |    /* 1 <= difference <= 32; 48000 <= fs <= 96000 */
  282|  1.38k|    if ((fs >= 48000) && ((k2 - k0) > MAX_FREQ_COEFFS_FS48000)) {
  ------------------
  |  |  143|    494|#define MAX_FREQ_COEFFS_FS48000 32
  ------------------
  |  Branch (282:9): [True: 494, False: 892]
  |  Branch (282:26): [True: 13, False: 481]
  ------------------
  283|     13|      return 255;
  284|     13|    }
  285|  1.38k|  }
  286|       |
  287|  1.75k|  return k2;
  288|  1.77k|}
sbrdec_freq_sca.cpp:_ZL13numberOfBandssiii:
  547|    909|{
  548|    909|  FIXP_SGL num_bands_div128;
  549|    909|  int num_bands;
  550|       |
  551|    909|  num_bands_div128 =
  552|    909|      FX_DBL2FX_SGL(fMult(FDK_getNumOctavesDiv8(start, stop), bpo_div16));
  ------------------
  |  |  220|    909|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|    909|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|    909|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  553|       |
  554|    909|  if (warpFlag) {
  ------------------
  |  Branch (554:7): [True: 259, False: 650]
  ------------------
  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|    259|    num_bands_div128 = FX_DBL2FX_SGL(
  ------------------
  |  |  220|  1.03k|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|    259|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|    259|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  |  |  |  Branch (220:41): [Folded, False: 259]
  |  |  |  Branch (220:41): [Folded, False: 0]
  |  |  |  Branch (220:41): [True: 259, Folded]
  |  |  ------------------
  ------------------
  560|    259|        fMult(num_bands_div128, FL2FXCONST_SGL(25200.0 / 32768.0)));
  561|    259|  }
  562|       |
  563|       |  /* add scaled 1 for rounding to even numbers: */
  564|    909|  num_bands_div128 = num_bands_div128 + FL2FXCONST_SGL(1.0f / 128.0f);
  ------------------
  |  |  180|    909|  (FIXP_SGL)(                                                                \
  |  |  181|    909|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 909, Folded]
  |  |  ------------------
  |  |  182|    909|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|    909|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|    909|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 909]
  |  |  ------------------
  |  |  183|    909|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|    909|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|    909|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|    909|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|    909|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|    909|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|    909|          : ((((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|    909|  num_bands = 2 * ((LONG)num_bands_div128 >> (FRACT_BITS - 7));
  ------------------
  |  |  112|    909|#define FRACT_BITS 16  /* single precision */
  ------------------
  567|       |
  568|    909|  return (num_bands);
  569|    909|}
sbrdec_freq_sca.cpp:_ZL9CalcBandsPhhhh:
  582|  2.72k|{
  583|  2.72k|  int i;
  584|  2.72k|  int previous;
  585|  2.72k|  int current;
  586|  2.72k|  FIXP_SGL exact, temp;
  587|  2.72k|  FIXP_SGL bandfactor = calcFactorPerBand(start, stop, num_bands);
  588|       |
  589|  2.72k|  previous = stop; /* Start with highest QMF channel */
  590|  2.72k|  exact = (FIXP_SGL)(
  591|  2.72k|      stop << (FRACT_BITS - 8)); /* Shift left to gain some accuracy */
  ------------------
  |  |  112|  2.72k|#define FRACT_BITS 16  /* single precision */
  ------------------
  592|       |
  593|  33.6k|  for (i = num_bands - 1; i >= 0; i--) {
  ------------------
  |  Branch (593:27): [True: 30.9k, False: 2.72k]
  ------------------
  594|       |    /* Calculate border of next lower sbr band */
  595|  30.9k|    exact = FX_DBL2FX_SGL(fMult(exact, bandfactor));
  ------------------
  |  |  220|  30.9k|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|  30.9k|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|  30.9k|#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.9k|    temp = exact + FL2FXCONST_SGL(128.0 / 32768.0);
  ------------------
  |  |  180|  30.9k|  (FIXP_SGL)(                                                                \
  |  |  181|  30.9k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 30.9k, Folded]
  |  |  ------------------
  |  |  182|  30.9k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  30.9k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  30.9k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 30.9k]
  |  |  ------------------
  |  |  183|  30.9k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  30.9k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  30.9k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  30.9k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  30.9k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  30.9k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  30.9k|          : ((((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.9k|    current = (LONG)temp >> (FRACT_BITS - 8);
  ------------------
  |  |  112|  30.9k|#define FRACT_BITS 16  /* single precision */
  ------------------
  604|       |
  605|       |    /* Save width of band i */
  606|  30.9k|    diff[i] = previous - current;
  607|  30.9k|    previous = current;
  608|  30.9k|  }
  609|  2.72k|}
sbrdec_freq_sca.cpp:_ZL17calcFactorPerBandiii:
  485|  2.72k|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.72k|  FIXP_DBL bandfactor = FL2FXCONST_DBL(0.25f); /* Start value */
  ------------------
  |  |  192|  2.72k|  (FIXP_DBL)(                                                                \
  |  |  193|  2.72k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 2.72k, Folded]
  |  |  ------------------
  |  |  194|  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 (194:14): [Folded, False: 2.72k]
  |  |  ------------------
  |  |  195|  2.72k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  2.72k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  2.72k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  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 */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  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 (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.72k|  FIXP_DBL step = FL2FXCONST_DBL(0.125f); /* Initial increment for factor */
  ------------------
  |  |  192|  2.72k|  (FIXP_DBL)(                                                                \
  |  |  193|  2.72k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 2.72k, Folded]
  |  |  ------------------
  |  |  194|  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 (194:14): [Folded, False: 2.72k]
  |  |  ------------------
  |  |  195|  2.72k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  2.72k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  2.72k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  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 */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  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 (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.72k|  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.72k|  FIXP_DBL start = k_start << (DFRACT_BITS - 8);
  ------------------
  |  |  113|  2.72k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  496|  2.72k|  FIXP_DBL stop = k_stop << (DFRACT_BITS - 8);
  ------------------
  |  |  113|  2.72k|#define DFRACT_BITS 32 /* double precision */
  ------------------
  497|       |
  498|  2.72k|  FIXP_DBL temp;
  499|       |
  500|  2.72k|  int j, i = 0;
  501|       |
  502|   124k|  while (step > FL2FXCONST_DBL(0.0f)) {
  ------------------
  |  |  192|   124k|  (FIXP_DBL)(                                                                \
  |  |  193|   124k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 124k, Folded]
  |  |  ------------------
  |  |  194|   124k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|   124k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   124k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 124k]
  |  |  ------------------
  |  |  195|   124k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|   124k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|   124k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|   124k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|   124k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|   124k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|   124k|          : ((((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: 121k, False: 2.72k]
  ------------------
  503|   121k|    i++;
  504|   121k|    temp = stop;
  505|       |
  506|       |    /* Calculate temp^num_bands: */
  507|  1.50M|    for (j = 0; j < num_bands; j++)
  ------------------
  |  Branch (507:17): [True: 1.38M, False: 121k]
  ------------------
  508|       |      // temp = fMult(temp,bandfactor);
  509|  1.38M|      temp = fMultDiv2(temp, bandfactor) << 2;
  510|       |
  511|   121k|    if (temp < start) { /* Factor too strong, make it weaker */
  ------------------
  |  Branch (511:9): [True: 63.2k, False: 58.2k]
  ------------------
  512|  63.2k|      if (direction == 0)
  ------------------
  |  Branch (512:11): [True: 38.1k, False: 25.1k]
  ------------------
  513|       |        /* Halfen step. Right shift is not done as fract because otherwise the
  514|       |           lowest bit cannot be cleared due to rounding */
  515|  38.1k|        step = (FIXP_DBL)((LONG)step >> 1);
  516|  63.2k|      direction = 1;
  517|  63.2k|      bandfactor = bandfactor + step;
  518|  63.2k|    } else { /* Factor is too weak: make it stronger */
  519|  58.2k|      if (direction == 1) step = (FIXP_DBL)((LONG)step >> 1);
  ------------------
  |  Branch (519:11): [True: 40.8k, False: 17.4k]
  ------------------
  520|  58.2k|      direction = 0;
  521|  58.2k|      bandfactor = bandfactor - step;
  522|  58.2k|    }
  523|       |
  524|   121k|    if (i > 100) {
  ------------------
  |  Branch (524:9): [True: 0, False: 121k]
  ------------------
  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|   121k|  }
  528|  2.72k|  return (bandfactor >= FL2FXCONST_DBL(0.5)) ? (FIXP_SGL)MAXVAL_SGL
  ------------------
  |  |  192|  2.72k|  (FIXP_DBL)(                                                                \
  |  |  193|  2.72k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 2.72k, Folded]
  |  |  ------------------
  |  |  194|  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 (194:14): [Folded, False: 2.72k]
  |  |  ------------------
  |  |  195|  2.72k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  2.72k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  2.72k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  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 */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  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 (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|     88|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  ------------------
  |  Branch (528:10): [True: 88, False: 2.63k]
  ------------------
  529|  2.72k|                                             : FX_DBL2FX_SGL(bandfactor << 1);
  ------------------
  |  |  220|  2.63k|#define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|  2.63k|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |               #define FX_DBL2FX_SGL(val) ((FIXP_SGL)((val) >> (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|  2.63k|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  530|  2.72k|}
sbrdec_freq_sca.cpp:_ZL6cumSumhPhhS_:
  615|  4.01k|                   UCHAR *start_adress) {
  616|  4.01k|  int i;
  617|  4.01k|  start_adress[0] = start_value;
  618|  48.0k|  for (i = 1; i <= length; i++)
  ------------------
  |  Branch (618:15): [True: 44.0k, False: 4.01k]
  ------------------
  619|  44.0k|    start_adress[i] = start_adress[i - 1] + diff[i - 1];
  620|  4.01k|}
sbrdec_freq_sca.cpp:_ZL11modifyBandshPhh:
  630|     81|                             UCHAR length) {
  631|     81|  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|     81|  if (change > (diff[length - 1] - diff[0]) >> 1)
  ------------------
  |  Branch (635:7): [True: 36, False: 45]
  ------------------
  636|     36|    change = (diff[length - 1] - diff[0]) >> 1;
  637|       |
  638|     81|  diff[0] += change;
  639|     81|  diff[length - 1] -= change;
  640|     81|  shellsort(diff, length);
  641|       |
  642|     81|  return SBRDEC_OK;
  643|     81|}
sbrdec_freq_sca.cpp:_ZL17sbrdecUpdateHiResPhS_S_hh:
  650|  1.85k|                              UCHAR xover_band) {
  651|  1.85k|  UCHAR i;
  652|       |
  653|  1.85k|  *num_hires = num_bands - xover_band;
  654|       |
  655|  22.1k|  for (i = xover_band; i <= num_bands; i++) {
  ------------------
  |  Branch (655:24): [True: 20.2k, False: 1.85k]
  ------------------
  656|  20.2k|    h_hires[i - xover_band] = v_k_master[i];
  657|  20.2k|  }
  658|  1.85k|}
sbrdec_freq_sca.cpp:_ZL17sbrdecUpdateLoResPhS_S_h:
  664|  1.85k|                              UCHAR num_hires) {
  665|  1.85k|  UCHAR i;
  666|       |
  667|  1.85k|  if ((num_hires & 1) == 0) {
  ------------------
  |  Branch (667:7): [True: 1.62k, False: 228]
  ------------------
  668|       |    /* If even number of hires bands */
  669|  1.62k|    *num_lores = num_hires >> 1;
  670|       |    /* Use every second lores=hires[0,2,4...] */
  671|  11.2k|    for (i = 0; i <= *num_lores; i++) h_lores[i] = h_hires[i * 2];
  ------------------
  |  Branch (671:17): [True: 9.66k, False: 1.62k]
  ------------------
  672|  1.62k|  } else {
  673|       |    /* Odd number of hires, which means xover is odd */
  674|    228|    *num_lores = (num_hires + 1) >> 1;
  675|       |    /* Use lores=hires[0,1,3,5 ...] */
  676|    228|    h_lores[0] = h_hires[0];
  677|  1.50k|    for (i = 1; i <= *num_lores; i++) {
  ------------------
  |  Branch (677:17): [True: 1.28k, False: 228]
  ------------------
  678|  1.28k|      h_lores[i] = h_hires[i * 2 - 1];
  679|  1.28k|    }
  680|    228|  }
  681|  1.85k|}

sbrDecoder_Open:
  447|  7.35k|                          HANDLE_FDK_QMF_DOMAIN pQmfDomain) {
  448|  7.35k|  HANDLE_SBRDECODER self = NULL;
  449|  7.35k|  SBR_ERROR sbrError = SBRDEC_OK;
  450|  7.35k|  int elIdx;
  451|       |
  452|  7.35k|  if ((pSelf == NULL) || (pQmfDomain == NULL)) {
  ------------------
  |  Branch (452:7): [True: 0, False: 7.35k]
  |  Branch (452:26): [True: 0, False: 7.35k]
  ------------------
  453|      0|    return SBRDEC_INVALID_ARGUMENT;
  454|      0|  }
  455|       |
  456|       |  /* Get memory for this instance */
  457|  7.35k|  self = GetRam_SbrDecoder();
  458|  7.35k|  if (self == NULL) {
  ------------------
  |  Branch (458:7): [True: 0, False: 7.35k]
  ------------------
  459|      0|    sbrError = SBRDEC_MEM_ALLOC_FAILED;
  460|      0|    goto bail;
  461|      0|  }
  462|       |
  463|  7.35k|  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.35k|  self->numDelayFrames = (1); /* set to the max value by default */
  473|       |
  474|       |  /* Initialize header sync state */
  475|  66.2k|  for (elIdx = 0; elIdx < (8); elIdx += 1) {
  ------------------
  |  Branch (475:19): [True: 58.8k, False: 7.35k]
  ------------------
  476|  58.8k|    int i;
  477|   176k|    for (i = 0; i < (1) + 1; i += 1) {
  ------------------
  |  Branch (477:17): [True: 117k, False: 58.8k]
  ------------------
  478|   117k|      self->sbrHeader[elIdx][i].syncState = SBR_NOT_INITIALIZED;
  479|   117k|    }
  480|  58.8k|  }
  481|       |
  482|  7.35k|  *pSelf = self;
  483|       |
  484|  7.35k|bail:
  485|  7.35k|  return sbrError;
  486|  7.35k|}
sbrDecoder_InitElement:
  532|  2.82k|    const UCHAR configMode, UCHAR *configChanged, const INT downscaleFactor) {
  533|  2.82k|  SBR_ERROR sbrError = SBRDEC_OK;
  534|  2.82k|  int chCnt = 0;
  535|  2.82k|  int nSbrElementsStart;
  536|  2.82k|  int nSbrChannelsStart;
  537|  2.82k|  if (self == NULL) {
  ------------------
  |  Branch (537:7): [True: 0, False: 2.82k]
  ------------------
  538|      0|    return SBRDEC_INVALID_ARGUMENT;
  539|      0|  }
  540|       |
  541|  2.82k|  nSbrElementsStart = self->numSbrElements;
  542|  2.82k|  nSbrChannelsStart = self->numSbrChannels;
  543|       |
  544|       |  /* Check core codec AOT */
  545|  2.82k|  if (!sbrDecoder_isCoreCodecValid(coreCodec) || elementIndex >= (8)) {
  ------------------
  |  Branch (545:7): [True: 0, False: 2.82k]
  |  Branch (545:50): [True: 0, False: 2.82k]
  ------------------
  546|      0|    sbrError = SBRDEC_UNSUPPORTED_CONFIG;
  547|      0|    goto bail;
  548|      0|  }
  549|       |
  550|  2.82k|  if (elementID != ID_SCE && elementID != ID_CPE && elementID != ID_LFE) {
  ------------------
  |  Branch (550:7): [True: 936, False: 1.88k]
  |  Branch (550:30): [True: 136, False: 800]
  |  Branch (550:53): [True: 0, False: 136]
  ------------------
  551|      0|    sbrError = SBRDEC_UNSUPPORTED_CONFIG;
  552|      0|    goto bail;
  553|      0|  }
  554|       |
  555|  2.82k|  if (self->sampleRateIn == sampleRateIn &&
  ------------------
  |  Branch (555:7): [True: 383, False: 2.44k]
  ------------------
  556|    383|      self->codecFrameSize == samplesPerFrame && self->coreCodec == coreCodec &&
  ------------------
  |  Branch (556:7): [True: 378, False: 5]
  |  Branch (556:50): [True: 378, False: 0]
  ------------------
  557|    378|      self->pSbrElement[elementIndex] != NULL &&
  ------------------
  |  Branch (557:7): [True: 0, False: 378]
  ------------------
  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.82k|  ) {
  567|       |    /* Nothing to do */
  568|      0|    return SBRDEC_OK;
  569|  2.82k|  } else {
  570|  2.82k|    if (configMode & AC_CM_DET_CFG_CHANGE) {
  ------------------
  |  |  334|  2.82k|  0x000001 /*!< Config mode signalizes the callback to work in config change \
  ------------------
  |  Branch (570:9): [True: 1.50k, False: 1.32k]
  ------------------
  571|  1.50k|      *configChanged = 1;
  572|  1.50k|    }
  573|  2.82k|  }
  574|       |
  575|       |  /* reaching this point the SBR-decoder gets (re-)configured */
  576|       |
  577|       |  /* The flags field is used for all elements! */
  578|  2.82k|  self->flags &=
  579|  2.82k|      (SBRDEC_FORCE_RESET | SBRDEC_FLUSH); /* Keep the global flags. They will
  ------------------
  |  |  231|  2.82k|  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.82k|#define SBRDEC_FLUSH 16384 /* Flag is used to flush all elements in use. */
  ------------------
  580|       |                                              be reset after decoding. */
  581|  2.82k|  self->flags |= (downscaleFactor > 1) ? SBRDEC_ELD_DOWNSCALE : 0;
  ------------------
  |  |  226|     22|  4096 /* Flag indicating that ELD downscaled mode decoding is used */
  ------------------
  |  Branch (581:18): [True: 22, False: 2.80k]
  ------------------
  582|  2.82k|  self->flags |= (coreCodec == AOT_ER_AAC_ELD) ? SBRDEC_ELD_GRID : 0;
  ------------------
  |  |  204|  1.55k|#define SBRDEC_ELD_GRID 1
  ------------------
  |  Branch (582:18): [True: 1.55k, False: 1.27k]
  ------------------
  583|  2.82k|  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.82k]
  ------------------
  584|  2.82k|  self->flags |=
  585|  2.82k|      (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.82k]
  ------------------
  586|  2.82k|  self->flags |= (coreCodec == AOT_DRM_SURROUND)
  ------------------
  |  Branch (586:18): [True: 0, False: 2.82k]
  ------------------
  587|  2.82k|                     ? 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.82k|                     : 0;
  589|  2.82k|  self->flags |= (coreCodec == AOT_USAC) ? SBRDEC_SYNTAX_USAC : 0;
  ------------------
  |  |  206|  1.27k|#define SBRDEC_SYNTAX_USAC 4
  ------------------
  |  Branch (589:18): [True: 1.27k, False: 1.55k]
  ------------------
  590|       |  /* Robustness: Take integer division rounding into consideration. E.g. 22050
  591|       |   * Hz with 4:1 SBR => 5512 Hz core sampling rate. */
  592|  2.82k|  self->flags |= (sampleRateIn == sampleRateOut / 4) ? SBRDEC_QUAD_RATE : 0;
  ------------------
  |  |  215|    428|  128 /* Flag indicating that USAC SBR 4:1 is active. \
  ------------------
  |  Branch (592:18): [True: 428, False: 2.39k]
  ------------------
  593|  2.82k|  self->flags |= (harmonicSBR == 1) ? SBRDEC_USAC_HARMONICSBR : 0;
  ------------------
  |  |  218|    111|  256 /* Flag indicating that USAC HBE tool is active. */
  ------------------
  |  Branch (593:18): [True: 111, False: 2.71k]
  ------------------
  594|       |
  595|  2.82k|  if (configMode & AC_CM_DET_CFG_CHANGE) {
  ------------------
  |  |  334|  2.82k|  0x000001 /*!< Config mode signalizes the callback to work in config change \
  ------------------
  |  Branch (595:7): [True: 1.50k, False: 1.32k]
  ------------------
  596|  1.50k|    return SBRDEC_OK;
  597|  1.50k|  }
  598|       |
  599|  1.32k|  self->sampleRateIn = sampleRateIn;
  600|  1.32k|  self->codecFrameSize = samplesPerFrame;
  601|  1.32k|  self->coreCodec = coreCodec;
  602|  1.32k|  self->harmonicSBR = harmonicSBR;
  603|  1.32k|  self->downscaleFactor = downscaleFactor;
  604|       |
  605|       |  /* Init SBR elements */
  606|  1.32k|  {
  607|  1.32k|    int elChannels, ch;
  608|       |
  609|  1.32k|    if (self->pSbrElement[elementIndex] == NULL) {
  ------------------
  |  Branch (609:9): [True: 1.32k, False: 0]
  ------------------
  610|  1.32k|      self->pSbrElement[elementIndex] = GetRam_SbrDecElement(elementIndex);
  611|  1.32k|      if (self->pSbrElement[elementIndex] == NULL) {
  ------------------
  |  Branch (611:11): [True: 0, False: 1.32k]
  ------------------
  612|      0|        sbrError = SBRDEC_MEM_ALLOC_FAILED;
  613|      0|        goto bail;
  614|      0|      }
  615|  1.32k|      self->numSbrElements++;
  616|  1.32k|    } else {
  617|      0|      self->numSbrChannels -= self->pSbrElement[elementIndex]->nChannels;
  618|      0|    }
  619|       |
  620|       |    /* Determine amount of channels for this element */
  621|  1.32k|    switch (elementID) {
  622|      0|      case ID_NONE:
  ------------------
  |  Branch (622:7): [True: 0, False: 1.32k]
  ------------------
  623|    384|      case ID_CPE:
  ------------------
  |  Branch (623:7): [True: 384, False: 938]
  ------------------
  624|    384|        elChannels = 2;
  625|    384|        break;
  626|     58|      case ID_LFE:
  ------------------
  |  Branch (626:7): [True: 58, False: 1.26k]
  ------------------
  627|    938|      case ID_SCE:
  ------------------
  |  Branch (627:7): [True: 880, False: 442]
  ------------------
  628|    938|        elChannels = 1;
  629|    938|        break;
  630|      0|      default:
  ------------------
  |  Branch (630:7): [True: 0, False: 1.32k]
  ------------------
  631|      0|        elChannels = 0;
  632|      0|        break;
  633|  1.32k|    }
  634|       |
  635|       |    /* Handle case of Parametric Stereo */
  636|  1.32k|    if (elementIndex == 0 && elementID == ID_SCE) {
  ------------------
  |  Branch (636:9): [True: 944, False: 378]
  |  Branch (636:30): [True: 866, False: 78]
  ------------------
  637|    866|      switch (coreCodec) {
  638|      0|        case AOT_AAC_LC:
  ------------------
  |  Branch (638:9): [True: 0, False: 866]
  ------------------
  639|      0|        case AOT_SBR:
  ------------------
  |  Branch (639:9): [True: 0, False: 866]
  ------------------
  640|      0|        case AOT_PS:
  ------------------
  |  Branch (640:9): [True: 0, False: 866]
  ------------------
  641|      0|        case AOT_ER_AAC_SCAL:
  ------------------
  |  Branch (641:9): [True: 0, False: 866]
  ------------------
  642|      0|        case AOT_DRM_AAC:
  ------------------
  |  Branch (642:9): [True: 0, False: 866]
  ------------------
  643|      0|        case AOT_DRM_SURROUND:
  ------------------
  |  Branch (643:9): [True: 0, False: 866]
  ------------------
  644|      0|          elChannels = 2;
  645|      0|          break;
  646|    866|        default:
  ------------------
  |  Branch (646:9): [True: 866, False: 0]
  ------------------
  647|    866|          break;
  648|    866|      }
  649|    866|    }
  650|       |
  651|       |    /* Sanity check to avoid memory leaks */
  652|  1.32k|    if (elChannels < self->pSbrElement[elementIndex]->nChannels ||
  ------------------
  |  Branch (652:9): [True: 0, False: 1.32k]
  ------------------
  653|  1.32k|        (self->numSbrChannels + elChannels) > (8) + (1)) {
  ------------------
  |  Branch (653:9): [True: 0, False: 1.32k]
  ------------------
  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.32k|    self->pSbrElement[elementIndex]->elementID = elementID;
  662|  1.32k|    self->pSbrElement[elementIndex]->nChannels = elChannels;
  663|       |
  664|  3.02k|    for (ch = 0; ch < elChannels; ch++) {
  ------------------
  |  Branch (664:18): [True: 1.70k, False: 1.32k]
  ------------------
  665|  1.70k|      if (self->pSbrElement[elementIndex]->pSbrChannel[ch] == NULL) {
  ------------------
  |  Branch (665:11): [True: 1.70k, False: 0]
  ------------------
  666|  1.70k|        self->pSbrElement[elementIndex]->pSbrChannel[ch] =
  667|  1.70k|            GetRam_SbrDecChannel(chCnt);
  668|  1.70k|        if (self->pSbrElement[elementIndex]->pSbrChannel[ch] == NULL) {
  ------------------
  |  Branch (668:13): [True: 0, False: 1.70k]
  ------------------
  669|      0|          sbrError = SBRDEC_MEM_ALLOC_FAILED;
  670|      0|          goto bail;
  671|      0|        }
  672|  1.70k|      }
  673|  1.70k|      self->numSbrChannels++;
  674|       |
  675|  1.70k|      sbrDecoder_drcInitChannel(&self->pSbrElement[elementIndex]
  676|  1.70k|                                     ->pSbrChannel[ch]
  677|  1.70k|                                     ->SbrDec.sbrDrcChannel);
  678|       |
  679|  1.70k|      chCnt++;
  680|  1.70k|    }
  681|  1.32k|  }
  682|       |
  683|  1.32k|  if (!self->pQmfDomain->globalConf.qmfDomainExplicitConfig) {
  ------------------
  |  Branch (683:7): [True: 1.32k, False: 0]
  ------------------
  684|  1.32k|    self->pQmfDomain->globalConf.nInputChannels_requested =
  685|  1.32k|        self->numSbrChannels;
  686|  1.32k|    self->pQmfDomain->globalConf.nOutputChannels_requested =
  687|  1.32k|        fMax((INT)self->numSbrChannels,
  688|  1.32k|             (INT)self->pQmfDomain->globalConf.nOutputChannels_requested);
  689|  1.32k|  }
  690|       |
  691|       |  /* Make sure each SBR channel has one QMF channel assigned even if
  692|       |   * numSbrChannels or element set-up has changed. */
  693|  1.32k|  sbrDecoder_AssignQmfChannels2SbrChannels(self);
  694|       |
  695|       |  /* clear error flags for all delay slots */
  696|  1.32k|  FDKmemclear(self->pSbrElement[elementIndex]->frameErrorFlag,
  697|  1.32k|              ((1) + 1) * sizeof(UCHAR));
  698|       |
  699|  1.32k|  {
  700|  1.32k|    int overlap;
  701|       |
  702|  1.32k|    if (coreCodec == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (702:9): [True: 756, False: 566]
  ------------------
  703|    756|      overlap = 0;
  704|    756|    } else if (self->flags & SBRDEC_QUAD_RATE) {
  ------------------
  |  |  215|    566|  128 /* Flag indicating that USAC SBR 4:1 is active. \
  ------------------
  |  Branch (704:16): [True: 182, False: 384]
  ------------------
  705|    182|      overlap = (3 * 4);
  706|    384|    } else {
  707|    384|      overlap = (3 * 2);
  708|    384|    }
  709|       |    /* Initialize this instance */
  710|  1.32k|    sbrError = sbrDecoder_ResetElement(self, sampleRateIn, sampleRateOut,
  711|  1.32k|                                       samplesPerFrame, elementID, elementIndex,
  712|  1.32k|                                       overlap);
  713|  1.32k|  }
  714|       |
  715|  1.32k|bail:
  716|  1.32k|  if (sbrError != SBRDEC_OK) {
  ------------------
  |  Branch (716:7): [True: 59, False: 1.26k]
  ------------------
  717|     59|    if ((nSbrElementsStart < self->numSbrElements) ||
  ------------------
  |  Branch (717:9): [True: 59, False: 0]
  ------------------
  718|     59|        (nSbrChannelsStart < self->numSbrChannels)) {
  ------------------
  |  Branch (718:9): [True: 0, False: 0]
  ------------------
  719|       |      /* Free the memory allocated for this element */
  720|     59|      sbrDecoder_DestroyElement(self, elementIndex);
  721|     59|    } 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|     59|  }
  727|       |
  728|  1.32k|  return sbrError;
  729|  1.32k|}
sbrDecoder_FreeMem:
  735|  3.05k|SBR_ERROR sbrDecoder_FreeMem(HANDLE_SBRDECODER *self) {
  736|  3.05k|  int i;
  737|  3.05k|  int elIdx;
  738|       |
  739|  3.05k|  if (self != NULL && *self != NULL) {
  ------------------
  |  Branch (739:7): [True: 3.05k, False: 0]
  |  Branch (739:23): [True: 3.05k, False: 0]
  ------------------
  740|  27.5k|    for (i = 0; i < (8); i++) {
  ------------------
  |  Branch (740:17): [True: 24.4k, False: 3.05k]
  ------------------
  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.05k]
  ------------------
  745|  73.3k|      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.05k|  }
  750|       |
  751|  3.05k|  return SBRDEC_OK;
  752|  3.05k|}
sbrDecoder_Header:
  805|  2.82k|                      const INT downscaleFactor) {
  806|  2.82k|  SBR_HEADER_STATUS headerStatus;
  807|  2.82k|  HANDLE_SBR_HEADER_DATA hSbrHeader;
  808|  2.82k|  SBR_ERROR sbrError = SBRDEC_OK;
  809|  2.82k|  int headerIndex;
  810|  2.82k|  UINT flagsSaved =
  811|  2.82k|      0; /* flags should not be changed in AC_CM_DET_CFG_CHANGE - mode after
  812|       |            parsing */
  813|       |
  814|  2.82k|  if (self == NULL || elementIndex >= (8)) {
  ------------------
  |  Branch (814:7): [True: 0, False: 2.82k]
  |  Branch (814:23): [True: 0, False: 2.82k]
  ------------------
  815|      0|    return SBRDEC_UNSUPPORTED_CONFIG;
  816|      0|  }
  817|       |
  818|  2.82k|  if (!sbrDecoder_isCoreCodecValid(coreCodec)) {
  ------------------
  |  Branch (818:7): [True: 0, False: 2.82k]
  ------------------
  819|      0|    return SBRDEC_UNSUPPORTED_CONFIG;
  820|      0|  }
  821|       |
  822|  2.82k|  if (configMode & AC_CM_DET_CFG_CHANGE) {
  ------------------
  |  |  334|  2.82k|  0x000001 /*!< Config mode signalizes the callback to work in config change \
  ------------------
  |  Branch (822:7): [True: 1.50k, False: 1.32k]
  ------------------
  823|  1.50k|    flagsSaved = self->flags; /* store */
  824|  1.50k|  }
  825|       |
  826|  2.82k|  sbrError = sbrDecoder_InitElement(
  827|  2.82k|      self, sampleRateIn, sampleRateOut, samplesPerFrame, coreCodec, elementID,
  828|  2.82k|      elementIndex, harmonicSBR, stereoConfigIndex, configMode, configChanged,
  829|  2.82k|      downscaleFactor);
  830|       |
  831|  2.82k|  if ((sbrError != SBRDEC_OK) || (elementID == ID_LFE)) {
  ------------------
  |  Branch (831:7): [True: 59, False: 2.76k]
  |  Branch (831:34): [True: 136, False: 2.63k]
  ------------------
  832|    195|    goto bail;
  833|    195|  }
  834|       |
  835|  2.63k|  if (configMode & AC_CM_DET_CFG_CHANGE) {
  ------------------
  |  |  334|  2.63k|  0x000001 /*!< Config mode signalizes the callback to work in config change \
  ------------------
  |  Branch (835:7): [True: 1.42k, False: 1.20k]
  ------------------
  836|  1.42k|    hSbrHeader = NULL;
  837|  1.42k|  } else {
  838|  1.20k|    headerIndex = getHeaderSlot(self->pSbrElement[elementIndex]->useFrameSlot,
  839|  1.20k|                                self->pSbrElement[elementIndex]->useHeaderSlot);
  840|       |
  841|  1.20k|    hSbrHeader = &(self->sbrHeader[elementIndex][headerIndex]);
  842|  1.20k|  }
  843|       |
  844|  2.63k|  headerStatus = sbrGetHeaderData(hSbrHeader, hBs, self->flags, 0, configMode);
  845|       |
  846|  2.63k|  if (coreCodec == AOT_USAC) {
  ------------------
  |  Branch (846:7): [True: 1.23k, False: 1.39k]
  ------------------
  847|  1.23k|    if (configMode & AC_CM_DET_CFG_CHANGE) {
  ------------------
  |  |  334|  1.23k|  0x000001 /*!< Config mode signalizes the callback to work in config change \
  ------------------
  |  Branch (847:9): [True: 706, False: 530]
  ------------------
  848|    706|      self->flags = flagsSaved; /* restore */
  849|    706|    }
  850|  1.23k|    return sbrError;
  851|  1.23k|  }
  852|       |
  853|  1.39k|  if (configMode & AC_CM_ALLOC_MEM) {
  ------------------
  |  |  337|  1.39k|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
  |  Branch (853:7): [True: 675, False: 719]
  ------------------
  854|    675|    SBR_DECODER_ELEMENT *pSbrElement;
  855|       |
  856|    675|    pSbrElement = self->pSbrElement[elementIndex];
  857|       |
  858|       |    /* Sanity check */
  859|    675|    if (pSbrElement != NULL) {
  ------------------
  |  Branch (859:9): [True: 675, False: 0]
  ------------------
  860|    675|      if ((elementID == ID_CPE && pSbrElement->nChannels != 2) ||
  ------------------
  |  Branch (860:12): [True: 351, False: 324]
  |  Branch (860:35): [True: 0, False: 351]
  ------------------
  861|    675|          (elementID != ID_CPE && pSbrElement->nChannels != 1)) {
  ------------------
  |  Branch (861:12): [True: 324, False: 351]
  |  Branch (861:35): [True: 0, False: 324]
  ------------------
  862|      0|        return SBRDEC_UNSUPPORTED_CONFIG;
  863|      0|      }
  864|    675|      if (headerStatus == HEADER_RESET) {
  ------------------
  |  Branch (864:11): [True: 675, False: 0]
  ------------------
  865|    675|        sbrError = sbrDecoder_HeaderUpdate(self, hSbrHeader, headerStatus,
  866|    675|                                           pSbrElement->pSbrChannel,
  867|    675|                                           pSbrElement->nChannels);
  868|       |
  869|    675|        if (sbrError == SBRDEC_OK) {
  ------------------
  |  Branch (869:13): [True: 527, False: 148]
  ------------------
  870|    527|          hSbrHeader->syncState = SBR_HEADER;
  871|    527|          hSbrHeader->status |= SBRDEC_HDR_STAT_UPDATE;
  ------------------
  |  |  240|    527|#define SBRDEC_HDR_STAT_UPDATE 2
  ------------------
  872|    527|        } else {
  873|    148|          hSbrHeader->syncState = SBR_NOT_INITIALIZED;
  874|    148|          hSbrHeader->status = HEADER_ERROR;
  875|    148|        }
  876|    675|      }
  877|    675|    }
  878|    675|  }
  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: 797, False: 792]
  ------------------
  881|    797|    self->flags = flagsSaved; /* restore */
  882|    797|  }
  883|  1.58k|  return sbrError;
  884|  1.39k|}
sbrDecoder_SetParam:
  887|  9.92k|                              const INT value) {
  888|  9.92k|  SBR_ERROR errorStatus = SBRDEC_OK;
  889|       |
  890|       |  /* configure the subsystems */
  891|  9.92k|  switch (param) {
  892|  9.92k|    case SBR_SYSTEM_BITSTREAM_DELAY:
  ------------------
  |  Branch (892:5): [True: 9.92k, False: 0]
  ------------------
  893|  9.92k|      if (value < 0 || value > (1)) {
  ------------------
  |  Branch (893:11): [True: 0, False: 9.92k]
  |  Branch (893:24): [True: 0, False: 9.92k]
  ------------------
  894|      0|        errorStatus = SBRDEC_SET_PARAM_FAIL;
  895|      0|        break;
  896|      0|      }
  897|  9.92k|      if (self == NULL) {
  ------------------
  |  Branch (897:11): [True: 0, False: 9.92k]
  ------------------
  898|      0|        errorStatus = SBRDEC_NOT_INITIALIZED;
  899|  9.92k|      } else {
  900|  9.92k|        self->numDelayFrames = (UCHAR)value;
  901|  9.92k|      }
  902|  9.92k|      break;
  903|      0|    case SBR_QMF_MODE:
  ------------------
  |  Branch (903:5): [True: 0, False: 9.92k]
  ------------------
  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.92k]
  ------------------
  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.92k]
  ------------------
  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.92k]
  ------------------
  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.92k]
  ------------------
  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.92k]
  ------------------
  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.92k]
  ------------------
  989|      0|      errorStatus = SBRDEC_SET_PARAM_FAIL;
  990|      0|      break;
  991|  9.92k|  } /* switch(param) */
  992|       |
  993|  9.92k|  return (errorStatus);
  994|  9.92k|}
sbrDecoder_Close:
 1933|  7.35k|SBR_ERROR sbrDecoder_Close(HANDLE_SBRDECODER *pSelf) {
 1934|  7.35k|  HANDLE_SBRDECODER self = *pSelf;
 1935|  7.35k|  int i;
 1936|       |
 1937|  7.35k|  if (self != NULL) {
  ------------------
  |  Branch (1937:7): [True: 7.35k, False: 0]
  ------------------
 1938|  7.35k|    if (self->hParametricStereoDec != NULL) {
  ------------------
  |  Branch (1938:9): [True: 0, False: 7.35k]
  ------------------
 1939|      0|      DeletePsDec(&self->hParametricStereoDec);
 1940|      0|    }
 1941|       |
 1942|  66.2k|    for (i = 0; i < (8); i++) {
  ------------------
  |  Branch (1942:17): [True: 58.8k, False: 7.35k]
  ------------------
 1943|  58.8k|      sbrDecoder_DestroyElement(self, i);
 1944|  58.8k|    }
 1945|       |
 1946|  7.35k|    FreeRam_SbrDecoder(pSelf);
 1947|  7.35k|  }
 1948|       |
 1949|  7.35k|  return SBRDEC_OK;
 1950|  7.35k|}
sbrdecoder.cpp:_ZL27sbrDecoder_isCoreCodecValid17AUDIO_OBJECT_TYPE:
  493|  5.65k|static int sbrDecoder_isCoreCodecValid(AUDIO_OBJECT_TYPE coreCodec) {
  494|  5.65k|  switch (coreCodec) {
  495|      0|    case AOT_AAC_LC:
  ------------------
  |  Branch (495:5): [True: 0, False: 5.65k]
  ------------------
  496|      0|    case AOT_SBR:
  ------------------
  |  Branch (496:5): [True: 0, False: 5.65k]
  ------------------
  497|      0|    case AOT_PS:
  ------------------
  |  Branch (497:5): [True: 0, False: 5.65k]
  ------------------
  498|      0|    case AOT_ER_AAC_SCAL:
  ------------------
  |  Branch (498:5): [True: 0, False: 5.65k]
  ------------------
  499|  3.10k|    case AOT_ER_AAC_ELD:
  ------------------
  |  Branch (499:5): [True: 3.10k, False: 2.54k]
  ------------------
  500|  3.10k|    case AOT_DRM_AAC:
  ------------------
  |  Branch (500:5): [True: 0, False: 5.65k]
  ------------------
  501|  3.10k|    case AOT_DRM_SURROUND:
  ------------------
  |  Branch (501:5): [True: 0, False: 5.65k]
  ------------------
  502|  5.65k|    case AOT_USAC:
  ------------------
  |  Branch (502:5): [True: 2.54k, False: 3.10k]
  ------------------
  503|  5.65k|      return 1;
  504|      0|    default:
  ------------------
  |  Branch (504:5): [True: 0, False: 5.65k]
  ------------------
  505|      0|      return 0;
  506|  5.65k|  }
  507|  5.65k|}
sbrdecoder.cpp:_ZL40sbrDecoder_AssignQmfChannels2SbrChannelsP20SBR_DECODER_INSTANCE:
  429|  1.32k|static void sbrDecoder_AssignQmfChannels2SbrChannels(HANDLE_SBRDECODER self) {
  430|  1.32k|  int ch, el, absCh_offset = 0;
  431|  3.39k|  for (el = 0; el < self->numSbrElements; el++) {
  ------------------
  |  Branch (431:16): [True: 2.06k, False: 1.32k]
  ------------------
  432|  2.06k|    if (self->pSbrElement[el] != NULL) {
  ------------------
  |  Branch (432:9): [True: 2.06k, False: 0]
  ------------------
  433|  4.87k|      for (ch = 0; ch < self->pSbrElement[el]->nChannels; ch++) {
  ------------------
  |  Branch (433:20): [True: 2.81k, False: 2.06k]
  ------------------
  434|  2.81k|        FDK_ASSERT(((absCh_offset + ch) < ((8) + (1))) &&
  ------------------
  |  |  221|  2.81k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (434:9): [True: 2.81k, False: 0]
  |  Branch (434:9): [True: 2.81k, False: 0]
  |  Branch (434:9): [True: 2.81k, False: 0]
  ------------------
  435|  2.81k|                   ((absCh_offset + ch) < ((8) + (1))));
  436|  2.81k|        self->pSbrElement[el]->pSbrChannel[ch]->SbrDec.qmfDomainInCh =
  437|  2.81k|            &self->pQmfDomain->QmfDomainIn[absCh_offset + ch];
  438|  2.81k|        self->pSbrElement[el]->pSbrChannel[ch]->SbrDec.qmfDomainOutCh =
  439|  2.81k|            &self->pQmfDomain->QmfDomainOut[absCh_offset + ch];
  440|  2.81k|      }
  441|  2.06k|      absCh_offset += self->pSbrElement[el]->nChannels;
  442|  2.06k|    }
  443|  2.06k|  }
  444|  1.32k|}
sbrdecoder.cpp:_ZL23sbrDecoder_ResetElementP20SBR_DECODER_INSTANCEiii14MP4_ELEMENT_IDii:
  278|  1.32k|                                         const int overlap) {
  279|  1.32k|  SBR_ERROR sbrError = SBRDEC_OK;
  280|  1.32k|  HANDLE_SBR_HEADER_DATA hSbrHeader;
  281|  1.32k|  UINT qmfFlags = 0;
  282|       |
  283|  1.32k|  int i, synDownsampleFac;
  284|       |
  285|       |  /* USAC: assuming theoretical case 8 kHz output sample rate with 4:1 SBR */
  286|  1.32k|  const int sbr_min_sample_rate_in = IS_USAC(self->coreCodec) ? 2000 : 6400;
  ------------------
  |  |  226|  1.32k|#define IS_USAC(aot) ((aot) == AOT_USAC)
  |  |  ------------------
  |  |  |  Branch (226:22): [True: 566, False: 756]
  |  |  ------------------
  ------------------
  287|       |
  288|       |  /* Check in/out samplerates */
  289|  1.32k|  if (sampleRateIn < sbr_min_sample_rate_in || sampleRateIn > (96000)) {
  ------------------
  |  Branch (289:7): [True: 11, False: 1.31k]
  |  Branch (289:48): [True: 19, False: 1.29k]
  ------------------
  290|     30|    sbrError = SBRDEC_UNSUPPORTED_CONFIG;
  291|     30|    goto bail;
  292|     30|  }
  293|       |
  294|  1.29k|  if (sampleRateOut > (96000)) {
  ------------------
  |  Branch (294:7): [True: 3, False: 1.28k]
  ------------------
  295|      3|    sbrError = SBRDEC_UNSUPPORTED_CONFIG;
  296|      3|    goto bail;
  297|      3|  }
  298|       |
  299|       |  /* Set QMF mode flags */
  300|  1.28k|  if (self->flags & SBRDEC_LOW_POWER) qmfFlags |= QMF_FLAG_LP;
  ------------------
  |  |  211|  1.28k|  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.28k]
  ------------------
  301|       |
  302|  1.28k|  if (self->coreCodec == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (302:7): [True: 734, False: 555]
  ------------------
  303|    734|    if (self->flags & SBRDEC_LD_MPS_QMF) {
  ------------------
  |  |  220|    734|  512 /* Flag indicating that the LD-MPS QMF shall be used. */
  ------------------
  |  Branch (303:9): [True: 0, False: 734]
  ------------------
  304|      0|      qmfFlags |= QMF_FLAG_MPSLDFB;
  ------------------
  |  |  137|      0|#define QMF_FLAG_MPSLDFB 16
  ------------------
  305|    734|    } else {
  306|    734|      qmfFlags |= QMF_FLAG_CLDFB;
  ------------------
  |  |  133|    734|#define QMF_FLAG_CLDFB 4
  ------------------
  307|    734|    }
  308|    734|  }
  309|       |
  310|       |  /* Set downsampling factor for synthesis filter bank */
  311|  1.28k|  if (sampleRateOut == 0) {
  ------------------
  |  Branch (311:7): [True: 0, False: 1.28k]
  ------------------
  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.28k|  if (sampleRateIn == sampleRateOut) {
  ------------------
  |  Branch (318:7): [True: 518, False: 771]
  ------------------
  319|    518|    synDownsampleFac = 2;
  320|    518|    self->flags |= SBRDEC_DOWNSAMPLE;
  ------------------
  |  |  228|    518|  8192 /* Flag indicating that the downsampling mode is used. */
  ------------------
  321|    771|  } else {
  322|    771|    synDownsampleFac = 1;
  323|    771|    self->flags &= ~SBRDEC_DOWNSAMPLE;
  ------------------
  |  |  228|    771|  8192 /* Flag indicating that the downsampling mode is used. */
  ------------------
  324|    771|  }
  325|       |
  326|  1.28k|  self->synDownsampleFac = synDownsampleFac;
  327|  1.28k|  self->sampleRateOut = sampleRateOut;
  328|       |
  329|  1.28k|  {
  330|  3.86k|    for (i = 0; i < (1) + 1; i++) {
  ------------------
  |  Branch (330:17): [True: 2.57k, False: 1.28k]
  ------------------
  331|  2.57k|      int setDflt;
  332|  2.57k|      hSbrHeader = &(self->sbrHeader[elementIndex][i]);
  333|  2.57k|      setDflt = ((hSbrHeader->syncState == SBR_NOT_INITIALIZED) ||
  ------------------
  |  Branch (333:18): [True: 2.57k, 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.57k|                    ? 1
  336|  2.57k|                    : 0;
  337|       |
  338|       |      /* init a default header such that we can at least do upsampling later */
  339|  2.57k|      sbrError = initHeaderData(hSbrHeader, sampleRateIn, sampleRateOut,
  340|  2.57k|                                self->downscaleFactor, samplesPerFrame,
  341|  2.57k|                                self->flags, setDflt);
  342|       |
  343|       |      /* Set synchState to UPSAMPLING in case it already is initialized */
  344|  2.57k|      hSbrHeader->syncState = hSbrHeader->syncState > UPSAMPLING
  ------------------
  |  Branch (344:31): [True: 0, False: 2.57k]
  ------------------
  345|  2.57k|                                  ? UPSAMPLING
  346|  2.57k|                                  : hSbrHeader->syncState;
  347|  2.57k|    }
  348|  1.28k|  }
  349|       |
  350|  1.28k|  if (sbrError != SBRDEC_OK) {
  ------------------
  |  Branch (350:7): [True: 0, False: 1.28k]
  ------------------
  351|      0|    goto bail;
  352|      0|  }
  353|       |
  354|  1.28k|  if (!self->pQmfDomain->globalConf.qmfDomainExplicitConfig) {
  ------------------
  |  Branch (354:7): [True: 1.28k, False: 0]
  ------------------
  355|  1.28k|    self->pQmfDomain->globalConf.flags_requested |= qmfFlags;
  356|  1.28k|    self->pQmfDomain->globalConf.nBandsAnalysis_requested =
  357|  1.28k|        self->sbrHeader[elementIndex][0].numberOfAnalysisBands;
  358|  1.28k|    self->pQmfDomain->globalConf.nBandsSynthesis_requested =
  359|  1.28k|        (synDownsampleFac == 1) ? 64 : 32; /* may be overwritten by MPS */
  ------------------
  |  Branch (359:9): [True: 771, False: 518]
  ------------------
  360|  1.28k|    self->pQmfDomain->globalConf.nBandsSynthesis_requested /=
  361|  1.28k|        self->downscaleFactor;
  362|  1.28k|    self->pQmfDomain->globalConf.nQmfTimeSlots_requested =
  363|  1.28k|        self->sbrHeader[elementIndex][0].numberTimeSlots *
  364|  1.28k|        self->sbrHeader[elementIndex][0].timeStep;
  365|  1.28k|    self->pQmfDomain->globalConf.nQmfOvTimeSlots_requested = overlap;
  366|  1.28k|    self->pQmfDomain->globalConf.nQmfProcBands_requested = 64; /* always 64 */
  367|  1.28k|    self->pQmfDomain->globalConf.nQmfProcChannels_requested =
  368|  1.28k|        1; /* may be overwritten by MPS */
  369|  1.28k|  }
  370|       |
  371|       |  /* Init SBR channels going to be assigned to a SBR element */
  372|  1.28k|  {
  373|  1.28k|    int ch;
  374|  2.93k|    for (ch = 0; ch < self->pSbrElement[elementIndex]->nChannels; ch++) {
  ------------------
  |  Branch (374:18): [True: 1.66k, False: 1.26k]
  ------------------
  375|  1.66k|      int headerIndex =
  376|  1.66k|          getHeaderSlot(self->pSbrElement[elementIndex]->useFrameSlot,
  377|  1.66k|                        self->pSbrElement[elementIndex]->useHeaderSlot);
  378|       |
  379|       |      /* and create sbrDec */
  380|  1.66k|      sbrError =
  381|  1.66k|          createSbrDec(self->pSbrElement[elementIndex]->pSbrChannel[ch],
  382|  1.66k|                       &self->sbrHeader[elementIndex][headerIndex],
  383|  1.66k|                       &self->pSbrElement[elementIndex]->transposerSettings,
  384|  1.66k|                       synDownsampleFac, qmfFlags, self->flags, overlap, ch,
  385|  1.66k|                       self->codecFrameSize);
  386|       |
  387|  1.66k|      if (sbrError != SBRDEC_OK) {
  ------------------
  |  Branch (387:11): [True: 26, False: 1.64k]
  ------------------
  388|     26|        goto bail;
  389|     26|      }
  390|  1.66k|    }
  391|  1.28k|  }
  392|       |
  393|       |  // FDKmemclear(sbr_OverlapBuffer, sizeof(sbr_OverlapBuffer));
  394|       |
  395|  1.26k|  if (self->numSbrElements == 1) {
  ------------------
  |  Branch (395:7): [True: 885, False: 378]
  ------------------
  396|    885|    switch (self->coreCodec) {
  397|      0|      case AOT_AAC_LC:
  ------------------
  |  Branch (397:7): [True: 0, False: 885]
  ------------------
  398|      0|      case AOT_SBR:
  ------------------
  |  Branch (398:7): [True: 0, False: 885]
  ------------------
  399|      0|      case AOT_PS:
  ------------------
  |  Branch (399:7): [True: 0, False: 885]
  ------------------
  400|      0|      case AOT_ER_AAC_SCAL:
  ------------------
  |  Branch (400:7): [True: 0, False: 885]
  ------------------
  401|      0|      case AOT_DRM_AAC:
  ------------------
  |  Branch (401:7): [True: 0, False: 885]
  ------------------
  402|      0|      case AOT_DRM_SURROUND:
  ------------------
  |  Branch (402:7): [True: 0, False: 885]
  ------------------
  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|    885|      default:
  ------------------
  |  Branch (408:7): [True: 885, False: 0]
  ------------------
  409|    885|        break;
  410|    885|    }
  411|    885|  }
  412|       |
  413|       |  /* Init frame delay slot handling */
  414|  1.26k|  self->pSbrElement[elementIndex]->useFrameSlot = 0;
  415|  3.78k|  for (i = 0; i < ((1) + 1); i++) {
  ------------------
  |  Branch (415:15): [True: 2.52k, False: 1.26k]
  ------------------
  416|  2.52k|    self->pSbrElement[elementIndex]->useHeaderSlot[i] = i;
  417|  2.52k|  }
  418|       |
  419|  1.32k|bail:
  420|       |
  421|  1.32k|  return sbrError;
  422|  1.26k|}
sbrdecoder.cpp:_ZL25sbrDecoder_DestroyElementP20SBR_DECODER_INSTANCEi:
  510|  83.3k|                                      const int elementIndex) {
  511|  83.3k|  if (self->pSbrElement[elementIndex] != NULL) {
  ------------------
  |  Branch (511:7): [True: 1.32k, False: 82.0k]
  ------------------
  512|  1.32k|    int ch;
  513|       |
  514|  3.96k|    for (ch = 0; ch < SBRDEC_MAX_CH_PER_ELEMENT; ch++) {
  ------------------
  |  |  115|  3.96k|#define SBRDEC_MAX_CH_PER_ELEMENT (2)
  ------------------
  |  Branch (514:18): [True: 2.64k, False: 1.32k]
  ------------------
  515|  2.64k|      if (self->pSbrElement[elementIndex]->pSbrChannel[ch] != NULL) {
  ------------------
  |  Branch (515:11): [True: 1.70k, False: 938]
  ------------------
  516|  1.70k|        deleteSbrDec(self->pSbrElement[elementIndex]->pSbrChannel[ch]);
  517|  1.70k|        FreeRam_SbrDecChannel(
  518|  1.70k|            &self->pSbrElement[elementIndex]->pSbrChannel[ch]);
  519|  1.70k|        self->numSbrChannels -= 1;
  520|  1.70k|      }
  521|  2.64k|    }
  522|  1.32k|    FreeRam_SbrDecElement(&self->pSbrElement[elementIndex]);
  523|  1.32k|    self->numSbrElements -= 1;
  524|  1.32k|  }
  525|  83.3k|}
sbrdecoder.cpp:_ZL13getHeaderSlothPh:
  182|  2.87k|static UCHAR getHeaderSlot(UCHAR currentSlot, UCHAR hdrSlotUsage[(1) + 1]) {
  183|  2.87k|  UINT occupied = 0;
  184|  2.87k|  int s;
  185|  2.87k|  UCHAR slot = hdrSlotUsage[currentSlot];
  186|       |
  187|  2.87k|  FDK_ASSERT((1) + 1 < 32);
  ------------------
  |  |  221|  2.87k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (187:3): [True: 2.87k, Folded]
  ------------------
  188|       |
  189|  6.95k|  for (s = 0; s < (1) + 1; s++) {
  ------------------
  |  Branch (189:15): [True: 5.74k, False: 1.20k]
  ------------------
  190|  5.74k|    if ((hdrSlotUsage[s] == slot) && (s != slot)) {
  ------------------
  |  Branch (190:9): [True: 4.54k, False: 1.20k]
  |  Branch (190:38): [True: 1.66k, False: 2.87k]
  ------------------
  191|  1.66k|      occupied = 1;
  192|  1.66k|      break;
  193|  1.66k|    }
  194|  5.74k|  }
  195|       |
  196|  2.87k|  if (occupied) {
  ------------------
  |  Branch (196:7): [True: 1.66k, False: 1.20k]
  ------------------
  197|  1.66k|    occupied = 0;
  198|       |
  199|  5.00k|    for (s = 0; s < (1) + 1; s++) {
  ------------------
  |  Branch (199:17): [True: 3.33k, False: 1.66k]
  ------------------
  200|  3.33k|      occupied |= 1 << hdrSlotUsage[s];
  201|  3.33k|    }
  202|  3.33k|    for (s = 0; s < (1) + 1; s++) {
  ------------------
  |  Branch (202:17): [True: 3.33k, False: 0]
  ------------------
  203|  3.33k|      if (!(occupied & 0x1)) {
  ------------------
  |  Branch (203:11): [True: 1.66k, False: 1.66k]
  ------------------
  204|  1.66k|        slot = s;
  205|  1.66k|        break;
  206|  1.66k|      }
  207|  1.66k|      occupied >>= 1;
  208|  1.66k|    }
  209|  1.66k|  }
  210|       |
  211|  2.87k|  return slot;
  212|  2.87k|}
sbrdecoder.cpp:_ZL23sbrDecoder_HeaderUpdateP20SBR_DECODER_INSTANCEP15SBR_HEADER_DATA17SBR_HEADER_STATUSPP11SBR_CHANNELi:
  768|    675|                                         const int numElementChannels) {
  769|    675|  SBR_ERROR errorStatus = SBRDEC_OK;
  770|       |
  771|       |  /*
  772|       |    change of control data, reset decoder
  773|       |  */
  774|    675|  errorStatus = resetFreqBandTables(hSbrHeader, self->flags);
  775|       |
  776|    675|  if (errorStatus == SBRDEC_OK) {
  ------------------
  |  Branch (776:7): [True: 527, False: 148]
  ------------------
  777|    527|    if (hSbrHeader->syncState == UPSAMPLING && headerStatus != HEADER_RESET) {
  ------------------
  |  Branch (777:9): [True: 0, False: 527]
  |  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|    527|    hSbrHeader->status |= SBRDEC_HDR_STAT_RESET;
  ------------------
  |  |  239|    527|#define SBRDEC_HDR_STAT_RESET 1
  ------------------
  793|    527|  }
  794|       |
  795|    675|  return errorStatus;
  796|    675|}

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

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

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

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.35k|                         const UINT mapInfoTabLen, const UINT fPassThrough) {
  249|  7.35k|  if (pMapDescr != NULL) {
  ------------------
  |  Branch (249:7): [True: 7.35k, False: 0]
  ------------------
  250|  7.35k|    int useDefaultTab = 1;
  251|       |
  252|  7.35k|    pMapDescr->fPassThrough = (fPassThrough == 0) ? 0 : 1;
  ------------------
  |  Branch (252:31): [True: 7.35k, False: 0]
  ------------------
  253|       |
  254|  7.35k|    if ((pMapInfoTab != NULL) && (mapInfoTabLen > 0)) {
  ------------------
  |  Branch (254:9): [True: 0, False: 7.35k]
  |  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.35k|    if (useDefaultTab != 0) {
  ------------------
  |  Branch (261:9): [True: 7.35k, False: 0]
  ------------------
  262|       |      /* Set default table. */
  263|  7.35k|      pMapDescr->pMapInfoTab = mapInfoTabDflt;
  264|  7.35k|      pMapDescr->mapInfoTabLen = DFLT_CH_MAP_TAB_LEN;
  ------------------
  |  |  110|  7.35k|  (15) /* Length of the default channel map info table. */
  ------------------
  265|  7.35k|    }
  266|  7.35k|  }
  267|  7.35k|}
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.36k|extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
   21|  7.36k|  HANDLE_AACDECODER aacDecoderInfo = NULL;
   22|       |
   23|  7.36k|  UCHAR *conf[FILEREAD_MAX_LAYERS];
   24|  7.36k|  UINT confSize[FILEREAD_MAX_LAYERS];
   25|       |
   26|  7.36k|  if (Size > 255) return 0;
  ------------------
  |  Branch (26:7): [True: 11, False: 7.35k]
  ------------------
   27|       |
   28|  7.35k|  aacDecoderInfo = aacDecoder_Open(TT_MP4_ADIF, FILEREAD_MAX_LAYERS);
  ------------------
  |  |   18|  7.35k|#define FILEREAD_MAX_LAYERS 1
  ------------------
   29|  7.35k|  FDK_ASSERT(aacDecoderInfo != NULL);
  ------------------
  |  |  221|  7.35k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (29:3): [True: 7.35k, 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.35k, False: 7.35k]
  ------------------
   32|  7.35k|    conf[layer] = const_cast<UCHAR *>(Data);
   33|  7.35k|    confSize[layer] = Size;
   34|  7.35k|  }
   35|       |
   36|  7.35k|  aacDecoder_ConfigRaw(aacDecoderInfo, conf, confSize);
   37|  7.35k|  aacDecoder_Close(aacDecoderInfo);
   38|  7.35k|  return 0;
   39|  7.35k|}

