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

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

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

_Z23CAacDecoder_AncDataInitP8CAncDataPhi:
  341|  6.83k|                                          unsigned char *buffer, int size) {
  342|  6.83k|  if (size >= 0) {
  ------------------
  |  Branch (342:7): [True: 6.83k, False: 0]
  ------------------
  343|  6.83k|    ancData->buffer = buffer;
  344|  6.83k|    ancData->bufferSize = size;
  345|       |
  346|  6.83k|    CAacDecoder_AncDataReset(ancData);
  347|       |
  348|  6.83k|    return AAC_DEC_OK;
  349|  6.83k|  }
  350|       |
  351|      0|  return AAC_DEC_ANC_DATA_ERROR;
  352|  6.83k|}
_Z16CAacDecoder_Open14TRANSPORT_TYPE:
 1282|  6.83k|{
 1283|  6.83k|  HANDLE_AACDECODER self;
 1284|       |
 1285|  6.83k|  self = GetAacDecoder();
 1286|  6.83k|  if (self == NULL) {
  ------------------
  |  Branch (1286:7): [True: 0, False: 6.83k]
  ------------------
 1287|      0|    goto bail;
 1288|      0|  }
 1289|       |
 1290|  6.83k|  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|  6.83k|  self->streamInfo.pChannelIndices = self->channelIndices;
 1295|  6.83k|  self->streamInfo.pChannelType = self->channelType;
 1296|  6.83k|  self->downscaleFactor = 1;
 1297|  6.83k|  self->downscaleFactorInBS = 1;
 1298|       |
 1299|       |  /* initialize anc data */
 1300|  6.83k|  CAacDecoder_AncDataInit(&self->ancData, NULL, 0);
 1301|       |
 1302|       |  /* initialize stream info */
 1303|  6.83k|  CStreamInfoInit(&self->streamInfo);
 1304|       |
 1305|       |  /* initialize progam config */
 1306|  6.83k|  CProgramConfig_Init(&self->pce);
 1307|       |
 1308|       |  /* initialize error concealment common data */
 1309|  6.83k|  CConcealment_InitCommonData(&self->concealCommonData);
 1310|  6.83k|  self->concealMethodUser = ConcealMethodNone; /* undefined -> auto mode */
 1311|       |
 1312|  6.83k|  self->hDrcInfo = GetDrcInfo();
 1313|  6.83k|  if (self->hDrcInfo == NULL) {
  ------------------
  |  Branch (1313:7): [True: 0, False: 6.83k]
  ------------------
 1314|      0|    goto bail;
 1315|      0|  }
 1316|       |  /* Init common DRC structure */
 1317|  6.83k|  aacDecoder_drcInit(self->hDrcInfo);
 1318|       |  /* Set default frame delay */
 1319|  6.83k|  aacDecoder_drcSetParam(self->hDrcInfo, DRC_BS_DELAY,
 1320|  6.83k|                         CConcealment_GetDelay(&self->concealCommonData));
 1321|  6.83k|  self->workBufferCore1 = (FIXP_DBL *)GetWorkBufferCore1();
 1322|       |
 1323|  6.83k|  self->workBufferCore2 = GetWorkBufferCore2();
 1324|  6.83k|  if (self->workBufferCore2 == NULL) goto bail;
  ------------------
  |  Branch (1324:7): [True: 0, False: 6.83k]
  ------------------
 1325|       |
 1326|       |  /* When RSVD60 is active use dedicated memory for core decoding */
 1327|  6.83k|  self->pTimeData2 = GetWorkBufferCore5();
 1328|  6.83k|  self->timeData2Size = GetRequiredMemWorkBufferCore5();
 1329|  6.83k|  if (self->pTimeData2 == NULL) {
  ------------------
  |  Branch (1329:7): [True: 0, False: 6.83k]
  ------------------
 1330|      0|    goto bail;
 1331|      0|  }
 1332|       |
 1333|  6.83k|  return self;
 1334|       |
 1335|      0|bail:
 1336|      0|  CAacDecoder_Close(self);
 1337|       |
 1338|       |  return NULL;
 1339|  6.83k|}
_Z19CAacDecoder_FreeMemP20AAC_DECODER_INSTANCEi:
 1491|  2.88k|                                                   const int subStreamIndex) {
 1492|  2.88k|  AAC_DECODER_ERROR err = AAC_DEC_OK;
 1493|       |
 1494|  2.88k|  CAacDecoder_DeInit(self, subStreamIndex);
 1495|       |
 1496|  2.88k|  return (err);
 1497|  2.88k|}
_Z17CAacDecoder_CloseP20AAC_DECODER_INSTANCE:
 1500|  6.83k|LINKSPEC_CPP void CAacDecoder_Close(HANDLE_AACDECODER self) {
 1501|  6.83k|  if (self == NULL) return;
  ------------------
  |  Branch (1501:7): [True: 0, False: 6.83k]
  ------------------
 1502|       |
 1503|  6.83k|  CAacDecoder_DeInit(self, 0);
 1504|       |
 1505|  6.83k|  {
 1506|  6.83k|    int ch;
 1507|  61.4k|    for (ch = 0; ch < (8); ch++) {
  ------------------
  |  Branch (1507:18): [True: 54.6k, False: 6.83k]
  ------------------
 1508|  54.6k|      if (self->pTimeDataFlush[ch] != NULL) {
  ------------------
  |  Branch (1508:11): [True: 1.85k, False: 52.8k]
  ------------------
 1509|  1.85k|        FreeTimeDataFlush(&self->pTimeDataFlush[ch]);
 1510|  1.85k|      }
 1511|  54.6k|    }
 1512|  6.83k|  }
 1513|       |
 1514|  6.83k|  if (self->hDrcInfo) {
  ------------------
  |  Branch (1514:7): [True: 6.83k, False: 0]
  ------------------
 1515|  6.83k|    FreeDrcInfo(&self->hDrcInfo);
 1516|  6.83k|  }
 1517|       |
 1518|  6.83k|  if (self->workBufferCore1 != NULL) {
  ------------------
  |  Branch (1518:7): [True: 6.83k, False: 0]
  ------------------
 1519|  6.83k|    FreeWorkBufferCore1((CWorkBufferCore1 **)&self->workBufferCore1);
 1520|  6.83k|  }
 1521|       |
 1522|       |  /* Free WorkBufferCore2 */
 1523|  6.83k|  if (self->workBufferCore2 != NULL) {
  ------------------
  |  Branch (1523:7): [True: 6.83k, False: 0]
  ------------------
 1524|  6.83k|    FreeWorkBufferCore2(&self->workBufferCore2);
 1525|  6.83k|  }
 1526|  6.83k|  if (self->pTimeData2 != NULL) {
  ------------------
  |  Branch (1526:7): [True: 6.83k, False: 0]
  ------------------
 1527|  6.83k|    FreeWorkBufferCore5(&self->pTimeData2);
 1528|  6.83k|  }
 1529|       |
 1530|  6.83k|  FDK_QmfDomain_Close(&self->qmfDomain);
 1531|       |
 1532|  6.83k|  FreeAacDecoder(&self);
 1533|  6.83k|}
_Z16CAacDecoder_InitP20AAC_DECODER_INSTANCEPK21CSAudioSpecificConfighPh:
 1544|  5.96k|                 UCHAR configMode, UCHAR *configChanged) {
 1545|  5.96k|  AAC_DECODER_ERROR err = AAC_DEC_OK;
 1546|  5.96k|  INT ascChannels, ascChanged = 0;
 1547|  5.96k|  AACDEC_RENDER_MODE initRenderMode = AACDEC_RENDER_INVALID;
 1548|  5.96k|  SCHAR usacStereoConfigIndex = -1;
 1549|  5.96k|  int usacResidualDelayCompSamples = 0;
 1550|  5.96k|  int elementOffset, aacChannelsOffset, aacChannelsOffsetIdx;
 1551|  5.96k|  const int streamIndex = 0;
 1552|  5.96k|  INT flushChannels = 0;
 1553|       |
 1554|  5.96k|  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|  5.96k|  UINT elFlags[(3 * ((8) * 2) + (((8) * 2)) / 2 + 4 * (1) + 1)];
 1558|       |
 1559|  5.96k|  UCHAR sbrEnabled = self->sbrEnabled;
 1560|  5.96k|  UCHAR sbrEnabledPrev = self->sbrEnabledPrev;
 1561|  5.96k|  UCHAR mpsEnableCurr = self->mpsEnableCurr;
 1562|       |
 1563|  5.96k|  if (!self) return AAC_DEC_INVALID_HANDLE;
  ------------------
  |  Branch (1563:7): [True: 0, False: 5.96k]
  ------------------
 1564|       |
 1565|  5.96k|  UCHAR downscaleFactor = self->downscaleFactor;
 1566|  5.96k|  UCHAR downscaleFactorInBS = self->downscaleFactorInBS;
 1567|       |
 1568|  5.96k|  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|  5.96k|  switch (asc->m_aot) {
 1574|  1.25k|    case AOT_AAC_LC:
  ------------------
  |  Branch (1574:5): [True: 1.25k, False: 4.70k]
  ------------------
 1575|  1.25k|      self->streamInfo.profile = 1;
 1576|  1.25k|      FDK_FALLTHROUGH;
  ------------------
  |  |  386|  1.25k|#define FDK_FALLTHROUGH [[clang::fallthrough]]
  ------------------
 1577|  1.27k|    case AOT_ER_AAC_SCAL:
  ------------------
  |  Branch (1577:5): [True: 18, False: 5.94k]
  ------------------
 1578|  1.27k|      if (asc->m_sc.m_gaSpecificConfig.m_layer > 0) {
  ------------------
  |  Branch (1578:11): [True: 4, False: 1.27k]
  ------------------
 1579|       |        /* aac_scalable_extension_element() currently not supported. */
 1580|      4|        return AAC_DEC_UNSUPPORTED_FORMAT;
 1581|      4|      }
 1582|  1.27k|      FDK_FALLTHROUGH;
  ------------------
  |  |  386|  1.27k|#define FDK_FALLTHROUGH [[clang::fallthrough]]
  ------------------
 1583|  1.27k|    case AOT_SBR:
  ------------------
  |  Branch (1583:5): [True: 0, False: 5.96k]
  ------------------
 1584|  1.27k|    case AOT_PS:
  ------------------
  |  Branch (1584:5): [True: 0, False: 5.96k]
  ------------------
 1585|  1.28k|    case AOT_ER_AAC_LC:
  ------------------
  |  Branch (1585:5): [True: 15, False: 5.95k]
  ------------------
 1586|  1.43k|    case AOT_ER_AAC_LD:
  ------------------
  |  Branch (1586:5): [True: 144, False: 5.82k]
  ------------------
 1587|  1.43k|    case AOT_DRM_AAC:
  ------------------
  |  Branch (1587:5): [True: 0, False: 5.96k]
  ------------------
 1588|  1.43k|    case AOT_DRM_SURROUND:
  ------------------
  |  Branch (1588:5): [True: 0, False: 5.96k]
  ------------------
 1589|  1.43k|      initRenderMode = AACDEC_RENDER_IMDCT;
 1590|  1.43k|      break;
 1591|    838|    case AOT_ER_AAC_ELD:
  ------------------
  |  Branch (1591:5): [True: 838, False: 5.12k]
  ------------------
 1592|    838|      initRenderMode = AACDEC_RENDER_ELDFB;
 1593|    838|      break;
 1594|  3.62k|    case AOT_USAC:
  ------------------
  |  Branch (1594:5): [True: 3.62k, False: 2.34k]
  ------------------
 1595|  3.62k|      initRenderMode = AACDEC_RENDER_IMDCT;
 1596|  3.62k|      break;
 1597|     68|    default:
  ------------------
  |  Branch (1597:5): [True: 68, False: 5.89k]
  ------------------
 1598|     68|      return AAC_DEC_UNSUPPORTED_AOT;
 1599|  5.96k|  }
 1600|       |
 1601|  5.89k|  if (CProgramConfig_IsValid(&self->pce) && (asc->m_channelConfiguration > 0)) {
  ------------------
  |  Branch (1601:7): [True: 139, False: 5.75k]
  |  Branch (1601:45): [True: 0, False: 139]
  ------------------
 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|  5.89k|  } else {
 1617|  5.89k|    CProgramConfig_Init(&self->pce);
 1618|  5.89k|  }
 1619|       |
 1620|       |  /* set channels */
 1621|  5.89k|  switch (asc->m_channelConfiguration) {
 1622|    438|    case 0:
  ------------------
  |  Branch (1622:5): [True: 438, False: 5.45k]
  ------------------
 1623|    438|      switch (asc->m_aot) {
 1624|      0|        case AOT_USAC:
  ------------------
  |  Branch (1624:9): [True: 0, False: 438]
  ------------------
 1625|      0|          self->chMapIndex = 0;
 1626|      0|          ascChannels = asc->m_sc.m_usacConfig.m_nUsacChannels;
 1627|      0|          break;
 1628|    438|        default:
  ------------------
  |  Branch (1628:9): [True: 438, False: 0]
  ------------------
 1629|       |          /* get channels from program config (ASC) */
 1630|    438|          if (CProgramConfig_IsValid(&asc->m_progrConfigElement)) {
  ------------------
  |  Branch (1630:15): [True: 338, False: 100]
  ------------------
 1631|    338|            ascChannels = asc->m_progrConfigElement.NumChannels;
 1632|    338|            if (ascChannels > 0) {
  ------------------
  |  Branch (1632:17): [True: 309, False: 29]
  ------------------
 1633|    309|              int el_tmp;
 1634|       |              /* valid number of channels -> copy program config element (PCE)
 1635|       |               * from ASC */
 1636|    309|              FDKmemcpy(&self->pce, &asc->m_progrConfigElement,
 1637|    309|                        sizeof(CProgramConfig));
 1638|       |              /* Built element table */
 1639|    309|              el_tmp = CProgramConfig_GetElementTable(
 1640|    309|                  &asc->m_progrConfigElement, self->elements, (((8)) + (8)),
 1641|    309|                  &self->chMapIndex);
 1642|  18.1k|              for (; el_tmp < (3 * ((8) * 2) + (((8) * 2)) / 2 + 4 * (1) + 1);
  ------------------
  |  Branch (1642:22): [True: 17.8k, False: 309]
  ------------------
 1643|  17.8k|                   el_tmp++) {
 1644|  17.8k|                self->elements[el_tmp] = ID_NONE;
 1645|  17.8k|              }
 1646|    309|            } else {
 1647|     29|              return AAC_DEC_UNSUPPORTED_CHANNELCONFIG;
 1648|     29|            }
 1649|    338|          } else {
 1650|    100|            self->chMapIndex = 0;
 1651|    100|            return AAC_DEC_UNSUPPORTED_CHANNELCONFIG;
 1652|    100|          }
 1653|    309|          break;
 1654|    438|      }
 1655|    309|      break;
 1656|  3.97k|    case 1:
  ------------------
  |  Branch (1656:5): [True: 3.97k, False: 1.92k]
  ------------------
 1657|  4.28k|    case 2:
  ------------------
  |  Branch (1657:5): [True: 312, False: 5.58k]
  ------------------
 1658|  4.46k|    case 3:
  ------------------
  |  Branch (1658:5): [True: 178, False: 5.71k]
  ------------------
 1659|  4.57k|    case 4:
  ------------------
  |  Branch (1659:5): [True: 108, False: 5.78k]
  ------------------
 1660|  4.79k|    case 5:
  ------------------
  |  Branch (1660:5): [True: 227, False: 5.66k]
  ------------------
 1661|  4.91k|    case 6:
  ------------------
  |  Branch (1661:5): [True: 113, False: 5.78k]
  ------------------
 1662|  4.91k|      ascChannels = asc->m_channelConfiguration;
 1663|  4.91k|      break;
 1664|     59|    case 11:
  ------------------
  |  Branch (1664:5): [True: 59, False: 5.83k]
  ------------------
 1665|     59|      ascChannels = 7;
 1666|     59|      break;
 1667|    187|    case 7:
  ------------------
  |  Branch (1667:5): [True: 187, False: 5.70k]
  ------------------
 1668|    301|    case 12:
  ------------------
  |  Branch (1668:5): [True: 114, False: 5.77k]
  ------------------
 1669|    373|    case 14:
  ------------------
  |  Branch (1669:5): [True: 72, False: 5.82k]
  ------------------
 1670|    373|      ascChannels = 8;
 1671|    373|      break;
 1672|    112|    default:
  ------------------
  |  Branch (1672:5): [True: 112, False: 5.78k]
  ------------------
 1673|    112|      return AAC_DEC_UNSUPPORTED_CHANNELCONFIG;
 1674|  5.89k|  }
 1675|       |
 1676|  5.65k|  if (asc->m_aot == AOT_USAC) {
  ------------------
  |  Branch (1676:7): [True: 3.62k, False: 2.02k]
  ------------------
 1677|  3.62k|    flushChannels = fMin(ascChannels, (8));
 1678|  3.62k|    INT numChannel;
 1679|  3.62k|    pcmDmx_GetParam(self->hPcmUtils, MIN_NUMBER_OF_OUTPUT_CHANNELS,
 1680|  3.62k|                    &numChannel);
 1681|  3.62k|    flushChannels = fMin(fMax(numChannel, flushChannels), (8));
 1682|  3.62k|  }
 1683|       |
 1684|  5.65k|  if (IS_USAC(asc->m_aot)) {
  ------------------
  |  |  226|  5.65k|#define IS_USAC(aot) ((aot) == AOT_USAC)
  |  |  ------------------
  |  |  |  Branch (226:22): [True: 3.62k, False: 2.02k]
  |  |  ------------------
  ------------------
 1685|  10.6k|    for (int el = 0; el < (INT)asc->m_sc.m_usacConfig.m_usacNumElements; el++) {
  ------------------
  |  Branch (1685:22): [True: 6.98k, False: 3.62k]
  ------------------
 1686|       |      /* fix number of core channels aka ascChannels for stereoConfigIndex = 1
 1687|       |       * cases */
 1688|  6.98k|      if (asc->m_sc.m_usacConfig.element[el].m_stereoConfigIndex == 1) {
  ------------------
  |  Branch (1688:11): [True: 18, False: 6.96k]
  ------------------
 1689|     18|        ascChannels--; /* stereoConfigIndex == 1 stereo cases do actually
 1690|       |                          contain only a mono core channel. */
 1691|  6.96k|      } else if (asc->m_sc.m_usacConfig.element[el].m_stereoConfigIndex == 2) {
  ------------------
  |  Branch (1691:18): [True: 49, False: 6.92k]
  ------------------
 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|     49|        if (asc->m_sc.m_usacConfig.element[el].m_harmonicSBR) {
  ------------------
  |  Branch (1697:13): [True: 14, False: 35]
  ------------------
 1698|     14|          usacResidualDelayCompSamples += asc->m_samplesPerFrame;
 1699|     14|        }
 1700|     49|        if (asc->m_sc.m_usacConfig.m_coreSbrFrameLengthIndex == 4) {
  ------------------
  |  Branch (1700:13): [True: 25, False: 24]
  ------------------
 1701|     25|          usacResidualDelayCompSamples +=
 1702|     25|              6 * 16; /* difference between 12 SBR
 1703|       |                         overlap slots from SBR and 6
 1704|       |                         slots delayed in MPS212 */
 1705|     25|        }
 1706|     49|      }
 1707|  6.98k|    }
 1708|  3.62k|  }
 1709|       |
 1710|  5.65k|  aacChannelsOffset = 0;
 1711|  5.65k|  aacChannelsOffsetIdx = 0;
 1712|  5.65k|  elementOffset = 0;
 1713|  5.65k|  if ((ascChannels <= 0) || (ascChannels > (8)) ||
  ------------------
  |  Branch (1713:7): [True: 0, False: 5.65k]
  |  Branch (1713:29): [True: 6, False: 5.64k]
  ------------------
 1714|  5.64k|      (asc->m_channelConfiguration > AACDEC_MAX_CH_CONF)) {
  ------------------
  |  |  121|  5.64k|#define AACDEC_MAX_CH_CONF 14
  ------------------
  |  Branch (1714:7): [True: 0, False: 5.64k]
  ------------------
 1715|      6|    return AAC_DEC_UNSUPPORTED_CHANNELCONFIG;
 1716|      6|  }
 1717|       |
 1718|       |  /* Set syntax flags */
 1719|  5.64k|  flags = 0;
 1720|  5.64k|  { FDKmemclear(elFlags, sizeof(elFlags)); }
 1721|       |
 1722|  5.64k|  if ((asc->m_channelConfiguration > 0) || IS_USAC(asc->m_aot)) {
  ------------------
  |  |  226|    303|#define IS_USAC(aot) ((aot) == AOT_USAC)
  |  |  ------------------
  |  |  |  Branch (226:22): [True: 0, False: 303]
  |  |  ------------------
  ------------------
  |  Branch (1722:7): [True: 5.34k, False: 303]
  ------------------
 1723|  5.34k|    if (IS_USAC(asc->m_aot)) {
  ------------------
  |  |  226|  5.34k|#define IS_USAC(aot) ((aot) == AOT_USAC)
  |  |  ------------------
  |  |  |  Branch (226:22): [True: 3.62k, False: 1.72k]
  |  |  ------------------
  ------------------
 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.62k|      self->pUsacConfig[streamIndex] = &asc->m_sc.m_usacConfig;
 1729|       |
 1730|       |      /* copy list of elements */
 1731|  3.62k|      if (self->pUsacConfig[streamIndex]->m_usacNumElements >
  ------------------
  |  Branch (1731:11): [True: 0, False: 3.62k]
  ------------------
 1732|  3.62k|          (3 * ((8) * 2) + (((8) * 2)) / 2 + 4 * (1) + 1)) {
 1733|      0|        goto bail;
 1734|      0|      }
 1735|       |
 1736|  3.62k|      if (self->numUsacElements[streamIndex] !=
  ------------------
  |  Branch (1736:11): [True: 3.62k, False: 0]
  ------------------
 1737|  3.62k|          asc->m_sc.m_usacConfig.m_usacNumElements) {
 1738|  3.62k|        ascChanged = 1;
 1739|  3.62k|      }
 1740|       |
 1741|  3.62k|      if (configMode & AC_CM_ALLOC_MEM) {
  ------------------
  |  |  337|  3.62k|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
  |  Branch (1741:11): [True: 1.79k, False: 1.82k]
  ------------------
 1742|  1.79k|        self->numUsacElements[streamIndex] =
 1743|  1.79k|            asc->m_sc.m_usacConfig.m_usacNumElements;
 1744|  1.79k|      }
 1745|       |
 1746|  3.62k|      mpsEnableCurr = 0;
 1747|  3.62k|      for (int _el = 0;
 1748|  10.6k|           _el < (int)self->pUsacConfig[streamIndex]->m_usacNumElements;
  ------------------
  |  Branch (1748:12): [True: 6.98k, False: 3.62k]
  ------------------
 1749|  6.98k|           _el++) {
 1750|  6.98k|        int el = _el + elementOffset;
 1751|  6.98k|        if (self->elements[el] !=
  ------------------
  |  Branch (1751:13): [True: 6.98k, False: 0]
  ------------------
 1752|  6.98k|            self->pUsacConfig[streamIndex]->element[_el].usacElementType) {
 1753|  6.98k|          ascChanged = 1;
 1754|  6.98k|        }
 1755|  6.98k|        if (self->usacStereoConfigIndex[el] !=
  ------------------
  |  Branch (1755:13): [True: 80, False: 6.90k]
  ------------------
 1756|  6.98k|            asc->m_sc.m_usacConfig.element[_el].m_stereoConfigIndex) {
 1757|     80|          ascChanged = 1;
 1758|     80|        }
 1759|  6.98k|        if (configMode & AC_CM_ALLOC_MEM) {
  ------------------
  |  |  337|  6.98k|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
  |  Branch (1759:13): [True: 3.47k, False: 3.51k]
  ------------------
 1760|  3.47k|          self->elements[el] =
 1761|  3.47k|              self->pUsacConfig[streamIndex]->element[_el].usacElementType;
 1762|       |          /* for Unified Stereo Coding */
 1763|  3.47k|          self->usacStereoConfigIndex[el] =
 1764|  3.47k|              asc->m_sc.m_usacConfig.element[_el].m_stereoConfigIndex;
 1765|  3.47k|          if (self->elements[el] == ID_USAC_CPE) {
  ------------------
  |  Branch (1765:15): [True: 59, False: 3.41k]
  ------------------
 1766|     59|            mpsEnableCurr |= self->usacStereoConfigIndex[el] ? 1 : 0;
  ------------------
  |  Branch (1766:30): [True: 37, False: 22]
  ------------------
 1767|     59|          }
 1768|  3.47k|        }
 1769|       |
 1770|  6.98k|        elFlags[el] |= (asc->m_sc.m_usacConfig.element[_el].m_noiseFilling)
  ------------------
  |  Branch (1770:24): [True: 886, False: 6.10k]
  ------------------
 1771|  6.98k|                           ? AC_EL_USAC_NOISE
  ------------------
  |  |  344|    886|#define AC_EL_USAC_NOISE 0x000002 /*!< USAC noise filling is active */
  ------------------
 1772|  6.98k|                           : 0;
 1773|  6.98k|        elFlags[el] |=
 1774|  6.98k|            (asc->m_sc.m_usacConfig.element[_el].m_stereoConfigIndex > 0)
  ------------------
  |  Branch (1774:13): [True: 80, False: 6.90k]
  ------------------
 1775|  6.98k|                ? AC_EL_USAC_MPS212
  ------------------
  |  |  348|     80|#define AC_EL_USAC_MPS212 0x000010 /*!< USAC MPS212 tool is active */
  ------------------
 1776|  6.98k|                : 0;
 1777|  6.98k|        elFlags[el] |= (asc->m_sc.m_usacConfig.element[_el].m_interTes)
  ------------------
  |  Branch (1777:24): [True: 71, False: 6.91k]
  ------------------
 1778|  6.98k|                           ? AC_EL_USAC_ITES
  ------------------
  |  |  345|     71|#define AC_EL_USAC_ITES 0x000004  /*!< USAC SBR inter-TES tool is active */
  ------------------
 1779|  6.98k|                           : 0;
 1780|  6.98k|        elFlags[el] |=
 1781|  6.98k|            (asc->m_sc.m_usacConfig.element[_el].m_pvc) ? AC_EL_USAC_PVC : 0;
  ------------------
  |  |  347|     74|  0x000008 /*!< USAC SBR predictive vector coding tool is active */
  ------------------
  |  Branch (1781:13): [True: 74, False: 6.91k]
  ------------------
 1782|  6.98k|        elFlags[el] |=
 1783|  6.98k|            (asc->m_sc.m_usacConfig.element[_el].usacElementType == ID_USAC_LFE)
  ------------------
  |  Branch (1783:13): [True: 0, False: 6.98k]
  ------------------
 1784|  6.98k|                ? AC_EL_USAC_LFE
  ------------------
  |  |  349|      0|#define AC_EL_USAC_LFE 0x000020    /*!< USAC element is LFE */
  ------------------
 1785|  6.98k|                : 0;
 1786|  6.98k|        elFlags[el] |=
 1787|  6.98k|            (asc->m_sc.m_usacConfig.element[_el].usacElementType == ID_USAC_LFE)
  ------------------
  |  Branch (1787:13): [True: 0, False: 6.98k]
  ------------------
 1788|  6.98k|                ? AC_EL_LFE
  ------------------
  |  |  359|      0|#define AC_EL_LFE 0x002000              /*!< The element is of type LFE. */
  ------------------
 1789|  6.98k|                : 0;
 1790|  6.98k|        if ((asc->m_sc.m_usacConfig.element[_el].usacElementType ==
  ------------------
  |  Branch (1790:13): [True: 126, False: 6.86k]
  ------------------
 1791|  6.98k|             ID_USAC_CPE) &&
 1792|    126|            ((self->usacStereoConfigIndex[el] == 0))) {
  ------------------
  |  Branch (1792:13): [True: 89, False: 37]
  ------------------
 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|  6.98k|      }
 1796|       |
 1797|  3.62k|      self->hasAudioPreRoll = 0;
 1798|  3.62k|      if (self->pUsacConfig[streamIndex]->m_usacNumElements) {
  ------------------
  |  Branch (1798:11): [True: 3.62k, False: 0]
  ------------------
 1799|  3.62k|        self->hasAudioPreRoll = asc->m_sc.m_usacConfig.element[0]
 1800|  3.62k|                                    .extElement.usacExtElementHasAudioPreRoll;
 1801|  3.62k|      }
 1802|  3.62k|      if (configMode & AC_CM_ALLOC_MEM) {
  ------------------
  |  |  337|  3.62k|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
  |  Branch (1802:11): [True: 1.79k, False: 1.82k]
  ------------------
 1803|  1.79k|        self->elements[elementOffset +
 1804|  1.79k|                       self->pUsacConfig[streamIndex]->m_usacNumElements] =
 1805|  1.79k|            ID_END;
 1806|  1.79k|      }
 1807|  3.62k|    } else {
 1808|       |      /* Initialize constant mappings for channel config 1-7 */
 1809|  1.72k|      int i;
 1810|  13.7k|      for (i = 0; i < AACDEC_CH_ELEMENTS_TAB_SIZE; i++) {
  ------------------
  |  |  122|  13.7k|#define AACDEC_CH_ELEMENTS_TAB_SIZE 7 /*!< Size of element tables */
  ------------------
  |  Branch (1810:19): [True: 12.0k, False: 1.72k]
  ------------------
 1811|  12.0k|        self->elements[i] = elementsTab[asc->m_channelConfiguration - 1][i];
 1812|  12.0k|      }
 1813|  94.6k|      for (; i < (3 * ((8) * 2) + (((8) * 2)) / 2 + 4 * (1) + 1); i++) {
  ------------------
  |  Branch (1813:14): [True: 92.8k, False: 1.72k]
  ------------------
 1814|  92.8k|        self->elements[i] = ID_NONE;
 1815|  92.8k|      }
 1816|  1.72k|    }
 1817|       |
 1818|  5.34k|    {
 1819|  5.34k|      int ch;
 1820|       |
 1821|  16.0k|      for (ch = 0; ch < ascChannels; ch++) {
  ------------------
  |  Branch (1821:20): [True: 10.7k, False: 5.34k]
  ------------------
 1822|  10.7k|        self->chMapping[ch] = ch;
 1823|  10.7k|      }
 1824|  37.3k|      for (; ch < (8); ch++) {
  ------------------
  |  Branch (1824:14): [True: 31.9k, False: 5.34k]
  ------------------
 1825|  31.9k|        self->chMapping[ch] = 255;
 1826|  31.9k|      }
 1827|  5.34k|    }
 1828|       |
 1829|  5.34k|    self->chMapIndex = asc->m_channelConfiguration;
 1830|  5.34k|  } else {
 1831|    303|    if (CProgramConfig_IsValid(&asc->m_progrConfigElement)) {
  ------------------
  |  Branch (1831:9): [True: 303, False: 0]
  ------------------
 1832|       |      /* Set matrix mixdown infos if available from PCE. */
 1833|    303|      pcmDmx_SetMatrixMixdownFromPce(
 1834|    303|          self->hPcmUtils, asc->m_progrConfigElement.MatrixMixdownIndexPresent,
 1835|    303|          asc->m_progrConfigElement.MatrixMixdownIndex,
 1836|    303|          asc->m_progrConfigElement.PseudoSurroundEnable);
 1837|    303|    }
 1838|    303|  }
 1839|       |
 1840|  5.64k|  self->streamInfo.channelConfig = asc->m_channelConfiguration;
 1841|       |
 1842|  5.64k|  if (self->streamInfo.aot != asc->m_aot) {
  ------------------
  |  Branch (1842:7): [True: 5.64k, False: 0]
  ------------------
 1843|  5.64k|    if (configMode & AC_CM_ALLOC_MEM) {
  ------------------
  |  |  337|  5.64k|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
  |  Branch (1843:9): [True: 2.69k, False: 2.95k]
  ------------------
 1844|  2.69k|      self->streamInfo.aot = asc->m_aot;
 1845|  2.69k|    }
 1846|  5.64k|    ascChanged = 1;
 1847|  5.64k|  }
 1848|       |
 1849|  5.64k|  if (asc->m_aot == AOT_ER_AAC_ELD &&
  ------------------
  |  Branch (1849:7): [True: 836, False: 4.81k]
  ------------------
 1850|    836|      asc->m_sc.m_eldSpecificConfig.m_downscaledSamplingFrequency != 0) {
  ------------------
  |  Branch (1850:7): [True: 836, False: 0]
  ------------------
 1851|    836|    if (self->samplingRateInfo[0].samplingRate !=
  ------------------
  |  Branch (1851:9): [True: 836, False: 0]
  ------------------
 1852|    836|            asc->m_sc.m_eldSpecificConfig.m_downscaledSamplingFrequency ||
 1853|      0|        self->samplingRateInfo[0].samplingRate * self->downscaleFactor !=
  ------------------
  |  Branch (1853:9): [True: 0, False: 0]
  ------------------
 1854|    836|            asc->m_samplingFrequency) {
 1855|       |      /* get downscaledSamplingFrequency from ESC and compute the downscale
 1856|       |       * factor */
 1857|    836|      downscaleFactorInBS =
 1858|    836|          asc->m_samplingFrequency /
 1859|    836|          asc->m_sc.m_eldSpecificConfig.m_downscaledSamplingFrequency;
 1860|    836|      if ((downscaleFactorInBS == 1 || downscaleFactorInBS == 2 ||
  ------------------
  |  Branch (1860:12): [True: 729, False: 107]
  |  Branch (1860:40): [True: 20, False: 87]
  ------------------
 1861|     87|           (downscaleFactorInBS == 3 &&
  ------------------
  |  Branch (1861:13): [True: 12, False: 75]
  ------------------
 1862|     12|            asc->m_sc.m_eldSpecificConfig.m_frameLengthFlag) ||
  ------------------
  |  Branch (1862:13): [True: 10, False: 2]
  ------------------
 1863|     77|           downscaleFactorInBS == 4) &&
  ------------------
  |  Branch (1863:12): [True: 5, False: 72]
  ------------------
 1864|    764|          ((asc->m_samplingFrequency %
  ------------------
  |  Branch (1864:11): [True: 738, False: 26]
  ------------------
 1865|    764|            asc->m_sc.m_eldSpecificConfig.m_downscaledSamplingFrequency) ==
 1866|    764|           0)) {
 1867|    738|        downscaleFactor = downscaleFactorInBS;
 1868|    738|      } else {
 1869|     98|        downscaleFactorInBS = 1;
 1870|     98|        downscaleFactor = 1;
 1871|     98|      }
 1872|    836|    }
 1873|  4.81k|  } else {
 1874|  4.81k|    downscaleFactorInBS = 1;
 1875|  4.81k|    downscaleFactor = 1;
 1876|  4.81k|  }
 1877|       |
 1878|  5.64k|  if (self->downscaleFactorInBS != downscaleFactorInBS) {
  ------------------
  |  Branch (1878:7): [True: 15, False: 5.63k]
  ------------------
 1879|     15|    if (configMode & AC_CM_ALLOC_MEM) {
  ------------------
  |  |  337|     15|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
  |  Branch (1879:9): [True: 6, False: 9]
  ------------------
 1880|      6|      self->downscaleFactorInBS = downscaleFactorInBS;
 1881|      6|      self->downscaleFactor = downscaleFactor;
 1882|      6|    }
 1883|     15|    ascChanged = 1;
 1884|     15|  }
 1885|       |
 1886|  5.64k|  if ((INT)asc->m_samplesPerFrame % downscaleFactor != 0) {
  ------------------
  |  Branch (1886:7): [True: 0, False: 5.64k]
  ------------------
 1887|      0|    return AAC_DEC_UNSUPPORTED_SAMPLINGRATE; /* frameSize/dsf must be an integer
 1888|       |                                                number */
 1889|      0|  }
 1890|       |
 1891|  5.64k|  self->streamInfo.bitRate = 0;
 1892|       |
 1893|  5.64k|  if (asc->m_aot == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (1893:7): [True: 836, False: 4.81k]
  ------------------
 1894|    836|    if (self->useLdQmfTimeAlign !=
  ------------------
  |  Branch (1894:9): [True: 141, False: 695]
  ------------------
 1895|    836|        asc->m_sc.m_eldSpecificConfig.m_useLdQmfTimeAlign) {
 1896|    141|      ascChanged = 1;
 1897|    141|    }
 1898|    836|    if (configMode & AC_CM_ALLOC_MEM) {
  ------------------
  |  |  337|    836|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
  |  Branch (1898:9): [True: 338, False: 498]
  ------------------
 1899|    338|      self->useLdQmfTimeAlign =
 1900|    338|          asc->m_sc.m_eldSpecificConfig.m_useLdQmfTimeAlign;
 1901|    338|    }
 1902|    836|    if (sbrEnabled != asc->m_sbrPresentFlag) {
  ------------------
  |  Branch (1902:9): [True: 556, False: 280]
  ------------------
 1903|    556|      ascChanged = 1;
 1904|    556|    }
 1905|    836|  }
 1906|       |
 1907|  5.64k|  self->streamInfo.extAot = asc->m_extensionAudioObjectType;
 1908|  5.64k|  if (self->streamInfo.extSamplingRate !=
  ------------------
  |  Branch (1908:7): [True: 2.16k, False: 3.48k]
  ------------------
 1909|  5.64k|      (INT)asc->m_extensionSamplingFrequency) {
 1910|  2.16k|    ascChanged = 1;
 1911|  2.16k|  }
 1912|  5.64k|  if (configMode & AC_CM_ALLOC_MEM) {
  ------------------
  |  |  337|  5.64k|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
  |  Branch (1912:7): [True: 2.69k, False: 2.95k]
  ------------------
 1913|  2.69k|    self->streamInfo.extSamplingRate = asc->m_extensionSamplingFrequency;
 1914|  2.69k|  }
 1915|  5.64k|  flags |= (asc->m_sbrPresentFlag) ? AC_SBR_PRESENT : 0;
  ------------------
  |  |  311|  1.87k|#define AC_SBR_PRESENT 0x008000 /*!< SBR present flag (from ASC) */
  ------------------
  |  Branch (1915:12): [True: 1.87k, False: 3.77k]
  ------------------
 1916|  5.64k|  flags |= (asc->m_psPresentFlag) ? AC_PS_PRESENT : 0;
  ------------------
  |  |  314|     59|#define AC_PS_PRESENT 0x020000 /*!< PS present flag (from ASC or implicit)  */
  ------------------
  |  Branch (1916:12): [True: 59, False: 5.58k]
  ------------------
 1917|  5.64k|  if (asc->m_sbrPresentFlag) {
  ------------------
  |  Branch (1917:7): [True: 1.87k, False: 3.77k]
  ------------------
 1918|  1.87k|    sbrEnabled = 1;
 1919|  1.87k|    sbrEnabledPrev = 1;
 1920|  3.77k|  } else {
 1921|  3.77k|    sbrEnabled = 0;
 1922|  3.77k|    sbrEnabledPrev = 0;
 1923|  3.77k|  }
 1924|  5.64k|  if (sbrEnabled && asc->m_extensionSamplingFrequency) {
  ------------------
  |  Branch (1924:7): [True: 1.87k, False: 3.77k]
  |  Branch (1924:21): [True: 1.87k, False: 0]
  ------------------
 1925|  1.87k|    if (downscaleFactor != 1 && (downscaleFactor)&1) {
  ------------------
  |  Branch (1925:9): [True: 7, False: 1.86k]
  |  Branch (1925:33): [True: 0, False: 7]
  ------------------
 1926|      0|      return AAC_DEC_UNSUPPORTED_SAMPLINGRATE; /* SBR needs an even downscale
 1927|       |                                                  factor */
 1928|      0|    }
 1929|  1.87k|    if (configMode & AC_CM_ALLOC_MEM) {
  ------------------
  |  |  337|  1.87k|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
  |  Branch (1929:9): [True: 808, False: 1.06k]
  ------------------
 1930|    808|      self->streamInfo.extSamplingRate =
 1931|    808|          self->streamInfo.extSamplingRate / self->downscaleFactor;
 1932|    808|    }
 1933|  1.87k|  }
 1934|  5.64k|  if ((asc->m_aot == AOT_AAC_LC) && (asc->m_sbrPresentFlag == 1) &&
  ------------------
  |  Branch (1934:7): [True: 1.02k, False: 4.61k]
  |  Branch (1934:37): [True: 203, False: 826]
  ------------------
 1935|    203|      (asc->m_extensionSamplingFrequency > (2 * asc->m_samplingFrequency))) {
  ------------------
  |  Branch (1935:7): [True: 63, False: 140]
  ------------------
 1936|     63|    return AAC_DEC_UNSUPPORTED_SAMPLINGRATE; /* Core decoder supports at most a
 1937|       |                                                1:2 upsampling for HE-AAC and
 1938|       |                                                HE-AACv2 */
 1939|     63|  }
 1940|       |
 1941|       |  /* --------- vcb11 ------------ */
 1942|  5.58k|  flags |= (asc->m_vcb11Flag) ? AC_ER_VCB11 : 0;
  ------------------
  |  |  294|    445|  0x000001 /*!< aacSectionDataResilienceFlag     flag (from ASC): 1 means use \
  ------------------
  |  Branch (1942:12): [True: 445, False: 5.13k]
  ------------------
 1943|       |
 1944|       |  /* ---------- rvlc ------------ */
 1945|  5.58k|  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.20k]
  ------------------
 1946|       |
 1947|       |  /* ----------- hcr ------------ */
 1948|  5.58k|  flags |= (asc->m_hcrFlag) ? AC_ER_HCR : 0;
  ------------------
  |  |  300|    409|  0x000004 /*!< aacSectionDataResilienceFlag     flag (from ASC): 1 means use \
  ------------------
  |  Branch (1948:12): [True: 409, False: 5.17k]
  ------------------
 1949|       |
 1950|  5.58k|  if (asc->m_aot == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (1950:7): [True: 836, False: 4.74k]
  ------------------
 1951|    836|    mpsEnableCurr = 0;
 1952|    836|    flags |= AC_ELD;
  ------------------
  |  |  303|    836|#define AC_ELD 0x000010         /*!< AAC-ELD */
  ------------------
 1953|    836|    flags |= (asc->m_sbrPresentFlag)
  ------------------
  |  Branch (1953:14): [True: 556, False: 280]
  ------------------
 1954|    836|                 ? AC_SBR_PRESENT
  ------------------
  |  |  311|    556|#define AC_SBR_PRESENT 0x008000 /*!< SBR present flag (from ASC) */
  ------------------
 1955|    836|                 : 0; /* Need to set the SBR flag for backward-compatibility
 1956|       |                               reasons. Even if SBR is not supported. */
 1957|    836|    flags |= (asc->m_sc.m_eldSpecificConfig.m_sbrCrcFlag) ? AC_SBRCRC : 0;
  ------------------
  |  |  313|    211|  0x010000 /*!< SBR CRC present flag. Only relevant for AAC-ELD for now. */
  ------------------
  |  Branch (1957:14): [True: 211, False: 625]
  ------------------
 1958|    836|    flags |= (asc->m_sc.m_eldSpecificConfig.m_useLdQmfTimeAlign)
  ------------------
  |  Branch (1958:14): [True: 141, False: 695]
  ------------------
 1959|    836|                 ? AC_MPS_PRESENT
  ------------------
  |  |  316|    141|  0x040000                    /*!< MPS present flag (from ASC or implicit) \
  ------------------
 1960|    836|                 : 0;
 1961|    836|    if (self->mpsApplicable) {
  ------------------
  |  Branch (1961:9): [True: 105, False: 731]
  ------------------
 1962|    105|      mpsEnableCurr = asc->m_sc.m_eldSpecificConfig.m_useLdQmfTimeAlign;
 1963|    105|    }
 1964|    836|  }
 1965|  5.58k|  flags |= (asc->m_aot == AOT_ER_AAC_LD) ? AC_LD : 0;
  ------------------
  |  |  304|    132|#define AC_LD 0x000020          /*!< AAC-LD */
  ------------------
  |  Branch (1965:12): [True: 132, False: 5.45k]
  ------------------
 1966|  5.58k|  flags |= (asc->m_epConfig >= 0) ? AC_ER : 0;
  ------------------
  |  |  305|    994|#define AC_ER 0x000040          /*!< ER syntax */
  ------------------
  |  Branch (1966:12): [True: 994, False: 4.58k]
  ------------------
 1967|       |
 1968|  5.58k|  if (asc->m_aot == AOT_USAC) {
  ------------------
  |  Branch (1968:7): [True: 3.62k, False: 1.96k]
  ------------------
 1969|  3.62k|    flags |= AC_USAC;
  ------------------
  |  |  307|  3.62k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
 1970|  3.62k|    flags |= (asc->m_sc.m_usacConfig.element[0].m_stereoConfigIndex > 0)
  ------------------
  |  Branch (1970:14): [True: 80, False: 3.54k]
  ------------------
 1971|  3.62k|                 ? AC_MPS_PRESENT
  ------------------
  |  |  316|     80|  0x040000                    /*!< MPS present flag (from ASC or implicit) \
  ------------------
 1972|  3.62k|                 : 0;
 1973|  3.62k|  }
 1974|  5.58k|  if (asc->m_aot == AOT_DRM_AAC) {
  ------------------
  |  Branch (1974:7): [True: 0, False: 5.58k]
  ------------------
 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.58k|  if (asc->m_aot == AOT_DRM_SURROUND) {
  ------------------
  |  Branch (1977:7): [True: 0, False: 5.58k]
  ------------------
 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.58k|  if ((asc->m_aot == AOT_AAC_SCAL) || (asc->m_aot == AOT_ER_AAC_SCAL)) {
  ------------------
  |  Branch (1981:7): [True: 0, False: 5.58k]
  |  Branch (1981:39): [True: 14, False: 5.56k]
  ------------------
 1982|     14|    flags |= AC_SCALABLE;
  ------------------
  |  |  302|     14|#define AC_SCALABLE 0x000008    /*!< AAC Scalable*/
  ------------------
 1983|     14|  }
 1984|       |
 1985|  5.58k|  if ((asc->m_epConfig >= 0) && (asc->m_channelConfiguration <= 0)) {
  ------------------
  |  Branch (1985:7): [True: 994, False: 4.58k]
  |  Branch (1985:33): [True: 0, False: 994]
  ------------------
 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.58k|  self->streamInfo.epConfig = asc->m_epConfig;
 1992|       |  /* self->hInput->asc.m_epConfig = asc->m_epConfig; */
 1993|       |
 1994|  5.58k|  if (asc->m_epConfig > 1) return AAC_DEC_UNSUPPORTED_ER_FORMAT;
  ------------------
  |  Branch (1994:7): [True: 0, False: 5.58k]
  ------------------
 1995|       |
 1996|       |  /* Check if samplerate changed. */
 1997|  5.58k|  if ((self->samplingRateInfo[streamIndex].samplingRate !=
  ------------------
  |  Branch (1997:7): [True: 5.58k, False: 2]
  ------------------
 1998|  5.58k|       asc->m_samplingFrequency) ||
 1999|      2|      (self->streamInfo.aacSamplesPerFrame !=
  ------------------
  |  Branch (1999:7): [True: 2, False: 0]
  ------------------
 2000|  5.58k|       (INT)asc->m_samplesPerFrame / downscaleFactor)) {
 2001|  5.58k|    AAC_DECODER_ERROR error;
 2002|       |
 2003|  5.58k|    ascChanged = 1;
 2004|       |
 2005|  5.58k|    if (configMode & AC_CM_ALLOC_MEM) {
  ------------------
  |  |  337|  5.58k|  0x000002 /*!< Config mode signalizes the callback to work in memory \
  ------------------
  |  Branch (2005:9): [True: 2.69k, False: 2.88k]
  ------------------
 2006|       |      /* Update samplerate info. */
 2007|  2.69k|      error = getSamplingRateInfo(
 2008|  2.69k|          &self->samplingRateInfo[streamIndex], asc->m_samplesPerFrame,
 2009|  2.69k|          asc->m_samplingFrequencyIndex, asc->m_samplingFrequency);
 2010|  2.69k|      if (error != AAC_DEC_OK) {
  ------------------
  |  Branch (2010:11): [True: 0, False: 2.69k]
  ------------------
 2011|      0|        return error;
 2012|      0|      }
 2013|  2.69k|      self->streamInfo.aacSampleRate =
 2014|  2.69k|          self->samplingRateInfo[0].samplingRate / self->downscaleFactor;
 2015|  2.69k|      self->streamInfo.aacSamplesPerFrame =
 2016|  2.69k|          asc->m_samplesPerFrame / self->downscaleFactor;
 2017|  2.69k|      if (self->streamInfo.aacSampleRate <= 0) {
  ------------------
  |  Branch (2017:11): [True: 0, False: 2.69k]
  ------------------
 2018|      0|        return AAC_DEC_UNSUPPORTED_SAMPLINGRATE;
 2019|      0|      }
 2020|  2.69k|    }
 2021|  5.58k|  }
 2022|       |
 2023|       |  /* Check if amount of channels has changed. */
 2024|  5.58k|  if (self->ascChannels[streamIndex] != ascChannels) {
  ------------------
  |  Branch (2024:7): [True: 5.58k, False: 0]
  ------------------
 2025|  5.58k|    ascChanged = 1;
 2026|  5.58k|  }
 2027|       |
 2028|       |  /* detect config change */
 2029|  5.58k|  if (configMode & AC_CM_DET_CFG_CHANGE) {
  ------------------
  |  |  334|  5.58k|  0x000001 /*!< Config mode signalizes the callback to work in config change \
  ------------------
  |  Branch (2029:7): [True: 2.88k, False: 2.69k]
  ------------------
 2030|  2.88k|    if (ascChanged != 0) {
  ------------------
  |  Branch (2030:9): [True: 2.88k, False: 0]
  ------------------
 2031|  2.88k|      *configChanged = 1;
 2032|  2.88k|    }
 2033|       |
 2034|  2.88k|    CAacDecoder_AcceptFlags(self, asc, flags, elFlags, streamIndex,
 2035|  2.88k|                            elementOffset);
 2036|       |
 2037|  2.88k|    return err;
 2038|  2.88k|  }
 2039|       |
 2040|       |  /* set AC_USAC_SCFGI3 globally if any usac element uses */
 2041|  2.69k|  switch (asc->m_aot) {
 2042|  1.79k|    case AOT_USAC:
  ------------------
  |  Branch (2042:5): [True: 1.79k, False: 900]
  ------------------
 2043|  1.79k|      if (sbrEnabled) {
  ------------------
  |  Branch (2043:11): [True: 517, False: 1.27k]
  ------------------
 2044|    517|        for (int _el = 0;
 2045|  1.51k|             _el < (int)self->pUsacConfig[streamIndex]->m_usacNumElements;
  ------------------
  |  Branch (2045:14): [True: 994, False: 517]
  ------------------
 2046|    994|             _el++) {
 2047|    994|          int el = elementOffset + _el;
 2048|    994|          if (IS_USAC_CHANNEL_ELEMENT(self->elements[el])) {
  ------------------
  |  |  484|    994|  ((elementId) == ID_USAC_SCE || (elementId) == ID_USAC_CPE || \
  |  |  ------------------
  |  |  |  Branch (484:4): [True: 469, False: 525]
  |  |  |  Branch (484:34): [True: 48, False: 477]
  |  |  ------------------
  |  |  485|    994|   (elementId) == ID_USAC_LFE)
  |  |  ------------------
  |  |  |  Branch (485:4): [True: 0, False: 477]
  |  |  ------------------
  ------------------
 2049|    517|            if (usacStereoConfigIndex < 0) {
  ------------------
  |  Branch (2049:17): [True: 517, False: 0]
  ------------------
 2050|    517|              usacStereoConfigIndex = self->usacStereoConfigIndex[el];
 2051|    517|            } 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|    517|          }
 2058|    994|        }
 2059|       |
 2060|    517|        if (usacStereoConfigIndex < 0) {
  ------------------
  |  Branch (2060:13): [True: 0, False: 517]
  ------------------
 2061|      0|          goto bail;
 2062|      0|        }
 2063|       |
 2064|    517|        if (usacStereoConfigIndex == 3) {
  ------------------
  |  Branch (2064:13): [True: 6, False: 511]
  ------------------
 2065|      6|          flags |= AC_USAC_SCFGI3;
  ------------------
  |  |  329|      6|  0x8000000 /*!< USAC flag: If stereoConfigIndex is 3 the flag is set. */
  ------------------
 2066|      6|        }
 2067|    517|      }
 2068|  1.79k|      break;
 2069|  1.79k|    default:
  ------------------
  |  Branch (2069:5): [True: 900, False: 1.79k]
  ------------------
 2070|    900|      break;
 2071|  2.69k|  }
 2072|       |
 2073|  2.69k|  if (*configChanged) {
  ------------------
  |  Branch (2073:7): [True: 2.69k, 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.69k|    switch (asc->m_aot) {
 2079|  1.79k|      case AOT_USAC:
  ------------------
  |  Branch (2079:7): [True: 1.79k, False: 900]
  ------------------
 2080|  1.79k|        if (sbrEnabled) {
  ------------------
  |  Branch (2080:13): [True: 517, False: 1.27k]
  ------------------
 2081|    517|          const UCHAR map_sbrRatio_2_nAnaBands[] = {16, 24, 32};
 2082|       |
 2083|    517|          FDK_ASSERT(asc->m_sc.m_usacConfig.m_sbrRatioIndex > 0);
  ------------------
  |  |  221|    517|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (2083:11): [True: 517, False: 0]
  ------------------
 2084|    517|          FDK_ASSERT(streamIndex == 0);
  ------------------
  |  |  221|    517|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (2084:11): [True: 517, Folded]
  ------------------
 2085|       |
 2086|    517|          self->qmfDomain.globalConf.nInputChannels_requested = ascChannels;
 2087|    517|          self->qmfDomain.globalConf.nOutputChannels_requested =
 2088|    517|              (usacStereoConfigIndex == 1) ? 2 : ascChannels;
  ------------------
  |  Branch (2088:15): [True: 8, False: 509]
  ------------------
 2089|    517|          self->qmfDomain.globalConf.flags_requested = 0;
 2090|    517|          self->qmfDomain.globalConf.nBandsAnalysis_requested =
 2091|    517|              map_sbrRatio_2_nAnaBands[asc->m_sc.m_usacConfig.m_sbrRatioIndex -
 2092|    517|                                       1];
 2093|    517|          self->qmfDomain.globalConf.nBandsSynthesis_requested = 64;
 2094|    517|          self->qmfDomain.globalConf.nQmfTimeSlots_requested =
 2095|    517|              (asc->m_sc.m_usacConfig.m_sbrRatioIndex == 1) ? 64 : 32;
  ------------------
  |  Branch (2095:15): [True: 134, False: 383]
  ------------------
 2096|    517|          self->qmfDomain.globalConf.nQmfOvTimeSlots_requested =
 2097|    517|              (asc->m_sc.m_usacConfig.m_sbrRatioIndex == 1) ? 12 : 6;
  ------------------
  |  Branch (2097:15): [True: 134, False: 383]
  ------------------
 2098|    517|          self->qmfDomain.globalConf.nQmfProcBands_requested = 64;
 2099|    517|          self->qmfDomain.globalConf.nQmfProcChannels_requested = 1;
 2100|    517|          self->qmfDomain.globalConf.parkChannel =
 2101|    517|              (usacStereoConfigIndex == 3) ? 1 : 0;
  ------------------
  |  Branch (2101:15): [True: 6, False: 511]
  ------------------
 2102|    517|          self->qmfDomain.globalConf.parkChannel_requested =
 2103|    517|              (usacStereoConfigIndex == 3) ? 1 : 0;
  ------------------
  |  Branch (2103:15): [True: 6, False: 511]
  ------------------
 2104|    517|          self->qmfDomain.globalConf.qmfDomainExplicitConfig = 1;
 2105|    517|        }
 2106|  1.79k|        break;
 2107|  1.79k|      case AOT_ER_AAC_ELD:
  ------------------
  |  Branch (2107:7): [True: 338, False: 2.35k]
  ------------------
 2108|    338|        if (mpsEnableCurr &&
  ------------------
  |  Branch (2108:13): [True: 50, False: 288]
  ------------------
 2109|     50|            asc->m_sc.m_eldSpecificConfig.m_useLdQmfTimeAlign) {
  ------------------
  |  Branch (2109:13): [True: 50, False: 0]
  ------------------
 2110|     50|          SAC_INPUT_CONFIG sac_interface = (sbrEnabled && self->hSbrDecoder)
  ------------------
  |  Branch (2110:45): [True: 6, False: 44]
  |  Branch (2110:59): [True: 6, False: 0]
  ------------------
 2111|     50|                                               ? SAC_INTERFACE_QMF
 2112|     50|                                               : SAC_INTERFACE_TIME;
 2113|     50|          mpegSurroundDecoder_ConfigureQmfDomain(
 2114|     50|              (CMpegSurroundDecoder *)self->pMpegSurroundDecoder, sac_interface,
 2115|     50|              (UINT)self->streamInfo.aacSampleRate, asc->m_aot);
 2116|     50|          self->qmfDomain.globalConf.qmfDomainExplicitConfig = 1;
 2117|     50|        }
 2118|    338|        break;
 2119|    562|      default:
  ------------------
  |  Branch (2119:7): [True: 562, False: 2.13k]
  ------------------
 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.69k|    }
 2125|       |
 2126|       |    /* Allocate all memory structures for each channel */
 2127|  2.69k|    {
 2128|  2.69k|      int ch = aacChannelsOffset;
 2129|  8.33k|      for (int _ch = 0; _ch < ascChannels; _ch++) {
  ------------------
  |  Branch (2129:25): [True: 5.64k, False: 2.69k]
  ------------------
 2130|  5.64k|        if (ch >= (8)) {
  ------------------
  |  Branch (2130:13): [True: 0, False: 5.64k]
  ------------------
 2131|      0|          goto bail;
 2132|      0|        }
 2133|  5.64k|        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.64k|        if (self->pAacDecoderChannelInfo[ch] == NULL) {
  ------------------
  |  Branch (2136:13): [True: 0, False: 5.64k]
  ------------------
 2137|      0|          goto bail;
 2138|      0|        }
 2139|  5.64k|        ch++;
 2140|  5.64k|      }
 2141|       |
 2142|  2.69k|      int chIdx = aacChannelsOffsetIdx;
 2143|  2.69k|      ch = aacChannelsOffset;
 2144|  2.69k|      int _numElements;
 2145|  2.69k|      _numElements = (((8)) + (8));
 2146|  2.69k|      if (flags & (AC_RSV603DA | AC_USAC)) {
  ------------------
  |  |  308|  2.69k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
                    if (flags & (AC_RSV603DA | AC_USAC)) {
  ------------------
  |  |  307|  2.69k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
  |  Branch (2146:11): [True: 1.79k, False: 900]
  ------------------
 2147|  1.79k|        _numElements = (int)asc->m_sc.m_usacConfig.m_usacNumElements;
 2148|  1.79k|      }
 2149|  10.6k|      for (int _el = 0; _el < _numElements; _el++) {
  ------------------
  |  Branch (2149:25): [True: 8.81k, False: 1.82k]
  ------------------
 2150|  8.81k|        int el_channels = 0;
 2151|  8.81k|        int el = elementOffset + _el;
 2152|       |
 2153|  8.81k|        if (flags &
  ------------------
  |  Branch (2153:13): [True: 4.79k, False: 4.01k]
  ------------------
 2154|  8.81k|            (AC_ER | AC_LD | AC_ELD | AC_RSV603DA | AC_USAC | AC_RSVD50)) {
  ------------------
  |  |  305|  8.81k|#define AC_ER 0x000040          /*!< ER syntax */
  ------------------
                          (AC_ER | AC_LD | AC_ELD | AC_RSV603DA | AC_USAC | AC_RSVD50)) {
  ------------------
  |  |  304|  8.81k|#define AC_LD 0x000020          /*!< AAC-LD */
  ------------------
                          (AC_ER | AC_LD | AC_ELD | AC_RSV603DA | AC_USAC | AC_RSVD50)) {
  ------------------
  |  |  303|  8.81k|#define AC_ELD 0x000010         /*!< AAC-ELD */
  ------------------
                          (AC_ER | AC_LD | AC_ELD | AC_RSV603DA | AC_USAC | AC_RSVD50)) {
  ------------------
  |  |  308|  8.81k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
                          (AC_ER | AC_LD | AC_ELD | AC_RSV603DA | AC_USAC | AC_RSVD50)) {
  ------------------
  |  |  307|  8.81k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                          (AC_ER | AC_LD | AC_ELD | AC_RSV603DA | AC_USAC | AC_RSVD50)) {
  ------------------
  |  |  310|  8.81k|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
 2155|  4.79k|          if (ch >= ascChannels) {
  ------------------
  |  Branch (2155:15): [True: 528, False: 4.27k]
  ------------------
 2156|    528|            break;
 2157|    528|          }
 2158|  4.79k|        }
 2159|       |
 2160|  8.28k|        switch (self->elements[el]) {
 2161|  1.02k|          case ID_SCE:
  ------------------
  |  Branch (2161:11): [True: 1.02k, False: 7.26k]
  ------------------
 2162|  2.26k|          case ID_CPE:
  ------------------
  |  Branch (2162:11): [True: 1.23k, False: 7.04k]
  ------------------
 2163|  2.55k|          case ID_LFE:
  ------------------
  |  Branch (2163:11): [True: 297, False: 7.99k]
  ------------------
 2164|  4.29k|          case ID_USAC_SCE:
  ------------------
  |  Branch (2164:11): [True: 1.73k, False: 6.55k]
  ------------------
 2165|  4.35k|          case ID_USAC_CPE:
  ------------------
  |  Branch (2165:11): [True: 59, False: 8.22k]
  ------------------
 2166|  4.35k|          case ID_USAC_LFE:
  ------------------
  |  Branch (2166:11): [True: 0, False: 8.28k]
  ------------------
 2167|       |
 2168|  4.35k|            el_channels = CAacDecoder_GetELChannels(
 2169|  4.35k|                self->elements[el], self->usacStereoConfigIndex[el]);
 2170|       |
 2171|  4.35k|            {
 2172|  4.35k|              self->pAacDecoderChannelInfo[ch]->pComStaticData =
 2173|  4.35k|                  (CAacDecoderCommonStaticData *)FDKcalloc(
 2174|  4.35k|                      1, sizeof(CAacDecoderCommonStaticData));
 2175|  4.35k|              if (self->pAacDecoderChannelInfo[ch]->pComStaticData == NULL) {
  ------------------
  |  Branch (2175:19): [True: 0, False: 4.35k]
  ------------------
 2176|      0|                goto bail;
 2177|      0|              }
 2178|  4.35k|              if (ch == aacChannelsOffset) {
  ------------------
  |  Branch (2178:19): [True: 2.69k, False: 1.65k]
  ------------------
 2179|  2.69k|                self->pAacDecoderChannelInfo[ch]->pComData =
 2180|  2.69k|                    (CAacDecoderCommonData *)GetWorkBufferCore6();
 2181|  2.69k|                self->pAacDecoderChannelInfo[ch]
 2182|  2.69k|                    ->pComStaticData->pWorkBufferCore1 = GetWorkBufferCore1();
 2183|  2.69k|              } else {
 2184|  1.65k|                self->pAacDecoderChannelInfo[ch]->pComData =
 2185|  1.65k|                    (CAacDecoderCommonData *)FDKaalloc(
 2186|  1.65k|                        sizeof(CAacDecoderCommonData), ALIGNMENT_DEFAULT);
  ------------------
  |  |  256|  1.65k|#define ALIGNMENT_DEFAULT 8
  ------------------
 2187|  1.65k|                self->pAacDecoderChannelInfo[ch]
 2188|  1.65k|                    ->pComStaticData->pWorkBufferCore1 =
 2189|  1.65k|                    self->pAacDecoderChannelInfo[aacChannelsOffset]
 2190|  1.65k|                        ->pComStaticData->pWorkBufferCore1;
 2191|  1.65k|              }
 2192|  4.35k|              if ((self->pAacDecoderChannelInfo[ch]->pComData == NULL) ||
  ------------------
  |  Branch (2192:19): [True: 0, False: 4.35k]
  ------------------
 2193|  4.35k|                  (self->pAacDecoderChannelInfo[ch]
  ------------------
  |  Branch (2193:19): [True: 0, False: 4.35k]
  ------------------
 2194|  4.35k|                       ->pComStaticData->pWorkBufferCore1 == NULL)) {
 2195|      0|                goto bail;
 2196|      0|              }
 2197|  4.35k|              self->pAacDecoderChannelInfo[ch]->pDynData =
 2198|  4.35k|                  &(self->pAacDecoderChannelInfo[ch]
 2199|  4.35k|                        ->pComData->pAacDecoderDynamicData[0]);
 2200|  4.35k|              self->pAacDecoderChannelInfo[ch]->pSpectralCoefficient =
 2201|  4.35k|                  (SPECTRAL_PTR)&self->workBufferCore2[ch * 1024];
 2202|       |
 2203|  4.35k|              if (el_channels == 2) {
  ------------------
  |  Branch (2203:19): [True: 1.29k, False: 3.06k]
  ------------------
 2204|  1.29k|                if (ch >= (8) - 1) {
  ------------------
  |  Branch (2204:21): [True: 0, False: 1.29k]
  ------------------
 2205|      0|                  return AAC_DEC_UNSUPPORTED_CHANNELCONFIG;
 2206|      0|                }
 2207|  1.29k|                self->pAacDecoderChannelInfo[ch + 1]->pComData =
 2208|  1.29k|                    self->pAacDecoderChannelInfo[ch]->pComData;
 2209|  1.29k|                self->pAacDecoderChannelInfo[ch + 1]->pComStaticData =
 2210|  1.29k|                    self->pAacDecoderChannelInfo[ch]->pComStaticData;
 2211|  1.29k|                self->pAacDecoderChannelInfo[ch + 1]
 2212|  1.29k|                    ->pComStaticData->pWorkBufferCore1 =
 2213|  1.29k|                    self->pAacDecoderChannelInfo[ch]
 2214|  1.29k|                        ->pComStaticData->pWorkBufferCore1;
 2215|  1.29k|                self->pAacDecoderChannelInfo[ch + 1]->pDynData =
 2216|  1.29k|                    &(self->pAacDecoderChannelInfo[ch]
 2217|  1.29k|                          ->pComData->pAacDecoderDynamicData[1]);
 2218|  1.29k|                self->pAacDecoderChannelInfo[ch + 1]->pSpectralCoefficient =
 2219|  1.29k|                    (SPECTRAL_PTR)&self->workBufferCore2[(ch + 1) * 1024];
 2220|  1.29k|              }
 2221|       |
 2222|  4.35k|              ch += el_channels;
 2223|  4.35k|            }
 2224|      0|            chIdx += el_channels;
 2225|  4.35k|            break;
 2226|       |
 2227|  3.93k|          default:
  ------------------
  |  Branch (2227:11): [True: 3.93k, False: 4.35k]
  ------------------
 2228|  3.93k|            break;
 2229|  8.28k|        }
 2230|       |
 2231|  8.28k|        if (self->elements[el] == ID_END) {
  ------------------
  |  Branch (2231:13): [True: 344, False: 7.94k]
  ------------------
 2232|    344|          break;
 2233|    344|        }
 2234|       |
 2235|  7.94k|        el++;
 2236|  7.94k|      }
 2237|       |
 2238|  2.69k|      chIdx = aacChannelsOffsetIdx;
 2239|  2.69k|      ch = aacChannelsOffset;
 2240|  8.33k|      for (int _ch = 0; _ch < ascChannels; _ch++) {
  ------------------
  |  Branch (2240:25): [True: 5.64k, False: 2.69k]
  ------------------
 2241|       |        /* Allocate persistent channel memory */
 2242|  5.64k|        {
 2243|  5.64k|          self->pAacDecoderStaticChannelInfo[ch] =
 2244|  5.64k|              GetAacDecoderStaticChannelInfo(ch);
 2245|  5.64k|          if (self->pAacDecoderStaticChannelInfo[ch] == NULL) {
  ------------------
  |  Branch (2245:15): [True: 0, False: 5.64k]
  ------------------
 2246|      0|            goto bail;
 2247|      0|          }
 2248|  5.64k|          self->pAacDecoderStaticChannelInfo[ch]->pOverlapBuffer =
 2249|  5.64k|              GetOverlapBuffer(ch); /* This area size depends on the AOT */
 2250|  5.64k|          if (self->pAacDecoderStaticChannelInfo[ch]->pOverlapBuffer == NULL) {
  ------------------
  |  Branch (2250:15): [True: 0, False: 5.64k]
  ------------------
 2251|      0|            goto bail;
 2252|      0|          }
 2253|  5.64k|          if (flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA /*|AC_BSAC*/)) {
  ------------------
  |  |  307|  5.64k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                        if (flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA /*|AC_BSAC*/)) {
  ------------------
  |  |  310|  5.64k|#define AC_RSVD50 0x004000      /*!< Rsvd50 */
  ------------------
                        if (flags & (AC_USAC | AC_RSVD50 | AC_RSV603DA /*|AC_BSAC*/)) {
  ------------------
  |  |  308|  5.64k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (2253:15): [True: 1.84k, False: 3.79k]
  ------------------
 2254|  1.84k|            self->pAacDecoderStaticChannelInfo[ch]->hArCo = CArco_Create();
 2255|  1.84k|            if (self->pAacDecoderStaticChannelInfo[ch]->hArCo == NULL) {
  ------------------
  |  Branch (2255:17): [True: 0, False: 1.84k]
  ------------------
 2256|      0|              goto bail;
 2257|      0|            }
 2258|  1.84k|          }
 2259|       |
 2260|  5.64k|          if (!(flags & (AC_USAC | AC_RSV603DA))) {
  ------------------
  |  |  307|  5.64k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                        if (!(flags & (AC_USAC | AC_RSV603DA))) {
  ------------------
  |  |  308|  5.64k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (2260:15): [True: 3.79k, False: 1.84k]
  ------------------
 2261|  3.79k|            CPns_UpdateNoiseState(
 2262|  3.79k|                &self->pAacDecoderChannelInfo[ch]->data.aac.PnsData,
 2263|  3.79k|                &self->pAacDecoderStaticChannelInfo[ch]->pnsCurrentSeed,
 2264|  3.79k|                self->pAacDecoderChannelInfo[ch]->pComData->pnsRandomSeed);
 2265|  3.79k|          }
 2266|  5.64k|          ch++;
 2267|  5.64k|        }
 2268|      0|        chIdx++;
 2269|  5.64k|      }
 2270|       |
 2271|  2.69k|      if (flags & AC_USAC) {
  ------------------
  |  |  307|  2.69k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
  |  Branch (2271:11): [True: 1.79k, False: 900]
  ------------------
 2272|  3.64k|        for (int _ch = 0; _ch < flushChannels; _ch++) {
  ------------------
  |  Branch (2272:27): [True: 1.85k, False: 1.79k]
  ------------------
 2273|  1.85k|          ch = aacChannelsOffset + _ch;
 2274|  1.85k|          if (self->pTimeDataFlush[ch] == NULL) {
  ------------------
  |  Branch (2274:15): [True: 1.85k, False: 0]
  ------------------
 2275|  1.85k|            self->pTimeDataFlush[ch] = GetTimeDataFlush(ch);
 2276|  1.85k|            if (self->pTimeDataFlush[ch] == NULL) {
  ------------------
  |  Branch (2276:17): [True: 0, False: 1.85k]
  ------------------
 2277|      0|              goto bail;
 2278|      0|            }
 2279|  1.85k|          }
 2280|  1.85k|        }
 2281|  1.79k|      }
 2282|       |
 2283|  2.69k|      if (flags & (AC_USAC | AC_RSV603DA)) {
  ------------------
  |  |  307|  2.69k|#define AC_USAC 0x000100        /*!< USAC */
  ------------------
                    if (flags & (AC_USAC | AC_RSV603DA)) {
  ------------------
  |  |  308|  2.69k|#define AC_RSV603DA 0x000200    /*!< RSVD60 3D audio */
  ------------------
  |  Branch (2283:11): [True: 1.79k, False: 900]
  ------------------
 2284|  1.79k|        int complexStereoPredPossible = 0;
 2285|  1.79k|        ch = aacChannelsOffset;
 2286|  1.79k|        chIdx = aacChannelsOffsetIdx;
 2287|  5.26k|        for (int _el2 = 0; _el2 < (int)asc->m_sc.m_usacConfig.m_usacNumElements;
  ------------------
  |  Branch (2287:28): [True: 3.47k, False: 1.79k]
  ------------------
 2288|  3.47k|             _el2++) {
 2289|  3.47k|          int el2 = elementOffset + _el2;
 2290|  3.47k|          int elCh = 0, ch2;
 2291|       |
 2292|  3.47k|          if ((self->elements[el2] == ID_USAC_CPE) &&
  ------------------
  |  Branch (2292:15): [True: 59, False: 3.41k]
  ------------------
 2293|     59|              !(self->usacStereoConfigIndex[el2] == 1)) {
  ------------------
  |  Branch (2293:15): [True: 51, False: 8]
  ------------------
 2294|     51|            elCh = 2;
 2295|  3.41k|          } else if (IS_CHANNEL_ELEMENT(self->elements[el2])) {
  ------------------
  |  |  459|  3.41k|  ((elementId) == ID_SCE || (elementId) == ID_CPE || (elementId) == ID_LFE || \
  |  |  ------------------
  |  |  |  Branch (459:4): [True: 0, False: 3.41k]
  |  |  |  Branch (459:29): [True: 0, False: 3.41k]
  |  |  |  Branch (459:54): [True: 0, False: 3.41k]
  |  |  ------------------
  |  |  460|  3.41k|   (elementId) == ID_USAC_SCE || (elementId) == ID_USAC_CPE ||                \
  |  |  ------------------
  |  |  |  Branch (460:4): [True: 1.73k, False: 1.68k]
  |  |  |  Branch (460:34): [True: 8, False: 1.67k]
  |  |  ------------------
  |  |  461|  3.41k|   (elementId) == ID_USAC_LFE)
  |  |  ------------------
  |  |  |  Branch (461:4): [True: 0, False: 1.67k]
  |  |  ------------------
  ------------------
 2296|  1.74k|            elCh = 1;
 2297|  1.74k|          }
 2298|       |
 2299|  3.47k|          if (elFlags[el2] & AC_EL_USAC_CP_POSSIBLE) {
  ------------------
  |  |  351|  3.47k|  0x000040 /*!< USAC may use Complex Stereo Prediction in this channel element \
  ------------------
  |  Branch (2299:15): [True: 22, False: 3.44k]
  ------------------
 2300|     22|            complexStereoPredPossible = 1;
 2301|     22|            if (self->cpeStaticData[el2] == NULL) {
  ------------------
  |  Branch (2301:17): [True: 22, False: 0]
  ------------------
 2302|     22|              self->cpeStaticData[el2] = GetCpePersistentData();
 2303|     22|              if (self->cpeStaticData[el2] == NULL) {
  ------------------
  |  Branch (2303:19): [True: 0, False: 22]
  ------------------
 2304|      0|                goto bail;
 2305|      0|              }
 2306|     22|            }
 2307|     22|          }
 2308|       |
 2309|  5.31k|          for (ch2 = 0; ch2 < elCh; ch2++) {
  ------------------
  |  Branch (2309:25): [True: 1.84k, False: 3.47k]
  ------------------
 2310|       |            /* Hook element specific cpeStaticData into channel specific
 2311|       |             * aacDecoderStaticChannelInfo */
 2312|  1.84k|            self->pAacDecoderStaticChannelInfo[ch]->pCpeStaticData =
 2313|  1.84k|                self->cpeStaticData[el2];
 2314|  1.84k|            if (self->pAacDecoderStaticChannelInfo[ch]->pCpeStaticData !=
  ------------------
  |  Branch (2314:17): [True: 44, False: 1.80k]
  ------------------
 2315|  1.84k|                NULL) {
 2316|     44|              self->pAacDecoderStaticChannelInfo[ch]
 2317|     44|                  ->pCpeStaticData->jointStereoPersistentData
 2318|     44|                  .spectralCoeffs[ch2] =
 2319|     44|                  self->pAacDecoderStaticChannelInfo[ch]
 2320|     44|                      ->concealmentInfo.spectralCoefficient;
 2321|     44|              self->pAacDecoderStaticChannelInfo[ch]
 2322|     44|                  ->pCpeStaticData->jointStereoPersistentData.specScale[ch2] =
 2323|     44|                  self->pAacDecoderStaticChannelInfo[ch]
 2324|     44|                      ->concealmentInfo.specScale;
 2325|     44|              self->pAacDecoderStaticChannelInfo[ch]
 2326|     44|                  ->pCpeStaticData->jointStereoPersistentData.scratchBuffer =
 2327|     44|                  (FIXP_DBL *)self->pTimeData2;
 2328|     44|            }
 2329|  1.84k|            chIdx++;
 2330|  1.84k|            ch++;
 2331|  1.84k|          } /* for each channel in current element */
 2332|  3.47k|          if (complexStereoPredPossible && (elCh == 2)) {
  ------------------
  |  Branch (2332:15): [True: 106, False: 3.36k]
  |  Branch (2332:44): [True: 22, False: 84]
  ------------------
 2333|       |            /* needed once for all channels */
 2334|     22|            if (self->pAacDecoderChannelInfo[ch - 1]
  ------------------
  |  Branch (2334:17): [True: 22, False: 0]
  ------------------
 2335|     22|                    ->pComStaticData->cplxPredictionData == NULL) {
 2336|     22|              self->pAacDecoderChannelInfo[ch - 1]
 2337|     22|                  ->pComStaticData->cplxPredictionData =
 2338|     22|                  GetCplxPredictionData();
 2339|     22|            }
 2340|     22|            if (self->pAacDecoderChannelInfo[ch - 1]
  ------------------
  |  Branch (2340:17): [True: 0, False: 22]
  ------------------
 2341|     22|                    ->pComStaticData->cplxPredictionData == NULL) {
 2342|      0|              goto bail;
 2343|      0|            }
 2344|     22|          }
 2345|  3.47k|          if (elCh > 0) {
  ------------------
  |  Branch (2345:15): [True: 1.79k, False: 1.67k]
  ------------------
 2346|  1.79k|            self->pAacDecoderStaticChannelInfo[ch - elCh]->nfRandomSeed =
 2347|  1.79k|                (ULONG)0x3039;
 2348|  1.79k|            if (self->elements[el2] == ID_USAC_CPE) {
  ------------------
  |  Branch (2348:17): [True: 59, False: 1.73k]
  ------------------
 2349|     59|              if (asc->m_sc.m_usacConfig.element[el2].m_stereoConfigIndex !=
  ------------------
  |  Branch (2349:19): [True: 51, False: 8]
  ------------------
 2350|     59|                  1) {
 2351|     51|                self->pAacDecoderStaticChannelInfo[ch - elCh + 1]
 2352|     51|                    ->nfRandomSeed = (ULONG)0x10932;
 2353|     51|              }
 2354|     59|            }
 2355|  1.79k|          }
 2356|  3.47k|        } /* for each element */
 2357|  1.79k|      }
 2358|       |
 2359|  2.69k|      if (ascChannels != self->aacChannels) {
  ------------------
  |  Branch (2359:11): [True: 2.69k, False: 0]
  ------------------
 2360|       |        /* Make allocated channel count persistent in decoder context. */
 2361|  2.69k|        self->aacChannels = aacChannelsOffset + ch;
 2362|  2.69k|      }
 2363|  2.69k|    }
 2364|       |
 2365|  2.69k|    if (usacResidualDelayCompSamples) {
  ------------------
  |  Branch (2365:9): [True: 13, False: 2.68k]
  ------------------
 2366|     13|      INT delayErr = FDK_Delay_Create(&self->usacResidualDelay,
 2367|     13|                                      (USHORT)usacResidualDelayCompSamples, 1);
 2368|     13|      if (delayErr) {
  ------------------
  |  Branch (2368:11): [True: 0, False: 13]
  ------------------
 2369|      0|        goto bail;
 2370|      0|      }
 2371|     13|    }
 2372|       |
 2373|       |    /* Make amount of signalled channels persistent in decoder context. */
 2374|  2.69k|    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.69k|    self->aacChannelsPrev = 0;
 2379|  2.69k|  }
 2380|       |
 2381|  2.69k|  if (self->pAacDecoderChannelInfo[0] != NULL) {
  ------------------
  |  Branch (2381:7): [True: 2.69k, False: 0]
  ------------------
 2382|  2.69k|    self->pDrmBsBuffer = self->pAacDecoderChannelInfo[0]
 2383|  2.69k|                             ->pComStaticData->pWorkBufferCore1->DrmBsBuffer;
 2384|  2.69k|    self->drmBsBufferSize = DRM_BS_BUFFER_SIZE;
  ------------------
  |  |  136|  2.69k|  (512) /* size of the dynamic buffer which is used to reverse the bits of \
  ------------------
 2385|  2.69k|  }
 2386|       |
 2387|       |  /* Update structures */
 2388|  2.69k|  if (*configChanged) {
  ------------------
  |  Branch (2388:7): [True: 2.69k, 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.69k|    int ch = 0;
 2394|  2.69k|    int chIdx = 0;
 2395|  8.33k|    for (int _ch = 0; _ch < self->ascChannels[streamIndex]; _ch++) {
  ------------------
  |  Branch (2395:23): [True: 5.64k, False: 2.69k]
  ------------------
 2396|  5.64k|      switch (self->streamInfo.aot) {
 2397|  1.19k|        case AOT_ER_AAC_ELD:
  ------------------
  |  Branch (2397:9): [True: 1.19k, False: 4.44k]
  ------------------
 2398|  1.46k|        case AOT_ER_AAC_LD:
  ------------------
  |  Branch (2398:9): [True: 267, False: 5.37k]
  ------------------
 2399|  1.46k|          self->pAacDecoderChannelInfo[ch]->granuleLength =
 2400|  1.46k|              self->streamInfo.aacSamplesPerFrame;
 2401|  1.46k|          break;
 2402|  4.18k|        default:
  ------------------
  |  Branch (2402:9): [True: 4.18k, False: 1.46k]
  ------------------
 2403|  4.18k|          self->pAacDecoderChannelInfo[ch]->granuleLength =
 2404|  4.18k|              self->streamInfo.aacSamplesPerFrame / 8;
 2405|  4.18k|          break;
 2406|  5.64k|      }
 2407|  5.64k|      self->pAacDecoderChannelInfo[ch]->renderMode = initRenderMode;
 2408|       |
 2409|  5.64k|      mdct_init(&self->pAacDecoderStaticChannelInfo[ch]->IMdct,
 2410|  5.64k|                self->pAacDecoderStaticChannelInfo[ch]->pOverlapBuffer,
 2411|  5.64k|                OverlapBufferSize);
  ------------------
  |  |  109|  5.64k|#define OverlapBufferSize (768)
  ------------------
 2412|       |
 2413|  5.64k|      self->pAacDecoderStaticChannelInfo[ch]->last_core_mode = FD_LONG;
 2414|  5.64k|      self->pAacDecoderStaticChannelInfo[ch]->last_lpd_mode = 255;
 2415|       |
 2416|  5.64k|      self->pAacDecoderStaticChannelInfo[ch]->last_tcx_pitch = L_DIV;
  ------------------
  |  |  192|  5.64k|#define L_DIV L_DIV_1024
  |  |  ------------------
  |  |  |  |  158|  5.64k|  (L_FRAME_PLUS_1024 / NB_DIV) /* length of one acelp or tcx20 frame */
  |  |  |  |  ------------------
  |  |  |  |  |  |  156|  5.64k|#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.64k|#define NB_DIV 4   /* number of division (20ms) per 80ms frame */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2417|       |
 2418|       |      /* Reset DRC control data for this channel */
 2419|  5.64k|      aacDecoder_drcInitChannelData(
 2420|  5.64k|          &self->pAacDecoderStaticChannelInfo[ch]->drcData);
 2421|       |
 2422|       |      /* Delete mixdown metadata from the past */
 2423|  5.64k|      pcmDmx_Reset(self->hPcmUtils, PCMDMX_RESET_BS_DATA);
  ------------------
  |  |  324|  5.64k|#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.64k|      CConcealment_InitChannelData(
 2428|  5.64k|          &self->pAacDecoderStaticChannelInfo[ch]->concealmentInfo,
 2429|  5.64k|          &self->concealCommonData, initRenderMode,
 2430|  5.64k|          self->streamInfo.aacSamplesPerFrame);
 2431|  5.64k|      ch++;
 2432|  5.64k|      chIdx++;
 2433|  5.64k|    }
 2434|  2.69k|  }
 2435|       |
 2436|  2.69k|  if (*configChanged) {
  ------------------
  |  Branch (2436:7): [True: 2.69k, False: 0]
  ------------------
 2437|  2.69k|    int drcDecSampleRate, drcDecFrameSize;
 2438|       |
 2439|  2.69k|    if (self->streamInfo.extSamplingRate != 0) {
  ------------------
  |  Branch (2439:9): [True: 952, False: 1.74k]
  ------------------
 2440|    952|      drcDecSampleRate = self->streamInfo.extSamplingRate;
 2441|    952|      drcDecFrameSize = (self->streamInfo.aacSamplesPerFrame *
 2442|    952|                         self->streamInfo.extSamplingRate) /
 2443|    952|                        self->streamInfo.aacSampleRate;
 2444|  1.74k|    } else {
 2445|  1.74k|      drcDecSampleRate = self->streamInfo.aacSampleRate;
 2446|  1.74k|      drcDecFrameSize = self->streamInfo.aacSamplesPerFrame;
 2447|  1.74k|    }
 2448|       |
 2449|  2.69k|    if (FDK_drcDec_Init(self->hUniDrcDecoder, drcDecFrameSize, drcDecSampleRate,
  ------------------
  |  Branch (2449:9): [True: 0, False: 2.69k]
  ------------------
 2450|  2.69k|                        self->aacChannels) != 0)
 2451|      0|      goto bail;
 2452|  2.69k|  }
 2453|       |
 2454|  2.69k|  if (*configChanged) {
  ------------------
  |  Branch (2454:7): [True: 2.69k, False: 0]
  ------------------
 2455|  2.69k|    if (asc->m_aot == AOT_USAC) {
  ------------------
  |  Branch (2455:9): [True: 1.79k, False: 900]
  ------------------
 2456|  1.79k|      aacDecoder_drcDisable(self->hDrcInfo);
 2457|  1.79k|    }
 2458|  2.69k|  }
 2459|       |
 2460|  2.69k|  if (asc->m_aot == AOT_USAC) {
  ------------------
  |  Branch (2460:7): [True: 1.79k, False: 900]
  ------------------
 2461|  1.79k|    pcmLimiter_SetAttack(self->hLimiter, (5));
 2462|  1.79k|    pcmLimiter_SetThreshold(self->hLimiter, FL2FXCONST_DBL(0.89125094f));
  ------------------
  |  |  192|  1.79k|  (FIXP_DBL)(                                                                \
  |  |  193|  1.79k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 1.79k, Folded]
  |  |  ------------------
  |  |  194|  1.79k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  1.79k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.79k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 1.79k]
  |  |  ------------------
  |  |  195|  1.79k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  1.79k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  1.79k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  1.79k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  1.79k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.79k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  1.79k|          : ((((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.79k|  }
 2464|       |
 2465|  2.69k|  CAacDecoder_AcceptFlags(self, asc, flags, elFlags, streamIndex,
 2466|  2.69k|                          elementOffset);
 2467|  2.69k|  self->sbrEnabled = sbrEnabled;
 2468|  2.69k|  self->sbrEnabledPrev = sbrEnabledPrev;
 2469|  2.69k|  self->mpsEnableCurr = mpsEnableCurr;
 2470|       |
 2471|       |  /* Update externally visible copy of flags */
 2472|  2.69k|  self->streamInfo.flags = self->flags[0];
 2473|       |
 2474|  2.69k|  return err;
 2475|       |
 2476|      0|bail:
 2477|      0|  CAacDecoder_DeInit(self, 0);
 2478|      0|  return AAC_DEC_OUT_OF_MEMORY;
 2479|  2.69k|}
aacdecoder.cpp:_ZL24CAacDecoder_AncDataResetP8CAncData:
  321|  6.83k|static AAC_DECODER_ERROR CAacDecoder_AncDataReset(CAncData *ancData) {
  322|  6.83k|  int i;
  323|  61.4k|  for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (323:15): [True: 54.6k, False: 6.83k]
  ------------------
  324|  54.6k|    ancData->offset[i] = 0;
  325|  54.6k|  }
  326|  6.83k|  ancData->nrElements = 0;
  327|       |
  328|  6.83k|  return AAC_DEC_OK;
  329|  6.83k|}
aacdecoder.cpp:_ZL15CStreamInfoInitP11CStreamInfo:
 1239|  6.83k|static void CStreamInfoInit(CStreamInfo *pStreamInfo) {
 1240|  6.83k|  pStreamInfo->aacSampleRate = 0;
 1241|  6.83k|  pStreamInfo->profile = -1;
 1242|  6.83k|  pStreamInfo->aot = AOT_NONE;
 1243|       |
 1244|  6.83k|  pStreamInfo->channelConfig = -1;
 1245|  6.83k|  pStreamInfo->bitRate = 0;
 1246|  6.83k|  pStreamInfo->aacSamplesPerFrame = 0;
 1247|       |
 1248|  6.83k|  pStreamInfo->extAot = AOT_NONE;
 1249|  6.83k|  pStreamInfo->extSamplingRate = 0;
 1250|       |
 1251|  6.83k|  pStreamInfo->flags = 0;
 1252|       |
 1253|  6.83k|  pStreamInfo->epConfig = -1; /* default: no ER */
 1254|       |
 1255|  6.83k|  pStreamInfo->numChannels = 0;
 1256|  6.83k|  pStreamInfo->sampleRate = 0;
 1257|  6.83k|  pStreamInfo->frameSize = 0;
 1258|       |
 1259|  6.83k|  pStreamInfo->outputDelay = 0;
 1260|       |
 1261|       |  /* DRC */
 1262|  6.83k|  pStreamInfo->drcProgRefLev =
 1263|  6.83k|      -1; /* set program reference level to not indicated */
 1264|  6.83k|  pStreamInfo->drcPresMode = -1; /* default: presentation mode not indicated */
 1265|       |
 1266|  6.83k|  pStreamInfo->outputLoudness = -1; /* default: no loudness metadata present */
 1267|  6.83k|}
aacdecoder.cpp:_ZL18CAacDecoder_DeInitP20AAC_DECODER_INSTANCEi:
 1343|  9.72k|                               const int subStreamIndex) {
 1344|  9.72k|  int ch;
 1345|  9.72k|  int aacChannelOffset = 0, aacChannels = (8);
 1346|  9.72k|  int numElements = (3 * ((8) * 2) + (((8) * 2)) / 2 + 4 * (1) + 1),
 1347|  9.72k|      elementOffset = 0;
 1348|       |
 1349|  9.72k|  if (self == NULL) return;
  ------------------
  |  Branch (1349:7): [True: 0, False: 9.72k]
  ------------------
 1350|       |
 1351|  9.72k|  {
 1352|  9.72k|    self->ascChannels[0] = 0;
 1353|  9.72k|    self->elements[0] = ID_END;
 1354|  9.72k|  }
 1355|       |
 1356|  87.4k|  for (ch = aacChannelOffset; ch < aacChannelOffset + aacChannels; ch++) {
  ------------------
  |  Branch (1356:31): [True: 77.7k, False: 9.72k]
  ------------------
 1357|  77.7k|    if (self->pAacDecoderChannelInfo[ch] != NULL) {
  ------------------
  |  Branch (1357:9): [True: 5.64k, False: 72.1k]
  ------------------
 1358|  5.64k|      if (self->pAacDecoderChannelInfo[ch]->pComStaticData != NULL) {
  ------------------
  |  Branch (1358:11): [True: 4.35k, False: 1.29k]
  ------------------
 1359|  4.35k|        if (self->pAacDecoderChannelInfo[ch]
  ------------------
  |  Branch (1359:13): [True: 4.35k, False: 0]
  ------------------
 1360|  4.35k|                ->pComStaticData->pWorkBufferCore1 != NULL) {
 1361|  4.35k|          if (ch == aacChannelOffset) {
  ------------------
  |  Branch (1361:15): [True: 2.69k, False: 1.65k]
  ------------------
 1362|  2.69k|            FreeWorkBufferCore1(&self->pAacDecoderChannelInfo[ch]
 1363|  2.69k|                                     ->pComStaticData->pWorkBufferCore1);
 1364|  2.69k|          }
 1365|  4.35k|        }
 1366|  4.35k|        if (self->pAacDecoderChannelInfo[ch]
  ------------------
  |  Branch (1366:13): [True: 22, False: 4.33k]
  ------------------
 1367|  4.35k|                ->pComStaticData->cplxPredictionData != NULL) {
 1368|     22|          FreeCplxPredictionData(&self->pAacDecoderChannelInfo[ch]
 1369|     22|                                      ->pComStaticData->cplxPredictionData);
 1370|     22|        }
 1371|       |        /* Avoid double free of linked pComStaticData in case of CPE by settings
 1372|       |         * pointer to NULL. */
 1373|  4.35k|        if (ch < (8) - 1) {
  ------------------
  |  Branch (1373:13): [True: 4.18k, False: 164]
  ------------------
 1374|  4.18k|          if ((self->pAacDecoderChannelInfo[ch + 1] != NULL) &&
  ------------------
  |  Branch (1374:15): [True: 2.04k, False: 2.14k]
  ------------------
 1375|  2.04k|              (self->pAacDecoderChannelInfo[ch + 1]->pComStaticData ==
  ------------------
  |  Branch (1375:15): [True: 1.29k, False: 752]
  ------------------
 1376|  2.04k|               self->pAacDecoderChannelInfo[ch]->pComStaticData)) {
 1377|  1.29k|            self->pAacDecoderChannelInfo[ch + 1]->pComStaticData = NULL;
 1378|  1.29k|          }
 1379|  4.18k|        }
 1380|  4.35k|        FDKfree(self->pAacDecoderChannelInfo[ch]->pComStaticData);
 1381|  4.35k|        self->pAacDecoderChannelInfo[ch]->pComStaticData = NULL;
 1382|  4.35k|      }
 1383|  5.64k|      if (self->pAacDecoderChannelInfo[ch]->pComData != NULL) {
  ------------------
  |  Branch (1383:11): [True: 4.35k, False: 1.29k]
  ------------------
 1384|       |        /* Avoid double free of linked pComData in case of CPE by settings
 1385|       |         * pointer to NULL. */
 1386|  4.35k|        if (ch < (8) - 1) {
  ------------------
  |  Branch (1386:13): [True: 4.18k, False: 164]
  ------------------
 1387|  4.18k|          if ((self->pAacDecoderChannelInfo[ch + 1] != NULL) &&
  ------------------
  |  Branch (1387:15): [True: 2.04k, False: 2.14k]
  ------------------
 1388|  2.04k|              (self->pAacDecoderChannelInfo[ch + 1]->pComData ==
  ------------------
  |  Branch (1388:15): [True: 1.29k, False: 752]
  ------------------
 1389|  2.04k|               self->pAacDecoderChannelInfo[ch]->pComData)) {
 1390|  1.29k|            self->pAacDecoderChannelInfo[ch + 1]->pComData = NULL;
 1391|  1.29k|          }
 1392|  4.18k|        }
 1393|  4.35k|        if (ch == aacChannelOffset) {
  ------------------
  |  Branch (1393:13): [True: 2.69k, False: 1.65k]
  ------------------
 1394|  2.69k|          FreeWorkBufferCore6(
 1395|  2.69k|              (SCHAR **)&self->pAacDecoderChannelInfo[ch]->pComData);
 1396|  2.69k|        } else {
 1397|  1.65k|          FDKafree(self->pAacDecoderChannelInfo[ch]->pComData);
 1398|  1.65k|        }
 1399|  4.35k|        self->pAacDecoderChannelInfo[ch]->pComData = NULL;
 1400|  4.35k|      }
 1401|  5.64k|    }
 1402|  77.7k|    if (self->pAacDecoderStaticChannelInfo[ch] != NULL) {
  ------------------
  |  Branch (1402:9): [True: 5.64k, False: 72.1k]
  ------------------
 1403|  5.64k|      if (self->pAacDecoderStaticChannelInfo[ch]->pOverlapBuffer != NULL) {
  ------------------
  |  Branch (1403:11): [True: 5.64k, False: 0]
  ------------------
 1404|  5.64k|        FreeOverlapBuffer(
 1405|  5.64k|            &self->pAacDecoderStaticChannelInfo[ch]->pOverlapBuffer);
 1406|  5.64k|      }
 1407|  5.64k|      if (self->pAacDecoderStaticChannelInfo[ch]->hArCo != NULL) {
  ------------------
  |  Branch (1407:11): [True: 1.84k, False: 3.79k]
  ------------------
 1408|  1.84k|        CArco_Destroy(self->pAacDecoderStaticChannelInfo[ch]->hArCo);
 1409|  1.84k|      }
 1410|  5.64k|      FreeAacDecoderStaticChannelInfo(&self->pAacDecoderStaticChannelInfo[ch]);
 1411|  5.64k|    }
 1412|  77.7k|    if (self->pAacDecoderChannelInfo[ch] != NULL) {
  ------------------
  |  Branch (1412:9): [True: 5.64k, False: 72.1k]
  ------------------
 1413|  5.64k|      FreeAacDecoderChannelInfo(&self->pAacDecoderChannelInfo[ch]);
 1414|  5.64k|    }
 1415|  77.7k|  }
 1416|       |
 1417|  9.72k|  {
 1418|  9.72k|    int el;
 1419|   602k|    for (el = elementOffset; el < elementOffset + numElements; el++) {
  ------------------
  |  Branch (1419:30): [True: 592k, False: 9.72k]
  ------------------
 1420|   592k|      if (self->cpeStaticData[el] != NULL) {
  ------------------
  |  Branch (1420:11): [True: 22, False: 592k]
  ------------------
 1421|     22|        FreeCpePersistentData(&self->cpeStaticData[el]);
 1422|     22|      }
 1423|   592k|    }
 1424|  9.72k|  }
 1425|       |
 1426|  9.72k|  FDK_Delay_Destroy(&self->usacResidualDelay);
 1427|       |
 1428|  9.72k|  self->aacChannels = 0;
 1429|  9.72k|  self->streamInfo.aacSampleRate = 0;
 1430|  9.72k|  self->streamInfo.sampleRate = 0;
 1431|       |  /* This samplerate value is checked for configuration change, not the others
 1432|       |   * above. */
 1433|  9.72k|  self->samplingRateInfo[subStreamIndex].samplingRate = 0;
 1434|  9.72k|}
aacdecoder.cpp:_ZL23CAacDecoder_AcceptFlagsP20AAC_DECODER_INSTANCEPK21CSAudioSpecificConfigjPjii:
 1451|  5.58k|                                    int elementOffset) {
 1452|  5.58k|  FDKmemcpy(self->elFlags, elFlags, sizeof(self->elFlags));
 1453|       |
 1454|  5.58k|  self->flags[streamIndex] = flags;
 1455|  5.58k|}
aacdecoder.cpp:_ZL25CAacDecoder_GetELChannels14MP4_ELEMENT_IDh:
  286|  4.35k|                                     UCHAR usacStereoConfigIndex) {
  287|  4.35k|  int el_channels = 0;
  288|       |
  289|  4.35k|  switch (type) {
  290|     59|    case ID_USAC_CPE:
  ------------------
  |  Branch (290:5): [True: 59, False: 4.29k]
  ------------------
  291|     59|      if (usacStereoConfigIndex == 1) {
  ------------------
  |  Branch (291:11): [True: 8, False: 51]
  ------------------
  292|      8|        el_channels = 1;
  293|     51|      } else {
  294|     51|        el_channels = 2;
  295|     51|      }
  296|     59|      break;
  297|  1.23k|    case ID_CPE:
  ------------------
  |  Branch (297:5): [True: 1.23k, False: 3.11k]
  ------------------
  298|  1.23k|      el_channels = 2;
  299|  1.23k|      break;
  300|  1.73k|    case ID_USAC_SCE:
  ------------------
  |  Branch (300:5): [True: 1.73k, False: 2.61k]
  ------------------
  301|  1.73k|    case ID_USAC_LFE:
  ------------------
  |  Branch (301:5): [True: 0, False: 4.35k]
  ------------------
  302|  2.75k|    case ID_SCE:
  ------------------
  |  Branch (302:5): [True: 1.02k, False: 3.33k]
  ------------------
  303|  3.05k|    case ID_LFE:
  ------------------
  |  Branch (303:5): [True: 297, False: 4.05k]
  ------------------
  304|  3.05k|      el_channels = 1;
  305|  3.05k|      break;
  306|      0|    default:
  ------------------
  |  Branch (306:5): [True: 0, False: 4.35k]
  ------------------
  307|      0|      el_channels = 0;
  308|      0|      break;
  309|  4.35k|  }
  310|       |
  311|  4.35k|  return el_channels;
  312|  4.35k|}

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

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

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

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

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

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

_Z23drcDec_readUniDrcConfigP13FDK_BITSTREAMP14UNI_DRC_CONFIG:
 1676|  30.5k|                        HANDLE_UNI_DRC_CONFIG hUniDrcConfig) {
 1677|  30.5k|  DRC_ERROR err = DE_OK;
 1678|  30.5k|  int i, diff = 0;
 1679|  30.5k|  int drcDescriptionBasicPresent, drcCoefficientsBasicCount,
 1680|  30.5k|      drcInstructionsBasicCount;
 1681|  30.5k|  CHANNEL_LAYOUT tmpChan;
 1682|  30.5k|  FDKmemclear(&tmpChan, sizeof(CHANNEL_LAYOUT));
 1683|  30.5k|  if (hUniDrcConfig == NULL) return DE_NOT_OK;
  ------------------
  |  Branch (1683:7): [True: 0, False: 30.5k]
  ------------------
 1684|       |
 1685|  30.5k|  diff |= _compAssign(&hUniDrcConfig->sampleRatePresent, FDKreadBits(hBs, 1));
 1686|       |
 1687|  30.5k|  if (hUniDrcConfig->sampleRatePresent == 1) {
  ------------------
  |  Branch (1687:7): [True: 1.04k, False: 29.4k]
  ------------------
 1688|  1.04k|    diff |=
 1689|  1.04k|        _compAssign(&hUniDrcConfig->sampleRate, FDKreadBits(hBs, 18) + 1000);
 1690|  1.04k|  }
 1691|       |
 1692|  30.5k|  diff |= _compAssign(&hUniDrcConfig->downmixInstructionsCountV0,
 1693|  30.5k|                      FDKreadBits(hBs, 7));
 1694|       |
 1695|  30.5k|  drcDescriptionBasicPresent = FDKreadBits(hBs, 1);
 1696|  30.5k|  if (drcDescriptionBasicPresent == 1) {
  ------------------
  |  Branch (1696:7): [True: 2.47k, False: 28.0k]
  ------------------
 1697|  2.47k|    drcCoefficientsBasicCount = FDKreadBits(hBs, 3);
 1698|  2.47k|    drcInstructionsBasicCount = FDKreadBits(hBs, 4);
 1699|  28.0k|  } else {
 1700|  28.0k|    drcCoefficientsBasicCount = 0;
 1701|  28.0k|    drcInstructionsBasicCount = 0;
 1702|  28.0k|  }
 1703|       |
 1704|  30.5k|  diff |= _compAssign(&hUniDrcConfig->drcCoefficientsUniDrcCountV0,
 1705|  30.5k|                      FDKreadBits(hBs, 3));
 1706|  30.5k|  diff |= _compAssign(&hUniDrcConfig->drcInstructionsUniDrcCountV0,
 1707|  30.5k|                      FDKreadBits(hBs, 6));
 1708|       |
 1709|  30.5k|  err = _readChannelLayout(hBs, &tmpChan);
 1710|  30.5k|  if (err) return err;
  ------------------
  |  Branch (1710:7): [True: 220, False: 30.3k]
  ------------------
 1711|       |
 1712|  30.3k|  if (!diff)
  ------------------
  |  Branch (1712:7): [True: 15.9k, False: 14.4k]
  ------------------
 1713|  15.9k|    diff |= (FDKmemcmp(&tmpChan, &hUniDrcConfig->channelLayout,
 1714|  15.9k|                       sizeof(CHANNEL_LAYOUT)) != 0);
 1715|  30.3k|  hUniDrcConfig->channelLayout = tmpChan;
 1716|       |
 1717|  30.3k|  hUniDrcConfig->downmixInstructionsCount =
 1718|  30.3k|      fMin(hUniDrcConfig->downmixInstructionsCountV0, (UCHAR)6);
 1719|  1.07M|  for (i = 0; i < hUniDrcConfig->downmixInstructionsCountV0; i++) {
  ------------------
  |  Branch (1719:15): [True: 1.04M, False: 30.2k]
  ------------------
 1720|  1.04M|    DOWNMIX_INSTRUCTIONS tmpDown;
 1721|  1.04M|    FDKmemclear(&tmpDown, sizeof(DOWNMIX_INSTRUCTIONS));
 1722|  1.04M|    err = _readDownmixInstructions(hBs, 0, &hUniDrcConfig->channelLayout,
 1723|  1.04M|                                   &tmpDown);
 1724|  1.04M|    if (err) return err;
  ------------------
  |  Branch (1724:9): [True: 86, False: 1.04M]
  ------------------
 1725|  1.04M|    if (i >= 6) continue;
  ------------------
  |  Branch (1725:9): [True: 986k, False: 62.7k]
  ------------------
 1726|  62.7k|    if (!diff)
  ------------------
  |  Branch (1726:9): [True: 10.2k, False: 52.4k]
  ------------------
 1727|  10.2k|      diff |= (FDKmemcmp(&tmpDown, &(hUniDrcConfig->downmixInstructions[i]),
 1728|  10.2k|                         sizeof(DOWNMIX_INSTRUCTIONS)) != 0);
 1729|  62.7k|    hUniDrcConfig->downmixInstructions[i] = tmpDown;
 1730|  62.7k|  }
 1731|       |
 1732|  35.1k|  for (i = 0; i < drcCoefficientsBasicCount; i++) {
  ------------------
  |  Branch (1732:15): [True: 4.95k, False: 30.2k]
  ------------------
 1733|  4.95k|    _skipDrcCoefficientsBasic(hBs);
 1734|  4.95k|  }
 1735|  49.6k|  for (i = 0; i < drcInstructionsBasicCount; i++) {
  ------------------
  |  Branch (1735:15): [True: 19.4k, False: 30.2k]
  ------------------
 1736|  19.4k|    _skipDrcInstructionsBasic(hBs);
 1737|  19.4k|  }
 1738|       |
 1739|  30.2k|  hUniDrcConfig->drcCoefficientsUniDrcCount =
 1740|  30.2k|      fMin(hUniDrcConfig->drcCoefficientsUniDrcCountV0, (UCHAR)2);
 1741|  75.4k|  for (i = 0; i < hUniDrcConfig->drcCoefficientsUniDrcCountV0; i++) {
  ------------------
  |  Branch (1741:15): [True: 45.3k, False: 30.1k]
  ------------------
 1742|  45.3k|    DRC_COEFFICIENTS_UNI_DRC tmpCoef;
 1743|  45.3k|    FDKmemclear(&tmpCoef, sizeof(DRC_COEFFICIENTS_UNI_DRC));
 1744|  45.3k|    err = _readDrcCoefficientsUniDrc(hBs, 0, &tmpCoef);
 1745|  45.3k|    if (err) return err;
  ------------------
  |  Branch (1745:9): [True: 106, False: 45.2k]
  ------------------
 1746|  45.2k|    if (i >= 2) continue;
  ------------------
  |  Branch (1746:9): [True: 26.5k, False: 18.6k]
  ------------------
 1747|  18.6k|    if (!diff)
  ------------------
  |  Branch (1747:9): [True: 5.03k, False: 13.6k]
  ------------------
 1748|  5.03k|      diff |= (FDKmemcmp(&tmpCoef, &(hUniDrcConfig->drcCoefficientsUniDrc[i]),
 1749|  5.03k|                         sizeof(DRC_COEFFICIENTS_UNI_DRC)) != 0);
 1750|  18.6k|    hUniDrcConfig->drcCoefficientsUniDrc[i] = tmpCoef;
 1751|  18.6k|  }
 1752|       |
 1753|  30.1k|  hUniDrcConfig->drcInstructionsUniDrcCount =
 1754|  30.1k|      fMin(hUniDrcConfig->drcInstructionsUniDrcCountV0, (UCHAR)12);
 1755|   651k|  for (i = 0; i < hUniDrcConfig->drcInstructionsUniDrcCountV0; i++) {
  ------------------
  |  Branch (1755:15): [True: 622k, False: 28.3k]
  ------------------
 1756|   622k|    DRC_INSTRUCTIONS_UNI_DRC tmpInst;
 1757|   622k|    FDKmemclear(&tmpInst, sizeof(DRC_INSTRUCTIONS_UNI_DRC));
 1758|   622k|    err = _readDrcInstructionsUniDrc(hBs, 0, hUniDrcConfig, &tmpInst);
 1759|   622k|    if (err) return err;
  ------------------
  |  Branch (1759:9): [True: 1.72k, False: 621k]
  ------------------
 1760|   621k|    if (i >= 12) continue;
  ------------------
  |  Branch (1760:9): [True: 467k, False: 153k]
  ------------------
 1761|   153k|    if (!diff)
  ------------------
  |  Branch (1761:9): [True: 33.8k, False: 119k]
  ------------------
 1762|  33.8k|      diff |= (FDKmemcmp(&tmpInst, &(hUniDrcConfig->drcInstructionsUniDrc[i]),
 1763|  33.8k|                         sizeof(DRC_INSTRUCTIONS_UNI_DRC)) != 0);
 1764|   153k|    hUniDrcConfig->drcInstructionsUniDrc[i] = tmpInst;
 1765|   153k|  }
 1766|       |
 1767|  28.3k|  diff |=
 1768|  28.3k|      _compAssign(&hUniDrcConfig->uniDrcConfigExtPresent, FDKreadBits(hBs, 1));
 1769|  28.3k|  hUniDrcConfig->diff = diff;
 1770|       |
 1771|  28.3k|  if (hUniDrcConfig->uniDrcConfigExtPresent == 1) {
  ------------------
  |  Branch (1771:7): [True: 18.1k, False: 10.2k]
  ------------------
 1772|  18.1k|    err = _readUniDrcConfigExtension(hBs, hUniDrcConfig);
 1773|  18.1k|    if (err) return err;
  ------------------
  |  Branch (1773:9): [True: 17.2k, False: 921]
  ------------------
 1774|  18.1k|  }
 1775|       |
 1776|  11.1k|  return err;
 1777|  28.3k|}
_Z26drcDec_readLoudnessInfoSetP13FDK_BITSTREAMP17LOUDNESS_INFO_SET:
 1995|  5.04k|                           HANDLE_LOUDNESS_INFO_SET hLoudnessInfoSet) {
 1996|  5.04k|  DRC_ERROR err = DE_OK;
 1997|  5.04k|  int i, diff = 0;
 1998|  5.04k|  if (hLoudnessInfoSet == NULL) return DE_NOT_OK;
  ------------------
  |  Branch (1998:7): [True: 0, False: 5.04k]
  ------------------
 1999|       |
 2000|  5.04k|  diff |= _compAssign(&hLoudnessInfoSet->loudnessInfoAlbumCountV0,
 2001|  5.04k|                      FDKreadBits(hBs, 6));
 2002|  5.04k|  diff |=
 2003|  5.04k|      _compAssign(&hLoudnessInfoSet->loudnessInfoCountV0, FDKreadBits(hBs, 6));
 2004|       |
 2005|  5.04k|  hLoudnessInfoSet->loudnessInfoAlbumCount =
 2006|  5.04k|      fMin(hLoudnessInfoSet->loudnessInfoAlbumCountV0, (UCHAR)12);
 2007|  9.64k|  for (i = 0; i < hLoudnessInfoSet->loudnessInfoAlbumCountV0; i++) {
  ------------------
  |  Branch (2007:15): [True: 4.91k, False: 4.73k]
  ------------------
 2008|  4.91k|    LOUDNESS_INFO tmpLoud;
 2009|  4.91k|    FDKmemclear(&tmpLoud, sizeof(LOUDNESS_INFO));
 2010|  4.91k|    err = _readLoudnessInfo(hBs, 0, &tmpLoud);
 2011|  4.91k|    if (err) return err;
  ------------------
  |  Branch (2011:9): [True: 309, False: 4.60k]
  ------------------
 2012|  4.60k|    if (i >= 12) continue;
  ------------------
  |  Branch (2012:9): [True: 2.24k, False: 2.35k]
  ------------------
 2013|  2.35k|    if (!diff)
  ------------------
  |  Branch (2013:9): [True: 270, False: 2.08k]
  ------------------
 2014|    270|      diff |= (FDKmemcmp(&tmpLoud, &(hLoudnessInfoSet->loudnessInfoAlbum[i]),
 2015|    270|                         sizeof(LOUDNESS_INFO)) != 0);
 2016|  2.35k|    hLoudnessInfoSet->loudnessInfoAlbum[i] = tmpLoud;
 2017|  2.35k|  }
 2018|       |
 2019|  4.73k|  hLoudnessInfoSet->loudnessInfoCount =
 2020|  4.73k|      fMin(hLoudnessInfoSet->loudnessInfoCountV0, (UCHAR)12);
 2021|  12.3k|  for (i = 0; i < hLoudnessInfoSet->loudnessInfoCountV0; i++) {
  ------------------
  |  Branch (2021:15): [True: 7.71k, False: 4.66k]
  ------------------
 2022|  7.71k|    LOUDNESS_INFO tmpLoud;
 2023|  7.71k|    FDKmemclear(&tmpLoud, sizeof(LOUDNESS_INFO));
 2024|  7.71k|    err = _readLoudnessInfo(hBs, 0, &tmpLoud);
 2025|  7.71k|    if (err) return err;
  ------------------
  |  Branch (2025:9): [True: 68, False: 7.64k]
  ------------------
 2026|  7.64k|    if (i >= 12) continue;
  ------------------
  |  Branch (2026:9): [True: 2.75k, False: 4.88k]
  ------------------
 2027|  4.88k|    if (!diff)
  ------------------
  |  Branch (2027:9): [True: 1.76k, False: 3.11k]
  ------------------
 2028|  1.76k|      diff |= (FDKmemcmp(&tmpLoud, &(hLoudnessInfoSet->loudnessInfo[i]),
 2029|  1.76k|                         sizeof(LOUDNESS_INFO)) != 0);
 2030|  4.88k|    hLoudnessInfoSet->loudnessInfo[i] = tmpLoud;
 2031|  4.88k|  }
 2032|       |
 2033|  4.66k|  diff |= _compAssign(&hLoudnessInfoSet->loudnessInfoSetExtPresent,
 2034|  4.66k|                      FDKreadBits(hBs, 1));
 2035|  4.66k|  hLoudnessInfoSet->diff = diff;
 2036|       |
 2037|  4.66k|  if (hLoudnessInfoSet->loudnessInfoSetExtPresent) {
  ------------------
  |  Branch (2037:7): [True: 922, False: 3.74k]
  ------------------
 2038|    922|    err = _readLoudnessInfoSetExtension(hBs, hLoudnessInfoSet);
 2039|    922|    if (err) return err;
  ------------------
  |  Branch (2039:9): [True: 398, False: 524]
  ------------------
 2040|    922|  }
 2041|       |
 2042|  4.26k|  return err;
 2043|  4.66k|}
drcDec_reader.cpp:_ZL11_compAssignPhh:
  139|   225k|static inline int _compAssign(UCHAR* dest, const UCHAR src) {
  140|   225k|  int diff = 0;
  141|   225k|  if (*dest != src) diff = 1;
  ------------------
  |  Branch (141:7): [True: 62.5k, False: 163k]
  ------------------
  142|   225k|  *dest = src;
  143|   225k|  return diff;
  144|   225k|}
drcDec_reader.cpp:_ZL11_compAssignPjj:
  146|  1.04k|static inline int _compAssign(ULONG* dest, const ULONG src) {
  147|  1.04k|  int diff = 0;
  148|  1.04k|  if (*dest != src) diff = 1;
  ------------------
  |  Branch (148:7): [True: 570, False: 470]
  ------------------
  149|  1.04k|  *dest = src;
  150|  1.04k|  return diff;
  151|  1.04k|}
drcDec_reader.cpp:_ZL18_readChannelLayoutP13FDK_BITSTREAMP14CHANNEL_LAYOUT:
 1478|  30.5k|                                    CHANNEL_LAYOUT* pChan) {
 1479|  30.5k|  DRC_ERROR err = DE_OK;
 1480|       |
 1481|  30.5k|  pChan->baseChannelCount = FDKreadBits(hBs, 7);
 1482|       |
 1483|  30.5k|  if (pChan->baseChannelCount > 8) return DE_NOT_OK;
  ------------------
  |  Branch (1483:7): [True: 220, False: 30.3k]
  ------------------
 1484|       |
 1485|  30.3k|  pChan->layoutSignalingPresent = FDKreadBits(hBs, 1);
 1486|       |
 1487|  30.3k|  if (pChan->layoutSignalingPresent) {
  ------------------
  |  Branch (1487:7): [True: 6.64k, False: 23.6k]
  ------------------
 1488|  6.64k|    pChan->definedLayout = FDKreadBits(hBs, 8);
 1489|       |
 1490|  6.64k|    if (pChan->definedLayout == 0) {
  ------------------
  |  Branch (1490:9): [True: 432, False: 6.21k]
  ------------------
 1491|    432|      int i;
 1492|  2.16k|      for (i = 0; i < pChan->baseChannelCount; i++) {
  ------------------
  |  Branch (1492:19): [True: 1.73k, False: 432]
  ------------------
 1493|  1.73k|        if (i < 8) {
  ------------------
  |  Branch (1493:13): [True: 1.73k, False: 0]
  ------------------
 1494|  1.73k|          pChan->speakerPosition[i] = FDKreadBits(hBs, 7);
 1495|  1.73k|        } else {
 1496|      0|          FDKpushFor(hBs, 7);
 1497|      0|        }
 1498|  1.73k|      }
 1499|    432|    }
 1500|  6.64k|  }
 1501|  30.3k|  return err;
 1502|  30.5k|}
drcDec_reader.cpp:_ZL24_readDownmixInstructionsP13FDK_BITSTREAMiP14CHANNEL_LAYOUTP20DOWNMIX_INSTRUCTIONS:
 1507|  1.08M|                                          DOWNMIX_INSTRUCTIONS* pDown) {
 1508|  1.08M|  DRC_ERROR err = DE_OK;
 1509|       |
 1510|  1.08M|  pDown->downmixId = FDKreadBits(hBs, 7);
 1511|  1.08M|  pDown->targetChannelCount = FDKreadBits(hBs, 7);
 1512|  1.08M|  pDown->targetLayout = FDKreadBits(hBs, 8);
 1513|  1.08M|  pDown->downmixCoefficientsPresent = FDKreadBits(hBs, 1);
 1514|       |
 1515|  1.08M|  if (pDown->downmixCoefficientsPresent) {
  ------------------
  |  Branch (1515:7): [True: 4.78k, False: 1.07M]
  ------------------
 1516|  4.78k|    int nDownmixCoeffs = pDown->targetChannelCount * pChan->baseChannelCount;
 1517|  4.78k|    int i;
 1518|  4.78k|    if (nDownmixCoeffs > 8 * 8) return DE_NOT_OK;
  ------------------
  |  Branch (1518:9): [True: 202, False: 4.58k]
  ------------------
 1519|  4.58k|    if (version == 0) {
  ------------------
  |  Branch (1519:9): [True: 2.41k, False: 2.17k]
  ------------------
 1520|  2.41k|      pDown->bsDownmixOffset = 0;
 1521|  16.5k|      for (i = 0; i < nDownmixCoeffs; i++) {
  ------------------
  |  Branch (1521:19): [True: 14.0k, False: 2.41k]
  ------------------
 1522|       |        /* LFE downmix coefficients are not supported. */
 1523|  14.0k|        pDown->downmixCoefficient[i] = downmixCoeff[FDKreadBits(hBs, 4)];
 1524|  14.0k|      }
 1525|  2.41k|    } else {
 1526|  2.17k|      pDown->bsDownmixOffset = FDKreadBits(hBs, 4);
 1527|  7.40k|      for (i = 0; i < nDownmixCoeffs; i++) {
  ------------------
  |  Branch (1527:19): [True: 5.23k, False: 2.17k]
  ------------------
 1528|  5.23k|        pDown->downmixCoefficient[i] = downmixCoeffV1[FDKreadBits(hBs, 5)];
 1529|  5.23k|      }
 1530|  2.17k|    }
 1531|  4.58k|  }
 1532|  1.08M|  return err;
 1533|  1.08M|}
drcDec_reader.cpp:_ZL25_skipDrcCoefficientsBasicP13FDK_BITSTREAM:
 1104|  4.95k|static void _skipDrcCoefficientsBasic(HANDLE_FDK_BITSTREAM hBs) {
 1105|  4.95k|  FDKpushFor(hBs, 4); /* drcLocation */
 1106|  4.95k|  FDKpushFor(hBs, 7); /* drcCharacteristic */
 1107|  4.95k|}
drcDec_reader.cpp:_ZL25_skipDrcInstructionsBasicP13FDK_BITSTREAM:
 1215|  19.4k|static void _skipDrcInstructionsBasic(HANDLE_FDK_BITSTREAM hBs) {
 1216|  19.4k|  int drcSetEffect;
 1217|  19.4k|  int additionalDownmixIdPresent, additionalDownmixIdCount,
 1218|  19.4k|      limiterPeakTargetPresent;
 1219|  19.4k|  int drcSetTargetLoudnessPresent, drcSetTargetLoudnessValueLowerPresent;
 1220|       |
 1221|  19.4k|  FDKpushFor(hBs, 6); /* drcSetId */
 1222|  19.4k|  FDKpushFor(hBs, 4); /* drcLocation */
 1223|  19.4k|  FDKpushFor(hBs, 7); /* downmixId */
 1224|  19.4k|  additionalDownmixIdPresent = FDKreadBits(hBs, 1);
 1225|  19.4k|  if (additionalDownmixIdPresent) {
  ------------------
  |  Branch (1225:7): [True: 1.99k, False: 17.4k]
  ------------------
 1226|  1.99k|    additionalDownmixIdCount = FDKreadBits(hBs, 3);
 1227|  1.99k|    FDKpushFor(hBs, 7 * additionalDownmixIdCount); /* additionalDownmixId */
 1228|  1.99k|  }
 1229|       |
 1230|  19.4k|  drcSetEffect = FDKreadBits(hBs, 16);
 1231|  19.4k|  if (!(drcSetEffect & (EB_DUCK_OTHER | EB_DUCK_SELF))) {
  ------------------
  |  Branch (1231:7): [True: 17.8k, False: 1.63k]
  ------------------
 1232|  17.8k|    limiterPeakTargetPresent = FDKreadBits(hBs, 1);
 1233|  17.8k|    if (limiterPeakTargetPresent) {
  ------------------
  |  Branch (1233:9): [True: 1.45k, False: 16.3k]
  ------------------
 1234|  1.45k|      FDKpushFor(hBs, 8); /* bsLimiterPeakTarget */
 1235|  1.45k|    }
 1236|  17.8k|  }
 1237|       |
 1238|  19.4k|  drcSetTargetLoudnessPresent = FDKreadBits(hBs, 1);
 1239|  19.4k|  if (drcSetTargetLoudnessPresent) {
  ------------------
  |  Branch (1239:7): [True: 1.85k, False: 17.6k]
  ------------------
 1240|  1.85k|    FDKpushFor(hBs, 6); /* bsDrcSetTargetLoudnessValueUpper */
 1241|  1.85k|    drcSetTargetLoudnessValueLowerPresent = FDKreadBits(hBs, 1);
 1242|  1.85k|    if (drcSetTargetLoudnessValueLowerPresent) {
  ------------------
  |  Branch (1242:9): [True: 901, False: 949]
  ------------------
 1243|    901|      FDKpushFor(hBs, 6); /* bsDrcSetTargetLoudnessValueLower */
 1244|    901|    }
 1245|  1.85k|  }
 1246|  19.4k|}
drcDec_reader.cpp:_ZL26_readDrcCoefficientsUniDrcP13FDK_BITSTREAMiP24DRC_COEFFICIENTS_UNI_DRC:
 1111|  72.6k|                                            DRC_COEFFICIENTS_UNI_DRC* pCoef) {
 1112|  72.6k|  DRC_ERROR err = DE_OK;
 1113|  72.6k|  int i, bsDrcFrameSize;
 1114|  72.6k|  int gainSequenceIndex = -1;
 1115|       |
 1116|  72.6k|  pCoef->drcLocation = FDKreadBits(hBs, 4);
 1117|  72.6k|  pCoef->drcFrameSizePresent = FDKreadBits(hBs, 1);
 1118|       |
 1119|  72.6k|  if (pCoef->drcFrameSizePresent == 1) {
  ------------------
  |  Branch (1119:7): [True: 4.48k, False: 68.1k]
  ------------------
 1120|  4.48k|    bsDrcFrameSize = FDKreadBits(hBs, 15);
 1121|  4.48k|    pCoef->drcFrameSize = bsDrcFrameSize + 1;
 1122|  4.48k|  }
 1123|  72.6k|  if (version == 0) {
  ------------------
  |  Branch (1123:7): [True: 45.3k, False: 27.3k]
  ------------------
 1124|  45.3k|    int gainSequenceCount = 0, gainSetCount;
 1125|  45.3k|    pCoef->characteristicLeftCount = 0;
 1126|  45.3k|    pCoef->characteristicRightCount = 0;
 1127|  45.3k|    gainSetCount = FDKreadBits(hBs, 6);
 1128|  45.3k|    pCoef->gainSetCount = fMin(gainSetCount, 12);
 1129|  80.7k|    for (i = 0; i < gainSetCount; i++) {
  ------------------
  |  Branch (1129:17): [True: 35.4k, False: 45.2k]
  ------------------
 1130|  35.4k|      GAIN_SET tmpGset;
 1131|  35.4k|      FDKmemclear(&tmpGset, sizeof(GAIN_SET));
 1132|  35.4k|      err = _readGainSet(hBs, version, &gainSequenceIndex, &tmpGset, 0);
 1133|  35.4k|      if (err) return err;
  ------------------
  |  Branch (1133:11): [True: 106, False: 35.3k]
  ------------------
 1134|  35.3k|      gainSequenceCount += tmpGset.bandCount;
 1135|       |
 1136|  35.3k|      if (i >= 12) continue;
  ------------------
  |  Branch (1136:11): [True: 22.3k, False: 13.0k]
  ------------------
 1137|  13.0k|      pCoef->gainSet[i] = tmpGset;
 1138|  13.0k|    }
 1139|  45.2k|    pCoef->gainSequenceCount = gainSequenceCount;
 1140|  45.2k|  } else { /* (version == 1) */
 1141|  27.3k|    UCHAR drcCharacteristicLeftPresent, drcCharacteristicRightPresent;
 1142|  27.3k|    UCHAR shapeFiltersPresent, shapeFilterCount, tmpPresent;
 1143|  27.3k|    int gainSetCount;
 1144|  27.3k|    drcCharacteristicLeftPresent = FDKreadBits(hBs, 1);
 1145|  27.3k|    if (drcCharacteristicLeftPresent) {
  ------------------
  |  Branch (1145:9): [True: 2.29k, False: 25.0k]
  ------------------
 1146|  2.29k|      pCoef->characteristicLeftCount = FDKreadBits(hBs, 4);
 1147|  2.29k|      if ((pCoef->characteristicLeftCount + 1) > 16) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (1147:11): [True: 0, False: 2.29k]
  ------------------
 1148|  10.0k|      for (i = 0; i < pCoef->characteristicLeftCount; i++) {
  ------------------
  |  Branch (1148:19): [True: 7.79k, False: 2.29k]
  ------------------
 1149|  7.79k|        err = _readCustomDrcCharacteristic(
 1150|  7.79k|            hBs, CS_LEFT, &(pCoef->characteristicLeftFormat[i + 1]),
 1151|  7.79k|            &(pCoef->customCharacteristicLeft[i + 1]), 0);
 1152|  7.79k|        if (err) return err;
  ------------------
  |  Branch (1152:13): [True: 0, False: 7.79k]
  ------------------
 1153|  7.79k|      }
 1154|  2.29k|    }
 1155|  27.3k|    drcCharacteristicRightPresent = FDKreadBits(hBs, 1);
 1156|  27.3k|    if (drcCharacteristicRightPresent) {
  ------------------
  |  Branch (1156:9): [True: 2.36k, False: 24.9k]
  ------------------
 1157|  2.36k|      pCoef->characteristicRightCount = FDKreadBits(hBs, 4);
 1158|  2.36k|      if ((pCoef->characteristicRightCount + 1) > 16) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (1158:11): [True: 0, False: 2.36k]
  ------------------
 1159|  8.20k|      for (i = 0; i < pCoef->characteristicRightCount; i++) {
  ------------------
  |  Branch (1159:19): [True: 5.84k, False: 2.36k]
  ------------------
 1160|  5.84k|        err = _readCustomDrcCharacteristic(
 1161|  5.84k|            hBs, CS_RIGHT, &(pCoef->characteristicRightFormat[i + 1]),
 1162|  5.84k|            &(pCoef->customCharacteristicRight[i + 1]), 0);
 1163|  5.84k|        if (err) return err;
  ------------------
  |  Branch (1163:13): [True: 0, False: 5.84k]
  ------------------
 1164|  5.84k|      }
 1165|  2.36k|    }
 1166|  27.3k|    shapeFiltersPresent = FDKreadBits(hBs, 1);
 1167|  27.3k|    if (shapeFiltersPresent) {
  ------------------
  |  Branch (1167:9): [True: 3.89k, False: 23.4k]
  ------------------
 1168|  3.89k|      shapeFilterCount = FDKreadBits(hBs, 4);
 1169|  28.5k|      for (i = 0; i < shapeFilterCount; i++) {
  ------------------
  |  Branch (1169:19): [True: 24.6k, False: 3.89k]
  ------------------
 1170|  24.6k|        tmpPresent = FDKreadBits(hBs, 1);
 1171|  24.6k|        if (tmpPresent) /* lfCutParams */
  ------------------
  |  Branch (1171:13): [True: 7.12k, False: 17.5k]
  ------------------
 1172|  7.12k|          FDKpushFor(hBs, 5);
 1173|       |
 1174|  24.6k|        tmpPresent = FDKreadBits(hBs, 1);
 1175|  24.6k|        if (tmpPresent) /* lfBoostParams */
  ------------------
  |  Branch (1175:13): [True: 6.28k, False: 18.3k]
  ------------------
 1176|  6.28k|          FDKpushFor(hBs, 5);
 1177|       |
 1178|  24.6k|        tmpPresent = FDKreadBits(hBs, 1);
 1179|  24.6k|        if (tmpPresent) /* hfCutParams */
  ------------------
  |  Branch (1179:13): [True: 7.82k, False: 16.8k]
  ------------------
 1180|  7.82k|          FDKpushFor(hBs, 5);
 1181|       |
 1182|  24.6k|        tmpPresent = FDKreadBits(hBs, 1);
 1183|  24.6k|        if (tmpPresent) /* hfBoostParams */
  ------------------
  |  Branch (1183:13): [True: 4.50k, False: 20.1k]
  ------------------
 1184|  4.50k|          FDKpushFor(hBs, 5);
 1185|  24.6k|      }
 1186|  3.89k|    }
 1187|  27.3k|    pCoef->gainSequenceCount = FDKreadBits(hBs, 6);
 1188|  27.3k|    gainSetCount = FDKreadBits(hBs, 6);
 1189|  27.3k|    pCoef->gainSetCount = fMin(gainSetCount, 12);
 1190|  81.7k|    for (i = 0; i < gainSetCount; i++) {
  ------------------
  |  Branch (1190:17): [True: 54.4k, False: 27.2k]
  ------------------
 1191|  54.4k|      GAIN_SET tmpGset;
 1192|  54.4k|      FDKmemclear(&tmpGset, sizeof(GAIN_SET));
 1193|  54.4k|      err = _readGainSet(hBs, version, &gainSequenceIndex, &tmpGset, 0);
 1194|  54.4k|      if (err) return err;
  ------------------
  |  Branch (1194:11): [True: 88, False: 54.3k]
  ------------------
 1195|       |
 1196|  54.3k|      if (i >= 12) continue;
  ------------------
  |  Branch (1196:11): [True: 28.3k, False: 26.0k]
  ------------------
 1197|  26.0k|      pCoef->gainSet[i] = tmpGset;
 1198|  26.0k|    }
 1199|  27.3k|  }
 1200|   942k|  for (i = 0; i < 12; i++) {
  ------------------
  |  Branch (1200:15): [True: 869k, False: 72.4k]
  ------------------
 1201|   869k|    pCoef->gainSetIndexForGainSequence[i] = 255;
 1202|   869k|  }
 1203|   111k|  for (i = 0; i < pCoef->gainSetCount; i++) {
  ------------------
  |  Branch (1203:15): [True: 38.8k, False: 72.4k]
  ------------------
 1204|  38.8k|    int b;
 1205|  57.0k|    for (b = 0; b < pCoef->gainSet[i].bandCount; b++) {
  ------------------
  |  Branch (1205:17): [True: 18.2k, False: 38.8k]
  ------------------
 1206|  18.2k|      if (pCoef->gainSet[i].gainSequenceIndex[b] >= 12) continue;
  ------------------
  |  Branch (1206:11): [True: 4.81k, False: 13.3k]
  ------------------
 1207|  13.3k|      pCoef->gainSetIndexForGainSequence[pCoef->gainSet[i]
 1208|  13.3k|                                             .gainSequenceIndex[b]] = i;
 1209|  13.3k|    }
 1210|  38.8k|  }
 1211|       |
 1212|  72.4k|  return err;
 1213|  72.6k|}
drcDec_reader.cpp:_ZL12_readGainSetP13FDK_BITSTREAMiPiP8GAIN_SETi:
  708|  89.9k|                              int isBox) {
  709|  89.9k|  if (isBox) FDKpushFor(hBs, 2); /* reserved */
  ------------------
  |  Branch (709:7): [True: 0, False: 89.9k]
  ------------------
  710|  89.9k|  pGSet->gainCodingProfile = FDKreadBits(hBs, 2);
  711|  89.9k|  pGSet->gainInterpolationType = FDKreadBits(hBs, 1);
  712|  89.9k|  pGSet->fullFrame = FDKreadBits(hBs, 1);
  713|  89.9k|  pGSet->timeAlignment = FDKreadBits(hBs, 1);
  714|  89.9k|  pGSet->timeDeltaMinPresent = FDKreadBits(hBs, 1);
  715|       |
  716|  89.9k|  if (pGSet->timeDeltaMinPresent) {
  ------------------
  |  Branch (716:7): [True: 3.46k, False: 86.4k]
  ------------------
  717|  3.46k|    int bsTimeDeltaMin;
  718|  3.46k|    if (isBox) FDKpushFor(hBs, 5); /* reserved */
  ------------------
  |  Branch (718:9): [True: 0, False: 3.46k]
  ------------------
  719|  3.46k|    bsTimeDeltaMin = FDKreadBits(hBs, 11);
  720|  3.46k|    pGSet->timeDeltaMin = bsTimeDeltaMin + 1;
  721|  3.46k|  }
  722|       |
  723|  89.9k|  if (pGSet->gainCodingProfile != GCP_CONSTANT) {
  ------------------
  |  Branch (723:7): [True: 84.2k, False: 5.68k]
  ------------------
  724|  84.2k|    int i;
  725|  84.2k|    if (isBox) FDKpushFor(hBs, 3); /* reserved */
  ------------------
  |  Branch (725:9): [True: 0, False: 84.2k]
  ------------------
  726|  84.2k|    pGSet->bandCount = FDKreadBits(hBs, 4);
  727|  84.2k|    if (pGSet->bandCount > 4) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (727:9): [True: 194, False: 84.0k]
  ------------------
  728|       |
  729|  84.0k|    if ((pGSet->bandCount > 1) || isBox) {
  ------------------
  |  Branch (729:9): [True: 3.89k, False: 80.1k]
  |  Branch (729:35): [True: 0, False: 80.1k]
  ------------------
  730|  3.89k|      pGSet->drcBandType = FDKreadBits(hBs, 1);
  731|  3.89k|    }
  732|       |
  733|  97.3k|    for (i = 0; i < pGSet->bandCount; i++) {
  ------------------
  |  Branch (733:17): [True: 13.2k, False: 84.0k]
  ------------------
  734|  13.2k|      if (version == 0) {
  ------------------
  |  Branch (734:11): [True: 3.33k, False: 9.91k]
  ------------------
  735|  3.33k|        *gainSequenceIndex = (*gainSequenceIndex) + 1;
  736|  9.91k|      } else {
  737|  9.91k|        int indexPresent;
  738|  9.91k|        indexPresent = (isBox) ? 1 : FDKreadBits(hBs, 1);
  ------------------
  |  Branch (738:24): [True: 0, False: 9.91k]
  ------------------
  739|  9.91k|        if (indexPresent) {
  ------------------
  |  Branch (739:13): [True: 3.06k, False: 6.85k]
  ------------------
  740|  3.06k|          int bsIndex;
  741|  3.06k|          bsIndex = FDKreadBits(hBs, 6);
  742|  3.06k|          *gainSequenceIndex = bsIndex;
  743|  6.85k|        } else {
  744|  6.85k|          *gainSequenceIndex = (*gainSequenceIndex) + 1;
  745|  6.85k|        }
  746|  9.91k|      }
  747|  13.2k|      pGSet->gainSequenceIndex[i] = *gainSequenceIndex;
  748|  13.2k|      _readDrcCharacteristic(hBs, version, &(pGSet->drcCharacteristic[i]),
  749|  13.2k|                             isBox);
  750|  13.2k|    }
  751|  92.0k|    for (i = 1; i < pGSet->bandCount; i++) {
  ------------------
  |  Branch (751:17): [True: 7.93k, False: 84.0k]
  ------------------
  752|  7.93k|      _readBandBorder(hBs, &(pGSet->bandBorder[i]), pGSet->drcBandType, isBox);
  753|  7.93k|    }
  754|  84.0k|  } else {
  755|  5.68k|    pGSet->bandCount = 1;
  756|  5.68k|    *gainSequenceIndex = (*gainSequenceIndex) + 1;
  757|  5.68k|    pGSet->gainSequenceIndex[0] = *gainSequenceIndex;
  758|  5.68k|  }
  759|       |
  760|  89.7k|  return DE_OK;
  761|  89.9k|}
drcDec_reader.cpp:_ZL22_readDrcCharacteristicP13FDK_BITSTREAMiP18DRC_CHARACTERISTICi:
  669|  13.2k|                                   DRC_CHARACTERISTIC* pDChar, int isBox) {
  670|  13.2k|  if (version == 0) {
  ------------------
  |  Branch (670:7): [True: 3.33k, False: 9.91k]
  ------------------
  671|  3.33k|    if (isBox) FDKpushFor(hBs, 1); /* reserved */
  ------------------
  |  Branch (671:9): [True: 0, False: 3.33k]
  ------------------
  672|  3.33k|    pDChar->cicpIndex = FDKreadBits(hBs, 7);
  673|  3.33k|    if (pDChar->cicpIndex > 0) {
  ------------------
  |  Branch (673:9): [True: 1.96k, False: 1.36k]
  ------------------
  674|  1.96k|      pDChar->present = 1;
  675|  1.96k|      pDChar->isCICP = 1;
  676|  1.96k|    } else {
  677|  1.36k|      pDChar->present = 0;
  678|  1.36k|    }
  679|  9.91k|  } else {
  680|  9.91k|    pDChar->present = FDKreadBits(hBs, 1);
  681|  9.91k|    if (isBox) pDChar->isCICP = FDKreadBits(hBs, 1);
  ------------------
  |  Branch (681:9): [True: 0, False: 9.91k]
  ------------------
  682|  9.91k|    if (pDChar->present) {
  ------------------
  |  Branch (682:9): [True: 3.20k, False: 6.71k]
  ------------------
  683|  3.20k|      if (!isBox) pDChar->isCICP = FDKreadBits(hBs, 1);
  ------------------
  |  Branch (683:11): [True: 3.20k, False: 0]
  ------------------
  684|  3.20k|      if (pDChar->isCICP) {
  ------------------
  |  Branch (684:11): [True: 1.44k, False: 1.75k]
  ------------------
  685|  1.44k|        if (isBox) FDKpushFor(hBs, 1); /* reserved */
  ------------------
  |  Branch (685:13): [True: 0, False: 1.44k]
  ------------------
  686|  1.44k|        pDChar->cicpIndex = FDKreadBits(hBs, 7);
  687|  1.75k|      } else {
  688|  1.75k|        pDChar->custom.left = FDKreadBits(hBs, 4);
  689|  1.75k|        pDChar->custom.right = FDKreadBits(hBs, 4);
  690|  1.75k|      }
  691|  3.20k|    }
  692|  9.91k|  }
  693|  13.2k|}
drcDec_reader.cpp:_ZL15_readBandBorderP13FDK_BITSTREAMP11BAND_BORDERii:
  696|  7.93k|                            int drcBandType, int isBox) {
  697|  7.93k|  if (drcBandType) {
  ------------------
  |  Branch (697:7): [True: 4.18k, False: 3.75k]
  ------------------
  698|  4.18k|    if (isBox) FDKpushFor(hBs, 4); /* reserved */
  ------------------
  |  Branch (698:9): [True: 0, False: 4.18k]
  ------------------
  699|  4.18k|    pBBord->crossoverFreqIndex = FDKreadBits(hBs, 4);
  700|  4.18k|  } else {
  701|  3.75k|    if (isBox) FDKpushFor(hBs, 6); /* reserved */
  ------------------
  |  Branch (701:9): [True: 0, False: 3.75k]
  ------------------
  702|  3.75k|    pBBord->startSubBandIndex = FDKreadBits(hBs, 10);
  703|  3.75k|  }
  704|  7.93k|}
drcDec_reader.cpp:_ZL28_readCustomDrcCharacteristicP13FDK_BITSTREAM19CHARACTERISTIC_SIDEPhP15CUSTOM_DRC_CHARi:
  767|  13.6k|                                              int isBox) {
  768|  13.6k|  if (isBox) FDKpushFor(hBs, 7); /* reserved */
  ------------------
  |  Branch (768:7): [True: 0, False: 13.6k]
  ------------------
  769|  13.6k|  *pCharacteristicFormat = FDKreadBits(hBs, 1);
  770|  13.6k|  if (*pCharacteristicFormat == CF_SIGMOID) {
  ------------------
  |  Branch (770:7): [True: 10.7k, False: 2.87k]
  ------------------
  771|  10.7k|    int bsGain, bsIoRatio, bsExp;
  772|  10.7k|    if (isBox) FDKpushFor(hBs, 1); /* reserved */
  ------------------
  |  Branch (772:9): [True: 0, False: 10.7k]
  ------------------
  773|  10.7k|    bsGain = FDKreadBits(hBs, 6);
  774|  10.7k|    if (side == CS_LEFT) {
  ------------------
  |  Branch (774:9): [True: 5.64k, False: 5.10k]
  ------------------
  775|  5.64k|      pCChar->sigmoid.gain = (FIXP_SGL)(bsGain << (FRACT_BITS - 1 - 6));
  ------------------
  |  |  112|  5.64k|#define FRACT_BITS 16  /* single precision */
  ------------------
  776|  5.64k|    } else {
  777|  5.10k|      pCChar->sigmoid.gain = (FIXP_SGL)(-bsGain << (FRACT_BITS - 1 - 6));
  ------------------
  |  |  112|  5.10k|#define FRACT_BITS 16  /* single precision */
  ------------------
  778|  5.10k|    }
  779|  10.7k|    bsIoRatio = FDKreadBits(hBs, 4);
  780|       |    /* pCChar->sigmoid.ioRatio = 0.05 + 0.15 * bsIoRatio; */
  781|  10.7k|    pCChar->sigmoid.ioRatio =
  782|  10.7k|        FL2FXCONST_SGL(0.05f / (float)(1 << 2)) +
  ------------------
  |  |  180|  10.7k|  (FIXP_SGL)(                                                                \
  |  |  181|  10.7k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 10.7k, Folded]
  |  |  ------------------
  |  |  182|  10.7k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  10.7k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  10.7k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 10.7k]
  |  |  ------------------
  |  |  183|  10.7k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  10.7k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  10.7k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  10.7k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  10.7k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  10.7k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  10.7k|          : ((((double)(val) * (FRACT_FIX_SCALE)-0.5) <=                     \
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (186:14): [Folded, False: 0]
  |  |  ------------------
  |  |  187|      0|              (double)(MINVAL_SGL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  188|      0|                 ? (SHORT)(MINVAL_SGL_CONST)                                 \
  |  |  ------------------
  |  |  |  |  177|      0|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|      0|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  189|      0|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  146|      0|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|      0|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  783|  10.7k|        (FIXP_SGL)((((3 * bsIoRatio) << (FRACT_BITS - 1)) / 5) >> 4);
  ------------------
  |  |  112|  10.7k|#define FRACT_BITS 16  /* single precision */
  ------------------
  784|  10.7k|    bsExp = FDKreadBits(hBs, 4);
  785|  10.7k|    if (bsExp < 15) {
  ------------------
  |  Branch (785:9): [True: 10.3k, False: 405]
  ------------------
  786|  10.3k|      pCChar->sigmoid.exp = (FIXP_SGL)((1 + 2 * bsExp) << (FRACT_BITS - 1 - 5));
  ------------------
  |  |  112|  10.3k|#define FRACT_BITS 16  /* single precision */
  ------------------
  787|  10.3k|    } else {
  788|    405|      pCChar->sigmoid.exp = (FIXP_SGL)MAXVAL_SGL; /* represents infinity */
  ------------------
  |  |  152|    405|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  ------------------
  789|    405|    }
  790|  10.7k|    pCChar->sigmoid.flipSign = FDKreadBits(hBs, 1);
  791|  10.7k|  } else { /* CF_NODES */
  792|  2.87k|    int i, bsCharacteristicNodeCount, bsNodeLevelDelta, bsNodeGain;
  793|  2.87k|    if (isBox) FDKpushFor(hBs, 6); /* reserved */
  ------------------
  |  Branch (793:9): [True: 0, False: 2.87k]
  ------------------
  794|  2.87k|    bsCharacteristicNodeCount = FDKreadBits(hBs, 2);
  795|  2.87k|    pCChar->nodes.characteristicNodeCount = bsCharacteristicNodeCount + 1;
  796|  2.87k|    if (pCChar->nodes.characteristicNodeCount > 4) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (796:9): [True: 0, False: 2.87k]
  ------------------
  797|  2.87k|    pCChar->nodes.nodeLevel[0] = DRC_INPUT_LOUDNESS_TARGET_SGL;
  ------------------
  |  |  140|  2.87k|#define DRC_INPUT_LOUDNESS_TARGET_SGL FL2FXCONST_SGL(-31.0f / (float)(1 << 7))
  |  |  ------------------
  |  |  |  |  180|  2.87k|  (FIXP_SGL)(                                                                \
  |  |  |  |  181|  2.87k|      ((val) >= 0)                                                           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (181:7): [Folded, False: 2.87k]
  |  |  |  |  ------------------
  |  |  |  |  182|  2.87k|          ? ((((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.87k|          : ((((double)(val) * (FRACT_FIX_SCALE)-0.5) <=                     \
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  2.87k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  2.87k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (186:14): [Folded, False: 2.87k]
  |  |  |  |  ------------------
  |  |  |  |  187|  2.87k|              (double)(MINVAL_SGL_CONST))                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  177|  2.87k|#define MINVAL_SGL_CONST MINVAL_SGL
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  154|  2.87k|  ((signed)0xFFFF8000) /* this has to be synchronized to FRACT_BITS */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  188|  2.87k|                 ? (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.87k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE)-0.5)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  2.87k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  112|  2.87k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  798|  2.87k|    pCChar->nodes.nodeGain[0] = (FIXP_SGL)0;
  799|  9.28k|    for (i = 0; i < pCChar->nodes.characteristicNodeCount; i++) {
  ------------------
  |  Branch (799:17): [True: 6.40k, False: 2.87k]
  ------------------
  800|  6.40k|      if (isBox) FDKpushFor(hBs, 3); /* reserved */
  ------------------
  |  Branch (800:11): [True: 0, False: 6.40k]
  ------------------
  801|  6.40k|      bsNodeLevelDelta = FDKreadBits(hBs, 5);
  802|  6.40k|      if (side == CS_LEFT) {
  ------------------
  |  Branch (802:11): [True: 4.35k, False: 2.05k]
  ------------------
  803|  4.35k|        pCChar->nodes.nodeLevel[i + 1] =
  804|  4.35k|            pCChar->nodes.nodeLevel[i] -
  805|  4.35k|            (FIXP_SGL)((1 + bsNodeLevelDelta) << (FRACT_BITS - 1 - 7));
  ------------------
  |  |  112|  4.35k|#define FRACT_BITS 16  /* single precision */
  ------------------
  806|  4.35k|      } else {
  807|  2.05k|        pCChar->nodes.nodeLevel[i + 1] =
  808|  2.05k|            pCChar->nodes.nodeLevel[i] +
  809|  2.05k|            (FIXP_SGL)((1 + bsNodeLevelDelta) << (FRACT_BITS - 1 - 7));
  ------------------
  |  |  112|  2.05k|#define FRACT_BITS 16  /* single precision */
  ------------------
  810|  2.05k|      }
  811|  6.40k|      bsNodeGain = FDKreadBits(hBs, 8);
  812|  6.40k|      pCChar->nodes.nodeGain[i + 1] = (FIXP_SGL)(
  813|  6.40k|          (bsNodeGain - 128)
  814|  6.40k|          << (FRACT_BITS - 1 - 1 - 7)); /* 0.5f * bsNodeGain - 64.0f; */
  ------------------
  |  |  112|  6.40k|#define FRACT_BITS 16  /* single precision */
  ------------------
  815|  6.40k|    }
  816|  2.87k|  }
  817|  13.6k|  return DE_OK;
  818|  13.6k|}
drcDec_reader.cpp:_ZL26_readDrcInstructionsUniDrcP13FDK_BITSTREAMiP14UNI_DRC_CONFIGP24DRC_INSTRUCTIONS_UNI_DRC:
 1251|   684k|                                            DRC_INSTRUCTIONS_UNI_DRC* pInst) {
 1252|   684k|  DRC_ERROR err = DE_OK;
 1253|   684k|  int i, g, c;
 1254|   684k|  int downmixIdPresent, additionalDownmixIdPresent, additionalDownmixIdCount;
 1255|   684k|  int bsLimiterPeakTarget, channelCount;
 1256|   684k|  DRC_COEFFICIENTS_UNI_DRC* pCoef = NULL;
 1257|   684k|  int repeatParameters, bsRepeatParametersCount;
 1258|   684k|  int repeatSequenceIndex, bsRepeatSequenceCount;
 1259|   684k|  SCHAR* gainSetIndex = pInst->gainSetIndex;
 1260|   684k|  SCHAR channelGroupForChannel[8];
 1261|   684k|  DUCKING_MODIFICATION duckingModificationForChannelGroup[8];
 1262|       |
 1263|   684k|  pInst->drcSetId = FDKreadBits(hBs, 6);
 1264|   684k|  if (version == 0) {
  ------------------
  |  Branch (1264:7): [True: 622k, False: 61.9k]
  ------------------
 1265|       |    /* Assume all v0 DRC sets to be manageable in terms of complexity */
 1266|   622k|    pInst->drcSetComplexityLevel = 2;
 1267|   622k|  } else {
 1268|  61.9k|    pInst->drcSetComplexityLevel = FDKreadBits(hBs, 4);
 1269|  61.9k|  }
 1270|   684k|  pInst->drcLocation = FDKreadBits(hBs, 4);
 1271|   684k|  if (version == 0) {
  ------------------
  |  Branch (1271:7): [True: 622k, False: 61.9k]
  ------------------
 1272|   622k|    downmixIdPresent = 1;
 1273|   622k|  } else {
 1274|  61.9k|    downmixIdPresent = FDKreadBits(hBs, 1);
 1275|  61.9k|  }
 1276|   684k|  if (downmixIdPresent) {
  ------------------
  |  Branch (1276:7): [True: 624k, False: 59.9k]
  ------------------
 1277|   624k|    pInst->downmixId[0] = FDKreadBits(hBs, 7);
 1278|   624k|    if (version == 0) {
  ------------------
  |  Branch (1278:9): [True: 622k, False: 2.07k]
  ------------------
 1279|   622k|      if (pInst->downmixId[0] == 0)
  ------------------
  |  Branch (1279:11): [True: 613k, False: 8.93k]
  ------------------
 1280|   613k|        pInst->drcApplyToDownmix = 0;
 1281|  8.93k|      else
 1282|  8.93k|        pInst->drcApplyToDownmix = 1;
 1283|   622k|    } else {
 1284|  2.07k|      pInst->drcApplyToDownmix = FDKreadBits(hBs, 1);
 1285|  2.07k|    }
 1286|       |
 1287|   624k|    additionalDownmixIdPresent = FDKreadBits(hBs, 1);
 1288|   624k|    if (additionalDownmixIdPresent) {
  ------------------
  |  Branch (1288:9): [True: 7.31k, False: 617k]
  ------------------
 1289|  7.31k|      additionalDownmixIdCount = FDKreadBits(hBs, 3);
 1290|  7.31k|      if ((1 + additionalDownmixIdCount) > 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (1290:11): [True: 0, False: 7.31k]
  ------------------
 1291|  29.2k|      for (i = 0; i < additionalDownmixIdCount; i++) {
  ------------------
  |  Branch (1291:19): [True: 21.9k, False: 7.31k]
  ------------------
 1292|  21.9k|        pInst->downmixId[i + 1] = FDKreadBits(hBs, 7);
 1293|  21.9k|      }
 1294|  7.31k|      pInst->downmixIdCount = 1 + additionalDownmixIdCount;
 1295|   617k|    } else {
 1296|   617k|      pInst->downmixIdCount = 1;
 1297|   617k|    }
 1298|   624k|  } else {
 1299|  59.9k|    pInst->downmixId[0] = 0;
 1300|  59.9k|    pInst->downmixIdCount = 1;
 1301|  59.9k|  }
 1302|       |
 1303|   684k|  pInst->drcSetEffect = FDKreadBits(hBs, 16);
 1304|       |
 1305|   684k|  if ((pInst->drcSetEffect & (EB_DUCK_OTHER | EB_DUCK_SELF)) == 0) {
  ------------------
  |  Branch (1305:7): [True: 678k, False: 6.39k]
  ------------------
 1306|   678k|    pInst->limiterPeakTargetPresent = FDKreadBits(hBs, 1);
 1307|   678k|    if (pInst->limiterPeakTargetPresent) {
  ------------------
  |  Branch (1307:9): [True: 2.12k, False: 676k]
  ------------------
 1308|  2.12k|      bsLimiterPeakTarget = FDKreadBits(hBs, 8);
 1309|  2.12k|      pInst->limiterPeakTarget = -(FIXP_SGL)(
 1310|  2.12k|          bsLimiterPeakTarget
 1311|  2.12k|          << (FRACT_BITS - 1 - 3 - 5)); /* - bsLimiterPeakTarget * 0.125; */
  ------------------
  |  |  112|  2.12k|#define FRACT_BITS 16  /* single precision */
  ------------------
 1312|  2.12k|    }
 1313|   678k|  }
 1314|       |
 1315|   684k|  pInst->drcSetTargetLoudnessPresent = FDKreadBits(hBs, 1);
 1316|       |
 1317|       |  /* set default values */
 1318|   684k|  pInst->drcSetTargetLoudnessValueUpper = 0;
 1319|   684k|  pInst->drcSetTargetLoudnessValueLower = -63;
 1320|       |
 1321|   684k|  if (pInst->drcSetTargetLoudnessPresent == 1) {
  ------------------
  |  Branch (1321:7): [True: 4.42k, False: 680k]
  ------------------
 1322|  4.42k|    int bsDrcSetTargetLoudnessValueUpper, bsDrcSetTargetLoudnessValueLower;
 1323|  4.42k|    int drcSetTargetLoudnessValueLowerPresent;
 1324|  4.42k|    bsDrcSetTargetLoudnessValueUpper = FDKreadBits(hBs, 6);
 1325|  4.42k|    pInst->drcSetTargetLoudnessValueUpper =
 1326|  4.42k|        bsDrcSetTargetLoudnessValueUpper - 63;
 1327|  4.42k|    drcSetTargetLoudnessValueLowerPresent = FDKreadBits(hBs, 1);
 1328|  4.42k|    if (drcSetTargetLoudnessValueLowerPresent == 1) {
  ------------------
  |  Branch (1328:9): [True: 1.64k, False: 2.77k]
  ------------------
 1329|  1.64k|      bsDrcSetTargetLoudnessValueLower = FDKreadBits(hBs, 6);
 1330|  1.64k|      pInst->drcSetTargetLoudnessValueLower =
 1331|  1.64k|          bsDrcSetTargetLoudnessValueLower - 63;
 1332|  1.64k|    }
 1333|  4.42k|  }
 1334|       |
 1335|   684k|  pInst->dependsOnDrcSetPresent = FDKreadBits(hBs, 1);
 1336|       |
 1337|   684k|  pInst->noIndependentUse = 0;
 1338|   684k|  if (pInst->dependsOnDrcSetPresent) {
  ------------------
  |  Branch (1338:7): [True: 4.60k, False: 680k]
  ------------------
 1339|  4.60k|    pInst->dependsOnDrcSet = FDKreadBits(hBs, 6);
 1340|   680k|  } else {
 1341|   680k|    pInst->noIndependentUse = FDKreadBits(hBs, 1);
 1342|   680k|  }
 1343|       |
 1344|   684k|  if (version == 0) {
  ------------------
  |  Branch (1344:7): [True: 622k, False: 61.9k]
  ------------------
 1345|   622k|    pInst->requiresEq = 0;
 1346|   622k|  } else {
 1347|  61.9k|    pInst->requiresEq = FDKreadBits(hBs, 1);
 1348|  61.9k|  }
 1349|       |
 1350|   684k|  pCoef = selectDrcCoefficients(hUniDrcConfig, pInst->drcLocation);
 1351|       |
 1352|   684k|  pInst->drcChannelCount = channelCount =
 1353|   684k|      hUniDrcConfig->channelLayout.baseChannelCount;
 1354|       |
 1355|   684k|  if (pInst->drcSetEffect & (EB_DUCK_OTHER | EB_DUCK_SELF)) {
  ------------------
  |  Branch (1355:7): [True: 6.39k, False: 678k]
  ------------------
 1356|  6.39k|    DUCKING_MODIFICATION* pDModForChannel =
 1357|  6.39k|        pInst->duckingModificationForChannel;
 1358|  6.39k|    c = 0;
 1359|  19.4k|    while (c < channelCount) {
  ------------------
  |  Branch (1359:12): [True: 13.3k, False: 6.11k]
  ------------------
 1360|  13.3k|      int bsGainSetIndex;
 1361|  13.3k|      bsGainSetIndex = FDKreadBits(hBs, 6);
 1362|  13.3k|      if (c >= 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (1362:11): [True: 0, False: 13.3k]
  ------------------
 1363|  13.3k|      gainSetIndex[c] = bsGainSetIndex - 1;
 1364|  13.3k|      _decodeDuckingModification(hBs, &(pDModForChannel[c]), 0);
 1365|       |
 1366|  13.3k|      c++;
 1367|  13.3k|      repeatParameters = FDKreadBits(hBs, 1);
 1368|  13.3k|      if (repeatParameters == 1) {
  ------------------
  |  Branch (1368:11): [True: 1.25k, False: 12.1k]
  ------------------
 1369|  1.25k|        bsRepeatParametersCount = FDKreadBits(hBs, 5);
 1370|  1.25k|        bsRepeatParametersCount += 1;
 1371|  5.91k|        for (i = 0; i < bsRepeatParametersCount; i++) {
  ------------------
  |  Branch (1371:21): [True: 4.93k, False: 978]
  ------------------
 1372|  4.93k|          if (c >= 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (1372:15): [True: 273, False: 4.66k]
  ------------------
 1373|  4.66k|          gainSetIndex[c] = gainSetIndex[c - 1];
 1374|  4.66k|          pDModForChannel[c] = pDModForChannel[c - 1];
 1375|  4.66k|          c++;
 1376|  4.66k|        }
 1377|  1.25k|      }
 1378|  13.3k|    }
 1379|  6.11k|    if (c > channelCount) {
  ------------------
  |  Branch (1379:9): [True: 86, False: 6.03k]
  ------------------
 1380|     86|      return DE_NOT_OK;
 1381|     86|    }
 1382|       |
 1383|  6.03k|    err = deriveDrcChannelGroups(
 1384|  6.03k|        pInst->drcSetEffect, pInst->drcChannelCount, gainSetIndex,
 1385|  6.03k|        pDModForChannel, &pInst->nDrcChannelGroups,
 1386|  6.03k|        pInst->gainSetIndexForChannelGroup, channelGroupForChannel,
 1387|  6.03k|        duckingModificationForChannelGroup);
 1388|  6.03k|    if (err) return (err);
  ------------------
  |  Branch (1388:9): [True: 967, False: 5.06k]
  ------------------
 1389|   678k|  } else {
 1390|   678k|    int deriveChannelCount = 0;
 1391|   678k|    if (((version == 0) || (pInst->drcApplyToDownmix != 0)) &&
  ------------------
  |  Branch (1391:10): [True: 618k, False: 60.3k]
  |  Branch (1391:28): [True: 656, False: 59.7k]
  ------------------
 1392|   618k|        (pInst->downmixId[0] != DOWNMIX_ID_BASE_LAYOUT) &&
  ------------------
  |  |  122|   618k|#define DOWNMIX_ID_BASE_LAYOUT 0x0
  ------------------
  |  Branch (1392:9): [True: 6.32k, False: 612k]
  ------------------
 1393|  6.32k|        (pInst->downmixId[0] != DOWNMIX_ID_ANY_DOWNMIX) &&
  ------------------
  |  |  123|  6.32k|#define DOWNMIX_ID_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (1393:9): [True: 5.81k, False: 511]
  ------------------
 1394|  5.81k|        (pInst->downmixIdCount == 1)) {
  ------------------
  |  Branch (1394:9): [True: 2.07k, False: 3.74k]
  ------------------
 1395|  2.07k|      if (hUniDrcConfig->downmixInstructionsCount != 0) {
  ------------------
  |  Branch (1395:11): [True: 681, False: 1.39k]
  ------------------
 1396|    681|        DOWNMIX_INSTRUCTIONS* pDown =
 1397|    681|            selectDownmixInstructions(hUniDrcConfig, pInst->downmixId[0]);
 1398|    681|        if (pDown == NULL) return DE_NOT_OK;
  ------------------
  |  Branch (1398:13): [True: 234, False: 447]
  ------------------
 1399|    447|        pInst->drcChannelCount = channelCount =
 1400|    447|            pDown->targetChannelCount; /* targetChannelCountFromDownmixId*/
 1401|  1.39k|      } else {
 1402|  1.39k|        deriveChannelCount = 1;
 1403|  1.39k|        channelCount = 1;
 1404|  1.39k|      }
 1405|   676k|    } else if (((version == 0) || (pInst->drcApplyToDownmix != 0)) &&
  ------------------
  |  Branch (1405:17): [True: 616k, False: 60.1k]
  |  Branch (1405:35): [True: 473, False: 59.7k]
  ------------------
 1406|   616k|               ((pInst->downmixId[0] == DOWNMIX_ID_ANY_DOWNMIX) ||
  ------------------
  |  |  123|   616k|#define DOWNMIX_ID_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (1406:17): [True: 511, False: 616k]
  ------------------
 1407|   616k|                (pInst->downmixIdCount > 1))) {
  ------------------
  |  Branch (1407:17): [True: 3.78k, False: 612k]
  ------------------
 1408|       |      /* Set maximum channel count as upper border. The effective channel count
 1409|       |       * is set at the process function. */
 1410|  4.29k|      pInst->drcChannelCount = 8;
 1411|  4.29k|      channelCount = 1;
 1412|  4.29k|    }
 1413|       |
 1414|   678k|    c = 0;
 1415|  5.36M|    while (c < channelCount) {
  ------------------
  |  Branch (1415:12): [True: 4.68M, False: 677k]
  ------------------
 1416|  4.68M|      int bsGainSetIndex;
 1417|  4.68M|      bsGainSetIndex = FDKreadBits(hBs, 6);
 1418|  4.68M|      if (c >= 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (1418:11): [True: 124, False: 4.68M]
  ------------------
 1419|  4.68M|      gainSetIndex[c] = bsGainSetIndex - 1;
 1420|  4.68M|      c++;
 1421|  4.68M|      repeatSequenceIndex = FDKreadBits(hBs, 1);
 1422|       |
 1423|  4.68M|      if (repeatSequenceIndex == 1) {
  ------------------
  |  Branch (1423:11): [True: 5.04k, False: 4.68M]
  ------------------
 1424|  5.04k|        bsRepeatSequenceCount = FDKreadBits(hBs, 5);
 1425|  5.04k|        bsRepeatSequenceCount += 1;
 1426|  5.04k|        if (deriveChannelCount) {
  ------------------
  |  Branch (1426:13): [True: 657, False: 4.39k]
  ------------------
 1427|    657|          channelCount = 1 + bsRepeatSequenceCount;
 1428|    657|        }
 1429|  23.7k|        for (i = 0; i < bsRepeatSequenceCount; i++) {
  ------------------
  |  Branch (1429:21): [True: 19.0k, False: 4.69k]
  ------------------
 1430|  19.0k|          if (c >= 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (1430:15): [True: 353, False: 18.6k]
  ------------------
 1431|  18.6k|          gainSetIndex[c] = bsGainSetIndex - 1;
 1432|  18.6k|          c++;
 1433|  18.6k|        }
 1434|  5.04k|      }
 1435|  4.68M|    }
 1436|   677k|    if (c > channelCount) {
  ------------------
  |  Branch (1436:9): [True: 90, False: 677k]
  ------------------
 1437|     90|      return DE_NOT_OK;
 1438|     90|    }
 1439|   677k|    if (deriveChannelCount) {
  ------------------
  |  Branch (1439:9): [True: 1.31k, False: 676k]
  ------------------
 1440|  1.31k|      pInst->drcChannelCount = channelCount;
 1441|  1.31k|    }
 1442|       |
 1443|       |    /* DOWNMIX_ID_ANY_DOWNMIX: channelCount is 1. Distribute gainSetIndex to all
 1444|       |     * channels. */
 1445|   677k|    if ((pInst->downmixId[0] == DOWNMIX_ID_ANY_DOWNMIX) ||
  ------------------
  |  |  123|   677k|#define DOWNMIX_ID_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (1445:9): [True: 585, False: 677k]
  ------------------
 1446|   677k|        (pInst->downmixIdCount > 1)) {
  ------------------
  |  Branch (1446:9): [True: 4.00k, False: 673k]
  ------------------
 1447|  34.0k|      for (c = 1; c < pInst->drcChannelCount; c++) {
  ------------------
  |  Branch (1447:19): [True: 29.4k, False: 4.58k]
  ------------------
 1448|  29.4k|        gainSetIndex[c] = gainSetIndex[0];
 1449|  29.4k|      }
 1450|  4.58k|    }
 1451|       |
 1452|   677k|    err = deriveDrcChannelGroups(pInst->drcSetEffect, pInst->drcChannelCount,
 1453|   677k|                                 gainSetIndex, NULL, &pInst->nDrcChannelGroups,
 1454|   677k|                                 pInst->gainSetIndexForChannelGroup,
 1455|   677k|                                 channelGroupForChannel, NULL);
 1456|   677k|    if (err) return (err);
  ------------------
  |  Branch (1456:9): [True: 0, False: 677k]
  ------------------
 1457|       |
 1458|   708k|    for (g = 0; g < pInst->nDrcChannelGroups; g++) {
  ------------------
  |  Branch (1458:17): [True: 31.2k, False: 677k]
  ------------------
 1459|  31.2k|      int set, bandCount;
 1460|  31.2k|      set = pInst->gainSetIndexForChannelGroup[g];
 1461|       |
 1462|       |      /* get bandCount */
 1463|  31.2k|      if (pCoef != NULL && set < pCoef->gainSetCount) {
  ------------------
  |  Branch (1463:11): [True: 16.3k, False: 14.9k]
  |  Branch (1463:28): [True: 1.20k, False: 15.0k]
  ------------------
 1464|  1.20k|        bandCount = pCoef->gainSet[set].bandCount;
 1465|  30.0k|      } else {
 1466|  30.0k|        bandCount = 1;
 1467|  30.0k|      }
 1468|       |
 1469|  31.2k|      _decodeGainModification(hBs, version, bandCount,
 1470|  31.2k|                              pInst->gainModificationForChannelGroup[g], 0);
 1471|  31.2k|    }
 1472|   677k|  }
 1473|       |
 1474|   682k|  return err;
 1475|   684k|}
drcDec_reader.cpp:_ZL26_decodeDuckingModificationP13FDK_BITSTREAMP20DUCKING_MODIFICATIONi:
  535|  13.3k|                                       DUCKING_MODIFICATION* pDMod, int isBox) {
  536|  13.3k|  int bsDuckingScaling, sigma, mu;
  537|       |
  538|  13.3k|  if (isBox) FDKpushFor(hBs, 7); /* reserved */
  ------------------
  |  Branch (538:7): [True: 0, False: 13.3k]
  ------------------
  539|  13.3k|  pDMod->duckingScalingPresent = FDKreadBits(hBs, 1);
  540|       |
  541|  13.3k|  if (pDMod->duckingScalingPresent) {
  ------------------
  |  Branch (541:7): [True: 2.86k, False: 10.5k]
  ------------------
  542|  2.86k|    if (isBox) FDKpushFor(hBs, 4); /* reserved */
  ------------------
  |  Branch (542:9): [True: 0, False: 2.86k]
  ------------------
  543|  2.86k|    bsDuckingScaling = FDKreadBits(hBs, 4);
  544|  2.86k|    sigma = bsDuckingScaling >> 3;
  545|  2.86k|    mu = bsDuckingScaling & 0x7;
  546|       |
  547|  2.86k|    if (sigma) {
  ------------------
  |  Branch (547:9): [True: 1.65k, False: 1.21k]
  ------------------
  548|  1.65k|      pDMod->duckingScaling = (FIXP_SGL)(
  549|  1.65k|          (7 - mu) << (FRACT_BITS - 1 - 3 - 2)); /* 1.0 - 0.125 * (1 + mu); */
  ------------------
  |  |  112|  1.65k|#define FRACT_BITS 16  /* single precision */
  ------------------
  550|  1.65k|    } else {
  551|  1.21k|      pDMod->duckingScaling = (FIXP_SGL)(
  552|  1.21k|          (9 + mu) << (FRACT_BITS - 1 - 3 - 2)); /* 1.0 + 0.125 * (1 + mu); */
  ------------------
  |  |  112|  1.21k|#define FRACT_BITS 16  /* single precision */
  ------------------
  553|  1.21k|    }
  554|  10.5k|  } else {
  555|  10.5k|    pDMod->duckingScaling = (FIXP_SGL)(1 << (FRACT_BITS - 1 - 2)); /* 1.0 */
  ------------------
  |  |  112|  10.5k|#define FRACT_BITS 16  /* single precision */
  ------------------
  556|  10.5k|  }
  557|  13.3k|}
drcDec_reader.cpp:_ZL23_decodeGainModificationP13FDK_BITSTREAMiiP17GAIN_MODIFICATIONi:
  561|  31.2k|                                    int isBox) {
  562|  31.2k|  int sign, bsGainOffset, bsAttenuationScaling, bsAmplificationScaling;
  563|       |
  564|  31.2k|  if (version > 0) {
  ------------------
  |  Branch (564:7): [True: 8.12k, False: 23.0k]
  ------------------
  565|  8.12k|    int b, shapeFilterPresent;
  566|       |
  567|  8.12k|    if (isBox) {
  ------------------
  |  Branch (567:9): [True: 0, False: 8.12k]
  ------------------
  568|      0|      FDKpushFor(hBs, 4); /* reserved */
  569|      0|      bandCount = FDKreadBits(hBs, 4);
  570|      0|    }
  571|       |
  572|  16.7k|    for (b = 0; b < bandCount; b++) {
  ------------------
  |  Branch (572:17): [True: 8.60k, False: 8.12k]
  ------------------
  573|  8.60k|      if (isBox) {
  ------------------
  |  Branch (573:11): [True: 0, False: 8.60k]
  ------------------
  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|  8.60k|      if (!isBox)
  ------------------
  |  Branch (581:11): [True: 8.60k, False: 0]
  ------------------
  582|  8.60k|        pGMod[b].targetCharacteristicLeftPresent = FDKreadBits(hBs, 1);
  583|  8.60k|      if (pGMod[b].targetCharacteristicLeftPresent) {
  ------------------
  |  Branch (583:11): [True: 2.45k, False: 6.15k]
  ------------------
  584|  2.45k|        if (isBox) FDKpushFor(hBs, 4); /* reserved */
  ------------------
  |  Branch (584:13): [True: 0, False: 2.45k]
  ------------------
  585|  2.45k|        pGMod[b].targetCharacteristicLeftIndex = FDKreadBits(hBs, 4);
  586|  2.45k|      }
  587|  8.60k|      if (!isBox)
  ------------------
  |  Branch (587:11): [True: 8.60k, False: 0]
  ------------------
  588|  8.60k|        pGMod[b].targetCharacteristicRightPresent = FDKreadBits(hBs, 1);
  589|  8.60k|      if (pGMod[b].targetCharacteristicRightPresent) {
  ------------------
  |  Branch (589:11): [True: 2.17k, False: 6.43k]
  ------------------
  590|  2.17k|        if (isBox) FDKpushFor(hBs, 4); /* reserved */
  ------------------
  |  Branch (590:13): [True: 0, False: 2.17k]
  ------------------
  591|  2.17k|        pGMod[b].targetCharacteristicRightIndex = FDKreadBits(hBs, 4);
  592|  2.17k|      }
  593|  8.60k|      if (!isBox) pGMod[b].gainScalingPresent = FDKreadBits(hBs, 1);
  ------------------
  |  Branch (593:11): [True: 8.60k, False: 0]
  ------------------
  594|  8.60k|      if (pGMod[b].gainScalingPresent) {
  ------------------
  |  Branch (594:11): [True: 2.06k, False: 6.53k]
  ------------------
  595|  2.06k|        bsAttenuationScaling = FDKreadBits(hBs, 4);
  596|  2.06k|        pGMod[b].attenuationScaling = (FIXP_SGL)(
  597|  2.06k|            bsAttenuationScaling
  598|  2.06k|            << (FRACT_BITS - 1 - 3 - 2)); /* bsAttenuationScaling * 0.125; */
  ------------------
  |  |  112|  2.06k|#define FRACT_BITS 16  /* single precision */
  ------------------
  599|  2.06k|        bsAmplificationScaling = FDKreadBits(hBs, 4);
  600|  2.06k|        pGMod[b].amplificationScaling = (FIXP_SGL)(
  601|  2.06k|            bsAmplificationScaling
  602|  2.06k|            << (FRACT_BITS - 1 - 3 - 2)); /* bsAmplificationScaling * 0.125; */
  ------------------
  |  |  112|  2.06k|#define FRACT_BITS 16  /* single precision */
  ------------------
  603|  2.06k|      }
  604|  8.60k|      if (!isBox) pGMod[b].gainOffsetPresent = FDKreadBits(hBs, 1);
  ------------------
  |  Branch (604:11): [True: 8.60k, False: 0]
  ------------------
  605|  8.60k|      if (pGMod[b].gainOffsetPresent) {
  ------------------
  |  Branch (605:11): [True: 2.42k, False: 6.18k]
  ------------------
  606|  2.42k|        if (isBox) FDKpushFor(hBs, 2); /* reserved */
  ------------------
  |  Branch (606:13): [True: 0, False: 2.42k]
  ------------------
  607|  2.42k|        sign = FDKreadBits(hBs, 1);
  608|  2.42k|        bsGainOffset = FDKreadBits(hBs, 5);
  609|  2.42k|        pGMod[b].gainOffset = (FIXP_SGL)(
  610|  2.42k|            (1 + bsGainOffset)
  611|  2.42k|            << (FRACT_BITS - 1 - 2 - 4)); /* (1+bsGainOffset) * 0.25; */
  ------------------
  |  |  112|  2.42k|#define FRACT_BITS 16  /* single precision */
  ------------------
  612|  2.42k|        if (sign) {
  ------------------
  |  Branch (612:13): [True: 1.07k, False: 1.34k]
  ------------------
  613|  1.07k|          pGMod[b].gainOffset = -pGMod[b].gainOffset;
  614|  1.07k|        }
  615|  2.42k|      }
  616|  8.60k|    }
  617|  8.12k|    if (bandCount == 1) {
  ------------------
  |  Branch (617:9): [True: 7.62k, False: 499]
  ------------------
  618|  7.62k|      shapeFilterPresent = FDKreadBits(hBs, 1);
  619|  7.62k|      if (shapeFilterPresent) {
  ------------------
  |  Branch (619:11): [True: 2.14k, False: 5.48k]
  ------------------
  620|  2.14k|        if (isBox) FDKpushFor(hBs, 3); /* reserved */
  ------------------
  |  Branch (620:13): [True: 0, False: 2.14k]
  ------------------
  621|  2.14k|        FDKpushFor(hBs, 4);            /* pGMod->shapeFilterIndex */
  622|  5.48k|      } else {
  623|  5.48k|        if (isBox) FDKpushFor(hBs, 7); /* reserved */
  ------------------
  |  Branch (623:13): [True: 0, False: 5.48k]
  ------------------
  624|  5.48k|      }
  625|  7.62k|    }
  626|  23.0k|  } else {
  627|  23.0k|    int b, gainScalingPresent, gainOffsetPresent;
  628|  23.0k|    FIXP_SGL attenuationScaling = FL2FXCONST_SGL(1.0f / (float)(1 << 2)),
  ------------------
  |  |  180|  23.0k|  (FIXP_SGL)(                                                                \
  |  |  181|  23.0k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 23.0k, Folded]
  |  |  ------------------
  |  |  182|  23.0k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  23.0k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  23.0k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 23.0k]
  |  |  ------------------
  |  |  183|  23.0k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  23.0k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  23.0k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  23.0k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  23.0k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  23.0k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  23.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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  629|  23.0k|             amplificationScaling = FL2FXCONST_SGL(1.0f / (float)(1 << 2)),
  ------------------
  |  |  180|  23.0k|  (FIXP_SGL)(                                                                \
  |  |  181|  23.0k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 23.0k, Folded]
  |  |  ------------------
  |  |  182|  23.0k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  23.0k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  23.0k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 23.0k]
  |  |  ------------------
  |  |  183|  23.0k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  23.0k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  23.0k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  23.0k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  23.0k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  23.0k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  23.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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  630|  23.0k|             gainOffset = (FIXP_SGL)0;
  631|  23.0k|    if (isBox) FDKpushFor(hBs, 7); /* reserved */
  ------------------
  |  Branch (631:9): [True: 0, False: 23.0k]
  ------------------
  632|  23.0k|    gainScalingPresent = FDKreadBits(hBs, 1);
  633|  23.0k|    if (gainScalingPresent) {
  ------------------
  |  Branch (633:9): [True: 14.2k, False: 8.81k]
  ------------------
  634|  14.2k|      bsAttenuationScaling = FDKreadBits(hBs, 4);
  635|  14.2k|      attenuationScaling = (FIXP_SGL)(
  636|  14.2k|          bsAttenuationScaling
  637|  14.2k|          << (FRACT_BITS - 1 - 3 - 2)); /* bsAttenuationScaling * 0.125; */
  ------------------
  |  |  112|  14.2k|#define FRACT_BITS 16  /* single precision */
  ------------------
  638|  14.2k|      bsAmplificationScaling = FDKreadBits(hBs, 4);
  639|  14.2k|      amplificationScaling = (FIXP_SGL)(
  640|  14.2k|          bsAmplificationScaling
  641|  14.2k|          << (FRACT_BITS - 1 - 3 - 2)); /* bsAmplificationScaling * 0.125; */
  ------------------
  |  |  112|  14.2k|#define FRACT_BITS 16  /* single precision */
  ------------------
  642|  14.2k|    }
  643|  23.0k|    if (isBox) FDKpushFor(hBs, 7); /* reserved */
  ------------------
  |  Branch (643:9): [True: 0, False: 23.0k]
  ------------------
  644|  23.0k|    gainOffsetPresent = FDKreadBits(hBs, 1);
  645|  23.0k|    if (gainOffsetPresent) {
  ------------------
  |  Branch (645:9): [True: 11.9k, False: 11.1k]
  ------------------
  646|  11.9k|      if (isBox) FDKpushFor(hBs, 2); /* reserved */
  ------------------
  |  Branch (646:11): [True: 0, False: 11.9k]
  ------------------
  647|  11.9k|      sign = FDKreadBits(hBs, 1);
  648|  11.9k|      bsGainOffset = FDKreadBits(hBs, 5);
  649|  11.9k|      gainOffset =
  650|  11.9k|          (FIXP_SGL)((1 + bsGainOffset) << (FRACT_BITS - 1 - 2 -
  ------------------
  |  |  112|  11.9k|#define FRACT_BITS 16  /* single precision */
  ------------------
  651|  11.9k|                                            4)); /* (1+bsGainOffset) * 0.25; */
  652|  11.9k|      if (sign) {
  ------------------
  |  Branch (652:11): [True: 7.06k, False: 4.90k]
  ------------------
  653|  7.06k|        gainOffset = -gainOffset;
  654|  7.06k|      }
  655|  11.9k|    }
  656|   115k|    for (b = 0; b < 4; b++) {
  ------------------
  |  Branch (656:17): [True: 92.3k, False: 23.0k]
  ------------------
  657|  92.3k|      pGMod[b].targetCharacteristicLeftPresent = 0;
  658|  92.3k|      pGMod[b].targetCharacteristicRightPresent = 0;
  659|  92.3k|      pGMod[b].gainScalingPresent = gainScalingPresent;
  660|  92.3k|      pGMod[b].attenuationScaling = attenuationScaling;
  661|  92.3k|      pGMod[b].amplificationScaling = amplificationScaling;
  662|  92.3k|      pGMod[b].gainOffsetPresent = gainOffsetPresent;
  663|  92.3k|      pGMod[b].gainOffset = gainOffset;
  664|  92.3k|    }
  665|  23.0k|  }
  666|  31.2k|}
drcDec_reader.cpp:_ZL26_readUniDrcConfigExtensionP13FDK_BITSTREAMP14UNI_DRC_CONFIG:
 1636|  18.1k|    HANDLE_FDK_BITSTREAM hBs, HANDLE_UNI_DRC_CONFIG hUniDrcConfig) {
 1637|  18.1k|  DRC_ERROR err = DE_OK;
 1638|  18.1k|  int k, bitSizeLen, extSizeBits, bitSize;
 1639|  18.1k|  INT nBitsRemaining;
 1640|  18.1k|  UNI_DRC_CONFIG_EXTENSION* pExt = &(hUniDrcConfig->uniDrcConfigExt);
 1641|       |
 1642|  18.1k|  k = 0;
 1643|  18.1k|  pExt->uniDrcConfigExtType[k] = FDKreadBits(hBs, 4);
 1644|  35.9k|  while (pExt->uniDrcConfigExtType[k] != UNIDRCCONFEXT_TERM) {
  ------------------
  |  |  117|  35.9k|#define UNIDRCCONFEXT_TERM 0x0
  ------------------
  |  Branch (1644:10): [True: 35.0k, False: 921]
  ------------------
 1645|  35.0k|    if (k >= (8 - 1)) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (1645:9): [True: 675, False: 34.3k]
  ------------------
 1646|  34.3k|    bitSizeLen = FDKreadBits(hBs, 4);
 1647|  34.3k|    extSizeBits = bitSizeLen + 4;
 1648|       |
 1649|  34.3k|    bitSize = FDKreadBits(hBs, extSizeBits);
 1650|  34.3k|    pExt->extBitSize[k] = bitSize + 1;
 1651|  34.3k|    nBitsRemaining = (INT)FDKgetValidBits(hBs);
 1652|       |
 1653|  34.3k|    switch (pExt->uniDrcConfigExtType[k]) {
 1654|  19.8k|      case UNIDRCCONFEXT_V1:
  ------------------
  |  |  112|  19.8k|#define UNIDRCCONFEXT_V1 0x2
  ------------------
  |  Branch (1654:7): [True: 19.8k, False: 14.4k]
  ------------------
 1655|  19.8k|        err = _readDrcExtensionV1(hBs, hUniDrcConfig);
 1656|  19.8k|        if (err) return err;
  ------------------
  |  Branch (1656:13): [True: 610, False: 19.2k]
  ------------------
 1657|  19.2k|        if (nBitsRemaining !=
  ------------------
  |  Branch (1657:13): [True: 15.9k, False: 3.32k]
  ------------------
 1658|  19.2k|            ((INT)pExt->extBitSize[k] + (INT)FDKgetValidBits(hBs)))
 1659|  15.9k|          return DE_NOT_OK;
 1660|  3.32k|        break;
 1661|  3.32k|      case UNIDRCCONFEXT_PARAM_DRC:
  ------------------
  |  |  111|  1.04k|#define UNIDRCCONFEXT_PARAM_DRC 0x1
  ------------------
  |  Branch (1661:7): [True: 1.04k, False: 33.2k]
  ------------------
 1662|       |      /* add future extensions here */
 1663|  14.4k|      default:
  ------------------
  |  Branch (1663:7): [True: 13.4k, False: 20.9k]
  ------------------
 1664|  14.4k|        FDKpushFor(hBs, pExt->extBitSize[k]);
 1665|  14.4k|        break;
 1666|  34.3k|    }
 1667|  17.7k|    k++;
 1668|  17.7k|    pExt->uniDrcConfigExtType[k] = FDKreadBits(hBs, 4);
 1669|  17.7k|  }
 1670|       |
 1671|    921|  return err;
 1672|  18.1k|}
drcDec_reader.cpp:_ZL19_readDrcExtensionV1P13FDK_BITSTREAMP14UNI_DRC_CONFIG:
 1536|  19.8k|                                     HANDLE_UNI_DRC_CONFIG hUniDrcConfig) {
 1537|  19.8k|  DRC_ERROR err = DE_OK;
 1538|  19.8k|  int downmixInstructionsV1Present;
 1539|  19.8k|  int drcCoeffsAndInstructionsUniDrcV1Present;
 1540|  19.8k|  int loudEqInstructionsPresent, loudEqInstructionsCount;
 1541|  19.8k|  int eqPresent, eqInstructionsCount;
 1542|  19.8k|  int i, offset;
 1543|  19.8k|  int diff = hUniDrcConfig->diff;
 1544|       |
 1545|  19.8k|  downmixInstructionsV1Present = FDKreadBits(hBs, 1);
 1546|  19.8k|  if (downmixInstructionsV1Present == 1) {
  ------------------
  |  Branch (1546:7): [True: 3.01k, False: 16.8k]
  ------------------
 1547|  3.01k|    diff |= _compAssign(&hUniDrcConfig->downmixInstructionsCountV1,
 1548|  3.01k|                        FDKreadBits(hBs, 7));
 1549|  3.01k|    offset = hUniDrcConfig->downmixInstructionsCountV0;
 1550|  3.01k|    hUniDrcConfig->downmixInstructionsCount = fMin(
 1551|  3.01k|        (UCHAR)(offset + hUniDrcConfig->downmixInstructionsCountV1), (UCHAR)6);
 1552|  36.8k|    for (i = 0; i < hUniDrcConfig->downmixInstructionsCountV1; i++) {
  ------------------
  |  Branch (1552:17): [True: 33.9k, False: 2.90k]
  ------------------
 1553|  33.9k|      DOWNMIX_INSTRUCTIONS tmpDown;
 1554|  33.9k|      FDKmemclear(&tmpDown, sizeof(DOWNMIX_INSTRUCTIONS));
 1555|  33.9k|      err = _readDownmixInstructions(hBs, 1, &hUniDrcConfig->channelLayout,
 1556|  33.9k|                                     &tmpDown);
 1557|  33.9k|      if (err) return err;
  ------------------
  |  Branch (1557:11): [True: 116, False: 33.7k]
  ------------------
 1558|  33.7k|      if ((offset + i) >= 6) continue;
  ------------------
  |  Branch (1558:11): [True: 26.6k, False: 7.18k]
  ------------------
 1559|  7.18k|      if (!diff)
  ------------------
  |  Branch (1559:11): [True: 352, False: 6.82k]
  ------------------
 1560|    352|        diff |= (FDKmemcmp(&tmpDown,
 1561|    352|                           &(hUniDrcConfig->downmixInstructions[offset + i]),
 1562|    352|                           sizeof(DOWNMIX_INSTRUCTIONS)) != 0);
 1563|  7.18k|      hUniDrcConfig->downmixInstructions[offset + i] = tmpDown;
 1564|  7.18k|    }
 1565|  16.8k|  } else {
 1566|  16.8k|    diff |= _compAssign(&hUniDrcConfig->downmixInstructionsCountV1, 0);
 1567|  16.8k|  }
 1568|       |
 1569|  19.7k|  drcCoeffsAndInstructionsUniDrcV1Present = FDKreadBits(hBs, 1);
 1570|  19.7k|  if (drcCoeffsAndInstructionsUniDrcV1Present == 1) {
  ------------------
  |  Branch (1570:7): [True: 9.90k, False: 9.84k]
  ------------------
 1571|  9.90k|    diff |= _compAssign(&hUniDrcConfig->drcCoefficientsUniDrcCountV1,
 1572|  9.90k|                        FDKreadBits(hBs, 3));
 1573|  9.90k|    offset = hUniDrcConfig->drcCoefficientsUniDrcCountV0;
 1574|  9.90k|    hUniDrcConfig->drcCoefficientsUniDrcCount =
 1575|  9.90k|        fMin((UCHAR)(offset + hUniDrcConfig->drcCoefficientsUniDrcCountV1),
 1576|  9.90k|             (UCHAR)2);
 1577|  37.1k|    for (i = 0; i < hUniDrcConfig->drcCoefficientsUniDrcCountV1; i++) {
  ------------------
  |  Branch (1577:17): [True: 27.3k, False: 9.81k]
  ------------------
 1578|  27.3k|      DRC_COEFFICIENTS_UNI_DRC tmpCoef;
 1579|  27.3k|      FDKmemclear(&tmpCoef, sizeof(DRC_COEFFICIENTS_UNI_DRC));
 1580|  27.3k|      err = _readDrcCoefficientsUniDrc(hBs, 1, &tmpCoef);
 1581|  27.3k|      if (err) return err;
  ------------------
  |  Branch (1581:11): [True: 88, False: 27.2k]
  ------------------
 1582|  27.2k|      if ((offset + i) >= 2) continue;
  ------------------
  |  Branch (1582:11): [True: 19.9k, False: 7.34k]
  ------------------
 1583|  7.34k|      if (!diff)
  ------------------
  |  Branch (1583:11): [True: 282, False: 7.06k]
  ------------------
 1584|    282|        diff |= (FDKmemcmp(&tmpCoef,
 1585|    282|                           &(hUniDrcConfig->drcCoefficientsUniDrc[offset + i]),
 1586|    282|                           sizeof(DRC_COEFFICIENTS_UNI_DRC)) != 0);
 1587|  7.34k|      hUniDrcConfig->drcCoefficientsUniDrc[offset + i] = tmpCoef;
 1588|  7.34k|    }
 1589|       |
 1590|  9.81k|    diff |= _compAssign(&hUniDrcConfig->drcInstructionsUniDrcCountV1,
 1591|  9.81k|                        FDKreadBits(hBs, 6));
 1592|  9.81k|    offset = hUniDrcConfig->drcInstructionsUniDrcCount;
 1593|  9.81k|    hUniDrcConfig->drcInstructionsUniDrcCount =
 1594|  9.81k|        fMin((UCHAR)(offset + hUniDrcConfig->drcInstructionsUniDrcCountV1),
 1595|  9.81k|             (UCHAR)12);
 1596|  71.4k|    for (i = 0; i < hUniDrcConfig->drcInstructionsUniDrcCount; i++) {
  ------------------
  |  Branch (1596:17): [True: 61.9k, False: 9.41k]
  ------------------
 1597|  61.9k|      DRC_INSTRUCTIONS_UNI_DRC tmpInst;
 1598|  61.9k|      FDKmemclear(&tmpInst, sizeof(DRC_INSTRUCTIONS_UNI_DRC));
 1599|  61.9k|      err = _readDrcInstructionsUniDrc(hBs, 1, hUniDrcConfig, &tmpInst);
 1600|  61.9k|      if (err) return err;
  ------------------
  |  Branch (1600:11): [True: 406, False: 61.5k]
  ------------------
 1601|  61.5k|      if ((offset + i) >= 12) continue;
  ------------------
  |  Branch (1601:11): [True: 39.0k, False: 22.5k]
  ------------------
 1602|  22.5k|      if (!diff)
  ------------------
  |  Branch (1602:11): [True: 465, False: 22.0k]
  ------------------
 1603|    465|        diff |= (FDKmemcmp(&tmpInst,
 1604|    465|                           &(hUniDrcConfig->drcInstructionsUniDrc[offset + i]),
 1605|    465|                           sizeof(DRC_INSTRUCTIONS_UNI_DRC)) != 0);
 1606|  22.5k|      hUniDrcConfig->drcInstructionsUniDrc[offset + i] = tmpInst;
 1607|  22.5k|    }
 1608|  9.84k|  } else {
 1609|  9.84k|    diff |= _compAssign(&hUniDrcConfig->drcCoefficientsUniDrcCountV1, 0);
 1610|  9.84k|    diff |= _compAssign(&hUniDrcConfig->drcInstructionsUniDrcCountV1, 0);
 1611|  9.84k|  }
 1612|       |
 1613|  19.2k|  loudEqInstructionsPresent = FDKreadBits(hBs, 1);
 1614|  19.2k|  if (loudEqInstructionsPresent == 1) {
  ------------------
  |  Branch (1614:7): [True: 4.41k, False: 14.8k]
  ------------------
 1615|  4.41k|    loudEqInstructionsCount = FDKreadBits(hBs, 4);
 1616|  24.6k|    for (i = 0; i < loudEqInstructionsCount; i++) {
  ------------------
  |  Branch (1616:17): [True: 20.2k, False: 4.41k]
  ------------------
 1617|  20.2k|      _skipLoudEqInstructions(hBs);
 1618|  20.2k|    }
 1619|  4.41k|  }
 1620|       |
 1621|  19.2k|  eqPresent = FDKreadBits(hBs, 1);
 1622|  19.2k|  if (eqPresent == 1) {
  ------------------
  |  Branch (1622:7): [True: 6.09k, False: 13.1k]
  ------------------
 1623|  6.09k|    _skipEqCoefficients(hBs);
 1624|  6.09k|    eqInstructionsCount = FDKreadBits(hBs, 4);
 1625|  34.6k|    for (i = 0; i < eqInstructionsCount; i++) {
  ------------------
  |  Branch (1625:17): [True: 28.5k, False: 6.09k]
  ------------------
 1626|  28.5k|      _skipEqInstructions(hBs, hUniDrcConfig);
 1627|  28.5k|    }
 1628|  6.09k|  }
 1629|       |
 1630|  19.2k|  hUniDrcConfig->diff = diff;
 1631|       |
 1632|  19.2k|  return err;
 1633|  19.7k|}
drcDec_reader.cpp:_ZL23_skipLoudEqInstructionsP13FDK_BITSTREAM:
  820|  20.2k|static void _skipLoudEqInstructions(HANDLE_FDK_BITSTREAM hBs) {
  821|  20.2k|  int i;
  822|  20.2k|  int downmixIdPresent, additionalDownmixIdPresent,
  823|  20.2k|      additionalDownmixIdCount = 0;
  824|  20.2k|  int drcSetIdPresent, additionalDrcSetIdPresent, additionalDrcSetIdCount = 0;
  825|  20.2k|  int eqSetIdPresent, additionalEqSetIdPresent, additionalEqSetIdCount = 0;
  826|  20.2k|  int loudEqGainSequenceCount, drcCharacteristicFormatIsCICP;
  827|       |
  828|  20.2k|  FDKpushFor(hBs, 4); /* loudEqSetId */
  829|  20.2k|  FDKpushFor(hBs, 4); /* drcLocation */
  830|  20.2k|  downmixIdPresent = FDKreadBits(hBs, 1);
  831|  20.2k|  if (downmixIdPresent) {
  ------------------
  |  Branch (831:7): [True: 2.21k, False: 18.0k]
  ------------------
  832|  2.21k|    FDKpushFor(hBs, 7); /* downmixId */
  833|  2.21k|    additionalDownmixIdPresent = FDKreadBits(hBs, 1);
  834|  2.21k|    if (additionalDownmixIdPresent) {
  ------------------
  |  Branch (834:9): [True: 1.07k, False: 1.14k]
  ------------------
  835|  1.07k|      additionalDownmixIdCount = FDKreadBits(hBs, 7);
  836|  22.0k|      for (i = 0; i < additionalDownmixIdCount; i++) {
  ------------------
  |  Branch (836:19): [True: 20.9k, False: 1.07k]
  ------------------
  837|  20.9k|        FDKpushFor(hBs, 7); /* additionalDownmixId */
  838|  20.9k|      }
  839|  1.07k|    }
  840|  2.21k|  }
  841|       |
  842|  20.2k|  drcSetIdPresent = FDKreadBits(hBs, 1);
  843|  20.2k|  if (drcSetIdPresent) {
  ------------------
  |  Branch (843:7): [True: 2.18k, False: 18.0k]
  ------------------
  844|  2.18k|    FDKpushFor(hBs, 6); /* drcSetId */
  845|  2.18k|    additionalDrcSetIdPresent = FDKreadBits(hBs, 1);
  846|  2.18k|    if (additionalDrcSetIdPresent) {
  ------------------
  |  Branch (846:9): [True: 905, False: 1.27k]
  ------------------
  847|    905|      additionalDrcSetIdCount = FDKreadBits(hBs, 6);
  848|  9.19k|      for (i = 0; i < additionalDrcSetIdCount; i++) {
  ------------------
  |  Branch (848:19): [True: 8.29k, False: 905]
  ------------------
  849|  8.29k|        FDKpushFor(hBs, 6); /* additionalDrcSetId; */
  850|  8.29k|      }
  851|    905|    }
  852|  2.18k|  }
  853|       |
  854|  20.2k|  eqSetIdPresent = FDKreadBits(hBs, 1);
  855|  20.2k|  if (eqSetIdPresent) {
  ------------------
  |  Branch (855:7): [True: 1.71k, False: 18.5k]
  ------------------
  856|  1.71k|    FDKpushFor(hBs, 6); /* eqSetId */
  857|  1.71k|    additionalEqSetIdPresent = FDKreadBits(hBs, 1);
  858|  1.71k|    if (additionalEqSetIdPresent) {
  ------------------
  |  Branch (858:9): [True: 941, False: 774]
  ------------------
  859|    941|      additionalEqSetIdCount = FDKreadBits(hBs, 6);
  860|  5.18k|      for (i = 0; i < additionalEqSetIdCount; i++) {
  ------------------
  |  Branch (860:19): [True: 4.23k, False: 941]
  ------------------
  861|  4.23k|        FDKpushFor(hBs, 6); /* additionalEqSetId; */
  862|  4.23k|      }
  863|    941|    }
  864|  1.71k|  }
  865|       |
  866|  20.2k|  FDKpushFor(hBs, 1); /* loudnessAfterDrc */
  867|  20.2k|  FDKpushFor(hBs, 1); /* loudnessAfterEq */
  868|  20.2k|  loudEqGainSequenceCount = FDKreadBits(hBs, 6);
  869|  30.7k|  for (i = 0; i < loudEqGainSequenceCount; i++) {
  ------------------
  |  Branch (869:15): [True: 10.4k, False: 20.2k]
  ------------------
  870|  10.4k|    FDKpushFor(hBs, 6); /* gainSequenceIndex */
  871|  10.4k|    drcCharacteristicFormatIsCICP = FDKreadBits(hBs, 1);
  872|  10.4k|    if (drcCharacteristicFormatIsCICP) {
  ------------------
  |  Branch (872:9): [True: 1.24k, False: 9.23k]
  ------------------
  873|  1.24k|      FDKpushFor(hBs, 7); /* drcCharacteristic */
  874|  9.23k|    } else {
  875|  9.23k|      FDKpushFor(hBs, 4); /* drcCharacteristicLeftIndex */
  876|  9.23k|      FDKpushFor(hBs, 4); /* drcCharacteristicRightIndex */
  877|  9.23k|    }
  878|  10.4k|    FDKpushFor(hBs, 6); /* frequencyRangeIndex */
  879|  10.4k|    FDKpushFor(hBs, 3); /* bsLoudEqScaling */
  880|  10.4k|    FDKpushFor(hBs, 5); /* bsLoudEqOffset */
  881|  10.4k|  }
  882|  20.2k|}
drcDec_reader.cpp:_ZL19_skipEqCoefficientsP13FDK_BITSTREAM:
  911|  6.09k|static void _skipEqCoefficients(HANDLE_FDK_BITSTREAM hBs) {
  912|  6.09k|  int j, k;
  913|  6.09k|  int eqDelayMaxPresent;
  914|  6.09k|  int uniqueFilterBlockCount, filterElementCount, filterElementGainPresent;
  915|  6.09k|  int uniqueTdFilterElementCount, eqFilterFormat, bsRealZeroRadiusOneCount,
  916|  6.09k|      realZeroCount, genericZeroCount, realPoleCount, complexPoleCount,
  917|  6.09k|      firFilterOrder;
  918|  6.09k|  int uniqueEqSubbandGainsCount, eqSubbandGainRepresentation,
  919|  6.09k|      eqSubbandGainCount;
  920|  6.09k|  int eqSubbandGainFormat;
  921|       |
  922|  6.09k|  eqDelayMaxPresent = FDKreadBits(hBs, 1);
  923|  6.09k|  if (eqDelayMaxPresent) {
  ------------------
  |  Branch (923:7): [True: 1.04k, False: 5.04k]
  ------------------
  924|  1.04k|    FDKpushFor(hBs, 8); /* bsEqDelayMax */
  925|  1.04k|  }
  926|       |
  927|  6.09k|  uniqueFilterBlockCount = FDKreadBits(hBs, 6);
  928|  23.8k|  for (j = 0; j < uniqueFilterBlockCount; j++) {
  ------------------
  |  Branch (928:15): [True: 17.7k, False: 6.09k]
  ------------------
  929|  17.7k|    filterElementCount = FDKreadBits(hBs, 6);
  930|  33.2k|    for (k = 0; k < filterElementCount; k++) {
  ------------------
  |  Branch (930:17): [True: 15.4k, False: 17.7k]
  ------------------
  931|  15.4k|      FDKpushFor(hBs, 6); /* filterElementIndex */
  932|  15.4k|      filterElementGainPresent = FDKreadBits(hBs, 1);
  933|  15.4k|      if (filterElementGainPresent) {
  ------------------
  |  Branch (933:11): [True: 925, False: 14.5k]
  ------------------
  934|    925|        FDKpushFor(hBs, 10); /* bsFilterElementGain */
  935|    925|      }
  936|  15.4k|    }
  937|  17.7k|  }
  938|  6.09k|  uniqueTdFilterElementCount = FDKreadBits(hBs, 6);
  939|  24.6k|  for (j = 0; j < uniqueTdFilterElementCount; j++) {
  ------------------
  |  Branch (939:15): [True: 18.5k, False: 6.09k]
  ------------------
  940|  18.5k|    eqFilterFormat = FDKreadBits(hBs, 1);
  941|  18.5k|    if (eqFilterFormat == 0) { /* pole/zero */
  ------------------
  |  Branch (941:9): [True: 17.3k, False: 1.17k]
  ------------------
  942|  17.3k|      bsRealZeroRadiusOneCount = FDKreadBits(hBs, 3);
  943|  17.3k|      realZeroCount = FDKreadBits(hBs, 6);
  944|  17.3k|      genericZeroCount = FDKreadBits(hBs, 6);
  945|  17.3k|      realPoleCount = FDKreadBits(hBs, 4);
  946|  17.3k|      complexPoleCount = FDKreadBits(hBs, 4);
  947|  17.3k|      FDKpushFor(hBs, 2 * bsRealZeroRadiusOneCount * 1);
  948|  17.3k|      FDKpushFor(hBs, realZeroCount * 8);
  949|  17.3k|      FDKpushFor(hBs, genericZeroCount * 14);
  950|  17.3k|      FDKpushFor(hBs, realPoleCount * 8);
  951|  17.3k|      FDKpushFor(hBs, complexPoleCount * 14);
  952|  17.3k|    } else { /* FIR coefficients */
  953|  1.17k|      firFilterOrder = FDKreadBits(hBs, 7);
  954|  1.17k|      FDKpushFor(hBs, 1);
  955|  1.17k|      FDKpushFor(hBs, (firFilterOrder / 2 + 1) * 11);
  956|  1.17k|    }
  957|  18.5k|  }
  958|  6.09k|  uniqueEqSubbandGainsCount = FDKreadBits(hBs, 6);
  959|  6.09k|  if (uniqueEqSubbandGainsCount > 0) {
  ------------------
  |  Branch (959:7): [True: 3.66k, False: 2.42k]
  ------------------
  960|  3.66k|    eqSubbandGainRepresentation = FDKreadBits(hBs, 1);
  961|  3.66k|    eqSubbandGainFormat = FDKreadBits(hBs, 4);
  962|  3.66k|    switch (eqSubbandGainFormat) {
  963|    488|      case GF_QMF32:
  ------------------
  |  Branch (963:7): [True: 488, False: 3.17k]
  ------------------
  964|    488|        eqSubbandGainCount = 32;
  965|    488|        break;
  966|    114|      case GF_QMFHYBRID39:
  ------------------
  |  Branch (966:7): [True: 114, False: 3.55k]
  ------------------
  967|    114|        eqSubbandGainCount = 39;
  968|    114|        break;
  969|    322|      case GF_QMF64:
  ------------------
  |  Branch (969:7): [True: 322, False: 3.34k]
  ------------------
  970|    322|        eqSubbandGainCount = 64;
  971|    322|        break;
  972|     39|      case GF_QMFHYBRID71:
  ------------------
  |  Branch (972:7): [True: 39, False: 3.62k]
  ------------------
  973|     39|        eqSubbandGainCount = 71;
  974|     39|        break;
  975|     88|      case GF_QMF128:
  ------------------
  |  Branch (975:7): [True: 88, False: 3.57k]
  ------------------
  976|     88|        eqSubbandGainCount = 128;
  977|     88|        break;
  978|    109|      case GF_QMFHYBRID135:
  ------------------
  |  Branch (978:7): [True: 109, False: 3.55k]
  ------------------
  979|    109|        eqSubbandGainCount = 135;
  980|    109|        break;
  981|    342|      case GF_UNIFORM:
  ------------------
  |  Branch (981:7): [True: 342, False: 3.32k]
  ------------------
  982|  2.50k|      default:
  ------------------
  |  Branch (982:7): [True: 2.16k, False: 1.50k]
  ------------------
  983|  2.50k|        eqSubbandGainCount = FDKreadBits(hBs, 8);
  984|  2.50k|        eqSubbandGainCount++;
  985|  2.50k|        break;
  986|  3.66k|    }
  987|   110k|    for (k = 0; k < uniqueEqSubbandGainsCount; k++) {
  ------------------
  |  Branch (987:17): [True: 106k, False: 3.66k]
  ------------------
  988|   106k|      if (eqSubbandGainRepresentation == 1) {
  ------------------
  |  Branch (988:11): [True: 19.5k, False: 87.1k]
  ------------------
  989|  19.5k|        _skipEqSubbandGainSpline(hBs);
  990|  87.1k|      } else {
  991|  87.1k|        FDKpushFor(hBs, eqSubbandGainCount * 9);
  992|  87.1k|      }
  993|   106k|    }
  994|  3.66k|  }
  995|  6.09k|}
drcDec_reader.cpp:_ZL24_skipEqSubbandGainSplineP13FDK_BITSTREAM:
  884|  19.5k|static void _skipEqSubbandGainSpline(HANDLE_FDK_BITSTREAM hBs) {
  885|  19.5k|  int nEqNodes, k, bits;
  886|  19.5k|  nEqNodes = FDKreadBits(hBs, 5);
  887|  19.5k|  nEqNodes += 2;
  888|  61.1k|  for (k = 0; k < nEqNodes; k++) {
  ------------------
  |  Branch (888:15): [True: 41.5k, False: 19.5k]
  ------------------
  889|  41.5k|    bits = FDKreadBits(hBs, 1);
  890|  41.5k|    if (!bits) {
  ------------------
  |  Branch (890:9): [True: 38.4k, False: 3.17k]
  ------------------
  891|  38.4k|      FDKpushFor(hBs, 4);
  892|  38.4k|    }
  893|  41.5k|  }
  894|  19.5k|  FDKpushFor(hBs, 4 * (nEqNodes - 1));
  895|  19.5k|  bits = FDKreadBits(hBs, 2);
  896|  19.5k|  switch (bits) {
  ------------------
  |  Branch (896:11): [True: 19.5k, False: 0]
  ------------------
  897|  18.2k|    case 0:
  ------------------
  |  Branch (897:5): [True: 18.2k, False: 1.31k]
  ------------------
  898|  18.2k|      FDKpushFor(hBs, 5);
  899|  18.2k|      break;
  900|    393|    case 1:
  ------------------
  |  Branch (900:5): [True: 393, False: 19.1k]
  ------------------
  901|    837|    case 2:
  ------------------
  |  Branch (901:5): [True: 444, False: 19.0k]
  ------------------
  902|    837|      FDKpushFor(hBs, 4);
  903|    837|      break;
  904|    474|    case 3:
  ------------------
  |  Branch (904:5): [True: 474, False: 19.0k]
  ------------------
  905|    474|      FDKpushFor(hBs, 3);
  906|    474|      break;
  907|  19.5k|  }
  908|  19.5k|  FDKpushFor(hBs, 5 * (nEqNodes - 1));
  909|  19.5k|}
drcDec_reader.cpp:_ZL19_skipEqInstructionsP13FDK_BITSTREAMP14UNI_DRC_CONFIG:
 1019|  28.5k|                                     HANDLE_UNI_DRC_CONFIG hUniDrcConfig) {
 1020|  28.5k|  DRC_ERROR err = DE_OK;
 1021|  28.5k|  int c, i, k, channelCount;
 1022|  28.5k|  int downmixIdPresent, downmixId, eqApplyToDownmix, additionalDownmixIdPresent,
 1023|  28.5k|      additionalDownmixIdCount = 0;
 1024|  28.5k|  int additionalDrcSetIdPresent, additionalDrcSetIdCount;
 1025|  28.5k|  int dependsOnEqSetPresent, eqChannelGroupCount, tdFilterCascadePresent,
 1026|  28.5k|      subbandGainsPresent, eqTransitionDurationPresent;
 1027|  28.5k|  UCHAR eqChannelGroupForChannel[8];
 1028|       |
 1029|  28.5k|  FDKpushFor(hBs, 6); /* eqSetId */
 1030|  28.5k|  FDKpushFor(hBs, 4); /* eqSetComplexityLevel */
 1031|  28.5k|  downmixIdPresent = FDKreadBits(hBs, 1);
 1032|  28.5k|  if (downmixIdPresent) {
  ------------------
  |  Branch (1032:7): [True: 5.10k, False: 23.4k]
  ------------------
 1033|  5.10k|    downmixId = FDKreadBits(hBs, 7);
 1034|  5.10k|    eqApplyToDownmix = FDKreadBits(hBs, 1);
 1035|  5.10k|    additionalDownmixIdPresent = FDKreadBits(hBs, 1);
 1036|  5.10k|    if (additionalDownmixIdPresent) {
  ------------------
  |  Branch (1036:9): [True: 1.63k, False: 3.46k]
  ------------------
 1037|  1.63k|      additionalDownmixIdCount = FDKreadBits(hBs, 7);
 1038|  1.63k|      FDKpushFor(hBs, additionalDownmixIdCount * 7); /* additionalDownmixId */
 1039|  1.63k|    }
 1040|  23.4k|  } else {
 1041|  23.4k|    downmixId = 0;
 1042|  23.4k|    eqApplyToDownmix = 0;
 1043|  23.4k|  }
 1044|  28.5k|  FDKpushFor(hBs, 6); /* drcSetId */
 1045|  28.5k|  additionalDrcSetIdPresent = FDKreadBits(hBs, 1);
 1046|  28.5k|  if (additionalDrcSetIdPresent) {
  ------------------
  |  Branch (1046:7): [True: 2.58k, False: 25.9k]
  ------------------
 1047|  2.58k|    additionalDrcSetIdCount = FDKreadBits(hBs, 6);
 1048|  20.8k|    for (i = 0; i < additionalDrcSetIdCount; i++) {
  ------------------
  |  Branch (1048:17): [True: 18.2k, False: 2.58k]
  ------------------
 1049|  18.2k|      FDKpushFor(hBs, 6); /* additionalDrcSetId */
 1050|  18.2k|    }
 1051|  2.58k|  }
 1052|  28.5k|  FDKpushFor(hBs, 16); /* eqSetPurpose */
 1053|  28.5k|  dependsOnEqSetPresent = FDKreadBits(hBs, 1);
 1054|  28.5k|  if (dependsOnEqSetPresent) {
  ------------------
  |  Branch (1054:7): [True: 3.01k, False: 25.5k]
  ------------------
 1055|  3.01k|    FDKpushFor(hBs, 6); /* dependsOnEqSet */
 1056|  25.5k|  } else {
 1057|  25.5k|    FDKpushFor(hBs, 1); /* noIndependentEqUse */
 1058|  25.5k|  }
 1059|       |
 1060|  28.5k|  channelCount = hUniDrcConfig->channelLayout.baseChannelCount;
 1061|  28.5k|  if ((downmixIdPresent == 1) && (eqApplyToDownmix == 1) && (downmixId != 0) &&
  ------------------
  |  Branch (1061:7): [True: 5.10k, False: 23.4k]
  |  Branch (1061:34): [True: 2.71k, False: 2.38k]
  |  Branch (1061:61): [True: 2.49k, False: 224]
  ------------------
 1062|  2.49k|      (downmixId != DOWNMIX_ID_ANY_DOWNMIX) &&
  ------------------
  |  |  123|  2.49k|#define DOWNMIX_ID_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (1062:7): [True: 2.11k, False: 378]
  ------------------
 1063|  2.11k|      (additionalDownmixIdCount == 0)) {
  ------------------
  |  Branch (1063:7): [True: 1.40k, False: 709]
  ------------------
 1064|  1.40k|    DOWNMIX_INSTRUCTIONS* pDown =
 1065|  1.40k|        selectDownmixInstructions(hUniDrcConfig, downmixId);
 1066|  1.40k|    if (pDown == NULL) return DE_NOT_OK;
  ------------------
  |  Branch (1066:9): [True: 1.12k, False: 278]
  ------------------
 1067|       |
 1068|    278|    channelCount =
 1069|    278|        pDown->targetChannelCount; /* targetChannelCountFromDownmixId*/
 1070|  27.1k|  } else if ((downmixId == DOWNMIX_ID_ANY_DOWNMIX) ||
  ------------------
  |  |  123|  27.1k|#define DOWNMIX_ID_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (1070:14): [True: 567, False: 26.5k]
  ------------------
 1071|  26.5k|             (additionalDownmixIdCount > 1)) {
  ------------------
  |  Branch (1071:14): [True: 798, False: 25.7k]
  ------------------
 1072|  1.36k|    channelCount = 1;
 1073|  1.36k|  }
 1074|       |
 1075|  27.3k|  eqChannelGroupCount = 0;
 1076|  93.0k|  for (c = 0; c < channelCount; c++) {
  ------------------
  |  Branch (1076:15): [True: 65.9k, False: 27.1k]
  ------------------
 1077|  65.9k|    int newGroup = 1;
 1078|  65.9k|    if (c >= 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (1078:9): [True: 226, False: 65.6k]
  ------------------
 1079|  65.6k|    eqChannelGroupForChannel[c] = FDKreadBits(hBs, 7);
 1080|   230k|    for (k = 0; k < c; k++) {
  ------------------
  |  Branch (1080:17): [True: 164k, False: 65.6k]
  ------------------
 1081|   164k|      if (eqChannelGroupForChannel[c] == eqChannelGroupForChannel[k]) {
  ------------------
  |  Branch (1081:11): [True: 145k, False: 19.3k]
  ------------------
 1082|   145k|        newGroup = 0;
 1083|   145k|      }
 1084|   164k|    }
 1085|  65.6k|    if (newGroup == 1) {
  ------------------
  |  Branch (1085:9): [True: 22.3k, False: 43.3k]
  ------------------
 1086|  22.3k|      eqChannelGroupCount += 1;
 1087|  22.3k|    }
 1088|  65.6k|  }
 1089|  27.1k|  tdFilterCascadePresent = FDKreadBits(hBs, 1);
 1090|  27.1k|  if (tdFilterCascadePresent) {
  ------------------
  |  Branch (1090:7): [True: 3.13k, False: 24.0k]
  ------------------
 1091|  3.13k|    _skipTdFilterCascade(hBs, eqChannelGroupCount);
 1092|  3.13k|  }
 1093|  27.1k|  subbandGainsPresent = FDKreadBits(hBs, 1);
 1094|  27.1k|  if (subbandGainsPresent) {
  ------------------
  |  Branch (1094:7): [True: 2.91k, False: 24.2k]
  ------------------
 1095|  2.91k|    FDKpushFor(hBs, eqChannelGroupCount * 6); /* subbandGainsIndex */
 1096|  2.91k|  }
 1097|  27.1k|  eqTransitionDurationPresent = FDKreadBits(hBs, 1);
 1098|  27.1k|  if (eqTransitionDurationPresent) {
  ------------------
  |  Branch (1098:7): [True: 2.82k, False: 24.3k]
  ------------------
 1099|  2.82k|    FDKpushFor(hBs, 5); /* bsEqTransitionDuration */
 1100|  2.82k|  }
 1101|  27.1k|  return err;
 1102|  27.3k|}
drcDec_reader.cpp:_ZL20_skipTdFilterCascadeP13FDK_BITSTREAMi:
  998|  3.13k|                                 const int eqChannelGroupCount) {
  999|  3.13k|  int i, eqCascadeGainPresent, filterBlockCount, eqPhaseAlignmentPresent;
 1000|  6.06k|  for (i = 0; i < eqChannelGroupCount; i++) {
  ------------------
  |  Branch (1000:15): [True: 2.93k, False: 3.13k]
  ------------------
 1001|  2.93k|    eqCascadeGainPresent = FDKreadBits(hBs, 1);
 1002|  2.93k|    if (eqCascadeGainPresent) {
  ------------------
  |  Branch (1002:9): [True: 1.12k, False: 1.80k]
  ------------------
 1003|  1.12k|      FDKpushFor(hBs, 10); /* bsEqCascadeGain */
 1004|  1.12k|    }
 1005|  2.93k|    filterBlockCount = FDKreadBits(hBs, 4);
 1006|  2.93k|    FDKpushFor(hBs, filterBlockCount * 7); /* filterBlockIndex */
 1007|  2.93k|  }
 1008|  3.13k|  eqPhaseAlignmentPresent = FDKreadBits(hBs, 1);
 1009|  3.13k|  {
 1010|  3.13k|    if (eqPhaseAlignmentPresent) {
  ------------------
  |  Branch (1010:9): [True: 2.13k, False: 1.00k]
  ------------------
 1011|  3.17k|      for (i = 0; i < eqChannelGroupCount; i++) {
  ------------------
  |  Branch (1011:19): [True: 1.04k, False: 2.13k]
  ------------------
 1012|  1.04k|        FDKpushFor(hBs, (eqChannelGroupCount - i - 1) * 1);
 1013|  1.04k|      }
 1014|  2.13k|    }
 1015|  3.13k|  }
 1016|  3.13k|}
drcDec_reader.cpp:_ZL17_readLoudnessInfoP13FDK_BITSTREAMiP13LOUDNESS_INFO:
 1853|  16.0k|                                   LOUDNESS_INFO* loudnessInfo) {
 1854|  16.0k|  DRC_ERROR err = DE_OK;
 1855|  16.0k|  int bsSamplePeakLevel, bsTruePeakLevel, i;
 1856|  16.0k|  int measurementCount;
 1857|       |
 1858|  16.0k|  loudnessInfo->drcSetId = FDKreadBits(hBs, 6);
 1859|  16.0k|  if (version >= 1) {
  ------------------
  |  Branch (1859:7): [True: 3.43k, False: 12.6k]
  ------------------
 1860|  3.43k|    loudnessInfo->eqSetId = FDKreadBits(hBs, 6);
 1861|  12.6k|  } else {
 1862|  12.6k|    loudnessInfo->eqSetId = 0;
 1863|  12.6k|  }
 1864|  16.0k|  loudnessInfo->downmixId = FDKreadBits(hBs, 7);
 1865|       |
 1866|  16.0k|  loudnessInfo->samplePeakLevelPresent = FDKreadBits(hBs, 1);
 1867|  16.0k|  if (loudnessInfo->samplePeakLevelPresent) {
  ------------------
  |  Branch (1867:7): [True: 1.58k, False: 14.4k]
  ------------------
 1868|  1.58k|    bsSamplePeakLevel = FDKreadBits(hBs, 12);
 1869|  1.58k|    if (bsSamplePeakLevel == 0) {
  ------------------
  |  Branch (1869:9): [True: 65, False: 1.51k]
  ------------------
 1870|     65|      loudnessInfo->samplePeakLevelPresent = 0;
 1871|     65|      loudnessInfo->samplePeakLevel = (FIXP_DBL)0;
 1872|  1.51k|    } else { /* 20.0 - bsSamplePeakLevel * 0.03125; */
 1873|  1.51k|      loudnessInfo->samplePeakLevel =
 1874|  1.51k|          FL2FXCONST_DBL(20.0f / (float)(1 << 7)) -
  ------------------
  |  |  192|  1.51k|  (FIXP_DBL)(                                                                \
  |  |  193|  1.51k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 1.51k, Folded]
  |  |  ------------------
  |  |  194|  1.51k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  1.51k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.51k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 1.51k]
  |  |  ------------------
  |  |  195|  1.51k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  1.51k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  1.51k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  1.51k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  1.51k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  1.51k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  1.51k|          : ((((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.51k|          (FIXP_DBL)(bsSamplePeakLevel << (DFRACT_BITS - 1 - 5 - 7));
  ------------------
  |  |  113|  1.51k|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1876|  1.51k|    }
 1877|  1.58k|  }
 1878|       |
 1879|  16.0k|  loudnessInfo->truePeakLevelPresent = FDKreadBits(hBs, 1);
 1880|  16.0k|  if (loudnessInfo->truePeakLevelPresent) {
  ------------------
  |  Branch (1880:7): [True: 784, False: 15.2k]
  ------------------
 1881|    784|    bsTruePeakLevel = FDKreadBits(hBs, 12);
 1882|    784|    if (bsTruePeakLevel == 0) {
  ------------------
  |  Branch (1882:9): [True: 90, False: 694]
  ------------------
 1883|     90|      loudnessInfo->truePeakLevelPresent = 0;
 1884|     90|      loudnessInfo->truePeakLevel = (FIXP_DBL)0;
 1885|    694|    } else {
 1886|    694|      loudnessInfo->truePeakLevel =
 1887|    694|          FL2FXCONST_DBL(20.0f / (float)(1 << 7)) -
  ------------------
  |  |  192|    694|  (FIXP_DBL)(                                                                \
  |  |  193|    694|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 694, Folded]
  |  |  ------------------
  |  |  194|    694|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|    694|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    694|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 694]
  |  |  ------------------
  |  |  195|    694|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|    694|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|    694|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|    694|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|    694|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    694|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|    694|          : ((((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|    694|          (FIXP_DBL)(bsTruePeakLevel << (DFRACT_BITS - 1 - 5 - 7));
  ------------------
  |  |  113|    694|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1889|    694|    }
 1890|    784|    loudnessInfo->truePeakLevelMeasurementSystem = FDKreadBits(hBs, 4);
 1891|    784|    loudnessInfo->truePeakLevelReliability = FDKreadBits(hBs, 2);
 1892|    784|  }
 1893|       |
 1894|  16.0k|  measurementCount = FDKreadBits(hBs, 4);
 1895|  16.0k|  loudnessInfo->measurementCount = fMin(measurementCount, 8);
 1896|  21.6k|  for (i = 0; i < measurementCount; i++) {
  ------------------
  |  Branch (1896:15): [True: 6.04k, False: 15.6k]
  ------------------
 1897|  6.04k|    LOUDNESS_MEASUREMENT tmpMeas;
 1898|  6.04k|    FDKmemclear(&tmpMeas, sizeof(LOUDNESS_MEASUREMENT));
 1899|  6.04k|    err = _readLoudnessMeasurement(hBs, &tmpMeas);
 1900|  6.04k|    if (err) return err;
  ------------------
  |  Branch (1900:9): [True: 458, False: 5.58k]
  ------------------
 1901|  5.58k|    if (i >= 8) continue;
  ------------------
  |  Branch (1901:9): [True: 534, False: 5.05k]
  ------------------
 1902|  5.05k|    loudnessInfo->loudnessMeasurement[i] = tmpMeas;
 1903|  5.05k|  }
 1904|       |
 1905|  15.6k|  return err;
 1906|  16.0k|}
drcDec_reader.cpp:_ZL24_readLoudnessMeasurementP13FDK_BITSTREAMP20LOUDNESS_MEASUREMENT:
 1839|  6.04k|                                          LOUDNESS_MEASUREMENT* pMeas) {
 1840|  6.04k|  DRC_ERROR err = DE_OK;
 1841|       |
 1842|  6.04k|  pMeas->methodDefinition = FDKreadBits(hBs, 4);
 1843|  6.04k|  err =
 1844|  6.04k|      _decodeMethodValue(hBs, pMeas->methodDefinition, &pMeas->methodValue, 0);
 1845|  6.04k|  if (err) return err;
  ------------------
  |  Branch (1845:7): [True: 458, False: 5.58k]
  ------------------
 1846|  5.58k|  pMeas->measurementSystem = FDKreadBits(hBs, 4);
 1847|  5.58k|  pMeas->reliability = FDKreadBits(hBs, 2);
 1848|       |
 1849|  5.58k|  return err;
 1850|  6.04k|}
drcDec_reader.cpp:_ZL18_decodeMethodValueP13FDK_BITSTREAMhPii:
 1785|  6.04k|                                    FIXP_DBL* methodValue, INT isBox) {
 1786|  6.04k|  int tmp;
 1787|  6.04k|  FIXP_DBL val;
 1788|  6.04k|  switch (methodDefinition) {
 1789|  1.61k|    case MD_UNKNOWN_OTHER:
  ------------------
  |  Branch (1789:5): [True: 1.61k, False: 4.43k]
  ------------------
 1790|  2.28k|    case MD_PROGRAM_LOUDNESS:
  ------------------
  |  Branch (1790:5): [True: 670, False: 5.37k]
  ------------------
 1791|  2.75k|    case MD_ANCHOR_LOUDNESS:
  ------------------
  |  Branch (1791:5): [True: 474, False: 5.57k]
  ------------------
 1792|  2.96k|    case MD_MAX_OF_LOUDNESS_RANGE:
  ------------------
  |  Branch (1792:5): [True: 209, False: 5.83k]
  ------------------
 1793|  3.28k|    case MD_MOMENTARY_LOUDNESS_MAX:
  ------------------
  |  Branch (1793:5): [True: 318, False: 5.72k]
  ------------------
 1794|  3.42k|    case MD_SHORT_TERM_LOUDNESS_MAX:
  ------------------
  |  Branch (1794:5): [True: 144, False: 5.90k]
  ------------------
 1795|  3.42k|      tmp = FDKreadBits(hBs, 8);
 1796|  3.42k|      val = FL2FXCONST_DBL(-57.75f / (float)(1 << 7)) +
  ------------------
  |  |  192|  3.42k|  (FIXP_DBL)(                                                                \
  |  |  193|  3.42k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 3.42k]
  |  |  ------------------
  |  |  194|  3.42k|          ? ((((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.42k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|  3.42k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  3.42k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 3.42k]
  |  |  ------------------
  |  |  199|  3.42k|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|  3.42k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|  3.42k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|  3.42k|                 ? (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.42k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|  3.42k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  3.42k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1797|  3.42k|            (FIXP_DBL)(
 1798|  3.42k|                tmp << (DFRACT_BITS - 1 - 2 - 7)); /* -57.75 + tmp * 0.25; */
  ------------------
  |  |  113|  3.42k|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1799|  3.42k|      break;
 1800|    585|    case MD_LOUDNESS_RANGE:
  ------------------
  |  Branch (1800:5): [True: 585, False: 5.46k]
  ------------------
 1801|    585|      tmp = FDKreadBits(hBs, 8);
 1802|    585|      if (tmp == 0)
  ------------------
  |  Branch (1802:11): [True: 73, False: 512]
  ------------------
 1803|     73|        val = (FIXP_DBL)0;
 1804|    512|      else if (tmp <= 128)
  ------------------
  |  Branch (1804:16): [True: 281, False: 231]
  ------------------
 1805|    281|        val = (FIXP_DBL)(tmp << (DFRACT_BITS - 1 - 2 - 7)); /* tmp * 0.25; */
  ------------------
  |  |  113|    281|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1806|    231|      else if (tmp <= 204) {
  ------------------
  |  Branch (1806:16): [True: 127, False: 104]
  ------------------
 1807|    127|        val = (FIXP_DBL)(tmp << (DFRACT_BITS - 1 - 1 - 7)) -
  ------------------
  |  |  113|    127|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1808|    127|              FL2FXCONST_DBL(32.0f / (float)(1 << 7)); /* 0.5 * tmp - 32.0f; */
  ------------------
  |  |  192|    127|  (FIXP_DBL)(                                                                \
  |  |  193|    127|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 127, Folded]
  |  |  ------------------
  |  |  194|    127|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|    127|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    127|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 127]
  |  |  ------------------
  |  |  195|    127|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|    127|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|    127|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|    127|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|    127|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    127|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|    127|          : ((((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|    127|      } else {
 1810|       |        /* downscale by 1 more bit to prevent overflow at intermediate result */
 1811|    104|        val = (FIXP_DBL)(tmp << (DFRACT_BITS - 1 - 8)) -
  ------------------
  |  |  113|    104|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1812|    104|              FL2FXCONST_DBL(134.0f / (float)(1 << 8)); /* tmp - 134.0; */
  ------------------
  |  |  192|    104|  (FIXP_DBL)(                                                                \
  |  |  193|    104|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 104, Folded]
  |  |  ------------------
  |  |  194|    104|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|    104|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    104|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 104]
  |  |  ------------------
  |  |  195|    104|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|    104|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|    104|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|    104|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|    104|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    104|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|    104|          : ((((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|    104|        val <<= 1;
 1814|    104|      }
 1815|    585|      break;
 1816|    622|    case MD_MIXING_LEVEL:
  ------------------
  |  Branch (1816:5): [True: 622, False: 5.42k]
  ------------------
 1817|    622|      tmp = FDKreadBits(hBs, isBox ? 8 : 5);
  ------------------
  |  Branch (1817:30): [True: 0, False: 622]
  ------------------
 1818|    622|      val = (FIXP_DBL)(tmp << (DFRACT_BITS - 1 - 7)) +
  ------------------
  |  |  113|    622|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1819|    622|            FL2FXCONST_DBL(80.0f / (float)(1 << 7)); /* tmp + 80.0; */
  ------------------
  |  |  192|    622|  (FIXP_DBL)(                                                                \
  |  |  193|    622|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 622, Folded]
  |  |  ------------------
  |  |  194|    622|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|    622|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    622|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 622]
  |  |  ------------------
  |  |  195|    622|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|    622|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|    622|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|    622|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|    622|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    622|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|    622|          : ((((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|    622|      break;
 1821|    736|    case MD_ROOM_TYPE:
  ------------------
  |  Branch (1821:5): [True: 736, False: 5.31k]
  ------------------
 1822|    736|      tmp = FDKreadBits(hBs, isBox ? 8 : 2);
  ------------------
  |  Branch (1822:30): [True: 0, False: 736]
  ------------------
 1823|    736|      val = (FIXP_DBL)(tmp << (DFRACT_BITS - 1 - 7)); /* tmp; */
  ------------------
  |  |  113|    736|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1824|    736|      break;
 1825|    218|    case MD_SHORT_TERM_LOUDNESS:
  ------------------
  |  Branch (1825:5): [True: 218, False: 5.82k]
  ------------------
 1826|    218|      tmp = FDKreadBits(hBs, 8);
 1827|    218|      val = FL2FXCONST_DBL(-116.0f / (float)(1 << 7)) +
  ------------------
  |  |  192|    218|  (FIXP_DBL)(                                                                \
  |  |  193|    218|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 218]
  |  |  ------------------
  |  |  194|    218|          ? ((((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|    218|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|    218|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    218|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 218]
  |  |  ------------------
  |  |  199|    218|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|    218|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|    218|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|    218|                 ? (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|    218|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|    218|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    218|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1828|    218|            (FIXP_DBL)(
 1829|    218|                tmp << (DFRACT_BITS - 1 - 1 - 7)); /* -116.0 + tmp * 0.5; */
  ------------------
  |  |  113|    218|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1830|    218|      break;
 1831|    458|    default:
  ------------------
  |  Branch (1831:5): [True: 458, False: 5.58k]
  ------------------
 1832|    458|      return DE_NOT_OK; /* invalid methodDefinition value */
 1833|  6.04k|  }
 1834|  5.58k|  *methodValue = val;
 1835|  5.58k|  return DE_OK;
 1836|  6.04k|}
drcDec_reader.cpp:_ZL29_readLoudnessInfoSetExtensionP13FDK_BITSTREAMP17LOUDNESS_INFO_SET:
 1955|    922|    HANDLE_FDK_BITSTREAM hBs, HANDLE_LOUDNESS_INFO_SET hLoudnessInfoSet) {
 1956|    922|  DRC_ERROR err = DE_OK;
 1957|    922|  int k, bitSizeLen, extSizeBits, bitSize;
 1958|    922|  INT nBitsRemaining;
 1959|    922|  LOUDNESS_INFO_SET_EXTENSION* pExt = &(hLoudnessInfoSet->loudnessInfoSetExt);
 1960|       |
 1961|    922|  k = 0;
 1962|    922|  pExt->loudnessInfoSetExtType[k] = FDKreadBits(hBs, 4);
 1963|  1.81k|  while (pExt->loudnessInfoSetExtType[k] != UNIDRCLOUDEXT_TERM) {
  ------------------
  |  |  116|  1.81k|#define UNIDRCLOUDEXT_TERM 0x0
  ------------------
  |  Branch (1963:10): [True: 1.28k, False: 524]
  ------------------
 1964|  1.28k|    if (k >= (8 - 1)) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (1964:9): [True: 66, False: 1.22k]
  ------------------
 1965|  1.22k|    bitSizeLen = FDKreadBits(hBs, 4);
 1966|  1.22k|    extSizeBits = bitSizeLen + 4;
 1967|       |
 1968|  1.22k|    bitSize = FDKreadBits(hBs, extSizeBits);
 1969|  1.22k|    pExt->extBitSize[k] = bitSize + 1;
 1970|  1.22k|    nBitsRemaining = (INT)FDKgetValidBits(hBs);
 1971|       |
 1972|  1.22k|    switch (pExt->loudnessInfoSetExtType[k]) {
 1973|    567|      case UNIDRCLOUDEXT_EQ:
  ------------------
  |  |  113|    567|#define UNIDRCLOUDEXT_EQ 0x1
  ------------------
  |  Branch (1973:7): [True: 567, False: 654]
  ------------------
 1974|    567|        err = _readLoudnessInfoSetExtEq(hBs, hLoudnessInfoSet);
 1975|    567|        if (err) return err;
  ------------------
  |  Branch (1975:13): [True: 81, False: 486]
  ------------------
 1976|    486|        if (nBitsRemaining !=
  ------------------
  |  Branch (1976:13): [True: 251, False: 235]
  ------------------
 1977|    486|            ((INT)pExt->extBitSize[k] + (INT)FDKgetValidBits(hBs)))
 1978|    251|          return DE_NOT_OK;
 1979|    235|        break;
 1980|       |      /* add future extensions here */
 1981|    654|      default:
  ------------------
  |  Branch (1981:7): [True: 654, False: 567]
  ------------------
 1982|    654|        FDKpushFor(hBs, pExt->extBitSize[k]);
 1983|    654|        break;
 1984|  1.22k|    }
 1985|    889|    k++;
 1986|    889|    pExt->loudnessInfoSetExtType[k] = FDKreadBits(hBs, 4);
 1987|    889|  }
 1988|       |
 1989|    524|  return err;
 1990|    922|}
drcDec_reader.cpp:_ZL25_readLoudnessInfoSetExtEqP13FDK_BITSTREAMP17LOUDNESS_INFO_SET:
 1909|    567|    HANDLE_FDK_BITSTREAM hBs, HANDLE_LOUDNESS_INFO_SET hLoudnessInfoSet) {
 1910|    567|  DRC_ERROR err = DE_OK;
 1911|    567|  int i, offset;
 1912|    567|  int diff = hLoudnessInfoSet->diff;
 1913|       |
 1914|    567|  diff |= _compAssign(&hLoudnessInfoSet->loudnessInfoAlbumCountV1,
 1915|    567|                      FDKreadBits(hBs, 6));
 1916|    567|  diff |=
 1917|    567|      _compAssign(&hLoudnessInfoSet->loudnessInfoCountV1, FDKreadBits(hBs, 6));
 1918|       |
 1919|    567|  offset = hLoudnessInfoSet->loudnessInfoAlbumCountV0;
 1920|    567|  hLoudnessInfoSet->loudnessInfoAlbumCount = fMin(
 1921|    567|      (UCHAR)(offset + hLoudnessInfoSet->loudnessInfoAlbumCountV1), (UCHAR)12);
 1922|  2.29k|  for (i = 0; i < hLoudnessInfoSet->loudnessInfoAlbumCountV1; i++) {
  ------------------
  |  Branch (1922:15): [True: 1.77k, False: 522]
  ------------------
 1923|  1.77k|    LOUDNESS_INFO tmpLoud;
 1924|  1.77k|    FDKmemclear(&tmpLoud, sizeof(LOUDNESS_INFO));
 1925|  1.77k|    err = _readLoudnessInfo(hBs, 1, &tmpLoud);
 1926|  1.77k|    if (err) return err;
  ------------------
  |  Branch (1926:9): [True: 45, False: 1.73k]
  ------------------
 1927|  1.73k|    if ((offset + i) >= 12) continue;
  ------------------
  |  Branch (1927:9): [True: 1.04k, False: 688]
  ------------------
 1928|    688|    if (!diff)
  ------------------
  |  Branch (1928:9): [True: 119, False: 569]
  ------------------
 1929|    119|      diff |= (FDKmemcmp(&tmpLoud,
 1930|    119|                         &(hLoudnessInfoSet->loudnessInfoAlbum[offset + i]),
 1931|    119|                         sizeof(LOUDNESS_INFO)) != 0);
 1932|    688|    hLoudnessInfoSet->loudnessInfoAlbum[offset + i] = tmpLoud;
 1933|    688|  }
 1934|       |
 1935|    522|  offset = hLoudnessInfoSet->loudnessInfoCountV0;
 1936|    522|  hLoudnessInfoSet->loudnessInfoCount =
 1937|    522|      fMin((UCHAR)(offset + hLoudnessInfoSet->loudnessInfoCountV1), (UCHAR)12);
 1938|  2.14k|  for (i = 0; i < hLoudnessInfoSet->loudnessInfoCountV1; i++) {
  ------------------
  |  Branch (1938:15): [True: 1.66k, False: 486]
  ------------------
 1939|  1.66k|    LOUDNESS_INFO tmpLoud;
 1940|  1.66k|    FDKmemclear(&tmpLoud, sizeof(LOUDNESS_INFO));
 1941|  1.66k|    err = _readLoudnessInfo(hBs, 1, &tmpLoud);
 1942|  1.66k|    if (err) return err;
  ------------------
  |  Branch (1942:9): [True: 36, False: 1.62k]
  ------------------
 1943|  1.62k|    if ((offset + i) >= 12) continue;
  ------------------
  |  Branch (1943:9): [True: 966, False: 658]
  ------------------
 1944|    658|    if (!diff)
  ------------------
  |  Branch (1944:9): [True: 94, False: 564]
  ------------------
 1945|     94|      diff |=
 1946|     94|          (FDKmemcmp(&tmpLoud, &(hLoudnessInfoSet->loudnessInfo[offset + i]),
 1947|     94|                     sizeof(LOUDNESS_INFO)) != 0);
 1948|    658|    hLoudnessInfoSet->loudnessInfo[offset + i] = tmpLoud;
 1949|    658|  }
 1950|    486|  hLoudnessInfoSet->diff = diff;
 1951|    486|  return err;
 1952|    522|}

_Z30drcDec_SelectionProcess_CreatePP26s_drcdec_selection_process:
  436|  6.83k|drcDec_SelectionProcess_Create(HANDLE_DRC_SELECTION_PROCESS* phInstance) {
  437|  6.83k|  HANDLE_DRC_SELECTION_PROCESS hInstance;
  438|  6.83k|  hInstance = (HANDLE_DRC_SELECTION_PROCESS)FDKcalloc(
  439|  6.83k|      1, sizeof(struct s_drcdec_selection_process));
  440|       |
  441|  6.83k|  if (!hInstance) return DRCDEC_SELECTION_PROCESS_OUTOFMEMORY;
  ------------------
  |  Branch (441:7): [True: 0, False: 6.83k]
  ------------------
  442|       |
  443|  6.83k|  hInstance->codecMode = SEL_PROC_CODEC_MODE_UNDEFINED;
  444|       |
  445|  6.83k|  *phInstance = hInstance;
  446|  6.83k|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
  447|  6.83k|}
_Z28drcDec_SelectionProcess_InitP26s_drcdec_selection_process:
  450|  6.83k|drcDec_SelectionProcess_Init(HANDLE_DRC_SELECTION_PROCESS hInstance) {
  451|  6.83k|  if (!hInstance) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (451:7): [True: 0, False: 6.83k]
  ------------------
  452|       |
  453|  6.83k|  _initDefaultParams(&hInstance->selProcInput);
  454|  6.83k|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
  455|  6.83k|}
_Z36drcDec_SelectionProcess_SetCodecModeP26s_drcdec_selection_process19SEL_PROC_CODEC_MODE:
  459|  4.63k|                                     const SEL_PROC_CODEC_MODE codecMode) {
  460|  4.63k|  DRCDEC_SELECTION_PROCESS_RETURN retVal = DRCDEC_SELECTION_PROCESS_NO_ERROR;
  461|       |
  462|  4.63k|  if (!hInstance) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (462:7): [True: 0, False: 4.63k]
  ------------------
  463|       |
  464|  4.63k|  switch (codecMode) {
  465|      0|    case SEL_PROC_MPEG_4_AAC:
  ------------------
  |  Branch (465:5): [True: 0, False: 4.63k]
  ------------------
  466|  4.63k|    case SEL_PROC_MPEG_D_USAC:
  ------------------
  |  Branch (466:5): [True: 4.63k, False: 0]
  ------------------
  467|  4.63k|    case SEL_PROC_TEST_TIME_DOMAIN:
  ------------------
  |  Branch (467:5): [True: 0, False: 4.63k]
  ------------------
  468|  4.63k|    case SEL_PROC_TEST_QMF_DOMAIN:
  ------------------
  |  Branch (468:5): [True: 0, False: 4.63k]
  ------------------
  469|  4.63k|    case SEL_PROC_TEST_STFT_DOMAIN:
  ------------------
  |  Branch (469:5): [True: 0, False: 4.63k]
  ------------------
  470|  4.63k|      hInstance->codecMode = codecMode;
  471|  4.63k|      break;
  472|       |
  473|      0|    case SEL_PROC_CODEC_MODE_UNDEFINED:
  ------------------
  |  Branch (473:5): [True: 0, False: 4.63k]
  ------------------
  474|      0|    default:
  ------------------
  |  Branch (474:5): [True: 0, False: 4.63k]
  ------------------
  475|      0|      return DRCDEC_SELECTION_PROCESS_NOT_OK;
  476|  4.63k|  }
  477|       |
  478|  4.63k|  retVal = _initCodecModeParams(&(hInstance->selProcInput),
  479|  4.63k|                                hInstance->codecMode = codecMode);
  480|       |
  481|  4.63k|  return retVal;
  482|  4.63k|}
_Z32drcDec_SelectionProcess_SetParamP26s_drcdec_selection_process19SEL_PROC_USER_PARAMiPi:
  487|  5.38k|                                 FIXP_DBL requestValue, int* pDiff) {
  488|  5.38k|  INT requestValueInt = (INT)requestValue;
  489|  5.38k|  int i, diff = 0;
  490|  5.38k|  SEL_PROC_INPUT* pSelProcInput = &(hInstance->selProcInput);
  491|       |
  492|  5.38k|  switch (requestType) {
  493|      0|    case SEL_PROC_LOUDNESS_NORMALIZATION_ON:
  ------------------
  |  Branch (493:5): [True: 0, False: 5.38k]
  ------------------
  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.38k]
  ------------------
  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.38k]
  ------------------
  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.38k]
  ------------------
  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.38k]
  ------------------
  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.38k]
  ------------------
  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.38k]
  ------------------
  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.38k]
  ------------------
  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.69k|    case SEL_PROC_BASE_CHANNEL_COUNT:
  ------------------
  |  Branch (590:5): [True: 2.69k, False: 2.69k]
  ------------------
  591|  2.69k|      if (requestValueInt < 0)
  ------------------
  |  Branch (591:11): [True: 0, False: 2.69k]
  ------------------
  592|      0|        return DRCDEC_SELECTION_PROCESS_PARAM_OUT_OF_RANGE;
  593|  2.69k|      diff |= _compAssign(&pSelProcInput->baseChannelCount, requestValueInt);
  594|  2.69k|      break;
  595|  2.69k|    case SEL_PROC_SAMPLE_RATE:
  ------------------
  |  Branch (595:5): [True: 2.69k, False: 2.69k]
  ------------------
  596|  2.69k|      if (requestValueInt < 0)
  ------------------
  |  Branch (596:11): [True: 0, False: 2.69k]
  ------------------
  597|      0|        return DRCDEC_SELECTION_PROCESS_PARAM_OUT_OF_RANGE;
  598|  2.69k|      diff |= _compAssign(&pSelProcInput->audioSampleRate, requestValueInt);
  599|  2.69k|      break;
  600|      0|    case SEL_PROC_BOOST:
  ------------------
  |  Branch (600:5): [True: 0, False: 5.38k]
  ------------------
  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.38k]
  ------------------
  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.38k]
  ------------------
  621|      0|      return DRCDEC_SELECTION_PROCESS_INVALID_PARAM;
  622|  5.38k|  }
  623|       |
  624|  5.38k|  if (pDiff != NULL) {
  ------------------
  |  Branch (624:7): [True: 5.38k, False: 0]
  ------------------
  625|  5.38k|    *pDiff |= diff;
  626|  5.38k|  }
  627|       |
  628|  5.38k|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
  629|  5.38k|}
_Z30drcDec_SelectionProcess_DeletePP26s_drcdec_selection_process:
  647|  6.83k|drcDec_SelectionProcess_Delete(HANDLE_DRC_SELECTION_PROCESS* phInstance) {
  648|  6.83k|  if (phInstance == NULL || *phInstance == NULL)
  ------------------
  |  Branch (648:7): [True: 0, False: 6.83k]
  |  Branch (648:29): [True: 0, False: 6.83k]
  ------------------
  649|      0|    return DRCDEC_SELECTION_PROCESS_INVALID_HANDLE;
  650|       |
  651|  6.83k|  FDKfree(*phInstance);
  652|       |  *phInstance = NULL;
  653|  6.83k|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
  654|  6.83k|}
_Z31drcDec_SelectionProcess_ProcessP26s_drcdec_selection_processP14UNI_DRC_CONFIGP17LOUDNESS_INFO_SETP26s_selection_process_output:
  660|  2.69k|                                HANDLE_SEL_PROC_OUTPUT hSelProcOutput) {
  661|  2.69k|  DRCDEC_SELECTION_PROCESS_RETURN retVal = DRCDEC_SELECTION_PROCESS_NO_ERROR;
  662|  2.69k|  DRCDEC_SELECTION* pCandidatesSelected;
  663|  2.69k|  DRCDEC_SELECTION* pCandidatesPotential;
  664|       |
  665|  2.69k|  if (hInstance == NULL) return DRCDEC_SELECTION_PROCESS_INVALID_HANDLE;
  ------------------
  |  Branch (665:7): [True: 0, False: 2.69k]
  ------------------
  666|       |
  667|  2.69k|  pCandidatesSelected = &(hInstance->selectionData[0]);
  668|  2.69k|  pCandidatesPotential = &(hInstance->selectionData[1]);
  669|  2.69k|  _drcdec_selection_setNumber(pCandidatesSelected, 0);
  670|  2.69k|  _drcdec_selection_setNumber(pCandidatesPotential, 0);
  671|       |
  672|  2.69k|  retVal = _generateVirtualDrcSets(&(hInstance->selProcInput), hUniDrcConfig,
  673|  2.69k|                                   hInstance->codecMode);
  674|  2.69k|  if (retVal) return (retVal);
  ------------------
  |  Branch (674:7): [True: 0, False: 2.69k]
  ------------------
  675|       |
  676|  2.69k|  if (hInstance->selProcInput.baseChannelCount !=
  ------------------
  |  Branch (676:7): [True: 2.62k, False: 64]
  ------------------
  677|  2.69k|      hUniDrcConfig->channelLayout.baseChannelCount) {
  678|  2.62k|    hInstance->selProcInput.baseChannelCount =
  679|  2.62k|        hUniDrcConfig->channelLayout.baseChannelCount;
  680|  2.62k|  }
  681|       |
  682|  2.69k|  if ((hInstance->selProcInput.targetConfigRequestType != 0) ||
  ------------------
  |  Branch (682:7): [True: 0, False: 2.69k]
  ------------------
  683|  2.69k|      (hInstance->selProcInput.targetConfigRequestType == 0 &&
  ------------------
  |  Branch (683:8): [True: 2.69k, False: 0]
  ------------------
  684|  2.69k|       hInstance->selProcInput.numDownmixIdRequests == 0)) {
  ------------------
  |  Branch (684:8): [True: 2.69k, False: 0]
  ------------------
  685|  2.69k|    retVal = _channelLayoutToDownmixIdMapping(&(hInstance->selProcInput),
  686|  2.69k|                                              hUniDrcConfig);
  687|       |
  688|  2.69k|    if (_isError(retVal)) return (retVal);
  ------------------
  |  Branch (688:9): [True: 0, False: 2.69k]
  ------------------
  689|  2.69k|  }
  690|       |
  691|  2.69k|  retVal = _drcSetPreSelection(&(hInstance->selProcInput), hUniDrcConfig,
  692|  2.69k|                               hLoudnessInfoSet, &pCandidatesPotential,
  693|  2.69k|                               &pCandidatesSelected, hInstance->codecMode);
  694|  2.69k|  if (retVal) return (retVal);
  ------------------
  |  Branch (694:7): [True: 14, False: 2.67k]
  ------------------
  695|       |
  696|  2.67k|  if (hInstance->selProcInput.albumMode) {
  ------------------
  |  Branch (696:7): [True: 0, False: 2.67k]
  ------------------
  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.67k|  _swapSelectionAndClear(&pCandidatesPotential, &pCandidatesSelected);
  709|       |
  710|  2.67k|  retVal = _drcSetRequestSelection(&(hInstance->selProcInput), hUniDrcConfig,
  711|  2.67k|                                   hLoudnessInfoSet, &pCandidatesPotential,
  712|  2.67k|                                   &pCandidatesSelected);
  713|  2.67k|  if (retVal) return (retVal);
  ------------------
  |  Branch (713:7): [True: 18, False: 2.66k]
  ------------------
  714|       |
  715|  2.66k|  retVal = _drcSetFinalSelection(&(hInstance->selProcInput), hUniDrcConfig,
  716|  2.66k|                                 &pCandidatesPotential, &pCandidatesSelected,
  717|  2.66k|                                 hInstance->codecMode);
  718|  2.66k|  if (retVal) return (retVal);
  ------------------
  |  Branch (718:7): [True: 78, False: 2.58k]
  ------------------
  719|       |
  720|  2.58k|  retVal = _generateOutputInfo(
  721|  2.58k|      &(hInstance->selProcInput), hSelProcOutput, hUniDrcConfig,
  722|  2.58k|      hLoudnessInfoSet, &(pCandidatesSelected->data[0]), hInstance->codecMode);
  723|       |
  724|  2.58k|  if (_isError(retVal)) return (retVal);
  ------------------
  |  Branch (724:7): [True: 163, False: 2.41k]
  ------------------
  725|       |
  726|  2.41k|  retVal = _selectDownmixMatrix(hSelProcOutput, hUniDrcConfig);
  727|  2.41k|  if (retVal) return (retVal);
  ------------------
  |  Branch (727:7): [True: 0, False: 2.41k]
  ------------------
  728|       |
  729|  2.41k|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
  730|  2.41k|}
_Z15_initValueOrderP11VALUE_ORDER:
 2587|  5.18k|void _initValueOrder(VALUE_ORDER* pValue) {
 2588|  5.18k|  pValue->value = (FIXP_DBL)0;
 2589|  5.18k|  pValue->order = -1;
 2590|  5.18k|}
drcDec_selectionProcess.cpp:_ZL11_compAssignPii:
  276|  2.69k|static inline int _compAssign(FIXP_DBL* dest, const FIXP_DBL src) {
  277|  2.69k|  int diff = 0;
  278|  2.69k|  if (*dest != src) diff = 1;
  ------------------
  |  Branch (278:7): [True: 2.69k, False: 0]
  ------------------
  279|  2.69k|  *dest = src;
  280|  2.69k|  return diff;
  281|  2.69k|}
drcDec_selectionProcess.cpp:_ZL11_compAssignPaa:
  269|  2.69k|static inline int _compAssign(SCHAR* dest, const SCHAR src) {
  270|  2.69k|  int diff = 0;
  271|  2.69k|  if (*dest != src) diff = 1;
  ------------------
  |  Branch (271:7): [True: 2.69k, False: 0]
  ------------------
  272|  2.69k|  *dest = src;
  273|  2.69k|  return diff;
  274|  2.69k|}
drcDec_selectionProcess.cpp:_ZL8_isErrori:
  253|  5.27k|static int _isError(int x) {
  254|  5.27k|  if (x < DRCDEC_SELECTION_PROCESS_WARNING) {
  ------------------
  |  Branch (254:7): [True: 163, False: 5.11k]
  ------------------
  255|    163|    return 1;
  256|    163|  }
  257|       |
  258|  5.11k|  return 0;
  259|  5.27k|}
drcDec_selectionProcess.cpp:_ZL18_initDefaultParamsP14SEL_PROC_INPUT:
  737|  6.83k|    HANDLE_SEL_PROC_INPUT hSelProcInput) {
  738|  6.83k|  DRCDEC_SELECTION_PROCESS_RETURN retVal = DRCDEC_SELECTION_PROCESS_NO_ERROR;
  739|       |
  740|  6.83k|  if (hSelProcInput == NULL) return DRCDEC_SELECTION_PROCESS_INVALID_HANDLE;
  ------------------
  |  Branch (740:7): [True: 0, False: 6.83k]
  ------------------
  741|       |
  742|       |  /* system parameters */
  743|  6.83k|  hSelProcInput->baseChannelCount = -1;
  744|  6.83k|  hSelProcInput->baseLayout = -1;
  745|  6.83k|  hSelProcInput->targetConfigRequestType = TCRT_DOWNMIX_ID;
  746|  6.83k|  hSelProcInput->numDownmixIdRequests = 0;
  747|       |
  748|       |  /* loudness normalization parameters */
  749|  6.83k|  hSelProcInput->albumMode = 0;
  750|  6.83k|  hSelProcInput->peakLimiterPresent = 0;
  751|  6.83k|  hSelProcInput->loudnessNormalizationOn = 1;
  752|  6.83k|  hSelProcInput->targetLoudness = FL2FXCONST_DBL(-24.0f / (float)(1 << 7));
  ------------------
  |  |  192|  6.83k|  (FIXP_DBL)(                                                                \
  |  |  193|  6.83k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [Folded, False: 6.83k]
  |  |  ------------------
  |  |  194|  6.83k|          ? ((((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|  6.83k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|  6.83k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  6.83k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 6.83k]
  |  |  ------------------
  |  |  199|  6.83k|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|  6.83k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|  6.83k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|  6.83k|                 ? (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|  6.83k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|  6.83k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  6.83k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  753|  6.83k|  hSelProcInput->loudnessDeviationMax = DEFAULT_LOUDNESS_DEVIATION_MAX;
  ------------------
  |  |  137|  6.83k|#define DEFAULT_LOUDNESS_DEVIATION_MAX 63
  ------------------
  754|  6.83k|  hSelProcInput->loudnessMeasurementMethod = MDR_ANCHOR_LOUDNESS;
  755|  6.83k|  hSelProcInput->loudnessMeasurementSystem = MSR_EXPERT_PANEL;
  756|  6.83k|  hSelProcInput->loudnessMeasurementPreProc = LPR_DEFAULT;
  757|  6.83k|  hSelProcInput->deviceCutOffFrequency = 500;
  758|  6.83k|  hSelProcInput->loudnessNormalizationGainDbMax =
  759|  6.83k|      (FIXP_DBL)MAXVAL_DBL; /* infinity as default */
  ------------------
  |  |  156|  6.83k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
  760|  6.83k|  hSelProcInput->loudnessNormalizationGainModificationDb = (FIXP_DBL)0;
  761|  6.83k|  hSelProcInput->outputPeakLevelMax = (FIXP_DBL)0;
  762|  6.83k|  if (hSelProcInput->peakLimiterPresent == 1) {
  ------------------
  |  Branch (762:7): [True: 0, False: 6.83k]
  ------------------
  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|  6.83k|  hSelProcInput->dynamicRangeControlOn = 1;
  768|       |
  769|  6.83k|  hSelProcInput->numDrcFeatureRequests = 0;
  770|       |
  771|       |  /* other parameters */
  772|  6.83k|  hSelProcInput->boost = FL2FXCONST_SGL(1.f / (float)(1 << 1));
  ------------------
  |  |  180|  6.83k|  (FIXP_SGL)(                                                                \
  |  |  181|  6.83k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 6.83k, Folded]
  |  |  ------------------
  |  |  182|  6.83k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  6.83k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  6.83k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 6.83k]
  |  |  ------------------
  |  |  183|  6.83k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  6.83k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  6.83k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  6.83k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  6.83k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  6.83k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  6.83k|          : ((((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|  6.83k|  hSelProcInput->compress = FL2FXCONST_SGL(1.f / (float)(1 << 1));
  ------------------
  |  |  180|  6.83k|  (FIXP_SGL)(                                                                \
  |  |  181|  6.83k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 6.83k, Folded]
  |  |  ------------------
  |  |  182|  6.83k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  6.83k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  6.83k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 6.83k]
  |  |  ------------------
  |  |  183|  6.83k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  6.83k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  6.83k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  6.83k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  6.83k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  6.83k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  6.83k|          : ((((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|  6.83k|  hSelProcInput->drcCharacteristicTarget = 0;
  775|       |
  776|  6.83k|  return retVal;
  777|  6.83k|}
drcDec_selectionProcess.cpp:_ZL20_initCodecModeParamsP14SEL_PROC_INPUT19SEL_PROC_CODEC_MODE:
  780|  4.63k|    HANDLE_SEL_PROC_INPUT hSelProcInput, const SEL_PROC_CODEC_MODE codecMode) {
  781|  4.63k|  DRCDEC_SELECTION_PROCESS_RETURN retVal = DRCDEC_SELECTION_PROCESS_NO_ERROR;
  782|       |
  783|  4.63k|  if (hSelProcInput == NULL) return DRCDEC_SELECTION_PROCESS_INVALID_HANDLE;
  ------------------
  |  Branch (783:7): [True: 0, False: 4.63k]
  ------------------
  784|       |
  785|  4.63k|  switch (codecMode) {
  786|      0|    case SEL_PROC_MPEG_H_3DA:
  ------------------
  |  Branch (786:5): [True: 0, False: 4.63k]
  ------------------
  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: 4.63k]
  ------------------
  795|  4.63k|    case SEL_PROC_MPEG_D_USAC:
  ------------------
  |  Branch (795:5): [True: 4.63k, False: 0]
  ------------------
  796|  4.63k|      hSelProcInput->loudnessDeviationMax = DEFAULT_LOUDNESS_DEVIATION_MAX;
  ------------------
  |  |  137|  4.63k|#define DEFAULT_LOUDNESS_DEVIATION_MAX 63
  ------------------
  797|  4.63k|      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|  4.63k|      hSelProcInput->outputPeakLevelMax =
  802|  4.63k|          FL2FXCONST_DBL(6.0f / (float)(1 << 7));
  ------------------
  |  |  192|  4.63k|  (FIXP_DBL)(                                                                \
  |  |  193|  4.63k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 4.63k, Folded]
  |  |  ------------------
  |  |  194|  4.63k|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|  4.63k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  4.63k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 4.63k]
  |  |  ------------------
  |  |  195|  4.63k|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|  4.63k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|  4.63k|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|  4.63k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|  4.63k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  4.63k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|  4.63k|          : ((((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|  4.63k|      break;
  804|      0|    case SEL_PROC_TEST_TIME_DOMAIN:
  ------------------
  |  Branch (804:5): [True: 0, False: 4.63k]
  ------------------
  805|      0|    case SEL_PROC_TEST_QMF_DOMAIN:
  ------------------
  |  Branch (805:5): [True: 0, False: 4.63k]
  ------------------
  806|      0|    case SEL_PROC_TEST_STFT_DOMAIN:
  ------------------
  |  Branch (806:5): [True: 0, False: 4.63k]
  ------------------
  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: 4.63k]
  ------------------
  812|      0|    default:
  ------------------
  |  Branch (812:5): [True: 0, False: 4.63k]
  ------------------
  813|      0|      hSelProcInput->loudnessDeviationMax = DEFAULT_LOUDNESS_DEVIATION_MAX;
  ------------------
  |  |  137|      0|#define DEFAULT_LOUDNESS_DEVIATION_MAX 63
  ------------------
  814|      0|      hSelProcInput->peakLimiterPresent = 0;
  815|  4.63k|  }
  816|       |
  817|  4.63k|  return retVal;
  818|  4.63k|}
drcDec_selectionProcess.cpp:_ZL32_channelLayoutToDownmixIdMappingP14SEL_PROC_INPUTP14UNI_DRC_CONFIG:
  821|  2.69k|    HANDLE_SEL_PROC_INPUT hSelProcInput, HANDLE_UNI_DRC_CONFIG hUniDrcConfig) {
  822|  2.69k|  DRCDEC_SELECTION_PROCESS_RETURN retVal = DRCDEC_SELECTION_PROCESS_NO_ERROR;
  823|       |
  824|  2.69k|  DOWNMIX_INSTRUCTIONS* pDown = NULL;
  825|       |
  826|  2.69k|  int i;
  827|       |
  828|  2.69k|  hSelProcInput->numDownmixIdRequests = 0;
  829|       |
  830|  2.69k|  switch (hSelProcInput->targetConfigRequestType) {
  831|  2.69k|    case TCRT_DOWNMIX_ID:
  ------------------
  |  Branch (831:5): [True: 2.69k, False: 0]
  ------------------
  832|  2.69k|      if (hSelProcInput->numDownmixIdRequests == 0) {
  ------------------
  |  Branch (832:11): [True: 2.69k, False: 0]
  ------------------
  833|  2.69k|        hSelProcInput->downmixIdRequested[0] = 0;
  834|  2.69k|        hSelProcInput->numDownmixIdRequests = 1;
  835|  2.69k|      }
  836|       |
  837|  2.69k|      break;
  838|       |
  839|      0|    case TCRT_TARGET_LAYOUT:
  ------------------
  |  Branch (839:5): [True: 0, False: 2.69k]
  ------------------
  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.69k]
  ------------------
  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.69k]
  ------------------
  904|      0|      return DRCDEC_SELECTION_PROCESS_NOT_OK;
  905|  2.69k|  }
  906|       |
  907|  2.69k|  return retVal;
  908|  2.69k|}
drcDec_selectionProcess.cpp:_ZL21_drcSetFinalSelectionP14SEL_PROC_INPUTP14UNI_DRC_CONFIGPP16DRCDEC_SELECTIONS5_19SEL_PROC_CODEC_MODE:
 1935|  2.66k|    DRCDEC_SELECTION** ppCandidatesSelected, SEL_PROC_CODEC_MODE codecMode) {
 1936|  2.66k|  DRCDEC_SELECTION_PROCESS_RETURN retVal = DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1937|       |
 1938|  2.66k|  if (_drcdec_selection_getNumber(*ppCandidatesPotential) == 0) {
  ------------------
  |  Branch (1938:7): [True: 0, False: 2.66k]
  ------------------
 1939|      0|    return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1940|  2.66k|  } else if (_drcdec_selection_getNumber(*ppCandidatesPotential) == 1) {
  ------------------
  |  Branch (1940:14): [True: 2.20k, False: 459]
  ------------------
 1941|  2.20k|    _swapSelection(ppCandidatesPotential, ppCandidatesSelected);
 1942|       |    /* finished */
 1943|  2.20k|  } else /* > 1 */
 1944|    459|  {
 1945|    459|    retVal = _drcSetFinalSelection_peakValue0(*ppCandidatesPotential,
 1946|    459|                                              *ppCandidatesSelected);
 1947|    459|    if (retVal) return (retVal);
  ------------------
  |  Branch (1947:9): [True: 0, False: 459]
  ------------------
 1948|       |
 1949|    459|    if (_drcdec_selection_getNumber(*ppCandidatesSelected) > 1) {
  ------------------
  |  Branch (1949:9): [True: 363, False: 96]
  ------------------
 1950|    363|      _swapSelectionAndClear(ppCandidatesPotential, ppCandidatesSelected);
 1951|    363|      retVal = _drcSetFinalSelection_downmixId(
 1952|    363|          hSelProcInput, ppCandidatesPotential, ppCandidatesSelected);
 1953|    363|      if (retVal) return (retVal);
  ------------------
  |  Branch (1953:11): [True: 0, False: 363]
  ------------------
 1954|    363|    }
 1955|       |
 1956|    459|    if (_drcdec_selection_getNumber(*ppCandidatesSelected) > 1) {
  ------------------
  |  Branch (1956:9): [True: 363, False: 96]
  ------------------
 1957|    363|      _swapSelectionAndClear(ppCandidatesPotential, ppCandidatesSelected);
 1958|    363|      retVal = _drcSetFinalSelection_effectTypes(*ppCandidatesPotential,
 1959|    363|                                                 *ppCandidatesSelected);
 1960|    363|      if (retVal) return (retVal);
  ------------------
  |  Branch (1960:11): [True: 0, False: 363]
  ------------------
 1961|    363|    }
 1962|       |
 1963|    459|    if (_drcdec_selection_getNumber(*ppCandidatesSelected) > 1) {
  ------------------
  |  Branch (1963:9): [True: 260, False: 199]
  ------------------
 1964|    260|      _swapSelectionAndClear(ppCandidatesPotential, ppCandidatesSelected);
 1965|    260|      retVal = _drcSetFinalSelection_targetLoudness(
 1966|    260|          hSelProcInput->targetLoudness, *ppCandidatesPotential,
 1967|    260|          *ppCandidatesSelected);
 1968|    260|      if (retVal) return (retVal);
  ------------------
  |  Branch (1968:11): [True: 0, False: 260]
  ------------------
 1969|    260|    }
 1970|       |
 1971|    459|    if (_drcdec_selection_getNumber(*ppCandidatesSelected) > 1) {
  ------------------
  |  Branch (1971:9): [True: 236, False: 223]
  ------------------
 1972|    236|      _swapSelectionAndClear(ppCandidatesPotential, ppCandidatesSelected);
 1973|    236|      retVal = _drcSetFinalSelection_peakValueLargest(*ppCandidatesPotential,
 1974|    236|                                                      *ppCandidatesSelected);
 1975|    236|      if (retVal) return (retVal);
  ------------------
  |  Branch (1975:11): [True: 0, False: 236]
  ------------------
 1976|    236|    }
 1977|       |
 1978|    459|    if (_drcdec_selection_getNumber(*ppCandidatesSelected) > 1) {
  ------------------
  |  Branch (1978:9): [True: 215, False: 244]
  ------------------
 1979|    215|      _swapSelectionAndClear(ppCandidatesPotential, ppCandidatesSelected);
 1980|    215|      retVal = _drcSetFinalSelection_drcSetId(*ppCandidatesPotential,
 1981|    215|                                              *ppCandidatesSelected);
 1982|    215|      if (retVal) return (retVal);
  ------------------
  |  Branch (1982:11): [True: 0, False: 215]
  ------------------
 1983|    215|    }
 1984|    459|  }
 1985|       |
 1986|  2.66k|  if (_drcdec_selection_getNumber(*ppCandidatesSelected) == 0) {
  ------------------
  |  Branch (1986:7): [True: 78, False: 2.58k]
  ------------------
 1987|     78|    return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1988|     78|  }
 1989|       |
 1990|  2.58k|  return retVal;
 1991|  2.66k|}
drcDec_selectionProcess.cpp:_ZL32_drcSetFinalSelection_peakValue0P16DRCDEC_SELECTIONS0_:
 1670|    459|    DRCDEC_SELECTION* pCandidatesSelected) {
 1671|    459|  int i;
 1672|       |
 1673|  2.33k|  for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1673:15): [True: 1.87k, False: 459]
  ------------------
 1674|  1.87k|    DRCDEC_SELECTION_DATA* pCandidate =
 1675|  1.87k|        _drcdec_selection_getAt(pCandidatesPotential, i);
 1676|  1.87k|    if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1676:9): [True: 0, False: 1.87k]
  ------------------
 1677|       |
 1678|  1.87k|    if (pCandidate->outputPeakLevel <= FIXP_DBL(0)) {
  ------------------
  |  Branch (1678:9): [True: 1.45k, False: 413]
  ------------------
 1679|  1.45k|      if (_drcdec_selection_add(pCandidatesSelected, pCandidate) == NULL)
  ------------------
  |  Branch (1679:11): [True: 0, False: 1.45k]
  ------------------
 1680|      0|        return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1681|  1.45k|    }
 1682|  1.87k|  }
 1683|       |
 1684|    459|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1685|    459|}
drcDec_selectionProcess.cpp:_ZL23_drcdec_selection_getAtP16DRCDEC_SELECTIONi:
 2469|  25.5k|    DRCDEC_SELECTION* pSelection, int at) {
 2470|  25.5k|  if (at >= 0 && at < (12 + 1 + 6)) {
  ------------------
  |  Branch (2470:7): [True: 25.5k, False: 0]
  |  Branch (2470:18): [True: 25.5k, False: 0]
  ------------------
 2471|  25.5k|    return &(pSelection->data[at]);
 2472|  25.5k|  } else {
 2473|       |    return NULL;
 2474|      0|  }
 2475|  25.5k|}
drcDec_selectionProcess.cpp:_ZL21_drcdec_selection_addP16DRCDEC_SELECTIONP21DRCDEC_SELECTION_DATA:
 2441|  14.5k|    DRCDEC_SELECTION* pSelection, DRCDEC_SELECTION_DATA* pDataIn) {
 2442|  14.5k|  if (pSelection->numData < (12 + 1 + 6)) {
  ------------------
  |  Branch (2442:7): [True: 14.5k, False: 0]
  ------------------
 2443|  14.5k|    DRCDEC_SELECTION_DATA* pData = &(pSelection->data[pSelection->numData]);
 2444|  14.5k|    FDKmemcpy(pData, pDataIn, sizeof(DRCDEC_SELECTION_DATA));
 2445|  14.5k|    pSelection->numData++;
 2446|  14.5k|    return pData;
 2447|  14.5k|  } else {
 2448|       |    return NULL;
 2449|      0|  }
 2450|  14.5k|}
drcDec_selectionProcess.cpp:_ZL31_drcSetFinalSelection_downmixIdP14SEL_PROC_INPUTPP16DRCDEC_SELECTIONS3_:
 1690|    363|    DRCDEC_SELECTION** ppCandidatesSelected) {
 1691|    363|  int i, j;
 1692|    363|  DRCDEC_SELECTION_DATA* pCandidate = NULL;
 1693|    363|  DRC_INSTRUCTIONS_UNI_DRC* pInst = NULL;
 1694|       |
 1695|  1.80k|  for (i = 0; i < _drcdec_selection_getNumber(*ppCandidatesPotential); i++) {
  ------------------
  |  Branch (1695:15): [True: 1.44k, False: 363]
  ------------------
 1696|  1.44k|    pCandidate = _drcdec_selection_getAt(*ppCandidatesPotential, i);
 1697|  1.44k|    if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1697:9): [True: 0, False: 1.44k]
  ------------------
 1698|       |
 1699|  1.44k|    pInst = pCandidate->pInst;
 1700|       |
 1701|  3.10k|    for (j = 0; j < pInst->downmixIdCount; j++) {
  ------------------
  |  Branch (1701:17): [True: 1.66k, False: 1.44k]
  ------------------
 1702|  1.66k|      if (DOWNMIX_ID_BASE_LAYOUT != pInst->downmixId[j] &&
  ------------------
  |  |  122|  1.66k|#define DOWNMIX_ID_BASE_LAYOUT 0x0
  ------------------
  |  Branch (1702:11): [True: 284, False: 1.37k]
  ------------------
 1703|    284|          DOWNMIX_ID_ANY_DOWNMIX != pInst->downmixId[j] &&
  ------------------
  |  |  123|    284|#define DOWNMIX_ID_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (1703:11): [True: 107, False: 177]
  ------------------
 1704|    107|          hSelProcInput
  ------------------
  |  Branch (1704:11): [True: 0, False: 107]
  ------------------
 1705|    107|                  ->downmixIdRequested[pCandidate->downmixIdRequestIndex] ==
 1706|    107|              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.66k|    }
 1711|  1.44k|  }
 1712|       |
 1713|    363|  if (_drcdec_selection_getNumber(*ppCandidatesSelected) == 0) {
  ------------------
  |  Branch (1713:7): [True: 363, False: 0]
  ------------------
 1714|    363|    _swapSelection(ppCandidatesPotential, ppCandidatesSelected);
 1715|    363|  }
 1716|       |
 1717|    363|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1718|    363|}
drcDec_selectionProcess.cpp:_ZL33_drcSetFinalSelection_effectTypesP16DRCDEC_SELECTIONS0_:
 1736|    363|    DRCDEC_SELECTION* pCandidatesSelected) {
 1737|    363|  int i;
 1738|    363|  int minNumEffects = 1000;
 1739|    363|  int numEffects = 0;
 1740|    363|  int effects = 0;
 1741|    363|  DRCDEC_SELECTION_DATA* pCandidate = NULL;
 1742|    363|  DRC_INSTRUCTIONS_UNI_DRC* pInst = NULL;
 1743|       |
 1744|  1.80k|  for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1744:15): [True: 1.44k, False: 363]
  ------------------
 1745|  1.44k|    pCandidate = _drcdec_selection_getAt(pCandidatesPotential, i);
 1746|  1.44k|    if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1746:9): [True: 0, False: 1.44k]
  ------------------
 1747|       |
 1748|  1.44k|    pInst = pCandidate->pInst;
 1749|       |
 1750|  1.44k|    effects = pInst->drcSetEffect;
 1751|  1.44k|    effects &= 0xffff ^ (EB_GENERAL_COMPR);
 1752|  1.44k|    numEffects = _crossSum(effects);
 1753|       |
 1754|  1.44k|    if (numEffects < minNumEffects) {
  ------------------
  |  Branch (1754:9): [True: 517, False: 923]
  ------------------
 1755|    517|      minNumEffects = numEffects;
 1756|    517|    }
 1757|  1.44k|  }
 1758|       |
 1759|       |  /* add all with minimum number of effects */
 1760|  1.80k|  for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1760:15): [True: 1.44k, False: 363]
  ------------------
 1761|  1.44k|    pCandidate = _drcdec_selection_getAt(pCandidatesPotential, i);
 1762|  1.44k|    if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1762:9): [True: 0, False: 1.44k]
  ------------------
 1763|       |
 1764|  1.44k|    pInst = pCandidate->pInst;
 1765|       |
 1766|  1.44k|    effects = pInst->drcSetEffect;
 1767|  1.44k|    effects &= 0xffff ^ (EB_GENERAL_COMPR);
 1768|  1.44k|    numEffects = _crossSum(effects);
 1769|       |
 1770|  1.44k|    if (numEffects == minNumEffects) {
  ------------------
  |  Branch (1770:9): [True: 1.17k, False: 263]
  ------------------
 1771|  1.17k|      if (_drcdec_selection_add(pCandidatesSelected, pCandidate) == NULL)
  ------------------
  |  Branch (1771:11): [True: 0, False: 1.17k]
  ------------------
 1772|      0|        return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1773|  1.17k|    }
 1774|  1.44k|  }
 1775|       |
 1776|    363|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1777|    363|}
drcDec_selectionProcess.cpp:_ZL9_crossSumi:
 1720|  2.88k|static int _crossSum(int value) {
 1721|  2.88k|  int sum = 0;
 1722|       |
 1723|  16.8k|  while (value != 0) {
  ------------------
  |  Branch (1723:10): [True: 13.9k, False: 2.88k]
  ------------------
 1724|  13.9k|    if ((value & 1) == 1) {
  ------------------
  |  Branch (1724:9): [True: 5.28k, False: 8.69k]
  ------------------
 1725|  5.28k|      sum++;
 1726|  5.28k|    }
 1727|       |
 1728|  13.9k|    value >>= 1;
 1729|  13.9k|  }
 1730|       |
 1731|  2.88k|  return sum;
 1732|  2.88k|}
drcDec_selectionProcess.cpp:_ZL36_drcSetFinalSelection_targetLoudnessiP16DRCDEC_SELECTIONS0_:
 1816|    260|    DRCDEC_SELECTION* pCandidatesSelected) {
 1817|    260|  DRCDEC_SELECTION_PROCESS_RETURN retVal = DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1818|    260|  int i;
 1819|    260|  DRCDEC_SELECTION_DATA* pCandidate = NULL;
 1820|       |
 1821|  1.33k|  for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1821:15): [True: 1.07k, False: 260]
  ------------------
 1822|  1.07k|    pCandidate = _drcdec_selection_getAt(pCandidatesPotential, i);
 1823|  1.07k|    if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1823:9): [True: 0, False: 1.07k]
  ------------------
 1824|       |
 1825|  1.07k|    if (pCandidate->selectionFlag == 0) {
  ------------------
  |  Branch (1825:9): [True: 988, False: 86]
  ------------------
 1826|    988|      if (_drcdec_selection_add(pCandidatesSelected, pCandidate) == NULL)
  ------------------
  |  Branch (1826:11): [True: 0, False: 988]
  ------------------
 1827|      0|        return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1828|    988|    }
 1829|  1.07k|  }
 1830|       |
 1831|    260|  if (_drcdec_selection_getNumber(pCandidatesSelected) == 0) {
  ------------------
  |  Branch (1831:7): [True: 21, False: 239]
  ------------------
 1832|     21|    retVal = _selectSmallestTargetLoudnessValueUpper(pCandidatesPotential,
 1833|     21|                                                     pCandidatesSelected);
 1834|     21|    if (retVal) return (retVal);
  ------------------
  |  Branch (1834:9): [True: 0, False: 21]
  ------------------
 1835|     21|  }
 1836|       |
 1837|    260|  if (_drcdec_selection_getNumber(pCandidatesSelected) > 1) {
  ------------------
  |  Branch (1837:7): [True: 246, False: 14]
  ------------------
 1838|    246|    DRC_INSTRUCTIONS_UNI_DRC* pDrcInstructionUniDrc = NULL;
 1839|       |
 1840|    246|    _swapSelectionAndClear(&pCandidatesPotential, &pCandidatesSelected);
 1841|       |
 1842|  1.26k|    for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1842:17): [True: 1.01k, False: 246]
  ------------------
 1843|  1.01k|      pCandidate = _drcdec_selection_getAt(pCandidatesPotential, i);
 1844|  1.01k|      if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1844:11): [True: 0, False: 1.01k]
  ------------------
 1845|       |
 1846|  1.01k|      pDrcInstructionUniDrc = pCandidate->pInst;
 1847|       |
 1848|  1.01k|      if (_targetLoudnessInRange(pDrcInstructionUniDrc, targetLoudness)) {
  ------------------
  |  Branch (1848:11): [True: 73, False: 944]
  ------------------
 1849|     73|        if (_drcdec_selection_add(pCandidatesSelected, pCandidate) == NULL)
  ------------------
  |  Branch (1849:13): [True: 0, False: 73]
  ------------------
 1850|      0|          return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1851|     73|      }
 1852|  1.01k|    }
 1853|       |
 1854|    246|    if (_drcdec_selection_getNumber(pCandidatesSelected) > 1) {
  ------------------
  |  Branch (1854:9): [True: 20, False: 226]
  ------------------
 1855|     20|      _swapSelectionAndClear(&pCandidatesPotential, &pCandidatesSelected);
 1856|       |
 1857|     20|      retVal = _selectSmallestTargetLoudnessValueUpper(pCandidatesPotential,
 1858|     20|                                                       pCandidatesSelected);
 1859|     20|      if (retVal) return (retVal);
  ------------------
  |  Branch (1859:11): [True: 0, False: 20]
  ------------------
 1860|     20|    }
 1861|    246|  }
 1862|       |
 1863|    260|  return retVal;
 1864|    260|}
drcDec_selectionProcess.cpp:_ZL39_selectSmallestTargetLoudnessValueUpperP16DRCDEC_SELECTIONS0_:
 1781|     41|    DRCDEC_SELECTION* pCandidatesSelected) {
 1782|     41|  int i;
 1783|     41|  SCHAR minVal = 0x7F;
 1784|     41|  SCHAR val = 0;
 1785|     41|  DRCDEC_SELECTION_DATA* pCandidate = NULL;
 1786|       |
 1787|    190|  for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1787:15): [True: 149, False: 41]
  ------------------
 1788|    149|    pCandidate = _drcdec_selection_getAt(pCandidatesPotential, i);
 1789|    149|    if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1789:9): [True: 0, False: 149]
  ------------------
 1790|       |
 1791|    149|    val = pCandidate->pInst->drcSetTargetLoudnessValueUpper;
 1792|       |
 1793|    149|    if (val < minVal) {
  ------------------
  |  Branch (1793:9): [True: 62, False: 87]
  ------------------
 1794|     62|      minVal = val;
 1795|     62|    }
 1796|    149|  }
 1797|       |
 1798|       |  /* add all with same smallest drcSetTargetLoudnessValueUpper */
 1799|    190|  for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1799:15): [True: 149, False: 41]
  ------------------
 1800|    149|    pCandidate = _drcdec_selection_getAt(pCandidatesPotential, i);
 1801|    149|    if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1801:9): [True: 0, False: 149]
  ------------------
 1802|       |
 1803|    149|    val = pCandidate->pInst->drcSetTargetLoudnessValueUpper;
 1804|       |
 1805|    149|    if (val == minVal) {
  ------------------
  |  Branch (1805:9): [True: 87, False: 62]
  ------------------
 1806|     87|      if (_drcdec_selection_add(pCandidatesSelected, pCandidate) == NULL)
  ------------------
  |  Branch (1806:11): [True: 0, False: 87]
  ------------------
 1807|      0|        return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1808|     87|    }
 1809|    149|  }
 1810|       |
 1811|     41|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1812|     41|}
drcDec_selectionProcess.cpp:_ZL22_targetLoudnessInRangeP24DRC_INSTRUCTIONS_UNI_DRCi:
 1086|  2.37k|    DRC_INSTRUCTIONS_UNI_DRC* pDrcInstructionUniDrc, FIXP_DBL targetLoudness) {
 1087|  2.37k|  int retVal = 0;
 1088|       |
 1089|  2.37k|  FIXP_DBL drcSetTargetLoudnessValueUpper =
 1090|  2.37k|      ((FIXP_DBL)pDrcInstructionUniDrc->drcSetTargetLoudnessValueUpper)
 1091|  2.37k|      << (DFRACT_BITS - 1 - 7);
  ------------------
  |  |  113|  2.37k|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1092|  2.37k|  FIXP_DBL drcSetTargetLoudnessValueLower =
 1093|  2.37k|      ((FIXP_DBL)pDrcInstructionUniDrc->drcSetTargetLoudnessValueLower)
 1094|  2.37k|      << (DFRACT_BITS - 1 - 7);
  ------------------
  |  |  113|  2.37k|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1095|       |
 1096|  2.37k|  if (pDrcInstructionUniDrc->drcSetTargetLoudnessPresent &&
  ------------------
  |  Branch (1096:7): [True: 591, False: 1.78k]
  ------------------
 1097|    591|      drcSetTargetLoudnessValueUpper >= targetLoudness &&
  ------------------
  |  Branch (1097:7): [True: 439, False: 152]
  ------------------
 1098|    439|      drcSetTargetLoudnessValueLower < targetLoudness) {
  ------------------
  |  Branch (1098:7): [True: 319, False: 120]
  ------------------
 1099|    319|    retVal = 1;
 1100|    319|  }
 1101|       |
 1102|  2.37k|  return retVal;
 1103|  2.37k|}
drcDec_selectionProcess.cpp:_ZL38_drcSetFinalSelection_peakValueLargestP16DRCDEC_SELECTIONS0_:
 1868|    236|    DRCDEC_SELECTION* pCandidatesSelected) {
 1869|    236|  int i;
 1870|    236|  FIXP_DBL largestPeakLevel = MINVAL_DBL;
  ------------------
  |  |  158|    236|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  ------------------
 1871|    236|  FIXP_DBL peakLevel = 0;
 1872|    236|  DRCDEC_SELECTION_DATA* pCandidate = NULL;
 1873|       |
 1874|  1.21k|  for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1874:15): [True: 980, False: 236]
  ------------------
 1875|    980|    pCandidate = _drcdec_selection_getAt(pCandidatesPotential, i);
 1876|    980|    if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1876:9): [True: 0, False: 980]
  ------------------
 1877|       |
 1878|    980|    peakLevel = pCandidate->outputPeakLevel;
 1879|       |
 1880|    980|    if (peakLevel > largestPeakLevel) {
  ------------------
  |  Branch (1880:9): [True: 247, False: 733]
  ------------------
 1881|    247|      largestPeakLevel = peakLevel;
 1882|    247|    }
 1883|    980|  }
 1884|       |
 1885|       |  /* add all with same largest peak level */
 1886|  1.21k|  for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1886:15): [True: 980, False: 236]
  ------------------
 1887|    980|    pCandidate = _drcdec_selection_getAt(pCandidatesPotential, i);
 1888|    980|    if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1888:9): [True: 0, False: 980]
  ------------------
 1889|       |
 1890|    980|    peakLevel = pCandidate->outputPeakLevel;
 1891|       |
 1892|    980|    if (peakLevel == largestPeakLevel) {
  ------------------
  |  Branch (1892:9): [True: 944, False: 36]
  ------------------
 1893|    944|      if (_drcdec_selection_add(pCandidatesSelected, pCandidate) == NULL)
  ------------------
  |  Branch (1893:11): [True: 0, False: 944]
  ------------------
 1894|      0|        return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1895|    944|    }
 1896|    980|  }
 1897|       |
 1898|    236|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1899|    236|}
drcDec_selectionProcess.cpp:_ZL30_drcSetFinalSelection_drcSetIdP16DRCDEC_SELECTIONS0_:
 1903|    215|    DRCDEC_SELECTION* pCandidatesSelected) {
 1904|    215|  int i;
 1905|    215|  int largestId = -1000;
 1906|    215|  int id = 0;
 1907|    215|  DRCDEC_SELECTION_DATA* pCandidate = NULL;
 1908|    215|  DRCDEC_SELECTION_DATA* pCandidateSelected = NULL;
 1909|       |
 1910|  1.13k|  for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1910:15): [True: 923, False: 215]
  ------------------
 1911|    923|    pCandidate = _drcdec_selection_getAt(pCandidatesPotential, i);
 1912|    923|    if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1912:9): [True: 0, False: 923]
  ------------------
 1913|       |
 1914|    923|    id = pCandidate->pInst->drcSetId;
 1915|       |
 1916|    923|    if (id > largestId) {
  ------------------
  |  Branch (1916:9): [True: 237, False: 686]
  ------------------
 1917|    237|      largestId = id;
 1918|    237|      pCandidateSelected = pCandidate;
 1919|    237|    }
 1920|    923|  }
 1921|       |
 1922|    215|  if (pCandidateSelected != NULL) {
  ------------------
  |  Branch (1922:7): [True: 215, False: 0]
  ------------------
 1923|    215|    if (_drcdec_selection_add(pCandidatesSelected, pCandidateSelected) == NULL)
  ------------------
  |  Branch (1923:9): [True: 0, False: 215]
  ------------------
 1924|      0|      return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1925|    215|  } else {
 1926|      0|    return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1927|      0|  }
 1928|       |
 1929|    215|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1930|    215|}
drcDec_selectionProcess.cpp:_ZL23_generateVirtualDrcSetsP14SEL_PROC_INPUTP14UNI_DRC_CONFIG19SEL_PROC_CODEC_MODE:
 1995|  2.69k|    SEL_PROC_CODEC_MODE codecMode) {
 1996|  2.69k|  int i;
 1997|  2.69k|  int nMixes = hUniDrcConfig->downmixInstructionsCount + 1;
 1998|  2.69k|  int index = hUniDrcConfig->drcInstructionsUniDrcCount;
 1999|  2.69k|  int indexVirtual = -1;
 2000|  2.69k|  DRC_INSTRUCTIONS_UNI_DRC* pDrcInstruction =
 2001|  2.69k|      &(hUniDrcConfig->drcInstructionsUniDrc[index]);
 2002|       |
 2003|  2.69k|  if (codecMode == SEL_PROC_MPEG_H_3DA) {
  ------------------
  |  Branch (2003:7): [True: 0, False: 2.69k]
  ------------------
 2004|      0|    nMixes = 1;
 2005|      0|  }
 2006|       |
 2007|  2.69k|  if ((index + nMixes) > (12 + 1 + 6)) {
  ------------------
  |  Branch (2007:7): [True: 0, False: 2.69k]
  ------------------
 2008|      0|    return DRCDEC_SELECTION_PROCESS_NOT_OK;
 2009|      0|  }
 2010|       |
 2011|  2.69k|  FDKmemset(pDrcInstruction, 0, sizeof(DRC_INSTRUCTIONS_UNI_DRC));
 2012|       |
 2013|  2.69k|  pDrcInstruction->drcSetId = indexVirtual;
 2014|  2.69k|  index++;
 2015|  2.69k|  indexVirtual--;
 2016|  2.69k|  pDrcInstruction->downmixIdCount = 1;
 2017|       |
 2018|  2.69k|  if ((codecMode == SEL_PROC_MPEG_H_3DA) &&
  ------------------
  |  Branch (2018:7): [True: 0, False: 2.69k]
  ------------------
 2019|      0|      (hSelProcInput->numDownmixIdRequests)) {
  ------------------
  |  Branch (2019:7): [True: 0, False: 0]
  ------------------
 2020|      0|    pDrcInstruction->downmixId[0] = hSelProcInput->downmixIdRequested[0];
 2021|  2.69k|  } else {
 2022|  2.69k|    pDrcInstruction->downmixId[0] = DOWNMIX_ID_BASE_LAYOUT;
  ------------------
  |  |  122|  2.69k|#define DOWNMIX_ID_BASE_LAYOUT 0x0
  ------------------
 2023|  2.69k|  }
 2024|       |
 2025|  3.79k|  for (i = 1; i < nMixes; i++) {
  ------------------
  |  Branch (2025:15): [True: 1.10k, False: 2.69k]
  ------------------
 2026|  1.10k|    pDrcInstruction = &(hUniDrcConfig->drcInstructionsUniDrc[index]);
 2027|  1.10k|    FDKmemset(pDrcInstruction, 0, sizeof(DRC_INSTRUCTIONS_UNI_DRC));
 2028|  1.10k|    pDrcInstruction->drcSetId = indexVirtual;
 2029|  1.10k|    pDrcInstruction->downmixId[0] =
 2030|  1.10k|        hUniDrcConfig->downmixInstructions[i - 1].downmixId;
 2031|  1.10k|    pDrcInstruction->downmixIdCount = 1;
 2032|  1.10k|    index++;
 2033|  1.10k|    indexVirtual--;
 2034|  1.10k|  }
 2035|       |
 2036|  2.69k|  hUniDrcConfig->drcInstructionsCountInclVirtual =
 2037|  2.69k|      hUniDrcConfig->drcInstructionsUniDrcCount + nMixes;
 2038|       |
 2039|  2.69k|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 2040|  2.69k|}
drcDec_selectionProcess.cpp:_ZL19_generateOutputInfoP14SEL_PROC_INPUTP26s_selection_process_outputP14UNI_DRC_CONFIGP17LOUDNESS_INFO_SETP21DRCDEC_SELECTION_DATA19SEL_PROC_CODEC_MODE:
 2046|  2.58k|    DRCDEC_SELECTION_DATA* pSelectionData, SEL_PROC_CODEC_MODE codecMode) {
 2047|  2.58k|  DRCDEC_SELECTION_PROCESS_RETURN retVal = DRCDEC_SELECTION_PROCESS_NO_ERROR;
 2048|       |
 2049|  2.58k|  int i, j;
 2050|  2.58k|  int hasDependend = 0;
 2051|  2.58k|  int hasFading = 0;
 2052|  2.58k|  int hasDucking = 0;
 2053|  2.58k|  int selectedDrcSetIds;
 2054|  2.58k|  int selectedDownmixIds;
 2055|  2.58k|  FIXP_DBL mixingLevel = 0;
 2056|  2.58k|  int albumMode = hSelProcInput->albumMode;
 2057|  2.58k|  UCHAR* pDownmixIdRequested = hSelProcInput->downmixIdRequested;
 2058|  2.58k|  FIXP_SGL boost = hSelProcInput->boost;
 2059|  2.58k|  FIXP_SGL compress = hSelProcInput->compress;
 2060|       |
 2061|  2.58k|  hSelProcOutput->numSelectedDrcSets = 1;
 2062|  2.58k|  hSelProcOutput->selectedDrcSetIds[0] = pSelectionData->pInst->drcSetId;
 2063|  2.58k|  hSelProcOutput->selectedDownmixIds[0] =
 2064|  2.58k|      pSelectionData->pInst->drcApplyToDownmix == 1
  ------------------
  |  Branch (2064:7): [True: 15, False: 2.56k]
  ------------------
 2065|  2.58k|          ? pSelectionData->pInst->downmixId[0]
 2066|  2.58k|          : 0;
 2067|  2.58k|  hSelProcOutput->loudnessNormalizationGainDb =
 2068|  2.58k|      pSelectionData->loudnessNormalizationGainDbAdjusted +
 2069|  2.58k|      hSelProcInput->loudnessNormalizationGainModificationDb;
 2070|  2.58k|  hSelProcOutput->outputPeakLevelDb = pSelectionData->outputPeakLevel;
 2071|  2.58k|  hSelProcOutput->outputLoudness = pSelectionData->outputLoudness;
 2072|       |
 2073|  2.58k|  hSelProcOutput->boost = boost;
 2074|  2.58k|  hSelProcOutput->compress = compress;
 2075|  2.58k|  hSelProcOutput->baseChannelCount =
 2076|  2.58k|      hUniDrcConfig->channelLayout.baseChannelCount;
 2077|  2.58k|  hSelProcOutput->targetChannelCount =
 2078|  2.58k|      hUniDrcConfig->channelLayout.baseChannelCount;
 2079|  2.58k|  hSelProcOutput->activeDownmixId =
 2080|  2.58k|      pDownmixIdRequested[pSelectionData->downmixIdRequestIndex];
 2081|       |
 2082|  2.58k|  _getMixingLevel(hLoudnessInfoSet, *pDownmixIdRequested,
 2083|  2.58k|                  hSelProcOutput->selectedDrcSetIds[0], albumMode,
 2084|  2.58k|                  &mixingLevel);
 2085|  2.58k|  hSelProcOutput->mixingLevel = mixingLevel;
 2086|       |
 2087|       |  /*dependent*/
 2088|  2.58k|  if (pSelectionData->pInst->dependsOnDrcSetPresent) {
  ------------------
  |  Branch (2088:7): [True: 103, False: 2.47k]
  ------------------
 2089|    103|    int dependsOnDrcSetID = pSelectionData->pInst->dependsOnDrcSet;
 2090|       |
 2091|    456|    for (i = 0; i < hUniDrcConfig->drcInstructionsCountInclVirtual; i++) {
  ------------------
  |  Branch (2091:17): [True: 415, False: 41]
  ------------------
 2092|    415|      DRC_INSTRUCTIONS_UNI_DRC* pInst =
 2093|    415|          &(hUniDrcConfig->drcInstructionsUniDrc[i]);
 2094|    415|      if (!_drcSetIsUsable(hUniDrcConfig, pInst)) continue;
  ------------------
  |  Branch (2094:11): [True: 90, False: 325]
  ------------------
 2095|       |
 2096|    325|      if (pInst->drcSetId == dependsOnDrcSetID) {
  ------------------
  |  Branch (2096:11): [True: 62, False: 263]
  ------------------
 2097|     62|        hSelProcOutput->selectedDrcSetIds[hSelProcOutput->numSelectedDrcSets] =
 2098|     62|            hUniDrcConfig->drcInstructionsUniDrc[i].drcSetId;
 2099|     62|        hSelProcOutput->selectedDownmixIds[hSelProcOutput->numSelectedDrcSets] =
 2100|     62|            hUniDrcConfig->drcInstructionsUniDrc[i].drcApplyToDownmix == 1
  ------------------
  |  Branch (2100:13): [True: 16, False: 46]
  ------------------
 2101|     62|                ? hUniDrcConfig->drcInstructionsUniDrc[i].downmixId[0]
 2102|     62|                : 0;
 2103|     62|        hSelProcOutput->numSelectedDrcSets++;
 2104|     62|        hasDependend = 1;
 2105|     62|        break;
 2106|     62|      }
 2107|    325|    }
 2108|    103|  }
 2109|       |
 2110|       |  /* fading */
 2111|  2.58k|  if (hSelProcInput->albumMode == 0) {
  ------------------
  |  Branch (2111:7): [True: 2.58k, False: 0]
  ------------------
 2112|  5.32k|    for (i = 0; i < hUniDrcConfig->drcInstructionsUniDrcCount; i++) {
  ------------------
  |  Branch (2112:17): [True: 2.90k, False: 2.41k]
  ------------------
 2113|  2.90k|      DRC_INSTRUCTIONS_UNI_DRC* pInst =
 2114|  2.90k|          &(hUniDrcConfig->drcInstructionsUniDrc[i]);
 2115|  2.90k|      if (!_drcSetIsUsable(hUniDrcConfig, pInst)) continue;
  ------------------
  |  Branch (2115:11): [True: 1.81k, False: 1.08k]
  ------------------
 2116|       |
 2117|  1.08k|      if (pInst->drcSetEffect & EB_FADE) {
  ------------------
  |  Branch (2117:11): [True: 270, False: 819]
  ------------------
 2118|    270|        if (pInst->downmixId[0] == DOWNMIX_ID_ANY_DOWNMIX) {
  ------------------
  |  |  123|    270|#define DOWNMIX_ID_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (2118:13): [True: 107, False: 163]
  ------------------
 2119|    107|          hSelProcOutput->numSelectedDrcSets = hasDependend + 1;
 2120|    107|          hSelProcOutput
 2121|    107|              ->selectedDrcSetIds[hSelProcOutput->numSelectedDrcSets] =
 2122|    107|              hUniDrcConfig->drcInstructionsUniDrc[i].drcSetId;
 2123|    107|          hSelProcOutput
 2124|    107|              ->selectedDownmixIds[hSelProcOutput->numSelectedDrcSets] =
 2125|    107|              hUniDrcConfig->drcInstructionsUniDrc[i].drcApplyToDownmix == 1
  ------------------
  |  Branch (2125:15): [True: 99, False: 8]
  ------------------
 2126|    107|                  ? hUniDrcConfig->drcInstructionsUniDrc[i].downmixId[0]
 2127|    107|                  : 0;
 2128|    107|          hSelProcOutput->numSelectedDrcSets++;
 2129|    107|          hasFading = 1;
 2130|       |
 2131|    163|        } else {
 2132|    163|          retVal = DRCDEC_SELECTION_PROCESS_NOT_OK;
 2133|    163|          if (retVal) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (2133:15): [True: 163, False: 0]
  ------------------
 2134|    163|        }
 2135|    270|      }
 2136|  1.08k|    }
 2137|  2.58k|  }
 2138|       |
 2139|       |  /* ducking */
 2140|  4.98k|  for (i = 0; i < hUniDrcConfig->drcInstructionsUniDrcCount; i++) {
  ------------------
  |  Branch (2140:15): [True: 2.56k, False: 2.41k]
  ------------------
 2141|  2.56k|    DRC_INSTRUCTIONS_UNI_DRC* pInst =
 2142|  2.56k|        &(hUniDrcConfig->drcInstructionsUniDrc[i]);
 2143|  2.56k|    if (!_drcSetIsUsable(hUniDrcConfig, pInst)) continue;
  ------------------
  |  Branch (2143:9): [True: 1.78k, False: 779]
  ------------------
 2144|       |
 2145|    779|    if (pInst->drcSetEffect & (EB_DUCK_OTHER | EB_DUCK_SELF)) {
  ------------------
  |  Branch (2145:9): [True: 372, False: 407]
  ------------------
 2146|  1.06k|      for (j = 0; j < pInst->downmixIdCount; j++) {
  ------------------
  |  Branch (2146:19): [True: 694, False: 372]
  ------------------
 2147|    694|        if (pInst->downmixId[j] == hSelProcOutput->activeDownmixId) {
  ------------------
  |  Branch (2147:13): [True: 300, False: 394]
  ------------------
 2148|    300|          hSelProcOutput->numSelectedDrcSets =
 2149|    300|              hasDependend + 1; /* ducking overrides fading */
 2150|       |
 2151|    300|          hSelProcOutput
 2152|    300|              ->selectedDrcSetIds[hSelProcOutput->numSelectedDrcSets] =
 2153|    300|              hUniDrcConfig->drcInstructionsUniDrc[i].drcSetId;
 2154|       |          /* force ducking DRC set to be processed on base layout */
 2155|    300|          hSelProcOutput
 2156|    300|              ->selectedDownmixIds[hSelProcOutput->numSelectedDrcSets] = 0;
 2157|    300|          hSelProcOutput->numSelectedDrcSets++;
 2158|    300|          hasDucking = 1;
 2159|    300|        }
 2160|    694|      }
 2161|    372|    }
 2162|    779|  }
 2163|       |
 2164|       |  /* repeat for DOWNMIX_ID_BASE_LAYOUT if no ducking found*/
 2165|       |
 2166|  2.41k|  if (!hasDucking) {
  ------------------
  |  Branch (2166:7): [True: 2.26k, False: 150]
  ------------------
 2167|  4.27k|    for (i = 0; i < hUniDrcConfig->drcInstructionsUniDrcCount; i++) {
  ------------------
  |  Branch (2167:17): [True: 2.00k, False: 2.26k]
  ------------------
 2168|  2.00k|      DRC_INSTRUCTIONS_UNI_DRC* pInst =
 2169|  2.00k|          &(hUniDrcConfig->drcInstructionsUniDrc[i]);
 2170|  2.00k|      if (!_drcSetIsUsable(hUniDrcConfig, pInst)) continue;
  ------------------
  |  Branch (2170:11): [True: 1.52k, False: 475]
  ------------------
 2171|       |
 2172|    475|      if (pInst->drcSetEffect & (EB_DUCK_OTHER | EB_DUCK_SELF)) {
  ------------------
  |  Branch (2172:11): [True: 146, False: 329]
  ------------------
 2173|    472|        for (j = 0; j < pInst->downmixIdCount; j++) {
  ------------------
  |  Branch (2173:21): [True: 326, False: 146]
  ------------------
 2174|    326|          if (pInst->downmixId[j] == DOWNMIX_ID_BASE_LAYOUT) {
  ------------------
  |  |  122|    326|#define DOWNMIX_ID_BASE_LAYOUT 0x0
  ------------------
  |  Branch (2174:15): [True: 0, False: 326]
  ------------------
 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|    326|        }
 2185|    146|      }
 2186|    475|    }
 2187|  2.26k|  }
 2188|       |
 2189|  2.41k|  if (hSelProcOutput->numSelectedDrcSets > 3) {
  ------------------
  |  Branch (2189:7): [True: 0, False: 2.41k]
  ------------------
 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.41k|  if (hSelProcOutput->numSelectedDrcSets == 3) {
  ------------------
  |  Branch (2197:7): [True: 14, False: 2.40k]
  ------------------
 2198|     14|    selectedDrcSetIds = hSelProcOutput->selectedDrcSetIds[0];
 2199|     14|    selectedDownmixIds = hSelProcOutput->selectedDownmixIds[0];
 2200|     14|    hSelProcOutput->selectedDrcSetIds[0] = hSelProcOutput->selectedDrcSetIds[2];
 2201|     14|    hSelProcOutput->selectedDownmixIds[0] =
 2202|     14|        hSelProcOutput->selectedDownmixIds[2];
 2203|     14|    hSelProcOutput->selectedDrcSetIds[2] = selectedDrcSetIds;
 2204|     14|    hSelProcOutput->selectedDownmixIds[2] = selectedDownmixIds;
 2205|  2.40k|  } else if (hSelProcOutput->numSelectedDrcSets == 2) {
  ------------------
  |  Branch (2205:14): [True: 210, False: 2.19k]
  ------------------
 2206|    210|    selectedDrcSetIds = hSelProcOutput->selectedDrcSetIds[0];
 2207|    210|    selectedDownmixIds = hSelProcOutput->selectedDownmixIds[0];
 2208|    210|    hSelProcOutput->selectedDrcSetIds[0] = hSelProcOutput->selectedDrcSetIds[1];
 2209|    210|    hSelProcOutput->selectedDownmixIds[0] =
 2210|    210|        hSelProcOutput->selectedDownmixIds[1];
 2211|    210|    hSelProcOutput->selectedDrcSetIds[1] = selectedDrcSetIds;
 2212|    210|    hSelProcOutput->selectedDownmixIds[1] = selectedDownmixIds;
 2213|    210|  }
 2214|       |
 2215|  2.41k|  return retVal;
 2216|  2.41k|}
drcDec_selectionProcess.cpp:_ZL15_getMixingLevelP17LOUDNESS_INFO_SETiiiPi:
 3127|  2.58k|    int drcSetIdRequested, int albumMode, FIXP_DBL* pMixingLevel) {
 3128|  2.58k|  const FIXP_DBL mixingLevelDefault = FL2FXCONST_DBL(85.0f / (float)(1 << 7));
  ------------------
  |  |  192|  2.58k|  (FIXP_DBL)(                                                                \
  |  |  193|  2.58k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 0, Folded]
  |  |  ------------------
  |  |  194|  2.58k|          ? ((((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.58k|          : ((((double)(val) * (DFRACT_FIX_SCALE)-0.5) <=                    \
  |  |  ------------------
  |  |  |  |  147|  2.58k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  2.58k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (198:14): [Folded, False: 2.58k]
  |  |  ------------------
  |  |  199|  2.58k|              (double)(MINVAL_DBL_CONST))                                    \
  |  |  ------------------
  |  |  |  |  176|  2.58k|#define MINVAL_DBL_CONST MINVAL_DBL
  |  |  |  |  ------------------
  |  |  |  |  |  |  158|  2.58k|  ((signed)0x80000000) /* this has to be synchronized to DFRACT_BITS */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  200|  2.58k|                 ? (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.58k|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE)-0.5)))
  |  |  ------------------
  |  |  |  |  147|  2.58k|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|  2.58k|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3129|       |
 3130|  2.58k|  int i;
 3131|  2.58k|  int count;
 3132|       |
 3133|  2.58k|  LOUDNESS_INFO* pLoudnessInfo = NULL;
 3134|       |
 3135|  2.58k|  *pMixingLevel = mixingLevelDefault;
 3136|       |
 3137|  2.58k|  if (drcSetIdRequested < 0) {
  ------------------
  |  Branch (3137:7): [True: 2.37k, False: 210]
  ------------------
 3138|  2.37k|    drcSetIdRequested = 0;
 3139|  2.37k|  }
 3140|       |
 3141|  2.58k|  if (albumMode) {
  ------------------
  |  Branch (3141:7): [True: 0, False: 2.58k]
  ------------------
 3142|      0|    count = hLoudnessInfoSet->loudnessInfoAlbumCount;
 3143|      0|    pLoudnessInfo = hLoudnessInfoSet->loudnessInfoAlbum;
 3144|  2.58k|  } else {
 3145|  2.58k|    count = hLoudnessInfoSet->loudnessInfoCount;
 3146|  2.58k|    pLoudnessInfo = hLoudnessInfoSet->loudnessInfo;
 3147|  2.58k|  }
 3148|       |
 3149|  3.93k|  for (i = 0; i < count; i++) {
  ------------------
  |  Branch (3149:15): [True: 1.36k, False: 2.56k]
  ------------------
 3150|  1.36k|    if ((drcSetIdRequested == pLoudnessInfo[i].drcSetId) &&
  ------------------
  |  Branch (3150:9): [True: 616, False: 749]
  ------------------
 3151|    616|        ((downmixIdRequested == pLoudnessInfo[i].downmixId) ||
  ------------------
  |  Branch (3151:10): [True: 384, False: 232]
  ------------------
 3152|    474|         (DOWNMIX_ID_ANY_DOWNMIX == pLoudnessInfo[i].downmixId))) {
  ------------------
  |  |  123|    232|#define DOWNMIX_ID_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (3152:10): [True: 90, False: 142]
  ------------------
 3153|    474|      int index = _findMethodDefinition(&pLoudnessInfo[i], MD_MIXING_LEVEL, 0);
 3154|       |
 3155|    474|      if (index >= 0) {
  ------------------
  |  Branch (3155:11): [True: 16, False: 458]
  ------------------
 3156|     16|        *pMixingLevel = pLoudnessInfo[i].loudnessMeasurement[index].methodValue;
 3157|     16|        break;
 3158|     16|      }
 3159|    474|    }
 3160|  1.36k|  }
 3161|       |
 3162|  2.58k|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 3163|  2.58k|}
drcDec_selectionProcess.cpp:_ZL21_findMethodDefinitionP13LOUDNESS_INFOii:
 3108|  3.54k|                                 int methodDefinition, int startIndex) {
 3109|  3.54k|  int i;
 3110|  3.54k|  int index = -1;
 3111|       |
 3112|  6.45k|  for (i = startIndex; i < pLoudnessInfo->measurementCount; i++) {
  ------------------
  |  Branch (3112:24): [True: 4.61k, False: 1.84k]
  ------------------
 3113|  4.61k|    if (pLoudnessInfo->loudnessMeasurement[i].methodDefinition ==
  ------------------
  |  Branch (3113:9): [True: 1.69k, False: 2.91k]
  ------------------
 3114|  4.61k|        methodDefinition) {
 3115|  1.69k|      index = i;
 3116|  1.69k|      break;
 3117|  1.69k|    }
 3118|  4.61k|  }
 3119|       |
 3120|  3.54k|  return index;
 3121|  3.54k|}
drcDec_selectionProcess.cpp:_ZL15_drcSetIsUsableP14UNI_DRC_CONFIGP24DRC_INSTRUCTIONS_UNI_DRC:
 1106|  7.88k|                           DRC_INSTRUCTIONS_UNI_DRC* pInst) {
 1107|  7.88k|  int usable = 0;
 1108|  7.88k|  DRC_COEFFICIENTS_UNI_DRC* pCoef =
 1109|  7.88k|      selectDrcCoefficients(hUniDrcConfig, LOCATION_SELECTED);
  ------------------
  |  |  131|  7.88k|  LOCATION_MP4_INSTREAM_UNIDRC /* set to location selected by system */
  |  |  ------------------
  |  |  |  |  127|  7.88k|#define LOCATION_MP4_INSTREAM_UNIDRC 0x1
  |  |  ------------------
  ------------------
 1110|       |
 1111|       |  /* check if ID is unique */
 1112|  7.88k|  if (selectDrcInstructions(hUniDrcConfig, pInst->drcSetId) != pInst) return 0;
  ------------------
  |  Branch (1112:7): [True: 3.72k, False: 4.15k]
  ------------------
 1113|       |  /* sanity check on drcInstructions */
 1114|  4.15k|  _preSelectionRequirement5(pInst, pCoef, &usable);
 1115|  4.15k|  return usable;
 1116|  7.88k|}
drcDec_selectionProcess.cpp:_ZL25_preSelectionRequirement5P24DRC_INSTRUCTIONS_UNI_DRCP24DRC_COEFFICIENTS_UNI_DRCPi:
  961|  9.57k|    DRC_COEFFICIENTS_UNI_DRC* pCoef, int* pMatchFound) {
  962|  9.57k|  int b, i;
  963|       |
  964|  9.57k|  *pMatchFound = 1;
  965|       |
  966|  9.57k|  if (pDrcInstructionUniDrc->drcSetId < 0) /* virtual DRC sets are okay */
  ------------------
  |  Branch (966:7): [True: 3.77k, False: 5.79k]
  ------------------
  967|  3.77k|  {
  968|  3.77k|    return DRCDEC_SELECTION_PROCESS_NO_ERROR;
  969|  3.77k|  }
  970|       |
  971|  5.79k|  if (pCoef == NULL) /* check for parametricDRC */
  ------------------
  |  Branch (971:7): [True: 636, False: 5.15k]
  ------------------
  972|    636|  {
  973|    636|    *pMatchFound = 0; /* parametricDRC not supported */
  974|    636|    return DRCDEC_SELECTION_PROCESS_NO_ERROR;
  975|    636|  }
  976|       |
  977|  5.15k|  if (pCoef->drcLocation !=
  ------------------
  |  Branch (977:7): [True: 814, False: 4.34k]
  ------------------
  978|  5.15k|      pDrcInstructionUniDrc
  979|  5.15k|          ->drcLocation) /* drcLocation must be LOCATION_SELECTED */
  980|    814|  {
  981|    814|    *pMatchFound = 0;
  982|    814|    return DRCDEC_SELECTION_PROCESS_NO_ERROR;
  983|    814|  }
  984|       |
  985|  7.27k|  for (i = 0; i < pDrcInstructionUniDrc->nDrcChannelGroups; i++) {
  ------------------
  |  Branch (985:15): [True: 3.15k, False: 4.12k]
  ------------------
  986|  3.15k|    int indexDrcCoeff = pDrcInstructionUniDrc->gainSetIndexForChannelGroup[i];
  987|  3.15k|    int bandCount = 0;
  988|       |
  989|  3.15k|    if (indexDrcCoeff >= 12) {
  ------------------
  |  Branch (989:9): [True: 120, False: 3.03k]
  ------------------
  990|    120|      *pMatchFound = 0;
  991|    120|      return DRCDEC_SELECTION_PROCESS_NO_ERROR;
  992|    120|    }
  993|       |
  994|  3.03k|    if (indexDrcCoeff > pCoef->gainSetCount - 1) /* check for parametricDRC */
  ------------------
  |  Branch (994:9): [True: 1.63k, False: 1.39k]
  ------------------
  995|  1.63k|    {
  996|  1.63k|      continue;
  997|  1.63k|    }
  998|       |
  999|  1.39k|    GAIN_SET* gainSet = &(pCoef->gainSet[indexDrcCoeff]);
 1000|  1.39k|    bandCount = gainSet->bandCount;
 1001|       |
 1002|  1.39k|    if (bandCount > 4) {
  ------------------
  |  Branch (1002:9): [True: 0, False: 1.39k]
  ------------------
 1003|      0|      *pMatchFound = 0;
 1004|      0|    }
 1005|       |
 1006|  2.83k|    for (b = 0; b < bandCount; b++) {
  ------------------
  |  Branch (1006:17): [True: 1.54k, False: 1.29k]
  ------------------
 1007|  1.54k|      if ((gainSet->gainSequenceIndex[b] >= 12) ||
  ------------------
  |  Branch (1007:11): [True: 57, False: 1.48k]
  ------------------
 1008|  1.48k|          (gainSet->gainSequenceIndex[b] >= pCoef->gainSequenceCount)) {
  ------------------
  |  Branch (1008:11): [True: 47, False: 1.43k]
  ------------------
 1009|    104|        *pMatchFound = 0;
 1010|    104|        return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1011|    104|      }
 1012|  1.54k|    }
 1013|  1.39k|  }
 1014|       |
 1015|  4.12k|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1016|  4.34k|}
drcDec_selectionProcess.cpp:_ZL20_selectDownmixMatrixP26s_selection_process_outputP14UNI_DRC_CONFIG:
 2220|  2.41k|    HANDLE_UNI_DRC_CONFIG hUniDrcConfig) {
 2221|  2.41k|  int i;
 2222|  2.41k|  hSelProcOutput->baseChannelCount =
 2223|  2.41k|      hUniDrcConfig->channelLayout.baseChannelCount;
 2224|  2.41k|  hSelProcOutput->targetChannelCount =
 2225|  2.41k|      hUniDrcConfig->channelLayout.baseChannelCount;
 2226|  2.41k|  hSelProcOutput->targetLayout = -1;
 2227|  2.41k|  hSelProcOutput->downmixMatrixPresent = 0;
 2228|       |
 2229|  2.41k|  if (hSelProcOutput->activeDownmixId != 0) {
  ------------------
  |  Branch (2229:7): [True: 0, False: 2.41k]
  ------------------
 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.41k|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 2264|  2.41k|}
drcDec_selectionProcess.cpp:_ZL19_drcSetPreSelectionP14SEL_PROC_INPUTP14UNI_DRC_CONFIGP17LOUDNESS_INFO_SETPP16DRCDEC_SELECTIONS7_19SEL_PROC_CODEC_MODE:
 2270|  2.69k|    DRCDEC_SELECTION** ppCandidatesSelected, SEL_PROC_CODEC_MODE codecMode) {
 2271|  2.69k|  DRCDEC_SELECTION_PROCESS_RETURN retVal = DRCDEC_SELECTION_PROCESS_NO_ERROR;
 2272|  2.69k|  int i, j;
 2273|       |
 2274|  5.37k|  for (i = 0; i < hSelProcInput->numDownmixIdRequests; i++) {
  ------------------
  |  Branch (2274:15): [True: 2.69k, False: 2.67k]
  ------------------
 2275|  10.2k|    for (j = 0; j < hUniDrcConfig->drcInstructionsCountInclVirtual; j++) {
  ------------------
  |  Branch (2275:17): [True: 7.52k, False: 2.67k]
  ------------------
 2276|  7.52k|      DRC_INSTRUCTIONS_UNI_DRC* pDrcInstruction =
 2277|  7.52k|          &(hUniDrcConfig->drcInstructionsUniDrc[j]);
 2278|       |      /* check if ID is unique */
 2279|  7.52k|      if (selectDrcInstructions(hUniDrcConfig, pDrcInstruction->drcSetId) !=
  ------------------
  |  Branch (2279:11): [True: 1.49k, False: 6.03k]
  ------------------
 2280|  7.52k|          pDrcInstruction)
 2281|  1.49k|        continue;
 2282|       |
 2283|  6.03k|      retVal = _drcSetPreSelectionSingleInstruction(
 2284|  6.03k|          hSelProcInput, i, hUniDrcConfig, hLoudnessInfoSet, pDrcInstruction,
 2285|  6.03k|          *ppCandidatesPotential, *ppCandidatesSelected, codecMode);
 2286|  6.03k|      if (retVal) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (2286:11): [True: 14, False: 6.01k]
  ------------------
 2287|  6.03k|    }
 2288|  2.69k|  }
 2289|       |
 2290|  2.67k|  retVal = _preSelectionRequirement9(hSelProcInput, *ppCandidatesPotential,
 2291|  2.67k|                                     *ppCandidatesSelected);
 2292|  2.67k|  if (retVal) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (2292:7): [True: 0, False: 2.67k]
  ------------------
 2293|       |
 2294|  2.67k|  if (_drcdec_selection_getNumber(*ppCandidatesSelected) == 0) {
  ------------------
  |  Branch (2294:7): [True: 189, False: 2.48k]
  ------------------
 2295|    189|    retVal = _drcSetSelectionAddCandidates(
 2296|    189|        hSelProcInput, *ppCandidatesPotential, *ppCandidatesSelected);
 2297|    189|    if (retVal) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (2297:9): [True: 0, False: 189]
  ------------------
 2298|    189|  }
 2299|       |
 2300|  2.67k|  return retVal;
 2301|  2.67k|}
drcDec_selectionProcess.cpp:_ZL36_drcSetPreSelectionSingleInstructionP14SEL_PROC_INPUTiP14UNI_DRC_CONFIGP17LOUDNESS_INFO_SETP24DRC_INSTRUCTIONS_UNI_DRCP16DRCDEC_SELECTIONS8_19SEL_PROC_CODEC_MODE:
 1261|  6.03k|    DRCDEC_SELECTION* pCandidatesSelected, SEL_PROC_CODEC_MODE codecMode) {
 1262|  6.03k|  DRCDEC_SELECTION_PROCESS_RETURN retVal = DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1263|  6.03k|  int matchFound = 0;
 1264|  6.03k|  DRC_COEFFICIENTS_UNI_DRC* pCoef =
 1265|  6.03k|      selectDrcCoefficients(hUniDrcConfig, LOCATION_SELECTED);
  ------------------
  |  |  131|  6.03k|  LOCATION_MP4_INSTREAM_UNIDRC /* set to location selected by system */
  |  |  ------------------
  |  |  |  |  127|  6.03k|#define LOCATION_MP4_INSTREAM_UNIDRC 0x1
  |  |  ------------------
  ------------------
 1266|       |
 1267|  6.03k|  retVal = _preSelectionRequirement123(
 1268|  6.03k|      hSelProcInput->downmixIdRequested[downmixIdIndex], pDrcInstructionUniDrc,
 1269|  6.03k|      &matchFound);
 1270|       |
 1271|  6.03k|  if (!retVal && matchFound)
  ------------------
  |  Branch (1271:7): [True: 6.03k, False: 0]
  |  Branch (1271:18): [True: 5.74k, False: 289]
  ------------------
 1272|  5.74k|    retVal = _preSelectionRequirement4(pDrcInstructionUniDrc,
 1273|  5.74k|                                       hSelProcInput->dynamicRangeControlOn,
 1274|  5.74k|                                       &matchFound);
 1275|       |
 1276|  6.03k|  if (!retVal && matchFound)
  ------------------
  |  Branch (1276:7): [True: 6.03k, False: 0]
  |  Branch (1276:18): [True: 5.41k, False: 616]
  ------------------
 1277|  5.41k|    retVal =
 1278|  5.41k|        _preSelectionRequirement5(pDrcInstructionUniDrc, pCoef, &matchFound);
 1279|       |
 1280|  6.03k|  if (!retVal && matchFound)
  ------------------
  |  Branch (1280:7): [True: 6.03k, False: 0]
  |  Branch (1280:18): [True: 5.23k, False: 800]
  ------------------
 1281|  5.23k|    retVal = _preSelectionRequirement6(pDrcInstructionUniDrc, &matchFound);
 1282|       |
 1283|  6.03k|  if (!retVal && matchFound)
  ------------------
  |  Branch (1283:7): [True: 6.03k, False: 0]
  |  Branch (1283:18): [True: 5.20k, False: 828]
  ------------------
 1284|  5.20k|    retVal = _preSelectionRequirement7(pDrcInstructionUniDrc, &matchFound);
 1285|       |
 1286|  6.03k|  if (!retVal && matchFound)
  ------------------
  |  Branch (1286:7): [True: 6.03k, False: 0]
  |  Branch (1286:18): [True: 5.18k, False: 843]
  ------------------
 1287|  5.18k|    retVal = _preSelectionRequirement8(
 1288|  5.18k|        hSelProcInput, downmixIdIndex, hUniDrcConfig, hLoudnessInfoSet,
 1289|  5.18k|        pDrcInstructionUniDrc, pCandidatesPotential, pCandidatesSelected,
 1290|  5.18k|        codecMode);
 1291|       |
 1292|  6.03k|  return retVal;
 1293|  6.03k|}
drcDec_selectionProcess.cpp:_ZL27_preSelectionRequirement123iP24DRC_INSTRUCTIONS_UNI_DRCPi:
  920|  6.03k|    int* pMatchFound) {
  921|  6.03k|  int i;
  922|  6.03k|  *pMatchFound = 0;
  923|       |
  924|  6.74k|  for (i = 0; i < pDrcInstructionUniDrc->downmixIdCount; i++) {
  ------------------
  |  Branch (924:15): [True: 6.46k, False: 289]
  ------------------
  925|  6.46k|    if ((pDrcInstructionUniDrc->downmixId[i] == nRequestedDownmixId) ||
  ------------------
  |  Branch (925:9): [True: 5.43k, False: 1.02k]
  ------------------
  926|  1.02k|        (pDrcInstructionUniDrc->downmixId[i] == DOWNMIX_ID_ANY_DOWNMIX) ||
  ------------------
  |  |  123|  1.02k|#define DOWNMIX_ID_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (926:9): [True: 310, False: 717]
  ------------------
  927|    717|        ((pDrcInstructionUniDrc->downmixId[i] == DOWNMIX_ID_BASE_LAYOUT) &&
  ------------------
  |  |  122|    717|#define DOWNMIX_ID_BASE_LAYOUT 0x0
  ------------------
  |  Branch (927:10): [True: 0, False: 717]
  ------------------
  928|  5.74k|         (pDrcInstructionUniDrc->drcSetId > 0))) {
  ------------------
  |  Branch (928:10): [True: 0, False: 0]
  ------------------
  929|  5.74k|      *pMatchFound = 1;
  930|  5.74k|      break;
  931|  5.74k|    }
  932|  6.46k|  }
  933|       |
  934|  6.03k|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
  935|  6.03k|}
drcDec_selectionProcess.cpp:_ZL25_preSelectionRequirement4P24DRC_INSTRUCTIONS_UNI_DRCiPi:
  940|  5.74k|    int* pMatchFound) {
  941|  5.74k|  *pMatchFound = 0;
  942|       |
  943|  5.74k|  if (nDynamicRangeControlOn == 1) {
  ------------------
  |  Branch (943:7): [True: 5.74k, False: 0]
  ------------------
  944|  5.74k|    if ((pDrcInstruction->drcSetEffect != EB_FADE) &&
  ------------------
  |  Branch (944:9): [True: 5.73k, False: 12]
  ------------------
  945|  5.73k|        (pDrcInstruction->drcSetEffect != EB_DUCK_OTHER) &&
  ------------------
  |  Branch (945:9): [True: 5.72k, False: 10]
  ------------------
  946|  5.72k|        (pDrcInstruction->drcSetEffect != EB_DUCK_SELF) &&
  ------------------
  |  Branch (946:9): [True: 5.70k, False: 19]
  ------------------
  947|  5.70k|        (pDrcInstruction->drcSetEffect != 0 || pDrcInstruction->drcSetId < 0)) {
  ------------------
  |  Branch (947:10): [True: 1.70k, False: 3.99k]
  |  Branch (947:48): [True: 3.70k, False: 286]
  ------------------
  948|  5.41k|      *pMatchFound = 1;
  949|  5.41k|    }
  950|  5.74k|  } else {
  951|      0|    *pMatchFound = 1;
  952|      0|  }
  953|       |
  954|  5.74k|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
  955|  5.74k|}
drcDec_selectionProcess.cpp:_ZL25_preSelectionRequirement6P24DRC_INSTRUCTIONS_UNI_DRCPi:
 1020|  5.23k|    DRC_INSTRUCTIONS_UNI_DRC* pDrcInstructionUniDrc, int* pMatchFound) {
 1021|  5.23k|  *pMatchFound = 0;
 1022|       |
 1023|  5.23k|  if (((pDrcInstructionUniDrc->dependsOnDrcSetPresent == 0) &&
  ------------------
  |  Branch (1023:8): [True: 4.86k, False: 364]
  ------------------
 1024|  4.86k|       (pDrcInstructionUniDrc->noIndependentUse == 0)) ||
  ------------------
  |  Branch (1024:8): [True: 4.84k, False: 28]
  ------------------
 1025|  5.20k|      (pDrcInstructionUniDrc->dependsOnDrcSetPresent == 1)) {
  ------------------
  |  Branch (1025:7): [True: 364, False: 28]
  ------------------
 1026|  5.20k|    *pMatchFound = 1;
 1027|  5.20k|  }
 1028|       |
 1029|  5.23k|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1030|  5.23k|}
drcDec_selectionProcess.cpp:_ZL25_preSelectionRequirement7P24DRC_INSTRUCTIONS_UNI_DRCPi:
 1034|  5.20k|    DRC_INSTRUCTIONS_UNI_DRC* pDrcInstructionUniDrc, int* pMatchFound) {
 1035|  5.20k|  *pMatchFound = 1;
 1036|       |
 1037|  5.20k|  if (pDrcInstructionUniDrc->requiresEq) {
  ------------------
  |  Branch (1037:7): [True: 15, False: 5.18k]
  ------------------
 1038|       |    /* EQ is not supported */
 1039|     15|    *pMatchFound = 0;
 1040|     15|  }
 1041|       |
 1042|  5.20k|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1043|  5.20k|}
drcDec_selectionProcess.cpp:_ZL25_preSelectionRequirement8P14SEL_PROC_INPUTiP14UNI_DRC_CONFIGP17LOUDNESS_INFO_SETP24DRC_INSTRUCTIONS_UNI_DRCP16DRCDEC_SELECTIONS8_19SEL_PROC_CODEC_MODE:
 1126|  5.18k|    DRCDEC_SELECTION* pCandidatesSelected, SEL_PROC_CODEC_MODE codecMode) {
 1127|  5.18k|  DRCDEC_SELECTION_PROCESS_RETURN retVal = DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1128|  5.18k|  int explicitPeakInformationPresent;
 1129|  5.18k|  FIXP_DBL signalPeakLevel;
 1130|  5.18k|  int addToCandidate = 0;
 1131|       |
 1132|  5.18k|  FIXP_DBL loudnessNormalizationGainDb;
 1133|  5.18k|  FIXP_DBL loudness;
 1134|       |
 1135|  5.18k|  FIXP_DBL loudnessDeviationMax =
 1136|  5.18k|      ((FIXP_DBL)hSelProcInput->loudnessDeviationMax) << (DFRACT_BITS - 1 - 7);
  ------------------
  |  |  113|  5.18k|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1137|       |
 1138|  5.18k|  {
 1139|  5.18k|    retVal = _getLoudness(hLoudnessInfoSet, hSelProcInput->albumMode,
 1140|  5.18k|                          hSelProcInput->loudnessMeasurementMethod,
 1141|  5.18k|                          hSelProcInput->loudnessMeasurementSystem,
 1142|  5.18k|                          hSelProcInput->targetLoudness,
 1143|  5.18k|                          pDrcInstructionUniDrc->drcSetId,
 1144|  5.18k|                          hSelProcInput->downmixIdRequested[downmixIdIndex],
 1145|  5.18k|                          &loudnessNormalizationGainDb, &loudness);
 1146|  5.18k|    if (retVal) return (retVal);
  ------------------
  |  Branch (1146:9): [True: 14, False: 5.17k]
  ------------------
 1147|  5.18k|  }
 1148|       |
 1149|  5.17k|  if (!hSelProcInput->loudnessNormalizationOn) {
  ------------------
  |  Branch (1149:7): [True: 0, False: 5.17k]
  ------------------
 1150|      0|    loudnessNormalizationGainDb = (FIXP_DBL)0;
 1151|      0|  }
 1152|       |
 1153|  5.17k|  retVal = _getSignalPeakLevel(
 1154|  5.17k|      hSelProcInput, hUniDrcConfig, hLoudnessInfoSet, pDrcInstructionUniDrc,
 1155|  5.17k|      hSelProcInput->downmixIdRequested[downmixIdIndex],
 1156|  5.17k|      &explicitPeakInformationPresent, &signalPeakLevel, codecMode
 1157|       |
 1158|  5.17k|  );
 1159|  5.17k|  if (retVal) return (retVal);
  ------------------
  |  Branch (1159:7): [True: 0, False: 5.17k]
  ------------------
 1160|       |
 1161|  5.17k|  if (hSelProcInput->dynamicRangeControlOn) {
  ------------------
  |  Branch (1161:7): [True: 5.17k, False: 0]
  ------------------
 1162|  5.17k|    if (explicitPeakInformationPresent == 0) {
  ------------------
  |  Branch (1162:9): [True: 3.90k, False: 1.26k]
  ------------------
 1163|  3.90k|      if (pDrcInstructionUniDrc->drcSetTargetLoudnessPresent &&
  ------------------
  |  Branch (1163:11): [True: 194, False: 3.71k]
  ------------------
 1164|    194|          ((hSelProcInput->loudnessNormalizationOn &&
  ------------------
  |  Branch (1164:13): [True: 194, False: 0]
  ------------------
 1165|    194|            _targetLoudnessInRange(pDrcInstructionUniDrc,
  ------------------
  |  Branch (1165:13): [True: 138, False: 56]
  ------------------
 1166|    194|                                   hSelProcInput->targetLoudness)) ||
 1167|    138|           !hSelProcInput->loudnessNormalizationOn)) {
  ------------------
  |  Branch (1167:12): [True: 0, False: 56]
  ------------------
 1168|    138|        DRCDEC_SELECTION_DATA* pData =
 1169|    138|            _drcdec_selection_addNew(pCandidatesSelected);
 1170|    138|        if (pData == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1170:13): [True: 0, False: 138]
  ------------------
 1171|       |
 1172|    138|        _setSelectionDataInfo(pData, loudness, loudnessNormalizationGainDb,
 1173|    138|                              hSelProcInput->loudnessNormalizationGainDbMax,
 1174|    138|                              loudnessDeviationMax, signalPeakLevel,
 1175|    138|                              hSelProcInput->outputPeakLevelMax, 0);
 1176|    138|        pData->downmixIdRequestIndex = downmixIdIndex;
 1177|    138|        pData->pInst = pDrcInstructionUniDrc;
 1178|    138|        pData->selectionFlag =
 1179|    138|            1; /* signal pre-selection step dealing with drcSetTargetLoudness */
 1180|       |
 1181|    138|        if (hSelProcInput->loudnessNormalizationOn) {
  ------------------
  |  Branch (1181:13): [True: 138, False: 0]
  ------------------
 1182|    138|          pData->outputPeakLevel =
 1183|    138|              hSelProcInput->targetLoudness -
 1184|    138|              (((FIXP_DBL)pData->pInst->drcSetTargetLoudnessValueUpper)
 1185|    138|               << (DFRACT_BITS - 1 - 7));
  ------------------
  |  |  113|    138|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1186|    138|        } else {
 1187|      0|          pData->outputPeakLevel = (FIXP_DBL)0;
 1188|      0|        }
 1189|  3.76k|      } else {
 1190|  3.76k|        if ((!hSelProcInput->loudnessNormalizationOn) ||
  ------------------
  |  Branch (1190:13): [True: 0, False: 3.76k]
  ------------------
 1191|  3.76k|            (!pDrcInstructionUniDrc->drcSetTargetLoudnessPresent) ||
  ------------------
  |  Branch (1191:13): [True: 3.71k, False: 56]
  ------------------
 1192|     56|            (hSelProcInput->loudnessNormalizationOn &&
  ------------------
  |  Branch (1192:14): [True: 56, False: 0]
  ------------------
 1193|     56|             _targetLoudnessInRange(pDrcInstructionUniDrc,
  ------------------
  |  Branch (1193:14): [True: 0, False: 56]
  ------------------
 1194|  3.71k|                                    hSelProcInput->targetLoudness))) {
 1195|  3.71k|          addToCandidate = 1;
 1196|  3.71k|        }
 1197|  3.76k|      }
 1198|  3.90k|    } else {
 1199|  1.26k|      addToCandidate = 1;
 1200|  1.26k|    }
 1201|       |
 1202|  5.17k|    if (addToCandidate) {
  ------------------
  |  Branch (1202:9): [True: 4.98k, False: 194]
  ------------------
 1203|  4.98k|      DRCDEC_SELECTION_DATA* pData =
 1204|  4.98k|          _drcdec_selection_addNew(pCandidatesPotential);
 1205|  4.98k|      if (pData == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1205:11): [True: 0, False: 4.98k]
  ------------------
 1206|       |
 1207|  4.98k|      _setSelectionDataInfo(pData, loudness, loudnessNormalizationGainDb,
 1208|  4.98k|                            hSelProcInput->loudnessNormalizationGainDbMax,
 1209|  4.98k|                            loudnessDeviationMax, signalPeakLevel,
 1210|  4.98k|                            hSelProcInput->outputPeakLevelMax, 0);
 1211|  4.98k|      pData->downmixIdRequestIndex = downmixIdIndex;
 1212|  4.98k|      pData->pInst = pDrcInstructionUniDrc;
 1213|  4.98k|      pData->selectionFlag = 0;
 1214|  4.98k|    }
 1215|  5.17k|  } 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.17k|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1233|  5.17k|}
drcDec_selectionProcess.cpp:_ZL12_getLoudnessP17LOUDNESS_INFO_SETi25METHOD_DEFINITION_REQUEST26MEASUREMENT_SYSTEM_REQUESTiiiPiS3_:
 2650|  5.18k|{
 2651|  5.18k|  int index;
 2652|       |
 2653|  5.18k|  LOUDNESS_INFO* pLoudnessInfo = NULL;
 2654|  5.18k|  VALUE_ORDER valueOrder;
 2655|       |
 2656|       |  /* map MDR_DEFAULT to MDR_PROGRAM_LOUDNESS */
 2657|  5.18k|  METHOD_DEFINITION_REQUEST requestedMethodDefinition =
 2658|  5.18k|      measurementMethodRequested < MDR_ANCHOR_LOUDNESS ? MDR_PROGRAM_LOUDNESS
  ------------------
  |  Branch (2658:7): [True: 0, False: 5.18k]
  ------------------
 2659|  5.18k|                                                       : MDR_ANCHOR_LOUDNESS;
 2660|       |
 2661|  5.18k|  if (measurementMethodRequested > MDR_ANCHOR_LOUDNESS) {
  ------------------
  |  Branch (2661:7): [True: 0, False: 5.18k]
  ------------------
 2662|      0|    return DRCDEC_SELECTION_PROCESS_NOT_OK;
 2663|      0|  }
 2664|       |
 2665|  5.18k|  _initValueOrder(&valueOrder);
 2666|       |
 2667|  5.18k|  *pLoudness = UNDEFINED_LOUDNESS_VALUE;
  ------------------
  |  |  114|  5.18k|#define UNDEFINED_LOUDNESS_VALUE (FIXP_DBL)(MAXVAL_DBL - 1)
  |  |  ------------------
  |  |  |  |  156|  5.18k|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  ------------------
 2668|  5.18k|  *pLoudnessNormalizationGain = (FIXP_DBL)0;
 2669|       |
 2670|  5.18k|  if (drcSetId < 0) {
  ------------------
  |  Branch (2670:7): [True: 3.70k, False: 1.48k]
  ------------------
 2671|  3.70k|    drcSetId = 0;
 2672|  3.70k|  }
 2673|       |
 2674|  5.18k|  pLoudnessInfo = _getApplicableLoudnessInfoStructure(
 2675|  5.18k|      hLoudnessInfoSet, drcSetId, downmixIdRequested, albumMode);
 2676|       |
 2677|  5.18k|  if (albumMode && (pLoudnessInfo == NULL)) {
  ------------------
  |  Branch (2677:7): [True: 0, False: 5.18k]
  |  Branch (2677:20): [True: 0, False: 0]
  ------------------
 2678|      0|    pLoudnessInfo = _getApplicableLoudnessInfoStructure(
 2679|      0|        hLoudnessInfoSet, drcSetId, downmixIdRequested, 0);
 2680|      0|  }
 2681|       |
 2682|  5.18k|  if (pLoudnessInfo == NULL) {
  ------------------
  |  Branch (2682:7): [True: 4.34k, False: 840]
  ------------------
 2683|  4.34k|    return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 2684|  4.34k|  }
 2685|       |
 2686|    840|  index = -1;
 2687|       |
 2688|  1.52k|  do {
 2689|  1.52k|    index = _findMethodDefinition(pLoudnessInfo, requestedMethodDefinition,
 2690|  1.52k|                                  index + 1);
 2691|       |
 2692|  1.52k|    if (index >= 0) {
  ------------------
  |  Branch (2692:9): [True: 687, False: 840]
  ------------------
 2693|    687|      _getMethodValue(
 2694|    687|          &valueOrder, pLoudnessInfo->loudnessMeasurement[index].methodValue,
 2695|    687|          pLoudnessInfo->loudnessMeasurement[index].measurementSystem,
 2696|    687|          measurementSystemRequested);
 2697|    687|    }
 2698|  1.52k|  } while (index >= 0);
  ------------------
  |  Branch (2698:12): [True: 687, False: 840]
  ------------------
 2699|       |
 2700|       |  /* repeat with other method definition */
 2701|    840|  if (valueOrder.order == -1) {
  ------------------
  |  Branch (2701:7): [True: 547, False: 293]
  ------------------
 2702|    547|    index = -1;
 2703|       |
 2704|  1.54k|    do {
 2705|  1.54k|      index = _findMethodDefinition(
 2706|  1.54k|          pLoudnessInfo,
 2707|  1.54k|          requestedMethodDefinition == MDR_PROGRAM_LOUDNESS
  ------------------
  |  Branch (2707:11): [True: 0, False: 1.54k]
  ------------------
 2708|  1.54k|              ? MDR_ANCHOR_LOUDNESS
 2709|  1.54k|              : MDR_PROGRAM_LOUDNESS,
 2710|  1.54k|          index + 1);
 2711|       |
 2712|  1.54k|      if (index >= 0) {
  ------------------
  |  Branch (2712:11): [True: 996, False: 547]
  ------------------
 2713|    996|        _getMethodValue(
 2714|    996|            &valueOrder, pLoudnessInfo->loudnessMeasurement[index].methodValue,
 2715|    996|            pLoudnessInfo->loudnessMeasurement[index].measurementSystem,
 2716|    996|            measurementSystemRequested);
 2717|    996|      }
 2718|  1.54k|    } while (index >= 0);
  ------------------
  |  Branch (2718:14): [True: 996, False: 547]
  ------------------
 2719|    547|  }
 2720|       |
 2721|    840|  if (valueOrder.order == -1) {
  ------------------
  |  Branch (2721:7): [True: 14, False: 826]
  ------------------
 2722|     14|    return DRCDEC_SELECTION_PROCESS_NOT_OK;
 2723|    826|  } else {
 2724|    826|    *pLoudnessNormalizationGain = targetLoudness - valueOrder.value;
 2725|    826|    *pLoudness = valueOrder.value;
 2726|    826|  }
 2727|       |
 2728|    826|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 2729|    840|}
drcDec_selectionProcess.cpp:_ZL35_getApplicableLoudnessInfoStructureP17LOUDNESS_INFO_SETiii:
 2529|  5.18k|    int downmixIdRequested, int albumMode) {
 2530|  5.18k|  LOUDNESS_INFO* pLoudnessInfo = NULL;
 2531|       |
 2532|       |  /* default value */
 2533|  5.18k|  pLoudnessInfo = _getLoudnessInfoStructure(hLoudnessInfoSet, drcSetId,
 2534|  5.18k|                                            downmixIdRequested, albumMode);
 2535|       |
 2536|       |  /* fallback values */
 2537|  5.18k|  if (pLoudnessInfo == NULL) {
  ------------------
  |  Branch (2537:7): [True: 4.94k, False: 244]
  ------------------
 2538|  4.94k|    pLoudnessInfo =
 2539|  4.94k|        _getLoudnessInfoStructure(hLoudnessInfoSet, drcSetId, 0x7F, albumMode);
 2540|  4.94k|  }
 2541|       |
 2542|  5.18k|  if (pLoudnessInfo == NULL) {
  ------------------
  |  Branch (2542:7): [True: 4.84k, False: 349]
  ------------------
 2543|  4.84k|    pLoudnessInfo = _getLoudnessInfoStructure(hLoudnessInfoSet, 0x3F,
 2544|  4.84k|                                              downmixIdRequested, albumMode);
 2545|  4.84k|  }
 2546|       |
 2547|  5.18k|  if (pLoudnessInfo == NULL) {
  ------------------
  |  Branch (2547:7): [True: 4.67k, False: 512]
  ------------------
 2548|  4.67k|    pLoudnessInfo = _getLoudnessInfoStructure(hLoudnessInfoSet, 0,
 2549|  4.67k|                                              downmixIdRequested, albumMode);
 2550|  4.67k|  }
 2551|       |
 2552|  5.18k|  if (pLoudnessInfo == NULL) {
  ------------------
  |  Branch (2552:7): [True: 4.55k, False: 630]
  ------------------
 2553|  4.55k|    pLoudnessInfo =
 2554|  4.55k|        _getLoudnessInfoStructure(hLoudnessInfoSet, 0x3F, 0x7F, albumMode);
 2555|  4.55k|  }
 2556|       |
 2557|  5.18k|  if (pLoudnessInfo == NULL) {
  ------------------
  |  Branch (2557:7): [True: 4.42k, False: 760]
  ------------------
 2558|  4.42k|    pLoudnessInfo =
 2559|  4.42k|        _getLoudnessInfoStructure(hLoudnessInfoSet, 0, 0x7F, albumMode);
 2560|  4.42k|  }
 2561|       |
 2562|  5.18k|  if (pLoudnessInfo == NULL) {
  ------------------
  |  Branch (2562:7): [True: 4.34k, False: 840]
  ------------------
 2563|  4.34k|    pLoudnessInfo =
 2564|  4.34k|        _getLoudnessInfoStructure(hLoudnessInfoSet, drcSetId, 0, albumMode);
 2565|  4.34k|  }
 2566|       |
 2567|  5.18k|  if (pLoudnessInfo == NULL) {
  ------------------
  |  Branch (2567:7): [True: 4.34k, False: 840]
  ------------------
 2568|  4.34k|    pLoudnessInfo =
 2569|  4.34k|        _getLoudnessInfoStructure(hLoudnessInfoSet, 0x3F, 0, albumMode);
 2570|  4.34k|  }
 2571|       |
 2572|  5.18k|  if (pLoudnessInfo == NULL) {
  ------------------
  |  Branch (2572:7): [True: 4.34k, False: 840]
  ------------------
 2573|  4.34k|    pLoudnessInfo =
 2574|  4.34k|        _getLoudnessInfoStructure(hLoudnessInfoSet, 0, 0, albumMode);
 2575|  4.34k|  }
 2576|       |
 2577|  5.18k|  return pLoudnessInfo;
 2578|  5.18k|}
drcDec_selectionProcess.cpp:_ZL25_getLoudnessInfoStructureP17LOUDNESS_INFO_SETiii:
 2498|  41.6k|    int albumMode) {
 2499|  41.6k|  int i, j;
 2500|  41.6k|  int count;
 2501|       |
 2502|  41.6k|  LOUDNESS_INFO* pLoudnessInfo = NULL;
 2503|       |
 2504|  41.6k|  if (albumMode) {
  ------------------
  |  Branch (2504:7): [True: 0, False: 41.6k]
  ------------------
 2505|      0|    count = hLoudnessInfoSet->loudnessInfoAlbumCount;
 2506|      0|    pLoudnessInfo = hLoudnessInfoSet->loudnessInfoAlbum;
 2507|  41.6k|  } else {
 2508|  41.6k|    count = hLoudnessInfoSet->loudnessInfoCount;
 2509|  41.6k|    pLoudnessInfo = hLoudnessInfoSet->loudnessInfo;
 2510|  41.6k|  }
 2511|       |
 2512|  90.2k|  for (i = 0; i < count; i++) {
  ------------------
  |  Branch (2512:15): [True: 49.4k, False: 40.8k]
  ------------------
 2513|  49.4k|    if ((pLoudnessInfo[i].drcSetId == drcSetId) &&
  ------------------
  |  Branch (2513:9): [True: 18.8k, False: 30.6k]
  ------------------
 2514|  18.8k|        (pLoudnessInfo[i].downmixId == downmixId)) {
  ------------------
  |  Branch (2514:9): [True: 8.65k, False: 10.1k]
  ------------------
 2515|  12.5k|      for (j = 0; j < pLoudnessInfo[i].measurementCount; j++) {
  ------------------
  |  Branch (2515:19): [True: 4.69k, False: 7.81k]
  ------------------
 2516|  4.69k|        if ((pLoudnessInfo[i].loudnessMeasurement[j].methodDefinition == 1) ||
  ------------------
  |  Branch (2516:13): [True: 524, False: 4.16k]
  ------------------
 2517|  4.16k|            (pLoudnessInfo[i].loudnessMeasurement[j].methodDefinition == 2)) {
  ------------------
  |  Branch (2517:13): [True: 316, False: 3.85k]
  ------------------
 2518|    840|          return &pLoudnessInfo[i];
 2519|    840|        }
 2520|  4.69k|      }
 2521|  8.65k|    }
 2522|  49.4k|  }
 2523|       |
 2524|  40.8k|  return NULL;
 2525|  41.6k|}
drcDec_selectionProcess.cpp:_ZL15_getMethodValueP11VALUE_ORDERiii:
 2608|  1.68k|    int measurementSystemRequested) {
 2609|  1.68k|  const int rows = 11;
 2610|  1.68k|  const int columns = 12;
 2611|  1.68k|  const int pOrdering[rows][columns] = {
 2612|  1.68k|      {0, 0, 8, 0, 1, 3, 0, 5, 6, 7, 4, 2}, /* default = bonus1770 */
 2613|  1.68k|      {0, 0, 8, 0, 1, 3, 0, 5, 6, 7, 4, 2}, /* bonus1770 */
 2614|  1.68k|      {0, 0, 1, 0, 8, 5, 0, 2, 3, 4, 6, 7}, /* bonusUser */
 2615|  1.68k|      {0, 0, 3, 0, 1, 8, 0, 4, 5, 6, 7, 2}, /* bonusExpert */
 2616|  1.68k|      {0, 0, 5, 0, 1, 3, 0, 8, 6, 7, 4, 2}, /* ResA */
 2617|  1.68k|      {0, 0, 5, 0, 1, 3, 0, 6, 8, 7, 4, 2}, /* ResB */
 2618|  1.68k|      {0, 0, 5, 0, 1, 3, 0, 6, 7, 8, 4, 2}, /* ResC */
 2619|  1.68k|      {0, 0, 3, 0, 1, 7, 0, 4, 5, 6, 8, 2}, /* ResD */
 2620|  1.68k|      {0, 0, 1, 0, 7, 5, 0, 2, 3, 4, 6, 8}, /* ResE */
 2621|  1.68k|      {0, 0, 1, 0, 0, 0, 0, 2, 3, 4, 0, 0}, /* ProgramLoudness */
 2622|  1.68k|      {0, 7, 0, 0, 0, 0, 6, 5, 4, 3, 2, 1}  /* PeakLoudness */
 2623|  1.68k|  };
 2624|       |
 2625|  1.68k|  if (measurementSystemRequested < 0 || measurementSystemRequested >= rows ||
  ------------------
  |  Branch (2625:7): [True: 0, False: 1.68k]
  |  Branch (2625:41): [True: 0, False: 1.68k]
  ------------------
 2626|  1.68k|      measurementSystem < 0 || measurementSystem >= columns) {
  ------------------
  |  Branch (2626:7): [True: 0, False: 1.68k]
  |  Branch (2626:32): [True: 290, False: 1.39k]
  ------------------
 2627|    290|    return DRCDEC_SELECTION_PROCESS_NOT_OK;
 2628|    290|  }
 2629|       |
 2630|  1.39k|  if (pOrdering[measurementSystemRequested][measurementSystem] >
  ------------------
  |  Branch (2630:7): [True: 992, False: 401]
  ------------------
 2631|  1.39k|      pValueOrder->order) {
 2632|    992|    pValueOrder->order =
 2633|    992|        pOrdering[measurementSystemRequested][measurementSystem];
 2634|    992|    pValueOrder->value = value;
 2635|    992|  }
 2636|       |
 2637|  1.39k|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 2638|  1.68k|}
drcDec_selectionProcess.cpp:_ZL19_getSignalPeakLevelP14SEL_PROC_INPUTP14UNI_DRC_CONFIGP17LOUDNESS_INFO_SETP24DRC_INSTRUCTIONS_UNI_DRCiPiS7_19SEL_PROC_CODEC_MODE:
 2910|  5.17k|) {
 2911|  5.17k|  DRCDEC_SELECTION_PROCESS_RETURN retVal = DRCDEC_SELECTION_PROCESS_NO_ERROR;
 2912|       |
 2913|  5.17k|  int albumMode = hSelProcInput->albumMode;
 2914|       |
 2915|  5.17k|  FIXP_DBL signalPeakLevelTmp = (FIXP_DBL)0;
 2916|  5.17k|  FIXP_DBL signalPeakLevel = FIXP_DBL(0);
 2917|       |
 2918|  5.17k|  int dmxId = downmixIdRequested;
 2919|       |
 2920|  5.17k|  int drcSetId = pInst->drcSetId;
 2921|       |
 2922|  5.17k|  if (drcSetId < 0) {
  ------------------
  |  Branch (2922:7): [True: 3.69k, False: 1.48k]
  ------------------
 2923|  3.69k|    drcSetId = 0;
 2924|  3.69k|  }
 2925|       |
 2926|  5.17k|  *explicitPeakInformationPresent = 1;
 2927|       |
 2928|  5.17k|  if (_truePeakLevelIsPresent(hLoudnessInfoSet, drcSetId, dmxId, albumMode)) {
  ------------------
  |  Branch (2928:7): [True: 121, False: 5.05k]
  ------------------
 2929|    121|    retVal = _getTruePeakLevel(hLoudnessInfoSet, drcSetId, dmxId, albumMode,
 2930|    121|                               &signalPeakLevel);
 2931|    121|    if (retVal) return (retVal);
  ------------------
  |  Branch (2931:9): [True: 0, False: 121]
  ------------------
 2932|  5.05k|  } else if (_samplePeakLevelIsPresent(hLoudnessInfoSet, drcSetId, dmxId,
  ------------------
  |  Branch (2932:14): [True: 348, False: 4.70k]
  ------------------
 2933|  5.05k|                                       albumMode)) {
 2934|    348|    retVal = _getSamplePeakLevel(hLoudnessInfoSet, drcSetId, dmxId, albumMode,
 2935|    348|                                 &signalPeakLevel);
 2936|    348|    if (retVal) return (retVal);
  ------------------
  |  Branch (2936:9): [True: 0, False: 348]
  ------------------
 2937|  4.70k|  } else if (_truePeakLevelIsPresent(hLoudnessInfoSet, 0x3F, dmxId,
  ------------------
  |  Branch (2937:14): [True: 183, False: 4.52k]
  ------------------
 2938|  4.70k|                                     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.52k|  } else if (_samplePeakLevelIsPresent(hLoudnessInfoSet, 0x3F, dmxId,
  ------------------
  |  Branch (2942:14): [True: 462, False: 4.06k]
  ------------------
 2943|  4.52k|                                       albumMode)) {
 2944|    462|    retVal = _getSamplePeakLevel(hLoudnessInfoSet, 0x3F, dmxId, albumMode,
 2945|    462|                                 &signalPeakLevel);
 2946|    462|    if (retVal) return (retVal);
  ------------------
  |  Branch (2946:9): [True: 0, False: 462]
  ------------------
 2947|  4.06k|  } else if (_limiterPeakTargetIsPresent(pInst, drcSetId, dmxId)) {
  ------------------
  |  Branch (2947:14): [True: 155, False: 3.90k]
  ------------------
 2948|    155|    retVal = _getLimiterPeakTarget(pInst, drcSetId, dmxId, &signalPeakLevel);
 2949|    155|    if (retVal) return (retVal);
  ------------------
  |  Branch (2949:9): [True: 0, False: 155]
  ------------------
 2950|  3.90k|  } else if (dmxId != 0) {
  ------------------
  |  Branch (2950:14): [True: 0, False: 3.90k]
  ------------------
 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|  3.90k|  } else {
 3018|  3.90k|    signalPeakLevel = FIXP_DBL(0); /* worst case estimate */
 3019|  3.90k|    *explicitPeakInformationPresent = FIXP_DBL(0);
 3020|  3.90k|  }
 3021|       |
 3022|  5.17k|  *signalPeakLevelOut = signalPeakLevel;
 3023|       |
 3024|  5.17k|  return retVal;
 3025|  5.17k|}
drcDec_selectionProcess.cpp:_ZL23_truePeakLevelIsPresentP17LOUDNESS_INFO_SETiii:
 2734|  9.88k|                                   int drcSetId, int downmixId, int albumMode) {
 2735|  9.88k|  int i;
 2736|  9.88k|  int count;
 2737|  9.88k|  LOUDNESS_INFO* pLoudnessInfo = NULL;
 2738|       |
 2739|  9.88k|  if (albumMode) {
  ------------------
  |  Branch (2739:7): [True: 0, False: 9.88k]
  ------------------
 2740|      0|    count = hLoudnessInfoSet->loudnessInfoAlbumCount;
 2741|      0|    pLoudnessInfo = hLoudnessInfoSet->loudnessInfoAlbum;
 2742|  9.88k|  } else {
 2743|  9.88k|    count = hLoudnessInfoSet->loudnessInfoCount;
 2744|  9.88k|    pLoudnessInfo = hLoudnessInfoSet->loudnessInfo;
 2745|  9.88k|  }
 2746|       |
 2747|  20.7k|  for (i = 0; i < count; i++) {
  ------------------
  |  Branch (2747:15): [True: 11.1k, False: 9.57k]
  ------------------
 2748|  11.1k|    if ((pLoudnessInfo[i].drcSetId == drcSetId) &&
  ------------------
  |  Branch (2748:9): [True: 4.26k, False: 6.89k]
  ------------------
 2749|  4.26k|        (pLoudnessInfo[i].downmixId == downmixId)) {
  ------------------
  |  Branch (2749:9): [True: 2.44k, False: 1.82k]
  ------------------
 2750|  2.44k|      if (pLoudnessInfo[i].truePeakLevelPresent) return 1;
  ------------------
  |  Branch (2750:11): [True: 304, False: 2.13k]
  ------------------
 2751|  2.44k|    }
 2752|  11.1k|  }
 2753|       |
 2754|  9.57k|  return 0;
 2755|  9.88k|}
drcDec_selectionProcess.cpp:_ZL17_getTruePeakLevelP17LOUDNESS_INFO_SETiiiPi:
 2759|    304|    int albumMode, FIXP_DBL* pTruePeakLevel) {
 2760|    304|  int i;
 2761|    304|  int count;
 2762|    304|  LOUDNESS_INFO* pLoudnessInfo = NULL;
 2763|       |
 2764|    304|  if (albumMode) {
  ------------------
  |  Branch (2764:7): [True: 0, False: 304]
  ------------------
 2765|      0|    count = hLoudnessInfoSet->loudnessInfoAlbumCount;
 2766|      0|    pLoudnessInfo = hLoudnessInfoSet->loudnessInfoAlbum;
 2767|    304|  } else {
 2768|    304|    count = hLoudnessInfoSet->loudnessInfoCount;
 2769|    304|    pLoudnessInfo = hLoudnessInfoSet->loudnessInfo;
 2770|    304|  }
 2771|       |
 2772|  1.33k|  for (i = 0; i < count; i++) {
  ------------------
  |  Branch (2772:15): [True: 1.33k, False: 0]
  ------------------
 2773|  1.33k|    if ((pLoudnessInfo[i].drcSetId == drcSetId) &&
  ------------------
  |  Branch (2773:9): [True: 899, False: 436]
  ------------------
 2774|    899|        (pLoudnessInfo[i].downmixId == downmixId)) {
  ------------------
  |  Branch (2774:9): [True: 504, False: 395]
  ------------------
 2775|    504|      if (pLoudnessInfo[i].truePeakLevelPresent) {
  ------------------
  |  Branch (2775:11): [True: 304, False: 200]
  ------------------
 2776|    304|        *pTruePeakLevel = pLoudnessInfo[i].truePeakLevel;
 2777|    304|        return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 2778|    304|      }
 2779|    504|    }
 2780|  1.33k|  }
 2781|       |
 2782|      0|  return DRCDEC_SELECTION_PROCESS_NOT_OK;
 2783|    304|}
drcDec_selectionProcess.cpp:_ZL25_samplePeakLevelIsPresentP17LOUDNESS_INFO_SETiii:
 2787|  9.57k|                                     int albumMode) {
 2788|  9.57k|  int i;
 2789|  9.57k|  int count;
 2790|  9.57k|  LOUDNESS_INFO* pLoudnessInfo = NULL;
 2791|       |
 2792|  9.57k|  if (albumMode) {
  ------------------
  |  Branch (2792:7): [True: 0, False: 9.57k]
  ------------------
 2793|      0|    count = hLoudnessInfoSet->loudnessInfoAlbumCount;
 2794|      0|    pLoudnessInfo = hLoudnessInfoSet->loudnessInfoAlbum;
 2795|  9.57k|  } else {
 2796|  9.57k|    count = hLoudnessInfoSet->loudnessInfoCount;
 2797|  9.57k|    pLoudnessInfo = hLoudnessInfoSet->loudnessInfo;
 2798|  9.57k|  }
 2799|       |
 2800|  18.4k|  for (i = 0; i < count; i++) {
  ------------------
  |  Branch (2800:15): [True: 9.65k, False: 8.76k]
  ------------------
 2801|  9.65k|    if ((pLoudnessInfo[i].drcSetId == drcSetId) &&
  ------------------
  |  Branch (2801:9): [True: 3.30k, False: 6.34k]
  ------------------
 2802|  3.30k|        (pLoudnessInfo[i].downmixId == downmixId)) {
  ------------------
  |  Branch (2802:9): [True: 1.91k, False: 1.39k]
  ------------------
 2803|  1.91k|      if (pLoudnessInfo[i].samplePeakLevelPresent) return 1;
  ------------------
  |  Branch (2803:11): [True: 810, False: 1.10k]
  ------------------
 2804|  1.91k|    }
 2805|  9.65k|  }
 2806|       |
 2807|  8.76k|  return 0;
 2808|  9.57k|}
drcDec_selectionProcess.cpp:_ZL19_getSamplePeakLevelP17LOUDNESS_INFO_SETiiiPi:
 2813|    810|) {
 2814|    810|  int i;
 2815|    810|  int count;
 2816|    810|  LOUDNESS_INFO* pLoudnessInfo = NULL;
 2817|       |
 2818|    810|  if (albumMode) {
  ------------------
  |  Branch (2818:7): [True: 0, False: 810]
  ------------------
 2819|      0|    count = hLoudnessInfoSet->loudnessInfoAlbumCount;
 2820|      0|    pLoudnessInfo = hLoudnessInfoSet->loudnessInfoAlbum;
 2821|    810|  } else {
 2822|    810|    count = hLoudnessInfoSet->loudnessInfoCount;
 2823|    810|    pLoudnessInfo = hLoudnessInfoSet->loudnessInfo;
 2824|    810|  }
 2825|       |
 2826|  1.76k|  for (i = 0; i < count; i++) {
  ------------------
  |  Branch (2826:15): [True: 1.76k, False: 0]
  ------------------
 2827|  1.76k|    if ((pLoudnessInfo[i].drcSetId == drcSetId) &&
  ------------------
  |  Branch (2827:9): [True: 1.40k, False: 364]
  ------------------
 2828|  1.40k|        (pLoudnessInfo[i].downmixId == downmixId)) {
  ------------------
  |  Branch (2828:9): [True: 1.03k, False: 371]
  ------------------
 2829|  1.03k|      if (pLoudnessInfo[i].samplePeakLevelPresent) {
  ------------------
  |  Branch (2829:11): [True: 810, False: 224]
  ------------------
 2830|    810|        *pSamplePeakLevel = pLoudnessInfo[i].samplePeakLevel;
 2831|    810|        return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 2832|    810|      }
 2833|  1.03k|    }
 2834|  1.76k|  }
 2835|       |
 2836|      0|  return DRCDEC_SELECTION_PROCESS_NOT_OK;
 2837|    810|}
drcDec_selectionProcess.cpp:_ZL27_limiterPeakTargetIsPresentP24DRC_INSTRUCTIONS_UNI_DRCii:
 2840|  4.06k|    DRC_INSTRUCTIONS_UNI_DRC* pDrcInstruction, int drcSetId, int downmixId) {
 2841|  4.06k|  int i;
 2842|       |
 2843|  4.06k|  if (pDrcInstruction->limiterPeakTargetPresent) {
  ------------------
  |  Branch (2843:7): [True: 168, False: 3.89k]
  ------------------
 2844|    168|    if ((pDrcInstruction->downmixId[0] == downmixId) ||
  ------------------
  |  Branch (2844:9): [True: 110, False: 58]
  ------------------
 2845|    116|        (pDrcInstruction->downmixId[0] == 0x7F)) {
  ------------------
  |  Branch (2845:9): [True: 6, False: 52]
  ------------------
 2846|    116|      return 1;
 2847|    116|    }
 2848|       |
 2849|    227|    for (i = 0; i < pDrcInstruction->downmixIdCount; i++) {
  ------------------
  |  Branch (2849:17): [True: 214, False: 13]
  ------------------
 2850|    214|      if (pDrcInstruction->downmixId[i] == downmixId) {
  ------------------
  |  Branch (2850:11): [True: 39, False: 175]
  ------------------
 2851|     39|        return 1;
 2852|     39|      }
 2853|    214|    }
 2854|     52|  }
 2855|       |
 2856|  3.90k|  return 0;
 2857|  4.06k|}
drcDec_selectionProcess.cpp:_ZL21_getLimiterPeakTargetP24DRC_INSTRUCTIONS_UNI_DRCiiPi:
 2861|    155|    FIXP_DBL* pLimiterPeakTarget) {
 2862|    155|  int i;
 2863|       |
 2864|    155|  if (pDrcInstruction->limiterPeakTargetPresent) {
  ------------------
  |  Branch (2864:7): [True: 155, False: 0]
  ------------------
 2865|    155|    if ((pDrcInstruction->downmixId[0] == downmixId) ||
  ------------------
  |  Branch (2865:9): [True: 110, False: 45]
  ------------------
 2866|    116|        (pDrcInstruction->downmixId[0] == 0x7F)) {
  ------------------
  |  Branch (2866:9): [True: 6, False: 39]
  ------------------
 2867|    116|      *pLimiterPeakTarget =
 2868|    116|          ((FX_SGL2FX_DBL(pDrcInstruction->limiterPeakTarget) >> 2));
  ------------------
  |  |  219|    116|  ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|    116|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |                 ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|    116|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
 2869|    116|      return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 2870|    116|    }
 2871|       |
 2872|    157|    for (i = 0; i < pDrcInstruction->downmixIdCount; i++) {
  ------------------
  |  Branch (2872:17): [True: 157, False: 0]
  ------------------
 2873|    157|      if (pDrcInstruction->downmixId[i] == downmixId) {
  ------------------
  |  Branch (2873:11): [True: 39, False: 118]
  ------------------
 2874|     39|        *pLimiterPeakTarget =
 2875|     39|            ((FX_SGL2FX_DBL(pDrcInstruction->limiterPeakTarget) >> 2));
  ------------------
  |  |  219|     39|  ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|     39|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |                 ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|     39|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
 2876|     39|        return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 2877|     39|      }
 2878|    157|    }
 2879|     39|  }
 2880|       |
 2881|      0|  return DRCDEC_SELECTION_PROCESS_NOT_OK;
 2882|    155|}
drcDec_selectionProcess.cpp:_ZL24_drcdec_selection_addNewP16DRCDEC_SELECTION:
 2428|  5.11k|    DRCDEC_SELECTION* pSelection) {
 2429|  5.11k|  if (pSelection->numData < (12 + 1 + 6)) {
  ------------------
  |  Branch (2429:7): [True: 5.11k, False: 0]
  ------------------
 2430|  5.11k|    DRCDEC_SELECTION_DATA* pData = &(pSelection->data[pSelection->numData]);
 2431|  5.11k|    FDKmemset(pData, 0, sizeof(DRCDEC_SELECTION_DATA));
 2432|  5.11k|    pSelection->numData++;
 2433|       |
 2434|  5.11k|    return pData;
 2435|  5.11k|  } else {
 2436|       |    return NULL;
 2437|      0|  }
 2438|  5.11k|}
drcDec_selectionProcess.cpp:_ZL21_setSelectionDataInfoP21DRCDEC_SELECTION_DATAiiiiiii:
 1052|  5.11k|    int applyAdjustment) {
 1053|  5.11k|  FIXP_DBL adjustment = 0; /* e = 8 */
 1054|       |
 1055|       |  /* use e = 8 for all function parameters to prevent overflow */
 1056|  5.11k|  loudness >>= 1;
 1057|  5.11k|  loudnessNormalizationGainDb >>= 1;
 1058|  5.11k|  loudnessNormalizationGainDbMax >>= 1;
 1059|  5.11k|  loudnessDeviationMax >>= 1;
 1060|  5.11k|  signalPeakLevel >>= 1;
 1061|  5.11k|  outputPeakLevelMax >>= 1;
 1062|       |
 1063|  5.11k|  if (applyAdjustment) {
  ------------------
  |  Branch (1063:7): [True: 0, False: 5.11k]
  ------------------
 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.11k|  pData->loudnessNormalizationGainDbAdjusted = fMin(
 1071|  5.11k|      loudnessNormalizationGainDb - adjustment, loudnessNormalizationGainDbMax);
 1072|  5.11k|  pData->outputLoudness = loudness + pData->loudnessNormalizationGainDbAdjusted;
 1073|  5.11k|  pData->outputPeakLevel =
 1074|  5.11k|      signalPeakLevel + pData->loudnessNormalizationGainDbAdjusted;
 1075|       |
 1076|       |  /* shift back to e = 7 using saturation */
 1077|  5.11k|  pData->loudnessNormalizationGainDbAdjusted = SATURATE_LEFT_SHIFT(
  ------------------
  |  |  251|  5.11k|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))        \
  |  |  ------------------
  |  |  |  Branch (251:4): [True: 0, False: 5.11k]
  |  |  ------------------
  |  |  252|  5.11k|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                               \
  |  |  253|  5.11k|       : ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (253:10): [True: 0, False: 5.11k]
  |  |  ------------------
  |  |  254|  5.11k|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                      \
  |  |  255|  5.11k|             : ((LONG)(src) << (scale)))
  ------------------
 1078|  5.11k|      pData->loudnessNormalizationGainDbAdjusted, 1, DFRACT_BITS);
 1079|  5.11k|  pData->outputLoudness =
 1080|  5.11k|      SATURATE_LEFT_SHIFT(pData->outputLoudness, 1, DFRACT_BITS);
  ------------------
  |  |  251|  5.11k|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))        \
  |  |  ------------------
  |  |  |  Branch (251:4): [True: 0, False: 5.11k]
  |  |  ------------------
  |  |  252|  5.11k|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                               \
  |  |  253|  5.11k|       : ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (253:10): [True: 0, False: 5.11k]
  |  |  ------------------
  |  |  254|  5.11k|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                      \
  |  |  255|  5.11k|             : ((LONG)(src) << (scale)))
  ------------------
 1081|  5.11k|  pData->outputPeakLevel =
 1082|  5.11k|      SATURATE_LEFT_SHIFT(pData->outputPeakLevel, 1, DFRACT_BITS);
  ------------------
  |  |  251|  5.11k|  (((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale)))        \
  |  |  ------------------
  |  |  |  Branch (251:4): [True: 0, False: 5.11k]
  |  |  ------------------
  |  |  252|  5.11k|       ? (LONG)(((1U) << ((dBits)-1)) - 1)                               \
  |  |  253|  5.11k|       : ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
  |  |  ------------------
  |  |  |  Branch (253:10): [True: 38, False: 5.08k]
  |  |  ------------------
  |  |  254|  5.11k|             ? ~((LONG)(((1U) << ((dBits)-1)) - 1))                      \
  |  |  255|  5.11k|             : ((LONG)(src) << (scale)))
  ------------------
 1083|  5.11k|}
drcDec_selectionProcess.cpp:_ZL25_preSelectionRequirement9P14SEL_PROC_INPUTP16DRCDEC_SELECTIONS2_:
 1238|  2.67k|    DRCDEC_SELECTION* pCandidatesSelected) {
 1239|  2.67k|  int i;
 1240|       |
 1241|  7.65k|  for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1241:15): [True: 4.98k, False: 2.67k]
  ------------------
 1242|  4.98k|    DRCDEC_SELECTION_DATA* pCandidate =
 1243|  4.98k|        _drcdec_selection_getAt(pCandidatesPotential, i);
 1244|  4.98k|    if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1244:9): [True: 0, False: 4.98k]
  ------------------
 1245|       |
 1246|  4.98k|    if (pCandidate->outputPeakLevel <= hSelProcInput->outputPeakLevelMax) {
  ------------------
  |  Branch (1246:9): [True: 3.89k, False: 1.08k]
  ------------------
 1247|  3.89k|      if (_drcdec_selection_add(pCandidatesSelected, pCandidate) == NULL)
  ------------------
  |  Branch (1247:11): [True: 0, False: 3.89k]
  ------------------
 1248|      0|        return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1249|  3.89k|    }
 1250|  4.98k|  }
 1251|       |
 1252|  2.67k|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1253|  2.67k|}
drcDec_selectionProcess.cpp:_ZL29_drcSetSelectionAddCandidatesP14SEL_PROC_INPUTP16DRCDEC_SELECTIONS2_:
 1297|    189|    DRCDEC_SELECTION* pCandidatesSelected) {
 1298|    189|  DRCDEC_SELECTION_PROCESS_RETURN retVal = DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1299|    189|  int nHitCount = 0;
 1300|    189|  int i;
 1301|       |
 1302|    189|  DRCDEC_SELECTION_DATA* pCandidate = NULL;
 1303|    189|  DRC_INSTRUCTIONS_UNI_DRC* pDrcInstructionUniDrc = NULL;
 1304|       |
 1305|  1.06k|  for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1305:15): [True: 880, False: 189]
  ------------------
 1306|    880|    pCandidate = _drcdec_selection_getAt(pCandidatesPotential, i);
 1307|    880|    if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1307:9): [True: 0, False: 880]
  ------------------
 1308|       |
 1309|    880|    pDrcInstructionUniDrc = pCandidate->pInst;
 1310|       |
 1311|    880|    if (_targetLoudnessInRange(pDrcInstructionUniDrc,
  ------------------
  |  Branch (1311:9): [True: 54, False: 826]
  ------------------
 1312|    880|                               hSelProcInput->targetLoudness)) {
 1313|     54|      nHitCount++;
 1314|     54|    }
 1315|    880|  }
 1316|       |
 1317|    189|  if (nHitCount != 0) {
  ------------------
  |  Branch (1317:7): [True: 37, False: 152]
  ------------------
 1318|    267|    for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1318:17): [True: 230, False: 37]
  ------------------
 1319|    230|      pCandidate = _drcdec_selection_getAt(pCandidatesPotential, i);
 1320|    230|      if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1320:11): [True: 0, False: 230]
  ------------------
 1321|       |
 1322|    230|      pDrcInstructionUniDrc = pCandidate->pInst;
 1323|       |
 1324|    230|      if (_targetLoudnessInRange(pDrcInstructionUniDrc,
  ------------------
  |  Branch (1324:11): [True: 54, False: 176]
  ------------------
 1325|    230|                                 hSelProcInput->targetLoudness)) {
 1326|     54|        if (_drcdec_selection_add(pCandidatesSelected, pCandidate) == NULL)
  ------------------
  |  Branch (1326:13): [True: 0, False: 54]
  ------------------
 1327|      0|          return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1328|     54|      }
 1329|    230|    }
 1330|    152|  } else {
 1331|    152|    FIXP_DBL lowestPeakLevel = MAXVAL_DBL; /* e = 7 */
  ------------------
  |  |  156|    152|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  ------------------
 1332|    152|    FIXP_DBL peakLevel = 0;                /* e = 7 */
 1333|       |
 1334|    802|    for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1334:17): [True: 650, False: 152]
  ------------------
 1335|    650|      pCandidate = _drcdec_selection_getAt(pCandidatesPotential, i);
 1336|    650|      if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1336:11): [True: 0, False: 650]
  ------------------
 1337|       |
 1338|    650|      peakLevel = pCandidate->outputPeakLevel;
 1339|       |
 1340|    650|      if (peakLevel < lowestPeakLevel) {
  ------------------
  |  Branch (1340:11): [True: 167, False: 483]
  ------------------
 1341|    167|        lowestPeakLevel = peakLevel;
 1342|    167|      }
 1343|    650|    }
 1344|       |
 1345|       |    /* add all with lowest peak level or max 1dB above */
 1346|    802|    for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1346:17): [True: 650, False: 152]
  ------------------
 1347|    650|      FIXP_DBL loudnessDeviationMax =
 1348|    650|          ((FIXP_DBL)hSelProcInput->loudnessDeviationMax)
 1349|    650|          << (DFRACT_BITS - 1 - 7); /* e = 7 */
  ------------------
  |  |  113|    650|#define DFRACT_BITS 32 /* double precision */
  ------------------
 1350|       |
 1351|    650|      pCandidate = _drcdec_selection_getAt(pCandidatesPotential, i);
 1352|    650|      if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1352:11): [True: 0, False: 650]
  ------------------
 1353|       |
 1354|    650|      peakLevel = pCandidate->outputPeakLevel;
 1355|       |
 1356|    650|      if (peakLevel == lowestPeakLevel ||
  ------------------
  |  Branch (1356:11): [True: 496, False: 154]
  ------------------
 1357|    154|          peakLevel <=
  ------------------
  |  Branch (1357:11): [True: 55, False: 99]
  ------------------
 1358|    551|              lowestPeakLevel + FL2FXCONST_DBL(1.0f / (float)(1 << 7))) {
  ------------------
  |  |  192|    154|  (FIXP_DBL)(                                                                \
  |  |  193|    154|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (193:7): [True: 154, Folded]
  |  |  ------------------
  |  |  194|    154|          ? ((((double)(val) * (DFRACT_FIX_SCALE) + 0.5) >=                  \
  |  |  ------------------
  |  |  |  |  147|    154|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    154|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (194:14): [Folded, False: 154]
  |  |  ------------------
  |  |  195|    154|              (double)(MAXVAL_DBL))                                          \
  |  |  ------------------
  |  |  |  |  156|    154|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  196|    154|                 ? (LONG)(MAXVAL_DBL)                                        \
  |  |  ------------------
  |  |  |  |  156|      0|  ((signed)0x7FFFFFFF) /* this has to be synchronized to DFRACT_BITS */
  |  |  ------------------
  |  |  197|    154|                 : (LONG)((double)(val) * (double)(DFRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  147|    154|#define DFRACT_FIX_SCALE ((INT64(1) << (DFRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  113|    154|#define DFRACT_BITS 32 /* double precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  198|    154|          : ((((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|    551|        FIXP_DBL adjustment =
 1360|    551|            fMax((FIXP_DBL)0, peakLevel - hSelProcInput->outputPeakLevelMax);
 1361|    551|        adjustment = fMin(adjustment, fMax((FIXP_DBL)0, loudnessDeviationMax));
 1362|       |
 1363|    551|        pCandidate->loudnessNormalizationGainDbAdjusted -= adjustment;
 1364|    551|        pCandidate->outputPeakLevel -= adjustment;
 1365|    551|        pCandidate->outputLoudness -= adjustment;
 1366|    551|        if (_drcdec_selection_add(pCandidatesSelected, pCandidate) == NULL)
  ------------------
  |  Branch (1366:13): [True: 0, False: 551]
  ------------------
 1367|      0|          return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1368|    551|      }
 1369|    650|    }
 1370|    152|  }
 1371|       |
 1372|    189|  return retVal;
 1373|    189|}
drcDec_selectionProcess.cpp:_ZL23_drcSetRequestSelectionP14SEL_PROC_INPUTP14UNI_DRC_CONFIGP17LOUDNESS_INFO_SETPP16DRCDEC_SELECTIONS7_:
 2307|  2.67k|    DRCDEC_SELECTION** ppCandidatesSelected) {
 2308|  2.67k|  DRCDEC_SELECTION_PROCESS_RETURN retVal;
 2309|  2.67k|  int i;
 2310|       |
 2311|  2.67k|  if (_drcdec_selection_getNumber(*ppCandidatesPotential) == 0) {
  ------------------
  |  Branch (2311:7): [True: 0, False: 2.67k]
  ------------------
 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.67k|  if (hSelProcInput->dynamicRangeControlOn) {
  ------------------
  |  Branch (2316:7): [True: 2.67k, False: 0]
  ------------------
 2317|  2.67k|    if (hSelProcInput->numDrcFeatureRequests == 0) {
  ------------------
  |  Branch (2317:9): [True: 2.67k, False: 0]
  ------------------
 2318|  2.67k|      retVal = _selectDrcSetEffectNone(hUniDrcConfig, *ppCandidatesPotential,
 2319|  2.67k|                                       *ppCandidatesSelected);
 2320|  2.67k|      if (retVal) return (retVal);
  ------------------
  |  Branch (2320:11): [True: 0, False: 2.67k]
  ------------------
 2321|       |
 2322|  2.67k|      if (_drcdec_selection_getNumber(*ppCandidatesSelected) == 0) {
  ------------------
  |  Branch (2322:11): [True: 189, False: 2.48k]
  ------------------
 2323|    189|        DRC_FEATURE_REQUEST fallbackRequest;
 2324|    189|        fallbackRequest.drcEffectType.numRequests = 5;
 2325|    189|        fallbackRequest.drcEffectType.numRequestsDesired = 5;
 2326|    189|        fallbackRequest.drcEffectType.request[0] = DETR_GENERAL_COMPR;
 2327|    189|        fallbackRequest.drcEffectType.request[1] = DETR_NIGHT;
 2328|    189|        fallbackRequest.drcEffectType.request[2] = DETR_NOISY;
 2329|    189|        fallbackRequest.drcEffectType.request[3] = DETR_LIMITED;
 2330|    189|        fallbackRequest.drcEffectType.request[4] = DETR_LOWLEVEL;
 2331|       |
 2332|    189|        retVal = _selectEffectTypeFeature(hUniDrcConfig, fallbackRequest,
 2333|    189|                                          ppCandidatesPotential,
 2334|    189|                                          ppCandidatesSelected);
 2335|    189|        if (retVal) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (2335:13): [True: 18, False: 171]
  ------------------
 2336|    189|      }
 2337|       |
 2338|  2.66k|      _swapSelectionAndClear(ppCandidatesPotential, ppCandidatesSelected);
 2339|  2.66k|    } 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.67k|  }
 2377|       |
 2378|  2.66k|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 2379|  2.67k|}
drcDec_selectionProcess.cpp:_ZL23_selectDrcSetEffectNoneP14UNI_DRC_CONFIGP16DRCDEC_SELECTIONS2_:
 1405|  2.67k|    DRCDEC_SELECTION* pCandidatesSelected) {
 1406|  2.67k|  int i;
 1407|       |
 1408|  7.31k|  for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1408:15): [True: 4.63k, False: 2.67k]
  ------------------
 1409|  4.63k|    DRCDEC_SELECTION_DATA* pCandidate =
 1410|  4.63k|        _drcdec_selection_getAt(pCandidatesPotential, i);
 1411|  4.63k|    if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1411:9): [True: 0, False: 4.63k]
  ------------------
 1412|       |
 1413|  4.63k|    if ((pCandidate->pInst->drcSetEffect & 0xff) == 0) {
  ------------------
  |  Branch (1413:9): [True: 3.68k, False: 952]
  ------------------
 1414|  3.68k|      if (_drcdec_selection_add(pCandidatesSelected, pCandidate) == NULL)
  ------------------
  |  Branch (1414:11): [True: 0, False: 3.68k]
  ------------------
 1415|      0|        return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1416|  3.68k|    }
 1417|  4.63k|  }
 1418|       |
 1419|  2.67k|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1420|  2.67k|}
drcDec_selectionProcess.cpp:_ZL24_selectEffectTypeFeatureP14UNI_DRC_CONFIG19DRC_FEATURE_REQUESTPP16DRCDEC_SELECTIONS4_:
 1470|    189|    DRCDEC_SELECTION** ppCandidatesSelected) {
 1471|    189|  DRCDEC_SELECTION_PROCESS_RETURN retVal = DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1472|    189|  int i;
 1473|    189|  int desiredEffectTypeFound = 0;
 1474|       |
 1475|  1.04k|  for (i = 0; i < drcFeatureRequest.drcEffectType.numRequestsDesired; i++) {
  ------------------
  |  Branch (1475:15): [True: 873, False: 171]
  ------------------
 1476|    873|    retVal = _selectSingleEffectType(
 1477|    873|        hUniDrcConfig, drcFeatureRequest.drcEffectType.request[i],
 1478|    873|        *ppCandidatesPotential, *ppCandidatesSelected);
 1479|    873|    if (retVal) return (retVal);
  ------------------
  |  Branch (1479:9): [True: 18, False: 855]
  ------------------
 1480|       |
 1481|    855|    if (_drcdec_selection_getNumber(*ppCandidatesSelected)) {
  ------------------
  |  Branch (1481:9): [True: 539, False: 316]
  ------------------
 1482|    539|      desiredEffectTypeFound = 1;
 1483|    539|      _swapSelectionAndClear(ppCandidatesPotential, ppCandidatesSelected);
 1484|    539|    }
 1485|    855|  }
 1486|       |
 1487|    171|  if (!desiredEffectTypeFound) {
  ------------------
  |  Branch (1487:7): [True: 3, False: 168]
  ------------------
 1488|      3|    for (i = drcFeatureRequest.drcEffectType.numRequestsDesired;
 1489|      3|         i < drcFeatureRequest.drcEffectType.numRequests; i++) {
  ------------------
  |  Branch (1489:10): [True: 0, False: 3]
  ------------------
 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|      3|  }
 1501|       |
 1502|    171|  _swapSelection(ppCandidatesPotential, ppCandidatesSelected);
 1503|       |
 1504|    171|  return retVal;
 1505|    171|}
drcDec_selectionProcess.cpp:_ZL23_selectSingleEffectTypeP14UNI_DRC_CONFIG23DRC_EFFECT_TYPE_REQUESTP16DRCDEC_SELECTIONS3_:
 1425|    873|    DRCDEC_SELECTION* pCandidatesSelected) {
 1426|    873|  int i;
 1427|    873|  DRCDEC_SELECTION_PROCESS_RETURN retVal = DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1428|    873|  DRC_INSTRUCTIONS_UNI_DRC* pInst;
 1429|    873|  DRC_INSTRUCTIONS_UNI_DRC* pDrcInstructionsDependent;
 1430|       |
 1431|    873|  if (effectType == DETR_NONE) {
  ------------------
  |  Branch (1431:7): [True: 0, False: 873]
  ------------------
 1432|      0|    retVal = _selectDrcSetEffectNone(hUniDrcConfig, pCandidatesPotential,
 1433|      0|                                     pCandidatesSelected);
 1434|      0|    if (retVal) return (retVal);
  ------------------
  |  Branch (1434:9): [True: 0, False: 0]
  ------------------
 1435|    873|  } else {
 1436|    873|    int effectBitPosition = 1 << (effectType - 1);
 1437|       |
 1438|  2.87k|    for (i = 0; i < _drcdec_selection_getNumber(pCandidatesPotential); i++) {
  ------------------
  |  Branch (1438:17): [True: 2.01k, False: 855]
  ------------------
 1439|  2.01k|      DRCDEC_SELECTION_DATA* pCandidate =
 1440|  2.01k|          _drcdec_selection_getAt(pCandidatesPotential, i);
 1441|  2.01k|      if (pCandidate == NULL) return DRCDEC_SELECTION_PROCESS_NOT_OK;
  ------------------
  |  Branch (1441:11): [True: 0, False: 2.01k]
  ------------------
 1442|       |
 1443|  2.01k|      pInst = pCandidate->pInst;
 1444|       |
 1445|  2.01k|      if (!pInst->dependsOnDrcSetPresent) {
  ------------------
  |  Branch (1445:11): [True: 1.22k, False: 792]
  ------------------
 1446|  1.22k|        if ((pInst->drcSetEffect & effectBitPosition)) {
  ------------------
  |  Branch (1446:13): [True: 763, False: 464]
  ------------------
 1447|    763|          if (_drcdec_selection_add(pCandidatesSelected, pCandidate) == NULL)
  ------------------
  |  Branch (1447:15): [True: 0, False: 763]
  ------------------
 1448|      0|            return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1449|    763|        }
 1450|  1.22k|      } else {
 1451|    792|        retVal = _dependentDrcInstruction(hUniDrcConfig, pInst,
 1452|    792|                                          &pDrcInstructionsDependent);
 1453|    792|        if (retVal) return (retVal);
  ------------------
  |  Branch (1453:13): [True: 18, False: 774]
  ------------------
 1454|       |
 1455|    774|        if (((pInst->drcSetEffect & effectBitPosition)) ||
  ------------------
  |  Branch (1455:13): [True: 414, False: 360]
  ------------------
 1456|    631|            ((pDrcInstructionsDependent->drcSetEffect & effectBitPosition))) {
  ------------------
  |  Branch (1456:13): [True: 217, False: 143]
  ------------------
 1457|    631|          if (_drcdec_selection_add(pCandidatesSelected, pCandidate) == NULL)
  ------------------
  |  Branch (1457:15): [True: 0, False: 631]
  ------------------
 1458|      0|            return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1459|    631|        }
 1460|    774|      }
 1461|  2.01k|    }
 1462|    873|  }
 1463|       |
 1464|    855|  return retVal;
 1465|    873|}
drcDec_selectionProcess.cpp:_ZL24_dependentDrcInstructionP14UNI_DRC_CONFIGP24DRC_INSTRUCTIONS_UNI_DRCPS2_:
 1377|    792|    DRC_INSTRUCTIONS_UNI_DRC** ppDrcInstructionsDependent) {
 1378|    792|  int i;
 1379|    792|  DRC_INSTRUCTIONS_UNI_DRC* pDependentDrc = NULL;
 1380|       |
 1381|  3.58k|  for (i = 0; i < hUniDrcConfig->drcInstructionsUniDrcCount; i++) {
  ------------------
  |  Branch (1381:15): [True: 3.56k, False: 15]
  ------------------
 1382|  3.56k|    pDependentDrc =
 1383|  3.56k|        (DRC_INSTRUCTIONS_UNI_DRC*)&(hUniDrcConfig->drcInstructionsUniDrc[i]);
 1384|       |
 1385|  3.56k|    if (pDependentDrc->drcSetId == pInst->dependsOnDrcSet) {
  ------------------
  |  Branch (1385:9): [True: 777, False: 2.79k]
  ------------------
 1386|    777|      break;
 1387|    777|    }
 1388|  3.56k|  }
 1389|       |
 1390|    792|  if (i == hUniDrcConfig->drcInstructionsUniDrcCount) {
  ------------------
  |  Branch (1390:7): [True: 15, False: 777]
  ------------------
 1391|     15|    return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1392|     15|  }
 1393|       |
 1394|    777|  if (pDependentDrc->dependsOnDrcSetPresent == 1) {
  ------------------
  |  Branch (1394:7): [True: 3, False: 774]
  ------------------
 1395|      3|    return DRCDEC_SELECTION_PROCESS_NOT_OK;
 1396|      3|  }
 1397|       |
 1398|    774|  *ppDrcInstructionsDependent = pDependentDrc;
 1399|       |
 1400|    774|  return DRCDEC_SELECTION_PROCESS_NO_ERROR;
 1401|    777|}
drcDec_selectionProcess.cpp:_ZL27_drcdec_selection_getNumberP16DRCDEC_SELECTION:
 2456|  55.3k|static int _drcdec_selection_getNumber(DRCDEC_SELECTION* pSelection) {
 2457|  55.3k|  return pSelection->numData;
 2458|  55.3k|}
drcDec_selectionProcess.cpp:_ZL27_drcdec_selection_setNumberP16DRCDEC_SELECTIONi:
 2460|  5.38k|static int _drcdec_selection_setNumber(DRCDEC_SELECTION* pSelection, int num) {
 2461|  5.38k|  if (num >= 0 && num < pSelection->numData) {
  ------------------
  |  Branch (2461:7): [True: 5.38k, False: 0]
  |  Branch (2461:19): [True: 0, False: 5.38k]
  ------------------
 2462|      0|    return pSelection->numData = num;
 2463|  5.38k|  } else {
 2464|  5.38k|    return pSelection->numData;
 2465|  5.38k|  }
 2466|  5.38k|}
drcDec_selectionProcess.cpp:_ZL22_swapSelectionAndClearPP16DRCDEC_SELECTIONS1_:
 2478|  7.58k|                                  DRCDEC_SELECTION** ppCandidatesSelected) {
 2479|  7.58k|  DRCDEC_SELECTION* pTmp = *ppCandidatesPotential;
 2480|  7.58k|  *ppCandidatesPotential = *ppCandidatesSelected;
 2481|  7.58k|  *ppCandidatesSelected = pTmp;
 2482|  7.58k|  _drcdec_selection_clear(*ppCandidatesSelected);
 2483|  7.58k|  return 0;
 2484|  7.58k|}
drcDec_selectionProcess.cpp:_ZL23_drcdec_selection_clearP16DRCDEC_SELECTION:
 2452|  7.58k|static int _drcdec_selection_clear(DRCDEC_SELECTION* pSelection) {
 2453|  7.58k|  return pSelection->numData = 0;
 2454|  7.58k|}
drcDec_selectionProcess.cpp:_ZL14_swapSelectionPP16DRCDEC_SELECTIONS1_:
 2487|  2.73k|                          DRCDEC_SELECTION** ppCandidatesSelected) {
 2488|  2.73k|  DRCDEC_SELECTION* pTmp = *ppCandidatesPotential;
 2489|  2.73k|  *ppCandidatesPotential = *ppCandidatesSelected;
 2490|  2.73k|  *ppCandidatesSelected = pTmp;
 2491|  2.73k|  return 0;
 2492|  2.73k|}

_Z12getDeltaTmini:
  108|  2.69k|int getDeltaTmin(const int sampleRate) {
  109|       |  /* half_ms = round (0.0005 * sampleRate); */
  110|  2.69k|  int half_ms = (sampleRate + 1000) / 2000;
  111|  2.69k|  int deltaTmin = 1;
  112|  2.69k|  if (sampleRate < 1000) {
  ------------------
  |  Branch (112:7): [True: 25, False: 2.66k]
  ------------------
  113|     25|    return DE_NOT_OK;
  114|     25|  }
  115|  14.0k|  while (deltaTmin <= half_ms) {
  ------------------
  |  Branch (115:10): [True: 11.3k, False: 2.66k]
  ------------------
  116|  11.3k|    deltaTmin = deltaTmin << 1;
  117|  11.3k|  }
  118|  2.66k|  return deltaTmin;
  119|  2.69k|}
_Z21selectDrcCoefficientsP14UNI_DRC_CONFIGi:
  122|   699k|    HANDLE_UNI_DRC_CONFIG hUniDrcConfig, const int location) {
  123|   699k|  int n;
  124|   699k|  int c = -1;
  125|  1.66M|  for (n = 0; n < hUniDrcConfig->drcCoefficientsUniDrcCount; n++) {
  ------------------
  |  Branch (125:15): [True: 961k, False: 699k]
  ------------------
  126|   961k|    if (hUniDrcConfig->drcCoefficientsUniDrc[n].drcLocation == location) {
  ------------------
  |  Branch (126:9): [True: 924k, False: 37.3k]
  ------------------
  127|   924k|      c = n;
  128|   924k|    }
  129|   961k|  }
  130|   699k|  if (c >= 0) {
  ------------------
  |  Branch (130:7): [True: 481k, False: 217k]
  ------------------
  131|   481k|    return &(hUniDrcConfig->drcCoefficientsUniDrc[c]);
  132|   481k|  }
  133|   217k|  return NULL; /* possible during bitstream parsing */
  134|   699k|}
_Z21selectDrcInstructionsP14UNI_DRC_CONFIGi:
  137|  18.2k|    HANDLE_UNI_DRC_CONFIG hUniDrcConfig, const int drcSetId) {
  138|  18.2k|  int i;
  139|  55.2k|  for (i = 0; i < hUniDrcConfig->drcInstructionsCountInclVirtual; i++) {
  ------------------
  |  Branch (139:15): [True: 55.2k, False: 0]
  ------------------
  140|  55.2k|    if (hUniDrcConfig->drcInstructionsUniDrc[i].drcSetId == drcSetId) {
  ------------------
  |  Branch (140:9): [True: 18.2k, False: 37.0k]
  ------------------
  141|  18.2k|      return &(hUniDrcConfig->drcInstructionsUniDrc[i]);
  142|  18.2k|    }
  143|  55.2k|  }
  144|      0|  return NULL;
  145|  18.2k|}
_Z25selectDownmixInstructionsP14UNI_DRC_CONFIGi:
  148|  2.08k|    HANDLE_UNI_DRC_CONFIG hUniDrcConfig, const int downmixId) {
  149|  2.08k|  int i;
  150|  5.87k|  for (i = 0; i < hUniDrcConfig->downmixInstructionsCount; i++) {
  ------------------
  |  Branch (150:15): [True: 4.51k, False: 1.36k]
  ------------------
  151|  4.51k|    if (hUniDrcConfig->downmixInstructions[i].downmixId == downmixId) {
  ------------------
  |  Branch (151:9): [True: 725, False: 3.79k]
  ------------------
  152|    725|      return &(hUniDrcConfig->downmixInstructions[i]);
  153|    725|    }
  154|  4.51k|  }
  155|  1.36k|  return NULL;
  156|  2.08k|}
_Z22deriveDrcChannelGroupsiiPKaPK20DUCKING_MODIFICATIONPhPaS5_PS1_:
  168|   684k|{
  169|   684k|  int duckingSequence = -1;
  170|   684k|  int c, n, g, match, idx;
  171|   684k|  FIXP_SGL factor;
  172|   684k|  FIXP_SGL uniqueScaling[8];
  173|       |
  174|  6.15M|  for (g = 0; g < 8; g++) {
  ------------------
  |  Branch (174:15): [True: 5.47M, False: 684k]
  ------------------
  175|  5.47M|    uniqueIndex[g] = -10;
  176|  5.47M|    uniqueScaling[g] = FIXP_SGL(-1.0f);
  177|  5.47M|  }
  178|       |
  179|   684k|  g = 0;
  180|       |
  181|   684k|  if (drcSetEffect & EB_DUCK_OTHER) {
  ------------------
  |  Branch (181:7): [True: 2.04k, False: 682k]
  ------------------
  182|  9.78k|    for (c = 0; c < channelCount; c++) {
  ------------------
  |  Branch (182:17): [True: 8.01k, False: 1.76k]
  ------------------
  183|  8.01k|      match = 0;
  184|  8.01k|      if (c >= 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (184:11): [True: 0, False: 8.01k]
  ------------------
  185|  8.01k|      idx = gainSetIndex[c];
  186|  8.01k|      factor = duckingModificationForChannel[c].duckingScaling;
  187|  8.01k|      if (idx < 0) {
  ------------------
  |  Branch (187:11): [True: 4.59k, False: 3.42k]
  ------------------
  188|  7.64k|        for (n = 0; n < g; n++) {
  ------------------
  |  Branch (188:21): [True: 5.96k, False: 1.67k]
  ------------------
  189|  5.96k|          if (uniqueScaling[n] == factor) {
  ------------------
  |  Branch (189:15): [True: 2.91k, False: 3.05k]
  ------------------
  190|  2.91k|            match = 1;
  191|  2.91k|            groupForChannel[c] = n;
  192|  2.91k|            break;
  193|  2.91k|          }
  194|  5.96k|        }
  195|  4.59k|        if (match == 0) {
  ------------------
  |  Branch (195:13): [True: 1.67k, False: 2.91k]
  ------------------
  196|  1.67k|          if (g >= 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (196:15): [True: 0, False: 1.67k]
  ------------------
  197|  1.67k|          uniqueIndex[g] = idx;
  198|  1.67k|          uniqueScaling[g] = factor;
  199|  1.67k|          groupForChannel[c] = g;
  200|  1.67k|          g++;
  201|  1.67k|        }
  202|  4.59k|      } else {
  203|  3.42k|        if ((duckingSequence > 0) && (duckingSequence != idx)) {
  ------------------
  |  Branch (203:13): [True: 1.85k, False: 1.56k]
  |  Branch (203:38): [True: 277, False: 1.58k]
  ------------------
  204|    277|          return DE_NOT_OK;
  205|    277|        }
  206|  3.14k|        duckingSequence = idx;
  207|  3.14k|        groupForChannel[c] = -1;
  208|  3.14k|      }
  209|  8.01k|    }
  210|  1.76k|    if (duckingSequence == -1) {
  ------------------
  |  Branch (210:9): [True: 690, False: 1.07k]
  ------------------
  211|    690|      return DE_NOT_OK;
  212|    690|    }
  213|   682k|  } else if (drcSetEffect & EB_DUCK_SELF) {
  ------------------
  |  Branch (213:14): [True: 4.24k, False: 677k]
  ------------------
  214|  10.7k|    for (c = 0; c < channelCount; c++) {
  ------------------
  |  Branch (214:17): [True: 6.49k, False: 4.24k]
  ------------------
  215|  6.49k|      match = 0;
  216|  6.49k|      if (c >= 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (216:11): [True: 0, False: 6.49k]
  ------------------
  217|  6.49k|      idx = gainSetIndex[c];
  218|  6.49k|      factor = duckingModificationForChannel[c].duckingScaling;
  219|  6.49k|      if (idx >= 0) {
  ------------------
  |  Branch (219:11): [True: 4.12k, False: 2.37k]
  ------------------
  220|  8.82k|        for (n = 0; n < g; n++) {
  ------------------
  |  Branch (220:21): [True: 6.27k, False: 2.55k]
  ------------------
  221|  6.27k|          if ((uniqueIndex[n] == idx) && (uniqueScaling[n] == factor)) {
  ------------------
  |  Branch (221:15): [True: 2.06k, False: 4.20k]
  |  Branch (221:42): [True: 1.57k, False: 493]
  ------------------
  222|  1.57k|            match = 1;
  223|  1.57k|            groupForChannel[c] = n;
  224|  1.57k|            break;
  225|  1.57k|          }
  226|  6.27k|        }
  227|  4.12k|        if (match == 0) {
  ------------------
  |  Branch (227:13): [True: 2.55k, False: 1.57k]
  ------------------
  228|  2.55k|          if (g >= 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (228:15): [True: 0, False: 2.55k]
  ------------------
  229|  2.55k|          uniqueIndex[g] = idx;
  230|  2.55k|          uniqueScaling[g] = factor;
  231|  2.55k|          groupForChannel[c] = g;
  232|  2.55k|          g++;
  233|  2.55k|        }
  234|  4.12k|      } else {
  235|  2.37k|        groupForChannel[c] = -1;
  236|  2.37k|      }
  237|  6.49k|    }
  238|   677k|  } else { /* no ducking */
  239|  5.40M|    for (c = 0; c < channelCount; c++) {
  ------------------
  |  Branch (239:17): [True: 4.73M, False: 677k]
  ------------------
  240|  4.73M|      if (c >= 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (240:11): [True: 0, False: 4.73M]
  ------------------
  241|  4.73M|      idx = gainSetIndex[c];
  242|  4.73M|      match = 0;
  243|  4.73M|      if (idx >= 0) {
  ------------------
  |  Branch (243:11): [True: 54.9k, False: 4.67M]
  ------------------
  244|   106k|        for (n = 0; n < g; n++) {
  ------------------
  |  Branch (244:21): [True: 75.4k, False: 31.3k]
  ------------------
  245|  75.4k|          if (uniqueIndex[n] == idx) {
  ------------------
  |  Branch (245:15): [True: 23.5k, False: 51.8k]
  ------------------
  246|  23.5k|            match = 1;
  247|  23.5k|            groupForChannel[c] = n;
  248|  23.5k|            break;
  249|  23.5k|          }
  250|  75.4k|        }
  251|  54.9k|        if (match == 0) {
  ------------------
  |  Branch (251:13): [True: 31.3k, False: 23.5k]
  ------------------
  252|  31.3k|          if (g >= 8) return DE_MEMORY_ERROR;
  ------------------
  |  Branch (252:15): [True: 0, False: 31.3k]
  ------------------
  253|  31.3k|          uniqueIndex[g] = idx;
  254|  31.3k|          groupForChannel[c] = g;
  255|  31.3k|          g++;
  256|  31.3k|        }
  257|  4.67M|      } else {
  258|  4.67M|        groupForChannel[c] = -1;
  259|  4.67M|      }
  260|  4.73M|    }
  261|   677k|  }
  262|   683k|  *nDrcChannelGroups = g;
  263|       |
  264|   683k|  if (drcSetEffect & (EB_DUCK_OTHER | EB_DUCK_SELF)) {
  ------------------
  |  Branch (264:7): [True: 5.32k, False: 677k]
  ------------------
  265|  8.68k|    for (g = 0; g < *nDrcChannelGroups; g++) {
  ------------------
  |  Branch (265:17): [True: 3.35k, False: 5.32k]
  ------------------
  266|  3.35k|      if (drcSetEffect & EB_DUCK_OTHER) {
  ------------------
  |  Branch (266:11): [True: 804, False: 2.55k]
  ------------------
  267|    804|        uniqueIndex[g] = duckingSequence;
  268|    804|      }
  269|  3.35k|      duckingModificationForChannelGroup[g].duckingScaling = uniqueScaling[g];
  270|  3.35k|      if (uniqueScaling[g] != FL2FXCONST_SGL(1.0f / (float)(1 << 2))) {
  ------------------
  |  |  180|  3.35k|  (FIXP_SGL)(                                                                \
  |  |  181|  3.35k|      ((val) >= 0)                                                           \
  |  |  ------------------
  |  |  |  Branch (181:7): [True: 3.35k, Folded]
  |  |  ------------------
  |  |  182|  3.35k|          ? ((((double)(val) * (FRACT_FIX_SCALE) + 0.5) >=                   \
  |  |  ------------------
  |  |  |  |  146|  3.35k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  3.35k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (182:14): [Folded, False: 3.35k]
  |  |  ------------------
  |  |  183|  3.35k|              (double)(MAXVAL_SGL))                                          \
  |  |  ------------------
  |  |  |  |  152|  3.35k|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  184|  3.35k|                 ? (SHORT)(MAXVAL_SGL)                                       \
  |  |  ------------------
  |  |  |  |  152|      0|  ((signed)0x00007FFF) /* this has to be synchronized to FRACT_BITS */
  |  |  ------------------
  |  |  185|  3.35k|                 : (SHORT)((double)(val) * (double)(FRACT_FIX_SCALE) + 0.5)) \
  |  |  ------------------
  |  |  |  |  146|  3.35k|#define FRACT_FIX_SCALE ((INT64(1) << (FRACT_BITS - 1)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  112|  3.35k|#define FRACT_BITS 16  /* single precision */
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|  3.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 */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (270:11): [True: 1.26k, False: 2.08k]
  ------------------
  271|  1.26k|        duckingModificationForChannelGroup[g].duckingScalingPresent = 1;
  272|  2.08k|      } else {
  273|  2.08k|        duckingModificationForChannelGroup[g].duckingScalingPresent = 0;
  274|  2.08k|      }
  275|  3.35k|    }
  276|  5.32k|  }
  277|       |
  278|   683k|  return DE_OK;
  279|   684k|}

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

FDK_crc.cpp:_ZL15FDKgetValidBitsP13FDK_BITSTREAM:
  577|    705|FDK_INLINE UINT FDKgetValidBits(HANDLE_FDK_BITSTREAM hBitStream) {
  578|    705|  FDKsyncCache(hBitStream);
  579|    705|  return FDK_getValidBits(&hBitStream->hBitBuf);
  580|    705|}
FDK_crc.cpp:_ZL12FDKsyncCacheP13FDK_BITSTREAM:
  452|    814|FDK_INLINE void FDKsyncCache(HANDLE_FDK_BITSTREAM hBitStream) {
  453|    814|  if (hBitStream->ConfigCache == BS_READER)
  ------------------
  |  Branch (453:7): [True: 814, False: 0]
  ------------------
  454|    814|    FDK_pushBack(&hBitStream->hBitBuf, hBitStream->BitsInCache,
  455|    814|                 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|    814|  hBitStream->BitsInCache = 0;
  461|    814|  hBitStream->CacheWord = 0;
  462|    814|}
FDK_crc.cpp:_ZL20FDKpushBiDirectionalP13FDK_BITSTREAMi:
  563|    109|                                     const INT numberOfBits) {
  564|    109|  if (numberOfBits >= 0)
  ------------------
  |  Branch (564:7): [True: 0, False: 109]
  ------------------
  565|      0|    FDKpushFor(hBitStream, numberOfBits);
  566|    109|  else
  567|    109|    FDKpushBack(hBitStream, -numberOfBits);
  568|    109|}
FDK_crc.cpp:_ZL11FDKpushBackP13FDK_BITSTREAMj:
  539|    109|                            const UINT numberOfBits) {
  540|    109|  if ((hBitStream->BitsInCache + numberOfBits) < CACHE_BITS &&
  ------------------
  |  |  111|    218|#define CACHE_BITS 32
  ------------------
  |  Branch (540:7): [True: 97, False: 12]
  ------------------
  541|     97|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (541:7): [True: 97, False: 0]
  ------------------
  542|     97|    hBitStream->BitsInCache += numberOfBits;
  543|     97|    FDKsyncCache(hBitStream); /* sync cache to avoid invalid cache */
  544|     97|  } else {
  545|     12|    FDKsyncCache(hBitStream);
  546|     12|    FDK_pushBack(&hBitStream->hBitBuf, numberOfBits, hBitStream->ConfigCache);
  547|     12|  }
  548|    109|}
FDK_crc.cpp:_ZL10FDKreadBitP13FDK_BITSTREAM:
  228|  2.19k|FDK_INLINE UINT FDKreadBit(HANDLE_FDK_BITSTREAM hBitStream) {
  229|  2.19k|  if (!hBitStream->BitsInCache) {
  ------------------
  |  Branch (229:7): [True: 121, False: 2.07k]
  ------------------
  230|    121|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  231|    121|    hBitStream->BitsInCache = CACHE_BITS - 1;
  ------------------
  |  |  111|    121|#define CACHE_BITS 32
  ------------------
  232|    121|    return hBitStream->CacheWord >> 31;
  233|    121|  }
  234|  2.07k|  hBitStream->BitsInCache--;
  235|       |
  236|  2.07k|  return (hBitStream->CacheWord >> hBitStream->BitsInCache) & 1;
  237|  2.19k|}
aacdecoder_lib.cpp:_ZL16FDKinitBitStreamP13FDK_BITSTREAMPhjj10FDK_BS_CFG:
  166|  3.79k|                      FDK_BS_CFG config = BS_READER) {
  167|  3.79k|  FDK_InitBitBuffer(&hBitStream->hBitBuf, pBuffer, bufSize, validBits);
  168|       |
  169|       |  /* init cache */
  170|  3.79k|  hBitStream->CacheWord = hBitStream->BitsInCache = 0;
  171|  3.79k|  hBitStream->ConfigCache = config;
  172|  3.79k|}
drcDec_reader.cpp:_ZL11FDKreadBitsP13FDK_BITSTREAMj:
  211|  22.5M|                            const UINT numberOfBits) {
  212|  22.5M|  UINT bits = 0;
  213|  22.5M|  INT missingBits = (INT)numberOfBits - (INT)hBitStream->BitsInCache;
  214|       |
  215|  22.5M|  FDK_ASSERT(numberOfBits <= 32);
  ------------------
  |  |  221|  22.5M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 22.5M, False: 0]
  ------------------
  216|  22.5M|  if (missingBits > 0) {
  ------------------
  |  Branch (216:7): [True: 2.96M, False: 19.6M]
  ------------------
  217|  2.96M|    if (missingBits != 32) bits = hBitStream->CacheWord << missingBits;
  ------------------
  |  Branch (217:9): [True: 2.96M, False: 0]
  ------------------
  218|  2.96M|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  219|  2.96M|    hBitStream->BitsInCache += CACHE_BITS;
  ------------------
  |  |  111|  2.96M|#define CACHE_BITS 32
  ------------------
  220|  2.96M|  }
  221|       |
  222|  22.5M|  hBitStream->BitsInCache -= numberOfBits;
  223|       |
  224|  22.5M|  return (bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) &
  225|  22.5M|         BitMask[numberOfBits];
  226|  22.5M|}
drcDec_reader.cpp:_ZL10FDKpushForP13FDK_BITSTREAMj:
  551|   763k|                           const UINT numberOfBits) {
  552|   763k|  if ((hBitStream->BitsInCache > numberOfBits) &&
  ------------------
  |  Branch (552:7): [True: 475k, False: 287k]
  ------------------
  553|   475k|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (553:7): [True: 475k, False: 0]
  ------------------
  554|   475k|    hBitStream->BitsInCache -= numberOfBits;
  555|   475k|  } else {
  556|   287k|    FDKsyncCache(hBitStream);
  557|   287k|    FDK_pushForward(&hBitStream->hBitBuf, numberOfBits,
  558|   287k|                    hBitStream->ConfigCache);
  559|   287k|  }
  560|   763k|}
drcDec_reader.cpp:_ZL12FDKsyncCacheP13FDK_BITSTREAM:
  452|   343k|FDK_INLINE void FDKsyncCache(HANDLE_FDK_BITSTREAM hBitStream) {
  453|   343k|  if (hBitStream->ConfigCache == BS_READER)
  ------------------
  |  Branch (453:7): [True: 343k, False: 0]
  ------------------
  454|   343k|    FDK_pushBack(&hBitStream->hBitBuf, hBitStream->BitsInCache,
  455|   343k|                 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|   343k|  hBitStream->BitsInCache = 0;
  461|   343k|  hBitStream->CacheWord = 0;
  462|   343k|}
drcDec_reader.cpp:_ZL15FDKgetValidBitsP13FDK_BITSTREAM:
  577|  55.2k|FDK_INLINE UINT FDKgetValidBits(HANDLE_FDK_BITSTREAM hBitStream) {
  578|  55.2k|  FDKsyncCache(hBitStream);
  579|  55.2k|  return FDK_getValidBits(&hBitStream->hBitBuf);
  580|  55.2k|}
env_extr.cpp:_ZL11FDKreadBitsP13FDK_BITSTREAMj:
  211|  9.51k|                            const UINT numberOfBits) {
  212|  9.51k|  UINT bits = 0;
  213|  9.51k|  INT missingBits = (INT)numberOfBits - (INT)hBitStream->BitsInCache;
  214|       |
  215|  9.51k|  FDK_ASSERT(numberOfBits <= 32);
  ------------------
  |  |  221|  9.51k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 9.51k, False: 0]
  ------------------
  216|  9.51k|  if (missingBits > 0) {
  ------------------
  |  Branch (216:7): [True: 1.10k, False: 8.40k]
  ------------------
  217|  1.10k|    if (missingBits != 32) bits = hBitStream->CacheWord << missingBits;
  ------------------
  |  Branch (217:9): [True: 1.10k, False: 0]
  ------------------
  218|  1.10k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  219|  1.10k|    hBitStream->BitsInCache += CACHE_BITS;
  ------------------
  |  |  111|  1.10k|#define CACHE_BITS 32
  ------------------
  220|  1.10k|  }
  221|       |
  222|  9.51k|  hBitStream->BitsInCache -= numberOfBits;
  223|       |
  224|  9.51k|  return (bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) &
  225|  9.51k|         BitMask[numberOfBits];
  226|  9.51k|}
env_extr.cpp:_ZL10FDKpushForP13FDK_BITSTREAMj:
  551|  2.77k|                           const UINT numberOfBits) {
  552|  2.77k|  if ((hBitStream->BitsInCache > numberOfBits) &&
  ------------------
  |  Branch (552:7): [True: 2.40k, False: 365]
  ------------------
  553|  2.40k|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (553:7): [True: 2.40k, False: 0]
  ------------------
  554|  2.40k|    hBitStream->BitsInCache -= numberOfBits;
  555|  2.40k|  } else {
  556|    365|    FDKsyncCache(hBitStream);
  557|    365|    FDK_pushForward(&hBitStream->hBitBuf, numberOfBits,
  558|    365|                    hBitStream->ConfigCache);
  559|    365|  }
  560|  2.77k|}
env_extr.cpp:_ZL12FDKsyncCacheP13FDK_BITSTREAM:
  452|    365|FDK_INLINE void FDKsyncCache(HANDLE_FDK_BITSTREAM hBitStream) {
  453|    365|  if (hBitStream->ConfigCache == BS_READER)
  ------------------
  |  Branch (453:7): [True: 365, False: 0]
  ------------------
  454|    365|    FDK_pushBack(&hBitStream->hBitBuf, hBitStream->BitsInCache,
  455|    365|                 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|    365|  hBitStream->BitsInCache = 0;
  461|    365|  hBitStream->CacheWord = 0;
  462|    365|}
env_extr.cpp:_ZL10FDKreadBitP13FDK_BITSTREAM:
  228|  2.77k|FDK_INLINE UINT FDKreadBit(HANDLE_FDK_BITSTREAM hBitStream) {
  229|  2.77k|  if (!hBitStream->BitsInCache) {
  ------------------
  |  Branch (229:7): [True: 201, False: 2.57k]
  ------------------
  230|    201|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  231|    201|    hBitStream->BitsInCache = CACHE_BITS - 1;
  ------------------
  |  |  111|    201|#define CACHE_BITS 32
  ------------------
  232|    201|    return hBitStream->CacheWord >> 31;
  233|    201|  }
  234|  2.57k|  hBitStream->BitsInCache--;
  235|       |
  236|  2.57k|  return (hBitStream->CacheWord >> hBitStream->BitsInCache) & 1;
  237|  2.77k|}
sac_bitdec.cpp:_ZL11FDKreadBitsP13FDK_BITSTREAMj:
  211|  8.38k|                            const UINT numberOfBits) {
  212|  8.38k|  UINT bits = 0;
  213|  8.38k|  INT missingBits = (INT)numberOfBits - (INT)hBitStream->BitsInCache;
  214|       |
  215|  8.38k|  FDK_ASSERT(numberOfBits <= 32);
  ------------------
  |  |  221|  8.38k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 8.38k, False: 0]
  ------------------
  216|  8.38k|  if (missingBits > 0) {
  ------------------
  |  Branch (216:7): [True: 1.41k, False: 6.96k]
  ------------------
  217|  1.41k|    if (missingBits != 32) bits = hBitStream->CacheWord << missingBits;
  ------------------
  |  Branch (217:9): [True: 1.41k, False: 0]
  ------------------
  218|  1.41k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  219|  1.41k|    hBitStream->BitsInCache += CACHE_BITS;
  ------------------
  |  |  111|  1.41k|#define CACHE_BITS 32
  ------------------
  220|  1.41k|  }
  221|       |
  222|  8.38k|  hBitStream->BitsInCache -= numberOfBits;
  223|       |
  224|  8.38k|  return (bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) &
  225|  8.38k|         BitMask[numberOfBits];
  226|  8.38k|}
sac_bitdec.cpp:_ZL15FDKgetValidBitsP13FDK_BITSTREAM:
  577|  3.56k|FDK_INLINE UINT FDKgetValidBits(HANDLE_FDK_BITSTREAM hBitStream) {
  578|  3.56k|  FDKsyncCache(hBitStream);
  579|  3.56k|  return FDK_getValidBits(&hBitStream->hBitBuf);
  580|  3.56k|}
sac_bitdec.cpp:_ZL12FDKsyncCacheP13FDK_BITSTREAM:
  452|  5.76k|FDK_INLINE void FDKsyncCache(HANDLE_FDK_BITSTREAM hBitStream) {
  453|  5.76k|  if (hBitStream->ConfigCache == BS_READER)
  ------------------
  |  Branch (453:7): [True: 5.76k, False: 0]
  ------------------
  454|  5.76k|    FDK_pushBack(&hBitStream->hBitBuf, hBitStream->BitsInCache,
  455|  5.76k|                 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.76k|  hBitStream->BitsInCache = 0;
  461|  5.76k|  hBitStream->CacheWord = 0;
  462|  5.76k|}
sac_bitdec.cpp:_ZL20FDKpushBiDirectionalP13FDK_BITSTREAMi:
  563|    655|                                     const INT numberOfBits) {
  564|    655|  if (numberOfBits >= 0)
  ------------------
  |  Branch (564:7): [True: 498, False: 157]
  ------------------
  565|    498|    FDKpushFor(hBitStream, numberOfBits);
  566|    157|  else
  567|    157|    FDKpushBack(hBitStream, -numberOfBits);
  568|    655|}
sac_bitdec.cpp:_ZL11FDKpushBackP13FDK_BITSTREAMj:
  539|    157|                            const UINT numberOfBits) {
  540|    157|  if ((hBitStream->BitsInCache + numberOfBits) < CACHE_BITS &&
  ------------------
  |  |  111|    314|#define CACHE_BITS 32
  ------------------
  |  Branch (540:7): [True: 109, False: 48]
  ------------------
  541|    109|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (541:7): [True: 109, False: 0]
  ------------------
  542|    109|    hBitStream->BitsInCache += numberOfBits;
  543|    109|    FDKsyncCache(hBitStream); /* sync cache to avoid invalid cache */
  544|    109|  } else {
  545|     48|    FDKsyncCache(hBitStream);
  546|     48|    FDK_pushBack(&hBitStream->hBitBuf, numberOfBits, hBitStream->ConfigCache);
  547|     48|  }
  548|    157|}
sac_bitdec.cpp:_ZL10FDKpushForP13FDK_BITSTREAMj:
  551|    971|                           const UINT numberOfBits) {
  552|    971|  if ((hBitStream->BitsInCache > numberOfBits) &&
  ------------------
  |  Branch (552:7): [True: 0, False: 971]
  ------------------
  553|      0|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (553:7): [True: 0, False: 0]
  ------------------
  554|      0|    hBitStream->BitsInCache -= numberOfBits;
  555|    971|  } else {
  556|    971|    FDKsyncCache(hBitStream);
  557|    971|    FDK_pushForward(&hBitStream->hBitBuf, numberOfBits,
  558|    971|                    hBitStream->ConfigCache);
  559|    971|  }
  560|    971|}
sac_bitdec.cpp:_ZL12FDKbyteAlignP13FDK_BITSTREAMj:
  496|  1.07k|                             UINT alignmentAnchor) {
  497|  1.07k|  FDKsyncCache(hBitStream);
  498|  1.07k|  if (hBitStream->ConfigCache == BS_READER) {
  ------------------
  |  Branch (498:7): [True: 1.07k, False: 0]
  ------------------
  499|  1.07k|    FDK_pushForward(
  500|  1.07k|        &hBitStream->hBitBuf,
  501|  1.07k|        (UINT)((INT)8 - (((INT)alignmentAnchor -
  502|  1.07k|                          (INT)FDK_getValidBits(&hBitStream->hBitBuf)) &
  503|  1.07k|                         0x07)) &
  504|  1.07k|            0x07,
  505|  1.07k|        hBitStream->ConfigCache);
  506|  1.07k|  } 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.07k|}
tpdec_asc.cpp:_ZL11FDKreadBitsP13FDK_BITSTREAMj:
  211|  1.88M|                            const UINT numberOfBits) {
  212|  1.88M|  UINT bits = 0;
  213|  1.88M|  INT missingBits = (INT)numberOfBits - (INT)hBitStream->BitsInCache;
  214|       |
  215|  1.88M|  FDK_ASSERT(numberOfBits <= 32);
  ------------------
  |  |  221|  1.88M|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 1.88M, False: 0]
  ------------------
  216|  1.88M|  if (missingBits > 0) {
  ------------------
  |  Branch (216:7): [True: 570k, False: 1.31M]
  ------------------
  217|   570k|    if (missingBits != 32) bits = hBitStream->CacheWord << missingBits;
  ------------------
  |  Branch (217:9): [True: 469k, False: 101k]
  ------------------
  218|   570k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  219|   570k|    hBitStream->BitsInCache += CACHE_BITS;
  ------------------
  |  |  111|   570k|#define CACHE_BITS 32
  ------------------
  220|   570k|  }
  221|       |
  222|  1.88M|  hBitStream->BitsInCache -= numberOfBits;
  223|       |
  224|  1.88M|  return (bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) &
  225|  1.88M|         BitMask[numberOfBits];
  226|  1.88M|}
tpdec_asc.cpp:_ZL12FDKbyteAlignP13FDK_BITSTREAMj:
  496|    596|                             UINT alignmentAnchor) {
  497|    596|  FDKsyncCache(hBitStream);
  498|    596|  if (hBitStream->ConfigCache == BS_READER) {
  ------------------
  |  Branch (498:7): [True: 596, False: 0]
  ------------------
  499|    596|    FDK_pushForward(
  500|    596|        &hBitStream->hBitBuf,
  501|    596|        (UINT)((INT)8 - (((INT)alignmentAnchor -
  502|    596|                          (INT)FDK_getValidBits(&hBitStream->hBitBuf)) &
  503|    596|                         0x07)) &
  504|    596|            0x07,
  505|    596|        hBitStream->ConfigCache);
  506|    596|  } 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|    596|}
tpdec_asc.cpp:_ZL12FDKsyncCacheP13FDK_BITSTREAM:
  452|   204k|FDK_INLINE void FDKsyncCache(HANDLE_FDK_BITSTREAM hBitStream) {
  453|   204k|  if (hBitStream->ConfigCache == BS_READER)
  ------------------
  |  Branch (453:7): [True: 196k, False: 7.24k]
  ------------------
  454|   196k|    FDK_pushBack(&hBitStream->hBitBuf, hBitStream->BitsInCache,
  455|   196k|                 hBitStream->ConfigCache);
  456|  7.24k|  else if (hBitStream->BitsInCache) /* BS_WRITER */
  ------------------
  |  Branch (456:12): [True: 6.98k, False: 264]
  ------------------
  457|  6.98k|    FDK_put(&hBitStream->hBitBuf, hBitStream->CacheWord,
  458|  6.98k|            hBitStream->BitsInCache);
  459|       |
  460|   204k|  hBitStream->BitsInCache = 0;
  461|   204k|  hBitStream->CacheWord = 0;
  462|   204k|}
tpdec_asc.cpp:_ZL11FDKpushBackP13FDK_BITSTREAMj:
  539|  8.51k|                            const UINT numberOfBits) {
  540|  8.51k|  if ((hBitStream->BitsInCache + numberOfBits) < CACHE_BITS &&
  ------------------
  |  |  111|  17.0k|#define CACHE_BITS 32
  ------------------
  |  Branch (540:7): [True: 776, False: 7.74k]
  ------------------
  541|    776|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (541:7): [True: 776, False: 0]
  ------------------
  542|    776|    hBitStream->BitsInCache += numberOfBits;
  543|    776|    FDKsyncCache(hBitStream); /* sync cache to avoid invalid cache */
  544|  7.74k|  } else {
  545|  7.74k|    FDKsyncCache(hBitStream);
  546|  7.74k|    FDK_pushBack(&hBitStream->hBitBuf, numberOfBits, hBitStream->ConfigCache);
  547|  7.74k|  }
  548|  8.51k|}
tpdec_asc.cpp:_ZL15FDKgetValidBitsP13FDK_BITSTREAM:
  577|   137k|FDK_INLINE UINT FDKgetValidBits(HANDLE_FDK_BITSTREAM hBitStream) {
  578|   137k|  FDKsyncCache(hBitStream);
  579|   137k|  return FDK_getValidBits(&hBitStream->hBitBuf);
  580|   137k|}
tpdec_asc.cpp:_ZL10FDKreadBitP13FDK_BITSTREAM:
  228|  98.3k|FDK_INLINE UINT FDKreadBit(HANDLE_FDK_BITSTREAM hBitStream) {
  229|  98.3k|  if (!hBitStream->BitsInCache) {
  ------------------
  |  Branch (229:7): [True: 1.06k, False: 97.2k]
  ------------------
  230|  1.06k|    hBitStream->CacheWord = FDK_get32(&hBitStream->hBitBuf);
  231|  1.06k|    hBitStream->BitsInCache = CACHE_BITS - 1;
  ------------------
  |  |  111|  1.06k|#define CACHE_BITS 32
  ------------------
  232|  1.06k|    return hBitStream->CacheWord >> 31;
  233|  1.06k|  }
  234|  97.2k|  hBitStream->BitsInCache--;
  235|       |
  236|  97.2k|  return (hBitStream->CacheWord >> hBitStream->BitsInCache) & 1;
  237|  98.3k|}
tpdec_asc.cpp:_ZL10FDKpushForP13FDK_BITSTREAMj:
  551|  55.2k|                           const UINT numberOfBits) {
  552|  55.2k|  if ((hBitStream->BitsInCache > numberOfBits) &&
  ------------------
  |  Branch (552:7): [True: 4.97k, False: 50.2k]
  ------------------
  553|  4.97k|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (553:7): [True: 4.97k, False: 0]
  ------------------
  554|  4.97k|    hBitStream->BitsInCache -= numberOfBits;
  555|  50.2k|  } else {
  556|  50.2k|    FDKsyncCache(hBitStream);
  557|  50.2k|    FDK_pushForward(&hBitStream->hBitBuf, numberOfBits,
  558|  50.2k|                    hBitStream->ConfigCache);
  559|  50.2k|  }
  560|  55.2k|}
tpdec_asc.cpp:_ZL12escapedValueP13FDK_BITSTREAMiii:
  306|   117k|                             int nBits2, int nBits3) {
  307|   117k|  UINT value = FDKreadBits(hBitStream, nBits1);
  308|       |
  309|   117k|  if (value == (UINT)(1 << nBits1) - 1) {
  ------------------
  |  Branch (309:7): [True: 32.0k, False: 85.6k]
  ------------------
  310|  32.0k|    UINT valueAdd = FDKreadBits(hBitStream, nBits2);
  311|  32.0k|    value += valueAdd;
  312|  32.0k|    if (valueAdd == (UINT)(1 << nBits2) - 1) {
  ------------------
  |  Branch (312:9): [True: 26.0k, False: 6.02k]
  ------------------
  313|  26.0k|      value += FDKreadBits(hBitStream, nBits3);
  314|  26.0k|    }
  315|  32.0k|  }
  316|       |
  317|   117k|  return value;
  318|   117k|}
tpdec_asc.cpp:_ZL16FDKinitBitStreamP13FDK_BITSTREAMPhjj10FDK_BS_CFG:
  166|  7.24k|                      FDK_BS_CFG config = BS_READER) {
  167|  7.24k|  FDK_InitBitBuffer(&hBitStream->hBitBuf, pBuffer, bufSize, validBits);
  168|       |
  169|       |  /* init cache */
  170|  7.24k|  hBitStream->CacheWord = hBitStream->BitsInCache = 0;
  171|  7.24k|  hBitStream->ConfigCache = config;
  172|  7.24k|}
tpdec_asc.cpp:_ZL12FDKwriteBitsP13FDK_BITSTREAMjj:
  343|   108k|                              const UINT numberOfBits) {
  344|   108k|  const UINT validMask = BitMask[numberOfBits];
  345|       |
  346|   108k|  if (hBitStream == NULL) {
  ------------------
  |  Branch (346:7): [True: 0, False: 108k]
  ------------------
  347|      0|    return numberOfBits;
  348|      0|  }
  349|       |
  350|   108k|  if ((hBitStream->BitsInCache + numberOfBits) < CACHE_BITS) {
  ------------------
  |  |  111|   108k|#define CACHE_BITS 32
  ------------------
  |  Branch (350:7): [True: 6.98k, False: 101k]
  ------------------
  351|  6.98k|    hBitStream->BitsInCache += numberOfBits;
  352|  6.98k|    hBitStream->CacheWord =
  353|  6.98k|        (hBitStream->CacheWord << numberOfBits) | (value & validMask);
  354|   101k|  } 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|   101k|    int missing_bits = CACHE_BITS - hBitStream->BitsInCache;
  ------------------
  |  |  111|   101k|#define CACHE_BITS 32
  ------------------
  363|   101k|    int remaining_bits = numberOfBits - missing_bits;
  364|   101k|    value = value & validMask;
  365|       |    /* Avoid shift left by 32 positions */
  366|   101k|    UINT CacheWord =
  367|   101k|        (missing_bits == 32) ? 0 : (hBitStream->CacheWord << missing_bits);
  ------------------
  |  Branch (367:9): [True: 101k, False: 0]
  ------------------
  368|   101k|    CacheWord |= (value >> (remaining_bits));
  369|   101k|    FDK_put(&hBitStream->hBitBuf, CacheWord, 32);
  370|       |
  371|   101k|    hBitStream->CacheWord = value;
  372|   101k|    hBitStream->BitsInCache = remaining_bits;
  373|   101k|  }
  374|       |
  375|   108k|  return numberOfBits;
  376|   108k|}
tpdec_lib.cpp:_ZL16FDKinitBitStreamP13FDK_BITSTREAMPhjj10FDK_BS_CFG:
  166|  13.6k|                      FDK_BS_CFG config = BS_READER) {
  167|  13.6k|  FDK_InitBitBuffer(&hBitStream->hBitBuf, pBuffer, bufSize, validBits);
  168|       |
  169|       |  /* init cache */
  170|  13.6k|  hBitStream->CacheWord = hBitStream->BitsInCache = 0;
  171|  13.6k|  hBitStream->ConfigCache = config;
  172|  13.6k|}
tpdec_lib.cpp:_ZL11FDKpushBackP13FDK_BITSTREAMj:
  539|  2.88k|                            const UINT numberOfBits) {
  540|  2.88k|  if ((hBitStream->BitsInCache + numberOfBits) < CACHE_BITS &&
  ------------------
  |  |  111|  5.77k|#define CACHE_BITS 32
  ------------------
  |  Branch (540:7): [True: 80, False: 2.80k]
  ------------------
  541|     80|      (hBitStream->ConfigCache == BS_READER)) {
  ------------------
  |  Branch (541:7): [True: 80, False: 0]
  ------------------
  542|     80|    hBitStream->BitsInCache += numberOfBits;
  543|     80|    FDKsyncCache(hBitStream); /* sync cache to avoid invalid cache */
  544|  2.80k|  } else {
  545|  2.80k|    FDKsyncCache(hBitStream);
  546|  2.80k|    FDK_pushBack(&hBitStream->hBitBuf, numberOfBits, hBitStream->ConfigCache);
  547|  2.80k|  }
  548|  2.88k|}
tpdec_lib.cpp:_ZL12FDKsyncCacheP13FDK_BITSTREAM:
  452|  5.77k|FDK_INLINE void FDKsyncCache(HANDLE_FDK_BITSTREAM hBitStream) {
  453|  5.77k|  if (hBitStream->ConfigCache == BS_READER)
  ------------------
  |  Branch (453:7): [True: 5.77k, False: 0]
  ------------------
  454|  5.77k|    FDK_pushBack(&hBitStream->hBitBuf, hBitStream->BitsInCache,
  455|  5.77k|                 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.77k|  hBitStream->BitsInCache = 0;
  461|  5.77k|  hBitStream->CacheWord = 0;
  462|  5.77k|}
tpdec_lib.cpp:_ZL15FDKgetValidBitsP13FDK_BITSTREAM:
  577|  2.88k|FDK_INLINE UINT FDKgetValidBits(HANDLE_FDK_BITSTREAM hBitStream) {
  578|  2.88k|  FDKsyncCache(hBitStream);
  579|  2.88k|  return FDK_getValidBits(&hBitStream->hBitBuf);
  580|  2.88k|}

_Z4fMinjj:
  416|  6.83k|inline UINT fMin(UINT a, UINT b) { return fixmin_UI(a, b); }
  ------------------
  |  |  129|  6.83k|#define fixmin_UI(a, b) fixmin(a, b)
  ------------------
_Z4fMaxjj:
  415|     94|inline UINT fMax(UINT a, UINT b) { return fixmax_UI(a, b); }
  ------------------
  |  |  128|     94|#define fixmax_UI(a, b) fixmax(a, b)
  ------------------
_Z4fMaxhh:
  418|  1.78k|inline UCHAR fMax(UCHAR a, UCHAR b) {
  419|  1.78k|  return (UCHAR)fixmax_UI((UINT)a, (UINT)b);
  ------------------
  |  |  128|  1.78k|#define fixmax_UI(a, b) fixmax(a, b)
  ------------------
  420|  1.78k|}
_Z4fMinhh:
  421|   127k|inline UCHAR fMin(UCHAR a, UCHAR b) {
  422|   127k|  return (UCHAR)fixmin_UI((UINT)a, (UINT)b);
  ------------------
  |  |  129|   127k|#define fixmin_UI(a, b) fixmin(a, b)
  ------------------
  423|   127k|}
aac_ram.cpp:_ZL4fMaxii:
  401|  2.69k|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|  2.69k|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
aacdecoder.cpp:_ZL4fMinii:
  400|  7.24k|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|  7.24k|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
aacdecoder.cpp:_ZL4fMaxii:
  401|  3.62k|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|  3.62k|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
conceal.cpp:_ZL5fMultss:
  238|   211k|FDK_INLINE LONG fMult(SHORT a, SHORT b) { return fixmul_SS(a, b); }
drcDec_reader.cpp:_ZL4fMinii:
  400|  88.7k|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|  88.7k|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
drcDec_selectionProcess.cpp:_ZL4fMaxii:
  401|  1.10k|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|  1.10k|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
drcDec_selectionProcess.cpp:_ZL4fMinii:
  400|  5.67k|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|  5.67k|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
fixpoint_math.cpp:_ZL5fMultii:
  241|   247k|FDK_INLINE LONG fMult(LONG a, LONG b) { return fixmul_DD(a, b); }
fixpoint_math.cpp:_ZL4fAbsi:
  275|  15.4k|FDK_INLINE FIXP_DBL fAbs(FIXP_DBL x) { return fixabs_D(x); }
fixpoint_math.cpp:_ZL12fMultAddDiv2isi:
  317|   231k|FDK_INLINE FIXP_DBL fMultAddDiv2(FIXP_DBL x, FIXP_SGL a, FIXP_DBL b) {
  318|   231k|  return fixmadddiv2_SD(x, a, b);
  319|   231k|}
fixpoint_math.cpp:_ZL9fMultDiv2ii:
  248|   247k|FDK_INLINE LONG fMultDiv2(LONG a, LONG b) { return fixmuldiv2_DD(a, b); }
fixpoint_math.cpp:_ZL6fNormzi:
  292|  15.4k|FDK_INLINE INT fNormz(FIXP_DBL x) { return fixnormz_D(x); }
fixpoint_math.cpp:_ZL12fMultAddDiv2iii:
  314|  15.4k|FDK_INLINE FIXP_DBL fMultAddDiv2(FIXP_DBL x, FIXP_DBL a, FIXP_DBL b) {
  315|  15.4k|  return fixmadddiv2_DD(x, a, b);
  316|  15.4k|}
fixpoint_math.cpp:_ZL5fNormi:
  294|  15.4k|FDK_INLINE INT fNorm(FIXP_DBL x) { return fixnorm_D(x); }
sac_bitdec.cpp:_ZL4fMaxii:
  401|     89|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|     89|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
sac_bitdec.cpp:_ZL4fMinii:
  400|    533|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|    533|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
sac_dec_lib.cpp:_ZL4fMinii:
  400|     50|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|     50|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
sbrdec_freq_sca.cpp:_ZL4fMinii:
  400|  1.79k|FDK_INLINE FIXP_DBL fMin(FIXP_DBL a, FIXP_DBL b) { return fixmin_D(a, b); }
  ------------------
  |  |  123|  1.79k|#define fixmin_D(a, b) fixmin(a, b)
  ------------------
sbrdec_freq_sca.cpp:_ZL5fMultss:
  238|  30.8k|FDK_INLINE LONG fMult(SHORT a, SHORT b) { return fixmul_SS(a, b); }
sbrdec_freq_sca.cpp:_ZL9fMultDiv2ii:
  248|  1.32M|FDK_INLINE LONG fMultDiv2(LONG a, LONG b) { return fixmuldiv2_DD(a, b); }
sbrdecoder.cpp:_ZL4fMaxii:
  401|  1.26k|FDK_INLINE FIXP_DBL fMax(FIXP_DBL a, FIXP_DBL b) { return fixmax_D(a, b); }
  ------------------
  |  |  122|  1.26k|#define fixmax_D(a, b) fixmax(a, b)
  ------------------
tpdec_asc.cpp:_ZL4fAbsi:
  275|  14.5k|FDK_INLINE FIXP_DBL fAbs(FIXP_DBL x) { return fixabs_D(x); }

_Z14fixmadddiv2_DDiii:
  124|   247k|inline FIXP_DBL fixmadddiv2_DD(FIXP_DBL x, const FIXP_DBL a, const FIXP_DBL b) {
  125|   247k|  return (x + fMultDiv2(a, b));
  126|   247k|}
_Z14fixmadddiv2_SDisi:
  130|   231k|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|   231k|  return fixmadddiv2_DD(x, FX_SGL2FX_DBL(a), b);
  ------------------
  |  |  219|   231k|  ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  113|   231k|#define DFRACT_BITS 32 /* double precision */
  |  |  ------------------
  |  |                 ((FIXP_DBL)((LONG)(val) << (DFRACT_BITS - FRACT_BITS)))
  |  |  ------------------
  |  |  |  |  112|   231k|#define FRACT_BITS 16  /* single precision */
  |  |  ------------------
  ------------------
  135|   231k|#endif
  136|   231k|}

_Z6fixminIjET_S0_S0_:
  113|   134k|inline T fixmin(T a, T b) {
  114|   134k|  return (a < b ? a : b);
  ------------------
  |  Branch (114:11): [True: 80.3k, False: 53.7k]
  ------------------
  115|   134k|}
_Z6fixmaxIiET_S0_S0_:
  118|  8.77k|inline T fixmax(T a, T b) {
  119|  8.77k|  return (a > b ? a : b);
  ------------------
  |  Branch (119:11): [True: 1.27k, False: 7.49k]
  ------------------
  120|  8.77k|}
_Z6fixminIiET_S0_S0_:
  113|   104k|inline T fixmin(T a, T b) {
  114|   104k|  return (a < b ? a : b);
  ------------------
  |  Branch (114:11): [True: 100k, False: 3.97k]
  ------------------
  115|   104k|}
_Z6fixmaxIjET_S0_S0_:
  118|  1.87k|inline T fixmax(T a, T b) {
  119|  1.87k|  return (a > b ? a : b);
  ------------------
  |  Branch (119:11): [True: 107, False: 1.77k]
  ------------------
  120|  1.87k|}

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

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

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

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

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

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

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

FDK_InitBitBuffer:
  127|  24.7k|                       UINT validBits) {
  128|  24.7k|  hBitBuf->ValidBits = validBits;
  129|  24.7k|  hBitBuf->ReadOffset = 0;
  130|  24.7k|  hBitBuf->WriteOffset = 0;
  131|  24.7k|  hBitBuf->BitNdx = 0;
  132|       |
  133|  24.7k|  hBitBuf->Buffer = pBuffer;
  134|  24.7k|  hBitBuf->bufSize = bufSize;
  135|  24.7k|  hBitBuf->bufBits = (bufSize << 3);
  136|       |  /*assure bufsize (2^n) */
  137|  24.7k|  FDK_ASSERT(hBitBuf->ValidBits <= hBitBuf->bufBits);
  ------------------
  |  |  221|  24.7k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (137:3): [True: 24.7k, False: 0]
  ------------------
  138|  24.7k|  FDK_ASSERT((bufSize > 0) && (bufSize <= MAX_BUFSIZE_BYTES));
  ------------------
  |  |  221|  24.7k|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (138:3): [True: 24.7k, False: 0]
  |  Branch (138:3): [True: 24.7k, False: 0]
  |  Branch (138:3): [True: 24.7k, False: 0]
  ------------------
  139|  24.7k|  {
  140|  24.7k|    UINT x = 0, n = bufSize;
  141|   293k|    for (x = 0; n > 0; x++, n >>= 1) {
  ------------------
  |  Branch (141:17): [True: 268k, False: 24.7k]
  ------------------
  142|   268k|    }
  143|  24.7k|    if (bufSize != ((UINT)1 << (x - 1))) {
  ------------------
  |  Branch (143:9): [True: 0, False: 24.7k]
  ------------------
  144|       |      FDK_ASSERT(0);
  ------------------
  |  |  221|      0|#define FDK_ASSERT(x) assert(x)
  ------------------
  |  Branch (144:7): [Folded, False: 0]
  ------------------
  145|      0|    }
  146|  24.7k|  }
  147|  24.7k|}
FDK_get32:
  181|  3.53M|INT FDK_get32(HANDLE_FDK_BITBUF hBitBuf) {
  182|  3.53M|  UINT BitNdx = hBitBuf->BitNdx + 32;
  183|  3.53M|  hBitBuf->BitNdx = BitNdx & (hBitBuf->bufBits - 1);
  184|  3.53M|  hBitBuf->ValidBits = (UINT)((INT)hBitBuf->ValidBits - (INT)32);
  185|       |
  186|  3.53M|  UINT byteOffset = (BitNdx - 1) >> 3;
  187|  3.53M|  if (BitNdx <= hBitBuf->bufBits) {
  ------------------
  |  Branch (187:7): [True: 3.52M, False: 10.5k]
  ------------------
  188|  3.52M|    UINT cache = (hBitBuf->Buffer[(byteOffset - 3)] << 24) |
  189|  3.52M|                 (hBitBuf->Buffer[(byteOffset - 2)] << 16) |
  190|  3.52M|                 (hBitBuf->Buffer[(byteOffset - 1)] << 8) |
  191|  3.52M|                 hBitBuf->Buffer[(byteOffset - 0)];
  192|       |
  193|  3.52M|    if ((BitNdx = (BitNdx & 7)) != 0) {
  ------------------
  |  Branch (193:9): [True: 897k, False: 2.63M]
  ------------------
  194|   897k|      cache = (cache >> (8 - BitNdx)) |
  195|   897k|              ((UINT)hBitBuf->Buffer[byteOffset - 4] << (24 + BitNdx));
  196|   897k|    }
  197|  3.52M|    return (cache);
  198|  3.52M|  } else {
  199|  10.5k|    UINT byte_mask = hBitBuf->bufSize - 1;
  200|  10.5k|    UINT cache = (hBitBuf->Buffer[(byteOffset - 3) & byte_mask] << 24) |
  201|  10.5k|                 (hBitBuf->Buffer[(byteOffset - 2) & byte_mask] << 16) |
  202|  10.5k|                 (hBitBuf->Buffer[(byteOffset - 1) & byte_mask] << 8) |
  203|  10.5k|                 hBitBuf->Buffer[(byteOffset - 0) & byte_mask];
  204|       |
  205|  10.5k|    if ((BitNdx = (BitNdx & 7)) != 0) {
  ------------------
  |  Branch (205:9): [True: 1.75k, False: 8.76k]
  ------------------
  206|  1.75k|      cache = (cache >> (8 - BitNdx)) |
  207|  1.75k|              ((UINT)hBitBuf->Buffer[(byteOffset - 4) & byte_mask]
  208|  1.75k|               << (24 + BitNdx));
  209|  1.75k|    }
  210|  10.5k|    return (cache);
  211|  10.5k|  }
  212|  3.53M|}
FDK_put:
  248|   108k|void FDK_put(HANDLE_FDK_BITBUF hBitBuf, UINT value, const UINT numberOfBits) {
  249|   108k|  if (numberOfBits != 0) {
  ------------------
  |  Branch (249:7): [True: 108k, False: 0]
  ------------------
  250|   108k|    UINT byteOffset0 = hBitBuf->BitNdx >> 3;
  251|   108k|    UINT bitOffset = hBitBuf->BitNdx & 0x7;
  252|       |
  253|   108k|    hBitBuf->BitNdx = (hBitBuf->BitNdx + numberOfBits) & (hBitBuf->bufBits - 1);
  254|   108k|    hBitBuf->ValidBits += numberOfBits;
  255|       |
  256|   108k|    UINT byteMask = hBitBuf->bufSize - 1;
  257|       |
  258|   108k|    UINT byteOffset1 = (byteOffset0 + 1) & byteMask;
  259|   108k|    UINT byteOffset2 = (byteOffset0 + 2) & byteMask;
  260|   108k|    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|   108k|    UINT tmp = (value << (32 - numberOfBits)) >> bitOffset;
  266|   108k|    UINT mask = ~((BitMask[numberOfBits] << (32 - numberOfBits)) >> bitOffset);
  267|       |
  268|       |    // read all 4 bytes from buffer and create a 32-bit cache
  269|   108k|    UINT cache = (((UINT)hBitBuf->Buffer[byteOffset0]) << 24) |
  270|   108k|                 (((UINT)hBitBuf->Buffer[byteOffset1]) << 16) |
  271|   108k|                 (((UINT)hBitBuf->Buffer[byteOffset2]) << 8) |
  272|   108k|                 (((UINT)hBitBuf->Buffer[byteOffset3]) << 0);
  273|       |
  274|   108k|    cache = (cache & mask) | tmp;
  275|   108k|    hBitBuf->Buffer[byteOffset0] = (UCHAR)(cache >> 24);
  276|   108k|    hBitBuf->Buffer[byteOffset1] = (UCHAR)(cache >> 16);
  277|   108k|    hBitBuf->Buffer[byteOffset2] = (UCHAR)(cache >> 8);
  278|   108k|    hBitBuf->Buffer[byteOffset3] = (UCHAR)(cache >> 0);
  279|       |
  280|   108k|    if ((bitOffset + numberOfBits) > 32) {
  ------------------
  |  Branch (280:9): [True: 0, False: 108k]
  ------------------
  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|   108k|  }
  291|   108k|}
FDK_pushBack:
  339|   563k|                  UCHAR config) {
  340|   563k|  hBitBuf->ValidBits =
  341|   563k|      (config == 0) ? (UINT)((INT)hBitBuf->ValidBits + (INT)numberOfBits)
  ------------------
  |  Branch (341:7): [True: 563k, False: 0]
  ------------------
  342|   563k|                    : ((UINT)((INT)hBitBuf->ValidBits - (INT)numberOfBits));
  343|   563k|  hBitBuf->BitNdx = ((UINT)((INT)hBitBuf->BitNdx - (INT)numberOfBits)) &
  344|   563k|                    (hBitBuf->bufBits - 1);
  345|   563k|}
FDK_pushForward:
  349|   341k|                     UCHAR config) {
  350|   341k|  hBitBuf->ValidBits =
  351|   341k|      (config == 0) ? ((UINT)((INT)hBitBuf->ValidBits - (INT)numberOfBits))
  ------------------
  |  Branch (351:7): [True: 341k, False: 0]
  ------------------
  352|   341k|                    : (UINT)((INT)hBitBuf->ValidBits + (INT)numberOfBits);
  353|   341k|  hBitBuf->BitNdx =
  354|   341k|      (UINT)((INT)hBitBuf->BitNdx + (INT)numberOfBits) & (hBitBuf->bufBits - 1);
  355|   341k|}
FDK_getValidBits:
  358|   201k|UINT FDK_getValidBits(HANDLE_FDK_BITBUF hBitBuf) { return hBitBuf->ValidBits; }

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

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

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

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

_Z28FDK_QmfDomain_ClearRequestedP17FDK_QMF_DOMAIN_GC:
  779|  9.72k|void FDK_QmfDomain_ClearRequested(HANDLE_FDK_QMF_DOMAIN_GC hgc) {
  780|  9.72k|  hgc->qmfDomainExplicitConfig = 0;
  781|  9.72k|  hgc->flags_requested = 0;
  782|  9.72k|  hgc->nInputChannels_requested = 0;
  783|  9.72k|  hgc->nOutputChannels_requested = 0;
  784|  9.72k|  hgc->parkChannel_requested = 0;
  785|  9.72k|  hgc->nBandsAnalysis_requested = 0;
  786|  9.72k|  hgc->nBandsSynthesis_requested = 0;
  787|  9.72k|  hgc->nQmfTimeSlots_requested = 0;
  788|  9.72k|  hgc->nQmfOvTimeSlots_requested = 0;
  789|  9.72k|  hgc->nQmfProcBands_requested = 0;
  790|  9.72k|  hgc->nQmfProcChannels_requested = 0;
  791|  9.72k|}
_Z21FDK_QmfDomain_FreeMemP14FDK_QMF_DOMAIN:
  997|  2.88k|void FDK_QmfDomain_FreeMem(HANDLE_FDK_QMF_DOMAIN hqd) {
  998|  2.88k|  FDK_QmfDomain_FreeWorkBuffer(hqd);
  999|       |
 1000|  2.88k|  FDK_QmfDomain_FreePersistentMemory(hqd);
 1001|       |
 1002|  2.88k|  FDK_QmfDomain_ClearFilterBank(hqd);
 1003|       |
 1004|  2.88k|  FDK_QmfDomain_ClearConfigured(&hqd->globalConf);
 1005|       |
 1006|  2.88k|  FDK_QmfDomain_ClearRequested(&hqd->globalConf);
 1007|  2.88k|}
_Z19FDK_QmfDomain_CloseP14FDK_QMF_DOMAIN:
 1009|  6.83k|void FDK_QmfDomain_Close(HANDLE_FDK_QMF_DOMAIN hqd) {
 1010|  6.83k|  FDK_QmfDomain_FreeWorkBuffer(hqd);
 1011|       |
 1012|  6.83k|  FDK_QmfDomain_FreePersistentMemory(hqd);
 1013|  6.83k|}
FDK_qmf_domain.cpp:_ZL28FDK_QmfDomain_FreeWorkBufferP14FDK_QMF_DOMAIN:
  987|  9.72k|static void FDK_QmfDomain_FreeWorkBuffer(HANDLE_FDK_QMF_DOMAIN hqd) {
  988|  9.72k|  FIXP_DBL **pWorkBuffer = hqd->globalConf.pWorkBuffer;
  989|       |
  990|  9.72k|  if (pWorkBuffer[0]) FreeQmfWorkBufferCore6(&pWorkBuffer[0]);
  ------------------
  |  Branch (990:7): [True: 0, False: 9.72k]
  ------------------
  991|  9.72k|  if (pWorkBuffer[1]) FreeQmfWorkBufferCore1(&pWorkBuffer[1]);
  ------------------
  |  Branch (991:7): [True: 0, False: 9.72k]
  ------------------
  992|  9.72k|  if (pWorkBuffer[2]) FreeQmfWorkBufferCore3(&pWorkBuffer[2]);
  ------------------
  |  Branch (992:7): [True: 0, False: 9.72k]
  ------------------
  993|  9.72k|  if (pWorkBuffer[3]) FreeQmfWorkBufferCore4(&pWorkBuffer[3]);
  ------------------
  |  Branch (993:7): [True: 0, False: 9.72k]
  ------------------
  994|  9.72k|  if (pWorkBuffer[4]) FreeQmfWorkBufferCore7(&pWorkBuffer[4]);
  ------------------
  |  Branch (994:7): [True: 0, False: 9.72k]
  ------------------
  995|  9.72k|}
FDK_qmf_domain.cpp:_ZL34FDK_QmfDomain_FreePersistentMemoryP14FDK_QMF_DOMAIN:
  199|  9.72k|static int FDK_QmfDomain_FreePersistentMemory(HANDLE_FDK_QMF_DOMAIN qd) {
  200|  9.72k|  int err = 0;
  201|  9.72k|  int ch;
  202|       |
  203|  97.2k|  for (ch = 0; ch < ((8) + (1)); ch++) {
  ------------------
  |  Branch (203:16): [True: 87.4k, False: 9.72k]
  ------------------
  204|  87.4k|    if (qd->QmfDomainIn[ch].pAnaQmfStates) {
  ------------------
  |  Branch (204:9): [True: 0, False: 87.4k]
  ------------------
  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|  87.4k|    if (qd->QmfDomainIn[ch].pOverlapBuffer) {
  ------------------
  |  Branch (218:9): [True: 0, False: 87.4k]
  ------------------
  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|  87.4k|    if (qd->QmfDomainIn[ch].hQmfSlotsReal) {
  ------------------
  |  Branch (228:9): [True: 0, False: 87.4k]
  ------------------
  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|  87.4k|    if (qd->QmfDomainIn[ch].hQmfSlotsImag) {
  ------------------
  |  Branch (238:9): [True: 0, False: 87.4k]
  ------------------
  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|  87.4k|  }
  249|       |
  250|  97.2k|  for (ch = 0; ch < ((8) + (1)); ch++) {
  ------------------
  |  Branch (250:16): [True: 87.4k, False: 9.72k]
  ------------------
  251|  87.4k|    if (qd->QmfDomainOut[ch].pSynQmfStates) {
  ------------------
  |  Branch (251:9): [True: 0, False: 87.4k]
  ------------------
  252|      0|      FreeSynQmfStates(&qd->QmfDomainOut[ch].pSynQmfStates);
  253|      0|    }
  254|  87.4k|  }
  255|       |
  256|  9.72k|  return err;
  257|  9.72k|}
FDK_qmf_domain.cpp:_ZL29FDK_QmfDomain_ClearFilterBankP14FDK_QMF_DOMAIN:
  806|  2.88k|static void FDK_QmfDomain_ClearFilterBank(HANDLE_FDK_QMF_DOMAIN hqd) {
  807|  2.88k|  int ch;
  808|       |
  809|  28.8k|  for (ch = 0; ch < ((8) + (1)); ch++) {
  ------------------
  |  Branch (809:16): [True: 25.9k, False: 2.88k]
  ------------------
  810|  25.9k|    FDKmemclear(&hqd->QmfDomainIn[ch].fb, sizeof(hqd->QmfDomainIn[ch].fb));
  811|  25.9k|  }
  812|       |
  813|  28.8k|  for (ch = 0; ch < ((8) + (1)); ch++) {
  ------------------
  |  Branch (813:16): [True: 25.9k, False: 2.88k]
  ------------------
  814|  25.9k|    FDKmemclear(&hqd->QmfDomainOut[ch].fb, sizeof(hqd->QmfDomainIn[ch].fb));
  815|  25.9k|  }
  816|  2.88k|}
FDK_qmf_domain.cpp:_ZL29FDK_QmfDomain_ClearConfiguredP17FDK_QMF_DOMAIN_GC:
  793|  2.88k|static void FDK_QmfDomain_ClearConfigured(HANDLE_FDK_QMF_DOMAIN_GC hgc) {
  794|  2.88k|  hgc->flags = 0;
  795|  2.88k|  hgc->nInputChannels = 0;
  796|  2.88k|  hgc->nOutputChannels = 0;
  797|  2.88k|  hgc->parkChannel = 0;
  798|  2.88k|  hgc->nBandsAnalysis = 0;
  799|  2.88k|  hgc->nBandsSynthesis = 0;
  800|  2.88k|  hgc->nQmfTimeSlots = 0;
  801|  2.88k|  hgc->nQmfOvTimeSlots = 0;
  802|  2.88k|  hgc->nQmfProcBands = 0;
  803|  2.88k|  hgc->nQmfProcChannels = 0;
  804|  2.88k|}

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

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

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

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

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

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

pcmDmx_Open:
 1622|  6.83k|PCMDMX_ERROR pcmDmx_Open(HANDLE_PCM_DOWNMIX *pSelf) {
 1623|  6.83k|  HANDLE_PCM_DOWNMIX self;
 1624|       |
 1625|  6.83k|  if (pSelf == NULL) {
  ------------------
  |  Branch (1625:7): [True: 0, False: 6.83k]
  ------------------
 1626|      0|    return (PCMDMX_INVALID_HANDLE);
 1627|      0|  }
 1628|       |
 1629|  6.83k|  *pSelf = NULL;
 1630|       |
 1631|  6.83k|  self = (HANDLE_PCM_DOWNMIX)GetPcmDmxInstance(0);
 1632|  6.83k|  if (self == NULL) {
  ------------------
  |  Branch (1632:7): [True: 0, False: 6.83k]
  ------------------
 1633|      0|    return (PCMDMX_OUT_OF_MEMORY);
 1634|      0|  }
 1635|       |
 1636|       |  /* Reset the full instance */
 1637|  6.83k|  pcmDmx_Reset(self, PCMDMX_RESET_FULL);
  ------------------
  |  |  325|  6.83k|#define PCMDMX_RESET_FULL (PCMDMX_RESET_PARAMS | PCMDMX_RESET_BS_DATA)
  |  |  ------------------
  |  |  |  |  323|  6.83k|#define PCMDMX_RESET_PARAMS (1)
  |  |  ------------------
  |  |               #define PCMDMX_RESET_FULL (PCMDMX_RESET_PARAMS | PCMDMX_RESET_BS_DATA)
  |  |  ------------------
  |  |  |  |  324|  6.83k|#define PCMDMX_RESET_BS_DATA (2)
  |  |  ------------------
  ------------------
 1638|       |
 1639|  6.83k|  *pSelf = self;
 1640|       |
 1641|  6.83k|  return (PCMDMX_OK);
 1642|  6.83k|}
pcmDmx_Reset:
 1649|  12.4k|PCMDMX_ERROR pcmDmx_Reset(HANDLE_PCM_DOWNMIX self, UINT flags) {
 1650|  12.4k|  if (self == NULL) {
  ------------------
  |  Branch (1650:7): [True: 0, False: 12.4k]
  ------------------
 1651|      0|    return (PCMDMX_INVALID_HANDLE);
 1652|      0|  }
 1653|       |
 1654|  12.4k|  if (flags & PCMDMX_RESET_PARAMS) {
  ------------------
  |  |  323|  12.4k|#define PCMDMX_RESET_PARAMS (1)
  ------------------
  |  Branch (1654:7): [True: 6.83k, False: 5.64k]
  ------------------
 1655|  6.83k|    PCM_DMX_USER_PARAMS *pParams = &self->userParams;
 1656|       |
 1657|  6.83k|    pParams->dualChannelMode = STEREO_MODE;
 1658|  6.83k|    pParams->pseudoSurrMode = NEVER_DO_PS_DMX;
 1659|  6.83k|    pParams->numOutChannelsMax = (6);
 1660|  6.83k|    pParams->numOutChannelsMin = (0);
 1661|  6.83k|    pParams->frameDelay = 0;
 1662|  6.83k|    pParams->expiryFrame = (0);
 1663|       |
 1664|  6.83k|    self->applyProcessing = 0;
 1665|  6.83k|  }
 1666|       |
 1667|  12.4k|  if (flags & PCMDMX_RESET_BS_DATA) {
  ------------------
  |  |  324|  12.4k|#define PCMDMX_RESET_BS_DATA (2)
  ------------------
  |  Branch (1667:7): [True: 12.4k, False: 0]
  ------------------
 1668|  12.4k|    int slot;
 1669|       |    /* Init all slots with a default set */
 1670|  37.4k|    for (slot = 0; slot <= (1); slot += 1) {
  ------------------
  |  Branch (1670:20): [True: 24.9k, False: 12.4k]
  ------------------
 1671|  24.9k|      FDKmemcpy(&self->bsMetaData[slot], &dfltMetaData,
 1672|  24.9k|                sizeof(DMX_BS_META_DATA));
 1673|  24.9k|    }
 1674|  12.4k|  }
 1675|       |
 1676|  12.4k|  return (PCMDMX_OK);
 1677|  12.4k|}
pcmDmx_SetParam:
 1686|  14.8k|                             const INT value) {
 1687|  14.8k|  switch (param) {
 1688|      0|    case DMX_PROFILE_SETTING:
  ------------------
  |  Branch (1688:5): [True: 0, False: 14.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.58k|    case DMX_BS_DATA_EXPIRY_FRAME:
  ------------------
  |  Branch (1702:5): [True: 5.58k, False: 9.22k]
  ------------------
 1703|  5.58k|      if (self == NULL) return (PCMDMX_INVALID_HANDLE);
  ------------------
  |  Branch (1703:11): [True: 0, False: 5.58k]
  ------------------
 1704|  5.58k|      self->userParams.expiryFrame = (value > 0) ? (UINT)value : 0;
  ------------------
  |  Branch (1704:38): [True: 0, False: 5.58k]
  ------------------
 1705|  5.58k|      break;
 1706|       |
 1707|  9.22k|    case DMX_BS_DATA_DELAY:
  ------------------
  |  Branch (1707:5): [True: 9.22k, False: 5.58k]
  ------------------
 1708|  9.22k|      if ((value > (1)) || (value < 0)) {
  ------------------
  |  Branch (1708:11): [True: 0, False: 9.22k]
  |  Branch (1708:28): [True: 0, False: 9.22k]
  ------------------
 1709|      0|        return (PCMDMX_UNABLE_TO_SET_PARAM);
 1710|      0|      }
 1711|  9.22k|      if (self == NULL) {
  ------------------
  |  Branch (1711:11): [True: 0, False: 9.22k]
  ------------------
 1712|      0|        return (PCMDMX_INVALID_HANDLE);
 1713|      0|      }
 1714|  9.22k|      self->userParams.frameDelay = (UCHAR)value;
 1715|  9.22k|      break;
 1716|       |
 1717|      0|    case MIN_NUMBER_OF_OUTPUT_CHANNELS:
  ------------------
  |  Branch (1717:5): [True: 0, False: 14.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: 14.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: 14.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: 14.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: 14.8k]
  ------------------
 1796|      0|      return (PCMDMX_UNKNOWN_PARAM);
 1797|  14.8k|  }
 1798|       |
 1799|  14.8k|  return (PCMDMX_OK);
 1800|  14.8k|}
pcmDmx_GetParam:
 1809|  3.62k|                             INT *const pValue) {
 1810|  3.62k|  PCM_DMX_USER_PARAMS *pUsrParams;
 1811|       |
 1812|  3.62k|  if ((self == NULL) || (pValue == NULL)) {
  ------------------
  |  Branch (1812:7): [True: 0, False: 3.62k]
  |  Branch (1812:25): [True: 0, False: 3.62k]
  ------------------
 1813|      0|    return (PCMDMX_INVALID_HANDLE);
 1814|      0|  }
 1815|  3.62k|  pUsrParams = &self->userParams;
 1816|       |
 1817|  3.62k|  switch (param) {
 1818|      0|    case DMX_PROFILE_SETTING:
  ------------------
  |  Branch (1818:5): [True: 0, False: 3.62k]
  ------------------
 1819|      0|      *pValue = (INT)pUsrParams->dmxProfile;
 1820|      0|      break;
 1821|      0|    case DMX_BS_DATA_EXPIRY_FRAME:
  ------------------
  |  Branch (1821:5): [True: 0, False: 3.62k]
  ------------------
 1822|      0|      *pValue = (INT)pUsrParams->expiryFrame;
 1823|      0|      break;
 1824|      0|    case DMX_BS_DATA_DELAY:
  ------------------
  |  Branch (1824:5): [True: 0, False: 3.62k]
  ------------------
 1825|      0|      *pValue = (INT)pUsrParams->frameDelay;
 1826|      0|      break;
 1827|  3.62k|    case MIN_NUMBER_OF_OUTPUT_CHANNELS:
  ------------------
  |  Branch (1827:5): [True: 3.62k, False: 0]
  ------------------
 1828|  3.62k|      *pValue = (INT)pUsrParams->numOutChannelsMin;
 1829|  3.62k|      break;
 1830|      0|    case MAX_NUMBER_OF_OUTPUT_CHANNELS:
  ------------------
  |  Branch (1830:5): [True: 0, False: 3.62k]
  ------------------
 1831|      0|      *pValue = (INT)pUsrParams->numOutChannelsMax;
 1832|      0|      break;
 1833|      0|    case DMX_DUAL_CHANNEL_MODE:
  ------------------
  |  Branch (1833:5): [True: 0, False: 3.62k]
  ------------------
 1834|      0|      *pValue = (INT)pUsrParams->dualChannelMode;
 1835|      0|      break;
 1836|      0|    case DMX_PSEUDO_SURROUND_MODE:
  ------------------
  |  Branch (1836:5): [True: 0, False: 3.62k]
  ------------------
 1837|      0|      *pValue = (INT)pUsrParams->pseudoSurrMode;
 1838|      0|      break;
 1839|      0|    default:
  ------------------
  |  Branch (1839:5): [True: 0, False: 3.62k]
  ------------------
 1840|      0|      return (PCMDMX_UNKNOWN_PARAM);
 1841|  3.62k|  }
 1842|       |
 1843|  3.62k|  return (PCMDMX_OK);
 1844|  3.62k|}
pcmDmx_SetMatrixMixdownFromPce:
 2022|    303|                                            int pseudoSurroundEnable) {
 2023|    303|  if (self == NULL) {
  ------------------
  |  Branch (2023:7): [True: 0, False: 303]
  ------------------
 2024|      0|    return (PCMDMX_INVALID_HANDLE);
 2025|      0|  }
 2026|       |
 2027|    303|  {
 2028|    303|    DMX_BS_META_DATA *pBsMetaData = &self->bsMetaData[0];
 2029|       |
 2030|    303|    if (matrixMixdownPresent) {
  ------------------
  |  Branch (2030:9): [True: 28, False: 275]
  ------------------
 2031|     28|      pBsMetaData->pseudoSurround = (pseudoSurroundEnable) ? 1 : 0;
  ------------------
  |  Branch (2031:37): [True: 15, False: 13]
  ------------------
 2032|     28|      pBsMetaData->matrixMixdownIdx = matrixMixdownIdx & 0x03;
 2033|     28|      pBsMetaData->typeFlags |= TYPE_PCE_DATA;
  ------------------
  |  |  327|     28|#define TYPE_PCE_DATA (0x01)
  ------------------
 2034|       |      /* Reset expiry counter */
 2035|     28|      pBsMetaData->expiryCount = 0;
 2036|     28|    }
 2037|    303|  }
 2038|       |
 2039|    303|  return (PCMDMX_OK);
 2040|    303|}
pcmDmx_Close:
 2635|  6.83k|PCMDMX_ERROR pcmDmx_Close(HANDLE_PCM_DOWNMIX *pSelf) {
 2636|  6.83k|  if (pSelf == NULL) {
  ------------------
  |  Branch (2636:7): [True: 0, False: 6.83k]
  ------------------
 2637|      0|    return (PCMDMX_INVALID_HANDLE);
 2638|      0|  }
 2639|       |
 2640|  6.83k|  FreePcmDmxInstance(pSelf);
 2641|  6.83k|  *pSelf = NULL;
 2642|       |
 2643|  6.83k|  return (PCMDMX_OK);
 2644|  6.83k|}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

FDK_chMapDescr_isValid:
  228|  5.96k|int FDK_chMapDescr_isValid(const FDK_channelMapDescr* const pMapDescr) {
  229|  5.96k|  int result = 0;
  230|  5.96k|  UINT i;
  231|       |
  232|  5.96k|  if (pMapDescr != NULL) {
  ------------------
  |  Branch (232:7): [True: 5.96k, False: 0]
  ------------------
  233|  5.96k|    result = 1;
  234|  95.4k|    for (i = 0; (i < pMapDescr->mapInfoTabLen) && result; i += 1) {
  ------------------
  |  Branch (234:17): [True: 89.4k, False: 5.96k]
  |  Branch (234:51): [True: 89.4k, False: 0]
  ------------------
  235|  89.4k|      if (!fdk_chMapDescr_isValidMap(&pMapDescr->pMapInfoTab[i])) {
  ------------------
  |  Branch (235:11): [True: 0, False: 89.4k]
  ------------------
  236|      0|        result = 0;
  237|      0|      }
  238|  89.4k|    }
  239|  5.96k|  }
  240|  5.96k|  return result;
  241|  5.96k|}
FDK_chMapDescr_init:
  248|  6.83k|                         const UINT mapInfoTabLen, const UINT fPassThrough) {
  249|  6.83k|  if (pMapDescr != NULL) {
  ------------------
  |  Branch (249:7): [True: 6.83k, False: 0]
  ------------------
  250|  6.83k|    int useDefaultTab = 1;
  251|       |
  252|  6.83k|    pMapDescr->fPassThrough = (fPassThrough == 0) ? 0 : 1;
  ------------------
  |  Branch (252:31): [True: 6.83k, False: 0]
  ------------------
  253|       |
  254|  6.83k|    if ((pMapInfoTab != NULL) && (mapInfoTabLen > 0)) {
  ------------------
  |  Branch (254:9): [True: 0, False: 6.83k]
  |  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|  6.83k|    if (useDefaultTab != 0) {
  ------------------
  |  Branch (261:9): [True: 6.83k, False: 0]
  ------------------
  262|       |      /* Set default table. */
  263|  6.83k|      pMapDescr->pMapInfoTab = mapInfoTabDflt;
  264|  6.83k|      pMapDescr->mapInfoTabLen = DFLT_CH_MAP_TAB_LEN;
  ------------------
  |  |  110|  6.83k|  (15) /* Length of the default channel map info table. */
  ------------------
  265|  6.83k|    }
  266|  6.83k|  }
  267|  6.83k|}
syslib_channelMapDescr.cpp:_ZL25fdk_chMapDescr_isValidMapPK16CHANNEL_MAP_INFO:
  184|  89.4k|static int fdk_chMapDescr_isValidMap(const CHANNEL_MAP_INFO* const pMapInfo) {
  185|  89.4k|  int result = 1;
  186|  89.4k|  UINT i;
  187|       |
  188|  89.4k|  if (pMapInfo == NULL) {
  ------------------
  |  Branch (188:7): [True: 0, False: 89.4k]
  ------------------
  189|      0|    result = 0;
  190|  89.4k|  } else {
  191|  89.4k|    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|  89.4k|    if (numChannels < 32) { /* Optimized version for less than 32 channels.
  ------------------
  |  Branch (195:9): [True: 89.4k, False: 0]
  ------------------
  196|       |                               Needs only one loop. */
  197|  89.4k|      UINT mappedChMask = 0x0;
  198|  1.12M|      for (i = 0; i < numChannels; i += 1) {
  ------------------
  |  Branch (198:19): [True: 1.03M, False: 89.4k]
  ------------------
  199|  1.03M|        mappedChMask |= 1 << pMapInfo->pChannelMap[i];
  200|  1.03M|      }
  201|  89.4k|      if (mappedChMask != (((UINT)1 << numChannels) - 1)) {
  ------------------
  |  Branch (201:11): [True: 0, False: 89.4k]
  ------------------
  202|      0|        result = 0;
  203|      0|      }
  204|  89.4k|    } 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|  89.4k|  }
  221|       |
  222|  89.4k|  return result;
  223|  89.4k|}

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

